X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Ftex.c;h=c5591011f8e81ea99b57d78897c0cf5f63fa8648;hb=d55fbbb4fda554d02c93dd46c6fa66128060e6f0;hp=e832db7d2acf34061af4a58db22bcd02b4fe5d0c;hpb=f5ad0a140f581d9f72e2c498d294af76032b1a9c;p=pspp diff --git a/src/output/tex.c b/src/output/tex.c index e832db7d2a..c5591011f8 100644 --- a/src/output/tex.c +++ b/src/output/tex.c @@ -389,16 +389,21 @@ tex_put_footnote_markers (struct tex_driver *tex, const size_t *footnote_indexes, size_t n_footnotes) { - if (n_footnotes > 0) - shipout (&tex->token_list, "$^{"); + size_t n_visible = 0; for (size_t i = 0; i < n_footnotes; i++) { const struct pivot_footnote *f = pt->footnotes[footnote_indexes[i]]; - char *marker = pivot_footnote_marker_string (f, pt); - tex_escape_string (tex, marker, true); - free (marker); + if (f->show) + { + if (!n_visible++) + shipout (&tex->token_list, "$^{"); + + char *marker = pivot_footnote_marker_string (f, pt); + tex_escape_string (tex, marker, true); + free (marker); + } } - if (n_footnotes > 0) + if (n_visible) shipout (&tex->token_list, "}$"); }