I used a variant of Mateo's solution. I'm using this in Rmd files written in github flavored markdown (gfm) for a Jekyll powered website but the same Rmd files are being used to produce pdfs in various contexts. The Rmd files are math heavy and the math is displayed with MathJax on the website. So I needed a solution that works with gfm that is processed via Jekyll, works with pandoc->pdflatex, and is compatible with MathJax.
snippet from Rmd file (which is gfm)
Here is a paragraph with an footnote <span id="a1">[[1]](#f1)</span>.
Footnotes
=========
1. <span id="f1"></span> This is a footnote. [$\hookleftarrow$](#a1)
$\hookleftarrow$
is latex, which works for me since I always have MathJax enabled. I use that to make sure it shows up correctly in my pdfs. I put my footnotes in square brackets because superscript is confusing if I am putting a footnote on some inline math.
Here it is in action: https://eeholmes.github.io/posts/2016-5-18-FI-recursion-1/
These notes can be put anywhere in the Rmd. I am putting in a list at the end so they are technically endnotes.
[^footnote]
syntax, even before it got officially added to the documentation – Rafferty