Revtex:我如何在标题栏以外的其他地方(例如页脚)重现作者姓名?

Revtex:我如何在标题栏以外的其他地方(例如页脚)重现作者姓名?

我用它revtex4-1来格式化注释,这些注释以后可能会成为期刊论文背景的一部分。虽然我总体上喜欢这种格式,但我发现很难在其他地方重新使用标题栏中的元素。具体来说,我想在页脚中包含作者姓名。虽然我通读了revtex4-1.cls,但它对作者的处理很复杂,我不知道在 之外要调用什么来重新打印作者姓名\maketitle。我尝试了在 中找到的几个命令,.cls例如\@author@finish等,但都不起作用。我能够根据需要在正文和页脚中打印标题,如下面的演示所示。

如何在标题栏外打印 revtex 作者?

% Document basic setup
\documentclass[aip,jmp,amsmath,amssymb,nofootinbib,reprint]{revtex4-1}

% Header and footer setup
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\rfoot{\footnotesize \thepage/\pageref{LastPage}}
\cfoot{}
% \lfoot{\makeatletter\@title\makeatother}  % Can't do it here

% Start document and define title and author
\begin{document}
\title{TITLE: revtex4-1 author and title demo}
\author{author NAME name}
\date{20190607}
% \lfoot{\makeatletter\@title\makeatother}  % Can't do it here
\maketitle

% \lfoot{\makeatletter\@title\makeatother}  % Can't do it here

% This works: -----
\makeatletter
\let\runtitle\@title
\makeatother
\lfoot{\runtitle}
% -----

% This doesn't work: -----
\makeatletter
\let\runauthor\@author
\makeatother
\cfoot{\runauthor}
% -----

\thispagestyle{fancy}  % Apply header and footer style to first page, too

% Content ------------------------------------------------------
\section{Introduction}
Words words words.

\subsection{Try to print the title in the text}
\begin{enumerate}
    \item \verb|\thetitle| doesn't work. %\thetitle
    \item \verb|\makeatletter\@title\makeatother| does work: \makeatletter\@title\makeatother
    \item \verb|\runtitle| does work (because we defined it): \runtitle
\end{enumerate}

\subsection{Try to print the author in the text}
\begin{enumerate}
    \item \verb|\theauthor| doesn't work. %\theauthor
    \item \verb|\makeatletter\@author\makeatother| doesn't produce an error, but it doesn't print anything: \makeatletter\@author\makeatother
    \item \verb|\runauthor| doesn't produce an error (because we defined it), but it still doesn't print anything: \runauthor
    \item \verb|\makeatletter\@author@finish\makeatother| prints nothing: \makeatletter\@author@finish\makeatother
\end{enumerate}

\end{document}

输出自样本

答案1

这个答案:https://tex.stackexchange.com/a/31070/120014清楚地展示了一种解决方法,即定义不同的命令,然后将其输入到\title{}\author{}以避免与 true\author{}和相关的复杂性\title{},例如在 期间被清除\maketitle。所以我只需定义\firstauthor并将其输入到\author和页脚即可:

\newcommand{\firstauthor}{author NAME name}
\author{\firstauthor}

...

\cfoot{\firstauthor}

这足以显示第一个作者或只有一个作者的文档,这在页脚中用起来没问题。它不会显示 revtex 保存并在标题栏中显示的完整作者列表。它也不会访问 revtex 保存的真实作者列表。虽然我不再有实际需要它了,但我仍然想知道如何让 revtex 打印其作者列表。

相关内容