# How can I use \footnotemark with a \ref argument?

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}]

-
what's the error? –  Walter May 9 at 14:23
good question - honestly I don't remember, as this was 4 years ago... I tried to reproduce it by adding the following line at the end of the example document above: now I'll try to produce the error: \footnotemark{\ref{Firstfootnote}} and I get a strange result in the PDF with first a "4" (in superscript like a foonote and then the "1" (normal size)). For your reference: I've just used pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) which might be quite outdated. –  Martin May 9 at 20:07
Without the refcount package, there is the following error: ./Footnotemark_2014.tex:17: Missing number, treated as zero. <to be read again> { l.17 ...ootnotemark[\getrefnumber{Firstfootnote}]} in pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) –  Martin May 10 at 7:03
I can reproduce it with the following source code: \documentclass[11pt]{scrartcl} \usepackage[ngerman]{babel} \usepackage[latin1]{inputenc} % \usepackage{refcount} \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[\getrefnumber{Firstfootnote}]} \end{document} –  Martin May 10 at 7:04

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.

-
thanks! I'm happy with the refcount package. –  Martin Apr 28 '11 at 18:56

\footnotemark uses \textsuperscript internally, so I suggest to define a new macro (say, \fnref) that will typeset the reference given in its argument number as superscript.

\documentclass[11pt]{scrartcl}

\newcommand*{\fnref}[1]{\textsuperscript{\ref{#1}}}

\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, so I use \fnref{Firstfootnote}}

\end{document}

-
Thanks for your suggestion! I also thought about that, but just for reasons of formatting consistently, I'd prefer to use the footnotemark command (together with the refcount package, as that should make sure that if somebody should change the way footnotes are displayed (e. g. with a closing round bracket like "3)", this footnote would still be displayed correctly. –  Martin Apr 28 '11 at 18:49
thanks for reminding me. I did not forget it and I promise you, I'll get back to those questions later (in some days, maybe 2 weeks), but I'm under very high pressure at the moment and some of them require more testing and trying before I can decide what's the best solution for me. (I know there are also some answers from you.) I'm working nearly day and night to get on with my thesis and when the first draft is ready for my supervisor, I'll have more time for the "cosmetic" and more difficult LaTeX questions. Should I add this comment to the other questions as well? –  Martin Apr 28 '11 at 19:06