1

In using Elsevier class, I would like to insert an extra line of

DOI: 10.xxxxx/blah

right after the Keywords part.

What I did is to type this line after the block \begin{keyword} ... \end{keyword} as a standard (regular) text. But the string I wanted to insert (e.g. DOI: 10.xxxxx/blah) appears, not after the Keywords part as intended, but in the first page separately.

Please help me to resolve this problem. Thank you very much in advance.

Mico
  • 506,678
  • 1
    Does https://tex.stackexchange.com/questions/154213/ help? If not, a minimal example of how you use the elsarticle class is needed. – egreg May 05 '18 at 10:02
  • Great! Thank you for you hint, I found helpful information from the link you gave. – Thanh Nguyen May 05 '18 at 13:14
  • How could I adapt this solution to add extra information (like “Article history: Received ..., Revised ..., Accepted ...”) right after the Address field, and outside of the two hrule for the Abstract part? I put \begin{extrainfo} \begin{center} \textbf{Article history}\\ blah blah\\ \end{center} \end{extrainfo} after the last \address[]{} command, and before the block \begin{abstract} ...\end{abstract}, but it failed to work. Thank you in advance. – Thanh Nguyen May 05 '18 at 15:31

1 Answers1

1

You can use the ideas in 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}

enter image description here

egreg
  • 1,121,712