Open mcanouil opened 1 year ago
I think this is a Pandoc limitation for now: https://github.com/jgm/pandoc/issues/1603
And also related to LaTeX produced for PDF Output
Pandoc create both footnotes
> quarto pandoc test2.qmd --to html
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non
risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec,
ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula
massa, varius a, semper congue, euismod non, mi.<a href="#fn1"
class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non
risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec,
ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula
massa, varius a, semper congue, euismod non, mi.<a href="#fn2"
class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a></p>
<aside id="footnotes" class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
<li id="fn1"><p>This is the first footnote.<a href="#fnref1"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2"><p>This is the first footnote.<a href="#fnref2"
class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</aside>
> quarto pandoc test2.qmd --to latex
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus.
Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies
sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius
a, semper congue, euismod non, mi.\footnote{This is the first footnote.}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus.
Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies
sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius
a, semper congue, euismod non, mi.\footnote{This is the first footnote.}
We get two \footnote
call which will lead to 2 footnotes in PDF. It does not seem as straightforward to do it in LaTeX. Some context: https://texfaq.org/FAQ-repfootnote
Probably happens in other formats too, like for Markdown as described in https://github.com/jgm/pandoc/issues/1603
I did not thought of trying that directly in Pandoc. Let's go for upstream.
Maybe a workaround, would be to write a small filter to "reformat" footnotes and "remove" duplicates.
Maybe a workaround, would be to write a small filter to "reformat" footnotes and "remove" duplicates.
I don't know if we want to start patching some Pandoc limitation like this, but if easy enough we could try. It is surprising that Pandoc doesn't.
@tarleb is there any big limitation that would prevent not having duplicated references ? Is this something we should try doing here ?
The big issue is that this will require changes in pandoc's internal document representation; any info about multiple markers for the same footnote is already lost when pandoc parses the input.
A filter might work, but I'm not sure if it would cause problems in PDF output in cases where the footnotes were supposed to be separate. This should really be fixed in pandoc.
I have this rendered
and this (in the footnotes):
even though my code is:
Now, let's try to apply this action to our initial state:
1. `active[token]`: This is true in our current state. Node 1 is active. This is called an *enabling condition*[^3].
::: {.callout-note appearance="simple"}
## Leslie Lamport
> *So, the definition of an action usually begins with its enabling condition* [^3]
:::
Bug description
When a footnote is reused, it is duplicated.
This is the case at least for
html
,pdf
, andrevealjs
.html
pdf
For instance the expected results would be the one that can be seen on GitHub.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.[^1]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.[^1]
[^1]: This is the first footnote.
Quarto: latest development version OS: MacOS Apple Silicon IDE: VSCode
Checklist
quarto check
so we know which version of quarto and its dependencies you're running.