How to reference two times to a single footnote in rmarkdown?

4k views Asked by At

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?

3

There are 3 answers

0
TheKrab On

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.

0
alejandro_hagan On

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

0
bboppins On

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...