-
Notifications
You must be signed in to change notification settings - Fork 176
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
Implement footnotes for LaTeX output #314
Comments
HTML (if the footnotes extension is enabled): <p>This is a test<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup></p>
<section class="footnotes" data-footnotes>
<ol>
<li id="fn-1">
<p>Nothing special. <a href="#fnref-1" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a></p>
</li>
</ol>
</section> LaTeX (not implemented): This is a test\footnote{Nothing special.} |
#362 have a solution and I have tested it that it works except that it could not handle
---
title: "footnote"
---
- A footnote[^1]
- A duplicated[^1]
- Another one[^2]
- A non-numeric[^tim]
[^1]: Footnote 1
[^2]: Footnote 2 with a line
break
[^tim]: Time is essential Using the command: \begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
\subsection{title: \textquotedbl{}footnote\textquotedbl{}}
\begin{itemize}
\item A footnote\footnote{1}
\item A duplicated\footnote{1}
\item Another one\footnote{2}
\item A non-numeric\footnote{3}
\end{itemize}
\footnote{1Footnote 1
}\footnote{2Footnote 2 with a line
break
}\footnote{timTime is essential
} So, from your example, LaTeX expects the footnote definition is in the body text, not at the end of the document. LaTeX will automatically generate reference numbers. |
That will be a great step forward! I really wish Github could merge #362, although it appears to me that they don't pay much attention to bug reports or PRs from the community. |
Currently LaTeX output for footnotes is not implemented:
cmark-gfm/src/latex.c
Lines 447 to 449 in c32ef78
I don't have much expertise on C but I wonder if the team is interested in getting it implemented. Basically what we need to do is to add the footnote content to
\footnote{}
in the case ofCMARK_NODE_FOOTNOTE_REFERENCE
, and output nil in the case ofCMARK_NODE_FOOTNOTE_DEFINITION
.Thanks!
The text was updated successfully, but these errors were encountered: