0

I have the following code to create specific footnotes with roman numerals:

\renewcommand{\thefootnote}{\arabic{footnote}}

\newcommand{\fixedFootnote}[2]{
\let\oldthefootnote=\thefootnote
\renewcommand{\thefootnote}{\roman{footnote}}
\footnote[#1]{#2}
\let\thefootnote=\oldthefootnote
}

It works like a charm.

PROBLEM: I can't reference it using \footnotemark. I have tried the following and all of them throw errors and do not compile (or put a 0 in the footnote):

  • \footnotemark[\value{ii}] breaks
  • \footnotemark[\roman{2}] also breaks
  • \footnotemark[ii] also breaks

How can I make \footnotemark reference my \fixedFootnote ?

EDIT: I cannot use \footnormark with a \ref because some templates, like the one I am using, break this command.

3 Answers 3

2

The problem is that \footnotemark is not taking a text argument in its optional argument (likewise \footnote) but rather a numerical argument. Internally, LaTeX takes the optional argument to \footnotemark and assigns the footnote counter to the value to the number provided and then creates a footnote mark using \thefootnote.

You talk about wanting to refer to footnotes. It's worth noting that you would use the same mechaism to referring to a footnote by number that you would for any other numbered element in the document, just being sure to put the \label inside the body of the footnote itself:

\footnote{blah blah.\label{myfootnote}}
...
see note~\ref{myfootnote}

As you noted in your self-answer, if you want the reference to be superscripted (which I would not recommend), you could write instead \textsuperscript{\ref{myfootnote}} which should give you nearly identical formatting to the normal footnote mark (which would be obtained by adding \normalfont before the \ref so that, e.g., in italicized or bold text, the footnote marker is not italicized or emboldened.

3
  • This is a valid answer. However, the problem is that some templates (like the one I'm using, elsclass) break the reference in a footnotemark. It also breaks the \textsuperspscript and the reference. Thus, I'm not accepting it because it doesn't solve my problem.
    – Carrol
    Mar 3, 2021 at 19:19
  • If you leave out information central to your problem in your question, you're unlikely to get the answer you want.
    – Don Hosek
    Mar 3, 2021 at 19:49
  • Fair enough. I did edit the question to add that piece of information.
    – Carrol
    Mar 3, 2021 at 20:05
1

Although it is not the best solution, I ended up doing:

\textsuperscript{ii}

replacing the ii by the number I wanted to reference.

0

It is maybe too late now but I'll add an answer. Since you are using two kinds of footnotes I suppose each one should have its own counter and they should be separated in the footer. If I'm correct, then manyfoot is what you want. It provides a command to define new footnotes

\DeclareNewFootnote[⟨footnote style⟩]{⟨suffix⟩}[⟨enumeration style⟩]

In an example it works like this:

\documentclass{article}
\textheight=90pt%just for the example
\usepackage{manyfoot}
\DeclareNewFootnote{R}[roman]
\begin{document}
Text\footnote{a footnote} more text\footnoteR{another footnote}

Text\footnotemark more text\footnotemarkR
\footnotetext{more footnotes} \footnotetextR{the last footnote}
\end{document}

enter image description here

In the manual you can see many more features of this package

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .