I am trying to insert a \label
in the footnote (\thanks
) of the author's field with the following code
\author{Gopal \thanks{XYZ university\label{auth1}}}
However, LaTeX keeps giving the error \@xfootnotemark doesn't match its definition
.
If I remove the label, then there are no errors.
Why am I trying to use a label? Two authors have the same affiliation and I want to refer the existing affiliation for the second author. I am also using hyperref
enabled for pdf.
I tried to look up on net for this solution but could not find one. Any help would be greatly appreciated.
Best Answer
You could save the
footnote
counter and use it for the second author in the following way:The idea here is to store the
footnote
counter before reusing the affiliation, and then to restore it after you've used it so that subsequent authors receive a different (unique)\footnotemark
.Since you are using
hyperref
, using\footnotes
as well and wanting to reference them is tricky. On the one hand, the regular titling command\author
does one of two things, neither of which helps with footnotes: It typesets the contents in atabular
- a known issue that traps footnotes - and temporarily redefines the way\footnote
works (by executing\let\footnote\thanks
). On top of this, thehyperref
README suggests the downside when "re-using a\footnotemark
out of order/sequence":The example that follows works with modifying both the traditional
footnote
counter, as well ashyperref
's internalHfootnote
counter. The "nasty example" makes things work, but it remains "nasty":The definition of the title, author and date was taken from
article.cls