Skip to content

Footnote inside a figure caption, with pdf output #1506

Closed
antoine-gallix opened this Issue · 3 comments

3 participants

@antoine-gallix

Footnote seems not to work when inside a caption.

input file:input.mmd

![picture[^note] caption][picture]

[picture]: image.png

[^note]: note about the caption

command:

pandoc input.mmd -o output.pdf

error message:

pandoc: Error producing PDF from TeX source.
! Argument of \Hy@tempa has an extra }.
<inserted text> 
                \par 
l.74 ...\footnote{note about the caption} caption}
@mpickering
Collaborator
@antoine-gallix

Ok, then if it's a common latex problem, should I close the issue or leave it like this?

@jgm
Owner
jgm commented

It might be worth fiddling to see if we can get something like this latex output when a caption includes a footnote:

\begin{figure}
...
\caption[caption without footnote, for lof]{caption with footnote replaced by\footnotemark}
\end{figure}
\footnotetext{The footnote}
@jgm jgm added a commit that referenced this issue
@jgm LaTeX writer: avoid footnotes in list of figures.
Footnotes aren't allowed in the list of figures.  This
patch causes footnotes to be stripped from captions when
entered into the list of figures.

Footnotes still don't actually WORK in captions in latex/pdf,
but at least an error is no longer raised.

See #1506.
c4ea642
@jgm jgm referenced this issue in jgm/pandoc-citeproc
Closed

image caption not shown if followed by footnote #187

@jgm jgm closed this in 411a253
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.