I want to refer to an existing footnote and I'm not happy with the workaround given here: http://anthony.liekens.net/index.php/LaTeX/MultipleFootnoteReferences
I found that I can put a \label
inside a footnote and then get the footnote-number by a \ref
to this label.
I'm not sure what would be the best way to reference to a footnote, but I would have formatted it like a normal footnote number (superscript). I tried to write \footnotemark[\ref{LabelName}]
, but that produces an error.
Can anybody help?
Is there any reason why I should not do it like that? (any risk of failure?)
\documentclass[11pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
First footnote\footnote{\label{Firstfootnote}My first footnote}
Second footnote\footnote{Second Footnote}
Third footnote where I want to refer to first footnote\footnote{I now want to refer to the first footnote by \ref{Firstfootnote}, but I'd like to format it like \footnotemark[1], but footnotemark[ref{Firstfootnote}] produces an error}
\end{document}
—
(my) solution:
add
\usepackage{refcount}
and use \footnotemark[\getrefnumber{Firstfootnote}]
Best Answer
the problem is getting a number out of a reference; this is what the refcount package does.
so, with the package loaded, use
\footnotemark[\getrefnumber{Firstfootnote}]
or whatever.
if your aim is to have multiple references to the same footnote, the fixfoot package may help. this allows you to define fixed footnotes as a single command.
so:
\DeclareFixedFootnote{\prooflater}{This theorem will be proved later}
allows you to say\prooflater
wherever you like, and the footnote text will only appear once per page.