How to reference two times to a single footnote in rmarkdown?
Asked Answered
S

3

36

I try to reference to a single footnote in a few places in the text. However, with the code below, I've got two footnotes with the same content.

---
title: "My document"
output: html_document
---

One part of the text [^1].

Two pages later [^1].

[^1]: My footnote

enter image description here

Is it possible to reference more than once to a specific footnote using rmarkdown?

Severalty answered 8/9, 2017 at 13:22 Comment(2)
See github.com/jgm/pandoc/issues/1603, a general solution does not seem to exist yet. But I guess (hope) there are solution specific to HTML document.Feline
If you are open to knitr and external packages like fixfoot see this reference-different-places-to-the-same-footnoteHuntingdon
W
2

I had the same problem. I used html tags which worked really well. Whatever you want as superscript just put between the <\sup> like below:

<sup> text </sup>

jan 6 2023 update: now I use quarto which is eally easy as you can just use do[^1]

[^1]footnote text

Wellappointed answered 2/4, 2022 at 16:8 Comment(0)
G
1

My workaround here is to just do it manually using inline latex mathmode (e.g, \(^2\) ).. Annoying, but even if they had a solution, you'd have to remember the citation number anyways...

Goodman answered 7/12, 2019 at 20:13 Comment(0)
A
0

I would suggest you to go with latex solution if you do not have many footnotes per page. By latex solution I mean:

(in Markdown, use Latex to superscript the footnote number)

First part$^1$

(and the next one)

Second part$^2$

(at the end of your text add *** to create a line across the document)

(under the line, add the text below:)

1, 2: Text for your footnote

On the other hand, there is a thread created on this specific R-Markdown bug. Maybe take a look at it, in this link.

Hope I helped somehow.

Ackler answered 9/5, 2022 at 10:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.