How to refer to the same footnote twice in R markdown

As the title says. Is there any way to refer to the same footnote twice (or more) without creating duplicate footnotes? For example, this R markdown code creates duplicate footnotes with the same content. I want to merge it into one. How can I do it?

First part of the document^[same footnote]

Second part of the document^[same footnote]

You can write footnotes different ways, one of them is to number them which ease the reference

See Pandoc - Pandoc User’s Guide

This is what the visual editor uses. See Visual R Markdown

Tried this one, but it still creates duplicate footnotes. Below is an example R markdown script for illustration.

---
title: "Title"
output: html_document
---

First part[^1]

Second part[^1]

Third part[^2]

Fourth part[^2]

[^1]: first footnote

[^2]: second footnote

Oh ok. It does not work as I expected.

It seems it is expected and Pandoc works this way since a long time.

There is a new issue you can follow if this evolves in the future

Rmarkdown currently depends on Pandoc for this.

Thank you for pointing me to that issue. Hope this is fixed soon.

Hello junghoonshin,
I face the same problem and an internet search brought me here. In the meantime, I may have found a small solution to your issue if you have not already resolved it:

(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

It works to a degree, but will not hyperlink the footnote numbers to the footnote text (like it would normally) - but if you have only a few footnote numbers for the same text, does it really matter.

Hope that helps - and if you found a better way, let us know.