{
tab_text_format (t, 0, i, TAB_LEFT, "%s.", f[i]->marker);
tab_text (t, 1, i, TAB_LEFT, f[i]->content);
+ if (f[i]->style)
+ {
+ tab_add_style (t, 0, i, f[i]->style);
+ tab_add_style (t, 1, i, f[i]->style);
+ }
}
render_pager_add_table (p, &t->table);
struct footnote *
tab_create_footnote (struct tab_table *table, size_t idx, const char *content,
- const char *marker)
+ const char *marker, struct cell_style *style)
{
struct footnote *f = pool_alloc (table->container, sizeof *f);
f->idx = idx;
f->content = pool_strdup (table->container, content);
f->marker = pool_strdup (table->container, marker);
+ f->style = style;
return f;
}
PRINTF_FORMAT (7, 8);
struct footnote *tab_create_footnote (struct tab_table *, size_t idx,
- const char *content, const char *marker);
+ const char *content, const char *marker,
+ struct cell_style *);
void tab_add_footnote (struct tab_table *, int x, int y,
const struct footnote *);
size_t idx;
char *content;
char *marker;
+ struct cell_style *style;
};
/* An item of contents within a table cell. */
{
char marker[2] = { 'a' + n_footnotes, '\0' };
struct footnote *f = tab_create_footnote (
- tab, n_footnotes, content, marker);
+ tab, n_footnotes, content, marker, NULL);
tab_add_footnote (tab, c, r, f);
n_footnotes++;
}