我正在使用 RevTex4-2 处理一篇文章。我想将前三位作者分组在一起,并将最后一位作者放在第二列。使用命令\collaboration
,我可以做到这一点。但是,是否可以先显示前三位作者的所属机构,然后显示最后一位作者的姓名及其所属机构?
\documentclass[prx,noshowpacs,twocolumn,superscriptaddress]{revtex4-2}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\@collaboration@present{(}{\medskip}{}{}
\xpatchcmd\@collaboration@present{)}{}{}{}
\makeatother
\begin{document}
\title{Title}
\author{Author1}
\affiliation{Affiliation 1}
\affiliation{Affiliation 2}
\author{Author2}
\affiliation{Affiliation 1}
\affiliation{Affiliation 2}
\author{Author3}
\affiliation{Affiliation 1}
\affiliation{Affiliation 2}
\affiliation{Affiliation 3}
\collaboration{}
\author{Author4}
\affiliation{Affiliation 4}
\affiliation{Affiliation 5}
\maketitle
\end{document}
答案1
这个答案中的解决方案是一个相当混乱的黑客行为,无疑会产生许多副作用。最好的方法可能是保留默认行为。
但是,如果您仍然有兴趣这样做,以下是\maketitle
两次调用的方法,首先针对第一个作者块(其附属关系直接位于下方),然后再次针对其余作者。
Revtex4-2 会清除之后的所有信息\maketitle
(包括其自身的定义\maketitle
),因此我们需要在临时命令中保留这些信息。此外,与往常不同,摘要是作为 的一部分打印的,\maketitle
因此第一次需要抑制摘要,第二次需要重新启用摘要。间距需要调整,当然第二次不应打印标题。
梅威瑟:
\documentclass[prx,noshowpacs,twocolumn,superscriptaddress]{revtex4-2}
\usepackage{xpatch}
\makeatletter
\xpatchcmd\@collaboration@present{(}{\medskip}{}{}
\xpatchcmd\@collaboration@present{)}{}{}{}
\makeatother
\usepackage{lipsum}
\begin{document}
\title{Title}
\begin{abstract}
This is the abstract
\end{abstract}
\author{Author1}
\affiliation{Affiliation 1}
\affiliation{Affiliation 2}
\author{Author2}
\affiliation{Affiliation 1}
\affiliation{Affiliation 2}
\author{Author3}
\affiliation{Affiliation 1}
\affiliation{Affiliation 2}
\affiliation{Affiliation 3}
\makeatletter
% store affiliation, author macro definitions
% before being cleared by first \maketitle
\let\tmpaffiliation\affiliation
\let\tmpauthor\author
% store abstract macro definition before temporary clearing it
% to prevent abstract being printed after first author block
\let\tmpabstract\frontmatter@abstract@produce
\let\frontmatter@abstract@produce\relax
% prevent vertical space being added after first author block
\let\frontmatter@finalspace\relax
% print title and first author block
\maketitle
% restore definition of vertical space at end of author block
\def\frontmatter@finalspace{\addvspace{18\p@}}
% restore definitions of \maketitle, affiliation, author, abstract
\let\maketitle\frontmatter@maketitle
\let\affiliation\tmpaffiliation
\let\author\tmpauthor
\let\frontmatter@abstract@produce\tmpabstract
% prevent printing title a second time
\let\frontmatter@title@produce\relax
\makeatother
\author{Author4}
\affiliation{Affiliation 4}
\affiliation{Affiliation 5}
% print second author block
\maketitle
\section{Introduction}
\lipsum[1-5]
\end{document}
结果:
我没有费心去修复的一个副作用是FirstPage
中某处有多次定义的标签\titleblock@produce
。您可能可以使用 删除它xpatch
,但肯定还有很多其他的簿记工作会受到\maketitle
两次调用的影响 - 因此请仔细检查。