# Custom footnotes in the authblk package

I would like to create a special footnote such that more than one location is mapped to the same footnote. This is covered elsewhere (Reference different places to the same footnote), but I am running in to trouble as I'm trying to use it in the authors list with the authblk package (the custom footnote is \CoAuthorMark). Other things may be wrong with this, but I haven't gotten to the point of experimentation yet.

Alternatively, is there a way to do this with \thanks?

\documentclass[letterpaper]{article}
\usepackage[affil-it]{authblk}

\usepackage[english]{babel}
\usepackage{blindtext}

\title{An efficient method for exploiting midichlorians in weak life-forms}

\newcounter{CoAuthor}

% The order may be wrong on these next two:
\setcounter{CoAuthor}{\value{footnote}}
\edef\CoAuthorMark{\footnotemark[\value{CoAuthor}]}

\author[2,3]{Darth Sidious\CoAuthorMark%

\affil[1]{Office of the Supreme Commander of the Imperial Forces, The Galactic Empire, The Bridge, Executor}
\affil[2]{Order of the Sith Lords, LiMerge Power Building, The Works, Coruscant}
\affil[3]{Office of the Emperor of the Galaxy, The Galactic Empire, 1000 Imperial Palace, 2 Main St. Coruscant}

\date{\today}

\begin{document}

\maketitle
\blindtext
\end{document}


The error message I get with the above is:

! Missing \endcsname inserted.
\c@CoAuthor
l.16 ...AuthorMark{\footnotemark[\value{CoAuthor}]
}


But I usually get something like this:

! Use of \\author doesn't match its definition.


The new counter doesn't seem necessary, as you just use the current value of footnote; also \footnotemark should be protected in the \edef and \value{CoAuthor} should be \arabic{CoAuthor}, because \value{CoAuthor} doesn't expand to the number, but only to the internal name of the counter.

Actually, you don't need \edef at all.

Finally, \CoAuthorMark must be protected in \author.

\documentclass[letterpaper]{article}
\usepackage[affil-it]{authblk}

\usepackage[english]{babel}
\usepackage{blindtext}

\title{An efficient method for exploiting midichlorians in weak life-forms}

% The order may be wrong on these next two:
\newcommand\CoAuthorMark{\footnotemark[\arabic{footnote}]} % get the current value
\author[2,3]{Darth Sidious\protect\CoAuthorMark

\affil[1]{%
Office of the Supreme Commander of the Imperial Forces,
The Galactic Empire, The Bridge, Executor}
\affil[2]{%
Order of the Sith Lords, LiMerge Power Building, The Works, Coruscant}
\affil[3]{%
Office of the Emperor of the Galaxy, The Galactic Empire,
1000 Imperial Palace, 2 Main St. Coruscant}

\date{\today}

\begin{document}

\maketitle
\blindtext
\end{document}


• @bbarker Well, I don't know what you want, because you didn't explain it. Apr 24, 2014 at 22:49
• Sorry that it wasn't clear. I'd expect to see: Darth Vader*1,2 and Darth Sidious*†2,3 Apr 24, 2014 at 22:56
• @bbarker The counter is not set when \author is processed, but only when the author field is used by \maketitle, that's the problem. Apr 25, 2014 at 17:15
• Got it, if I use \protect\setcounter... inside the \author command, it will work. Apr 25, 2014 at 17:25
• Thanks. How would someone indicate the corresponding author when using the authblk package and the titlepage option? May 16, 2016 at 8:06