在使用 Elsevier 类时,我想插入一行
DOI: 10.xxxxx/blah
紧接着关键词部分。
我所做的就是在块后面输入此行\begin{keyword} ... \end{keyword}
作为标准(常规)文本。但是我想要插入的字符串(例如DOI: 10.xxxxx/blah
)并没有按预期出现在关键字部分之后,而是单独出现在第一页中。
请帮我解决这个问题。非常感谢。
答案1
您可以使用以下想法https://tex.stackexchange.com/a/154216/4427
\documentclass[preprint, authoryear]{elsarticle}
\usepackage{etoolbox}
\makeatletter
% patch \maketitle to accommodate the new information before the first rule
\patchcmd{\pprintMaketitle}
{\vskip36pt}
{\ifvoid\extrainfobox
\vskip36pt
\else
\vskip10pt\unvbox\extrainfobox\par\vspace{10pt}%
\fi\relax
}
{}{}
% patch \maketitle to accommodate the DOI after the keywords
\patchcmd{\pprintMaketitle}
{\fi\hrule}% the second rule
{\fi
\ifx\@DOI\@empty
\else
{\normalfont\normalsize\@DOI}\hspace*{\fill}\par\vspace{10pt}%
\fi\hrule
}
{}{}
% an environment for the new information
\newenvironment{extrainfo}
{\global\setbox\extrainfobox=\vbox\bgroup\parindent=0pt }
{\egroup}
\newsavebox\extrainfobox
% The DOI
\newcommand{\DOI}[1]{%
\gdef\@DOI{DOI: #1}%
}
\let\@DOI\@empty % initialize
\makeatother
\bibliographystyle{annesstyle}
\begin{document}
\begin{frontmatter}
\title{title}
\author[firstaddress]{Aaddress}
\author[secondaddress]{address}
\author[thirdaddress]{Haddress}
\author[thirdaddress]{address}
\author[thirdaddress]{address}
\author[thirdaddress,firstaddress]{address}
\address{Address for correspondance:}
\address[firstaddress]{address}
\address[secondaddress]{address}
\begin{abstract}abstract\end{abstract}
\begin{keyword}keywords\end{keyword}
\DOI{10.xxxxx/blah}
\begin{extrainfo}
\begin{center}
\textbf{Article history}
blah blah
\end{center}
\end{extrainfo}
\end{frontmatter}
\section{References}
\bibliography{mybib}
\end{document}