
我在一篇文章中使用 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
兩次呼叫的影響 - 所以請仔細檢查。