我想创建一个特殊的脚注,以便将多个位置映射到同一个脚注。这在其他地方有介绍(不同的地方引用同一个脚注),但我在尝试将其与 authblk 包一起用于作者列表中时遇到了麻烦(自定义脚注是\CoAuthorMark
)。其他方面可能存在问题,但我还没有进行实验。
或者,有没有办法用 \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{[email protected]}; 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}
我收到的上述错误消息是:
! Missing \endcsname inserted.
<to be read again>
\c@CoAuthor
l.16 ...AuthorMark{\footnotemark[\value{CoAuthor}]
}
但我通常会得到这样的信息:
! Use of \\author doesn't match its definition.
答案1
新的计数器似乎没有必要,因为您只使用 的当前值footnote
;也\footnotemark
应该在 中受到保护,\edef
并且\value{CoAuthor}
应该是\arabic{CoAuthor}
,因为\value{CoAuthor}
不会扩展到数字,而只会扩展到计数器的内部名称。
\edef
事实上,你根本不需要。
最后,\CoAuthorMark
必须加以保护\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{[email protected]}; 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}