Skip to content
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

HTML footnotes and margin references do not work #78

Closed
Selbosh opened this issue Apr 17, 2020 · 6 comments
Closed

HTML footnotes and margin references do not work #78

Selbosh opened this issue Apr 17, 2020 · 6 comments

Comments

@Selbosh
Copy link

Selbosh commented Apr 17, 2020

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.

@grimbough
Copy link
Contributor

This sounds like the same issue addressed in #76. Does that fix it for you?

@Selbosh
Copy link
Author

Selbosh commented May 1, 2020

Yes, it seems to fix the problem with footnotes, though not with margin references (they still appear at the end).

@yihui yihui closed this as completed in 964117a May 7, 2020
@yihui
Copy link
Member

yihui commented May 7, 2020

Should be fixed now. Thanks for the report!

@Selbosh
Copy link
Author

Selbosh commented May 8, 2020

Thanks. Just tried it and can confirm that footnotes and margin references both now appear to be working as expected.

@yihui
Copy link
Member

yihui commented May 8, 2020

Great! And the new version is on CRAN now.

@github-actions
Copy link

github-actions bot commented Dec 4, 2020

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants