HTML footnotes and margin references do not work
Selbosh opened this issue · 6 comments
When writing a document with output tufte_html
, margin references do not work---they are displayed at the end of the document.
Furthermore, Markdown footnotes are completely broken; not only do they not appear in the margin, they actually don't appear anywhere in the resulting HTML source. A super-scripted number appears, with a link to #fn1
, but the footnote text is missing from the rendered document.
On the other hand, tufte::margin_note()
s work as expected.
I am using
- tufte 0.5.1
- pandoc 2.9.2.1
- pandoc-citeproc 0.17
- R x64 3.6.3
- Windows 10
Minimal example
---
title: Tufte HTML document
output:
tufte::tufte_html:
margin_references: yes
references:
- id: bar
author:
- name:
family: Bar
given: Foo
issued:
year: 2020
title: Hello, world!
link-citations: yes
---
Footnotes[^ftnt] and margin references [@bar] do not appear to work in this document.
[^ftnt]: This is a footnote.
Resulting HTML <body>
output
Notice that the "This is a footnote" text doesn't appear anywhere, and the element with id fn1
is nowhere to be found.
<h1 class="title toc-ignore">Tufte HTML document</h1>
<p>Footnotes<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a> and margin references <span class="citation">(Bar <a href="#ref-bar" role="doc-biblioref">2020</a>)</span> do not appear to work in this document.</p>
<div id="refs" class="references hanging-indent">
<div id="ref-bar">
<p>Bar, Foo. 2020. “Hello, World!”</p>
</div>
</div>
The issue is the same when using an external bibliography file, rather than the inline reference in the example above. And bookdown::tufte_html2
produces the same result.
Yes, it seems to fix the problem with footnotes, though not with margin references (they still appear at the end).
Should be fixed now. Thanks for the report!
Thanks. Just tried it and can confirm that footnotes and margin references both now appear to be working as expected.
Great! And the new version is on CRAN now.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.