pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
603 stars 165 forks source link

short-captions: breaks footnote in caption #65

Open matangover opened 5 years ago

matangover commented 5 years ago

When there is a footnote in a figure's (long) caption, adding a short-caption to the figure breaks the footnote (the footnote text vanishes).

tarleb commented 5 years ago

Thank you for the report. LaTeX footnotes are difficult to get right and requires some effort from the pandoc LaTeX writer to get right. We'd have to re-implement that logic in the filter.

I don't think I'll find time for that in the near future, unfortunately. Patches or pull requests are welcome, of course.

matangover commented 5 years ago

Thanks for your reply, makes total sense. IMO the best approach would be to have the filter alter only the LaTeX macro used to format the caption, like table-short-captions does. This might be better than the current approach of rendering the entire figure in the filter, which breaks footnotes and maybe other things too (and is supposedly less future proof to changes in pandoc). Unfortunately I also don't think I'll find time for working on this right now, though :(