pandoc
pandoc copied to clipboard
Using captions on math figures (LaTeX)
Describe the bug Using the Captions package in LaTeX, captions may be added to math figures using the folloing kinds of syntax:
\[ F9X=x\int_{t=0}^\infty g(x) dx \]
\captionof{figure}{Equation one}
\begin{figure}
\[ F9X=x\int_{t=0}^\infty g(x) dx \]
\caption{Equation three}
\end{figure}
PanDoc discards this information completely:
Which in other utilities is rendered below the figure in a PDF (source: OverLeaf):
Using a caption here is very useful in PDF, and could be used as alt text for MarkDown and HTML instead of just the equation in LaTeX as is seen now.
- PanDoc 2.5 for Linux
This might have to wait until we have native figure elements in pandoc's AST: https://github.com/jgm/pandoc/issues/3177
btw. if you're going from LaTeX to PDF, no need to use pandoc, just use pdflatex
directly...
I'm actually looking at LaTeX -> ePub/HTML, but Kindle support for MathML is terrible. In any case, the loss of this caption information is not great.