更改模板命令以允许两个从属关系

更改模板命令以允许两个从属关系

我正在关注会议模板还有一个命令\author[orgN]{First A. Author}允许包含作者姓名及其所属机构。其中一位合著者要求我添加第二个所属机构,但该命令\author[orgN, orgN+1]{First A. Author}返回的是(??)上标,而不是(1),(2)

您可以从模板中找到链接,这些是创建此类命令的函数

\newcounter{author}
\renewcommand{\author}[2][]{
   \stepcounter{author}
   \@namedef{author@\theauthor}{#2}
   \@namedef{authorlabel@\theauthor}{#1}
}

\newcounter{address}
\newcommand{\address}[2][]{
   \stepcounter{address}
   \@namedef{address@\theaddress}{#2}
   \@namedef{addresslabel@\theaddress}{#1}
}

鉴于作者及其所属机构将如此创建

% authors and affiliations
% the organization option [orgN] associates the authors with the
% proper address
\author[org1]{First A. Author}
\author[org1]{Second B. Author}
\author[org2]{Third C. Author}

% each address must have a unique identifier in the option field
\address[org1]{The University of Here, Anywhere, VA 12345, USA, http://www.here.edu}
\address[org2]{The Next Company, Neverland, WA 54321, USA ([email protected])}

抱歉,如果这么简单的话,我使用 LaTeX 很随意,通常遵循模板,没有太大问题。

答案1

我定义了命令\addressxtra来容纳两个地址。

\addressxtra{< unique identifier>}
{<first address>} % 
{<second address>}% 

喜欢

\addressxtra{org2}
{The Next Company, Neverland, WA 54321, USA ([email protected])} % first address
{Also: Department of Chemistry, Unknown University, Unknown Town}% second address

有两种口味:

(1)

\makeatletter
\newcommand{\addressxtra}[3]{%  first option <<<<<<<<<<<<<
    \address[#1]{#2\par ${}^{(\thec@address)}$\,#3}
    }
\makeatother

A

或者(2)

\newcommand{\addressxtra}[3]{% second option <<<<<<<<<<
    \address[#1]{#2\par\phantom{(2)} #3}
}

输出如下:

C

将任何定义放在序言中。

\title{Template for AP-S/USNC-URSI Two-Page Summary }

\author[org1]{First A. Author}
\author[org1]{Second B. Author}
\author[org2]{Third C. Author}

\address[org1]{The University of Here, Anywhere, VA 12345, USA, http://www.here.edu}


%% **************************************** added
%\makeatletter
%\newcommand{\addressxtra}[3]{%  first option <<<<<<<<<<<<<
%   \address[#1]{#2\par ${}^{(\thec@address)}$\,#3}
%   }
%\makeatother

\newcommand{\addressxtra}[3]{% second option <<<<<<<<<<
    \address[#1]{#2\par\phantom{(2)} #3}
}

\addressxtra{org2}
{The Next Company, Neverland, WA 54321, USA ([email protected])} % first address
{Also: Department of Chemistry, Unknown University, Unknown Town}% second address
%% **************************************** 

\begin{document}

\newmaketitle

答案2

我喜欢 Simon Dispa 的想法,但后来我意识到有一个非常简单的解决方法。

可以简单地执行\author[orgN]{First. A. Author$^{(N+1)}}$以下操作:

在此处输入图片描述

然后只需进行相应的重新安排,因为如果您添加一个地址,即使未在\author命令中使用,它也会显示出来。

相关内容