9

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.
bbarker
  • 1,177

1 Answers1

7

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

egreg
  • 1,121,712
  • It seems that only the dagger (from \thanks) is typeset for the second author. – bbarker Apr 24 '14 at 22:35
  • 1
    @bbarker Well, I don't know what you want, because you didn't explain it. – egreg Apr 24 '14 at 22:49
  • 1
    Sorry that it wasn't clear. I'd expect to see: Darth Vader1,2 and Darth Sidious†2,3 – bbarker Apr 24 '14 at 22:56
  • @bbarker Is it good, now? – egreg Apr 24 '14 at 23:03
  • Yes! I need to double check, but it seems my main mistake (at least at some point in trying) was that I was not using \arabic. – bbarker Apr 24 '14 at 23:05
  • Actually, both \value and \arabic seemed to work in this context. My problem seems to stem from how I used the new counter. I realize isn't needed for this particular example. But let's say you increment footnote one or more times before wanting to use the old symbol ('*' in this example). In that case, it seems useful to somehow save footnote to some other counter. But when I try this using e.g. \setcounter{CoAuthor}{\value{footnote}}, no symbol is displayed where the following command is called: \newcommand\CoAuthorMark{\footnotemark[\value{CoAuthor}]}. (I tried \arabic too). – bbarker Apr 25 '14 at 16:24
  • 2
    @bbarker The counter is not set when \author is processed, but only when the author field is used by \maketitle, that's the problem. – egreg Apr 25 '14 at 17:15
  • 1
    Got it, if I use \protect\setcounter... inside the \author command, it will work. – bbarker Apr 25 '14 at 17:25
  • @littleO The titlepage option changes the meaning of \maketitle – egreg May 16 '16 at 07:45
  • 1
    Thanks. How would someone indicate the corresponding author when using the authblk package and the titlepage option? – littleO May 16 '16 at 08:06
  • 1
    @littleO That's a whole new question – egreg May 16 '16 at 08:11
  • 1
    I just asked it as a new question, if you have a chance to answer it'd help a lot. Thanks. – littleO May 16 '16 at 08:19