[Tex/LaTex] Custom footnotes in the authblk package

authblkfootnotes

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}

\author[1,2]{Darth Vader\footnote{Contributed equally.}}%

\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%
  \thanks{Electronic address: \texttt{palpatine@empire.gove}; Corresponding author}}

\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.
<to be read again>
                   \c@CoAuthor
l.16 ...AuthorMark{\footnotemark[\value{CoAuthor}]
                                                  }

But I usually get something like this:

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

Best Answer

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}

\author[1,2]{Darth Vader\footnote{Contributed equally.}}

% 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
  \thanks{Electronic address: \texttt{palpatine@empire.gove}; Corresponding author}}

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

enter image description here

Related Question