You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the (closed) issues #1506, #4683, and #5367, I would have guessed that most, if not all issues connected with footnotes in image and table captions and latex output had been fixed.
However, when using a citation in an image caption with a footnote CSL style such as chicago-fullnote-bibliography.csl, and latex/pdf as a target format, I found that the footnote mark inside the caption is present in the output while the complete footnote text is missing.
I also found that normal footnotes inside image captions show the same effect.
When switching to html output, the footnote text is rendered as expected.
Surprisingly, both normal and citation footnotes are rendered as expected in latex/pdf if the link to an actual image file is omitted (see the example below).
(As a side note: A warning “replacing image with description” is generated if no actual image file is indicated, but the alt text is not rendered at all, though this might be a good idea ...)
Example (processed with the latest dev versions of pandoc & pandoc-citeproc):
pandoc --filter pandoc-citeproc -o test.pdf << EOT
# Example: Footnotes
Blah blah blah.
![Image, with link to image file, and footnote[^1]](https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Leonhard_Euler.jpg/220px-Leonhard_Euler.jpg "DESCRIPTION OF FIRST IMAGE"){width=20mm}
Blah blah blah.
![Image, with alt text only, and footnote[^1]]("DESCRIPTION OF FIRST IMAGE"){width=20mm}
# Example: Citations
Blah blah blah.
![Image, with link to image file, and citation[@item1]](https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Leonhard_Euler.jpg/220px-Leonhard_Euler.jpg "DESCRIPTION OF FIRST IMAGE"){width=20mm}
Blah blah blah.
![Image, with alt text only, and citation[@item1]]("DESCRIPTION OF FIRST IMAGE"){width=20mm}
[^1]: Image caption footnote.
---
csl: chicago-fullnote-bibliography.csl
reference-section-title: References
references:
- id: item1
type: article-journal
title: A paper
author:
- family: Doe
given: John
issued:
- year: 2019
...
EOT
Actual output:
Expected:
footnote text for footnotes 1 and 3
Another puzzling detail is that the latex output from this example (replacing -o test.pdf by -t latex -o test.tex, output shown below) does not contain a single occurrence of \footnotetext, which makes it unclear where the correct text for footnotes 2 and 4 in the pdf above even comes from.
\hypertarget{example-footnotes}{%
\section{Example: Footnotes}\label{example-footnotes}}
Blah blah blah.
\begin{figure}
\centering
\includegraphics[width=20mm,height=\textheight]{https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Leonhard_Euler.jpg/220px-Leonhard_Euler.jpg}
\caption[Image, with link to image file, and footnote]{Image, with link
to image file, and footnote\footnotemark{}}
\end{figure}
Blah blah blah.
\begin{figure}
\centering
\includegraphics[width=20mm,height=\textheight]{"DESCRIPTION OF FIRST IMAGE"}
\caption[Image, with alt text only, and footnote]{Image, with alt text
only, and footnote\footnotemark{}}
\end{figure}
\hypertarget{example-citations}{%
\section{Example: Citations}\label{example-citations}}
Blah blah blah.
\begin{figure}
\centering
\includegraphics[width=20mm,height=\textheight]{https://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Leonhard_Euler.jpg/220px-Leonhard_Euler.jpg}
\caption[Image, with link to image file, and citation]{Image, with link
to image file, and citation\footnotemark{}}
\end{figure}
Blah blah blah.
\begin{figure}
\centering
\includegraphics[width=20mm,height=\textheight]{"DESCRIPTION OF FIRST IMAGE"}
\caption[Image, with alt text only, and citation]{Image, with alt text
only, and citation\footnotemark{}}
\end{figure}
\hypertarget{bibliography}{%
\section*{References}\label{bibliography}}
\addcontentsline{toc}{section}{References}
\hypertarget{refs}{}
\leavevmode\hypertarget{ref-item1}{}%
Doe, John. ``A Paper,'' 2019.
The text was updated successfully, but these errors were encountered:
That example is borrowed from #4683. There is a superscript in the caption, but no footnote text. I found the same problem with beamer. This had not been a problem until I upgraded to 2.7.2. I think I'd been using 2.5.
jgm
transferred this issue from jgm/pandoc-citeproc
May 1, 2019
So it appears that this is really a pandoc issue, not pandoc-citeproc specific.
Apparently in fixing #4683 we fixed the case that didn't work before but broke the case that DID work before!
Based on the (closed) issues #1506, #4683, and #5367, I would have guessed that most, if not all issues connected with footnotes in image and table captions and latex output had been fixed.
However, when using a citation in an image caption with a footnote CSL style such as
chicago-fullnote-bibliography.csl
, and latex/pdf as a target format, I found that the footnote mark inside the caption is present in the output while the complete footnote text is missing.I also found that normal footnotes inside image captions show the same effect.
When switching to html output, the footnote text is rendered as expected.
Surprisingly, both normal and citation footnotes are rendered as expected in latex/pdf if the link to an actual image file is omitted (see the example below).
(As a side note: A warning “replacing image with description” is generated if no actual image file is indicated, but the alt text is not rendered at all, though this might be a good idea ...)
Example (processed with the latest dev versions of pandoc & pandoc-citeproc):
Actual output:
Expected:
footnote text for footnotes 1 and 3
Another puzzling detail is that the latex output from this example (replacing
-o test.pdf
by-t latex -o test.tex
, output shown below) does not contain a single occurrence of\footnotetext
, which makes it unclear where the correct text for footnotes 2 and 4 in the pdf above even comes from.The text was updated successfully, but these errors were encountered: