static void
tex_put_footnote_markers (struct tex_driver *tex,
- struct footnote **footnotes,
+ struct pivot_footnote **footnotes,
size_t n_footnotes)
{
if (n_footnotes > 0)
shipout (&tex->token_list, "$^{");
for (size_t i = 0; i < n_footnotes; i++)
{
- const struct footnote *f = footnotes[i];
-
- tex_escape_string (tex, f->marker, true);
+ char *marker = pivot_value_to_string (footnotes[i]->marker,
+ SETTINGS_VALUE_SHOW_DEFAULT,
+ SETTINGS_VALUE_SHOW_DEFAULT);
+ tex_escape_string (tex, marker, true);
+ free (marker);
}
if (n_footnotes > 0)
shipout (&tex->token_list, "}$");
/* Tables are rendered in TeX with the \halign command.
This is described in the TeXbook Ch. 22 */
struct table *title, *layers, *body, *caption;
- struct footnote **footnotes;
+ struct pivot_footnote **footnotes;
size_t n_footnotes;
pivot_output (pt, layer_indexes, &title, &layers, &body,
&caption, NULL, &footnotes, &n_footnotes);
for (int i = 0; i < n_footnotes; ++i)
{
+ char *marker = pivot_value_to_string (footnotes[i]->marker,
+ SETTINGS_VALUE_SHOW_DEFAULT,
+ SETTINGS_VALUE_SHOW_DEFAULT);
+ char *content = pivot_value_to_string (footnotes[i]->content,
+ SETTINGS_VALUE_SHOW_DEFAULT,
+ SETTINGS_VALUE_SHOW_DEFAULT);
+
shipout (&tex->token_list, "$^{");
- tex_escape_string (tex, footnotes[i]->marker, false);
+ tex_escape_string (tex, marker, false);
shipout (&tex->token_list, "}$");
- tex_escape_string (tex, footnotes[i]->content, false);
+ tex_escape_string (tex, content, false);
+
+ free (content);
+ free (marker);
}
shipout (&tex->token_list, "}\n\\vskip 3ex\n\n");