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
First off, this is about an edge case in LaTeX.
I fear that solving this edge case in Pandoc will require some serious work, so I don't expect this to be fixed soon.
This issue is therefor more of a tracking issue, maybe accumulating further workarounds in the future.
In the meantime, it may be appropriate for Pandoc to issue a warning/error message in these cases.
The LaTeX writer currently inlines all footnotes using \footnote{<footnotetext}.
This doesn't work correctly in \item[<text>] declarations though.
In these cases only, the footnote mark will be rendered, not the footnote itself.
An input Markdown document of
Header[^fn]:
: Some other text.
[^fn]: A footnote.
produces the following LaTeX:
\begin{description}
\tightlist\item[Header\footnote{A footnote.}:]
Some other text.
\end{description}
Which produces the following PDF output:
Workarounds/Solutions
A discussion of solutions can be found on StackExchange.
The more complete fixes require additional packages and are really not trivial to solve.
A simple workaround for single footnotes that are only used once (referencing footnotes multiple times isn't supported in Pandoc anyway), is to use \footnotemark{} and \footnotetext{<text>} as in the following example:
Header\footnotemark{}:
: \footnotetext{A footnote}
Some other text.
which will render to the following LaTeX:
\begin{description}
\item[Header\footnotemark{}:]
\footnotetext{A footnote}
Some other text.
\end{description}
This obviously won't work for multiple footnotes in the same heading.
If this hacky solution is acceptable, I'd probably be able to create a pull request for this behavior.
The text was updated successfully, but these errors were encountered:
First off, this is about an edge case in LaTeX.
I fear that solving this edge case in Pandoc will require some serious work, so I don't expect this to be fixed soon.
This issue is therefor more of a tracking issue, maybe accumulating further workarounds in the future.
In the meantime, it may be appropriate for Pandoc to issue a warning/error message in these cases.
Go to workaround section
The LaTeX writer currently inlines all footnotes using
\footnote{<footnotetext}
.This doesn't work correctly in
\item[<text>]
declarations though.In these cases only, the footnote mark will be rendered, not the footnote itself.
An input Markdown document of
produces the following LaTeX:
Which produces the following PDF output:
Workarounds/Solutions
A discussion of solutions can be found on StackExchange.
The more complete fixes require additional packages and are really not trivial to solve.
A simple workaround for single footnotes that are only used once (referencing footnotes multiple times isn't supported in Pandoc anyway), is to use
\footnotemark{}
and\footnotetext{<text>}
as in the following example:which will render to the following LaTeX:
This obviously won't work for multiple footnotes in the same heading.
If this hacky solution is acceptable, I'd probably be able to create a pull request for this behavior.
The text was updated successfully, but these errors were encountered: