为 revtex 4-1 的摘要添加行号

为 revtex 4-1 的摘要添加行号

我在 revtex 4-1 中有一个 latex 文档。我在序言中添加了linenumbers选项,除摘要外,所有内容(甚至标题)都有行号。如何为摘要添加行号?

以下是我所拥有的:

\documentclass[
    pre,
    twocolumn,
    % twoside,
    byrevtex,
    superscriptaddress,
    floatfix,
    nofootinbib,
    longbibliography,
    linenumbers
]{revtex4-1}

\begin{document}

\title{\protect
Sample title
}


\begin{abstract}
test

several

lines
\end{abstract}

\maketitle

\section{Test}
Line 1

Line 2

\clearpage

\end{document}

答案1

刚刚找到答案感谢https://tex.stackexchange.com/a/277545/168596

\begin{abstract}
% add line numbers to the abstract
\begin{linenumbers}
test

several

lines
\end{linenumbers}
\end{abstract}

\nolinenumbers % removes line number from the title
\maketitle

\linenumbers
% insert rest of document here

相关内容