[Tex/LaTex] How to make multiple references to the same footnote

footnotesmemoir

I am using the memoir class.

In some parts of the page, there are multiple spots that need to be annotated with the same footnote.

Lorem ipsum dolor[1] sit amet, consectetur adipiscing elit[2], sed do eiusmod tempor incididunt ut labore et dolore[1] magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor[1] in reprehenderit in voluptate velit esse cillum dolore[1] eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


1: See Appendix on dolors.

2: See Appendix on elites.

Currently, I am manually specifying the footnotes, such as ipsum dolor\footnote[1]{See \emph{Appendix on dolors}.} sit amet. Then I have to manually add the other footnote marks: labore et dolore\textsuperscript{1} magna aliqua

But I don't want to manually keep track of what number is what footnote. They get moved around a lot and I keep forgetting. Besides, I shouldn't have to manually keep track of the numbering, Latex should do it for me.

What command can I use to reference the same footnote multiple times, so that the footnotes are automatically numbered?

Best Answer

Using Andrews MWE and adding some Heiko magic:

\documentclass{memoir}
\usepackage[height=30mm]{geometry}%
\usepackage{refcount}
\begin{document}
  One footnote\footnote{A wonderful footnote!\label{foot}}
  and a second one\footnote{A less wonderful footnote!\label{toe}}.

  The last footnote, \ref{foot}, is really nice. I like
  footnote~\ref{foot} more than footnote \ref{toe}. Here is another
  footnote with the first footnote marker\footnotemark[\getrefnumber{foot}]
  and a second footnote with the second foot note
  marker\footnotemark[\getrefnumber{toe}].

\end{document}

The point is that \ref{...} gives number + \hbox{}, thus \footnotemark does not like it as it expects a number.

The solution probably fails if something other than numbers are used to mark footnotes.

Note how the \label have been added inside the footnotes.

Related Question