Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footnote inside a figure caption, with pdf output #1506

Closed
antoine-gallix opened this issue Aug 9, 2014 · 3 comments
Closed

Footnote inside a figure caption, with pdf output #1506

antoine-gallix opened this issue Aug 9, 2014 · 3 comments

Comments

@antoine-gallix
Copy link

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
Copy link
Collaborator

Footnotes in captions are very difficult to get correct in LaTeX. I suggest
you try to avoid placing footnotes in captions - you can try putting it
directly after the figure or where maybe where you refer to the figure
would be appropiate.

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=ftncapt

On Sat, Aug 9, 2014 at 5:28 PM, antoine-gallix [email protected]
wrote:

Footnote seems not to work when inside a caption.

input file:
---input.mmd
[image: picture1 caption] http://image.png

command:
pandoc input.mmd -o output.pdf

error message:
pandoc: Error producing PDF from TeX source.
! Argument of \Hy@tempa has an extra }.

\par
l.74 ...\footnote{note about the caption} caption}


Reply to this email directly or view it on GitHub
#1506.

Footnotes

  1. note about the caption

@antoine-gallix
Copy link
Author

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

@jgm
Copy link
Owner

jgm commented Aug 9, 2014

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 added a commit that referenced this issue Nov 1, 2015
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.
@jgm jgm closed this as completed in 411a253 Nov 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants