10

I am using the elsarticle class in order to typeset a preprint of an article I am writing.

I wanted to add line numbering in order to make the revision easier, so I included the lineno package.

This is a MWE:

\documentclass[preprint,review]{elsarticle}

\usepackage{lipsum}

% ADDING LINENUMBERS FOR REVIEWING:
\usepackage{lineno}
    \linenumbers

\journal{The Name Of The Journal}

\begin{document}

\begin{frontmatter}

\title{The Tile Of The Article}

\author[]{Name1 Surname1\corref{cor1}}
\ead{surname1@email.ok}
\cortext[cor1]{Corresponding author. Tel.: WHATEVER; Fax: WHATEVER.}
\author[]{Name2 Surname2}
\ead{surname2@email.ok}
\author[]{Name2 Surname3}
\ead{surname3@email.ok}
\address{Research Structure Name, University Name, Full Postal Address.}

\begin{abstract}
\lipsum[31]
\end{abstract}

\begin{keyword}
Keyword1; Keyword2; Keyword3; Keyword4; Keyword5
\end{keyword}

\end{frontmatter}


\section{Introduction and background}

\subsection{Introduction}

\lipsum[1-5]

\subsection{Background}

\lipsum[6-15]

\subsection{Aims and scope}

\lipsum[16-20]

\section{Conclusions}

\lipsum[21-30]

\section*{Acknowledgements}

Thanks to all!

\end{document}

And this is what I get (1st page, see bottom):

Elsarticle With Lineno

The normal result when removing these two lines in the tex document:

\usepackage{lineno}
    \linenumbers

is the following (see the bottom):

Elsarticle Without Lineno

So, author information is overlaped with the bottom line "Preprint sumbitted to [...]". How can I fix this issue??

6

An analysis of the problem would be quite time consuming, because lineno does many hacks and elsarticle too.

A simple workaround is to add \enlargethispage{-2\baselineskip} after \end{frontmatter}. In order to have this in the same place with \usepackage{lineno} so that you can easily remove it when the final version is submitted is

% ADDING LINENUMBERS FOR REVIEWING:
\usepackage{lineno}
\linenumbers
\makeatletter
\g@addto@macro\endfrontmatter{\enlargethispage{-2\baselineskip}}
\makeatother

enter image description here

6

I am answering my own question.

I managed to solve this issue by just moving the \linenumbers sentence to the beginning of the main text —that is:

\documentclass[preprint,review]{elsarticle}

\usepackage{lipsum}

% ADDING LINENUMBERS FOR REVIEWING:
\usepackage{lineno}
%    \linenumbers   <---- NOT HERE !!!

\journal{The Name Of The Journal}

\begin{document}

\begin{frontmatter}

\title{\begin{linenumbers}The Tile Of The Article\end{linenumbers}}


\author[]{Name1 Surname1\corref{cor1}}
\ead{surname1@email.ok}
\cortext[cor1]{Corresponding author. Tel.: WHATEVER; Fax: WHATEVER.}
\author[]{Name2 Surname2}
\ead{surname2@email.ok}
\author[]{Name2 Surname3}
\ead{surname3@email.ok}
\address{Research Structure Name, University Name, Full Postal Address.}



\begin{abstract}

\lipsum[31]

\end{abstract}

\begin{keyword}
Keyword1; Keyword2; Keyword3; Keyword4; Keyword5
\end{keyword}

\end{frontmatter}

\linenumbers  %% <---- BUT HERE !

\section{Introduction and background}

\subsection{Introduction}

\lipsum[1-5]

\subsection{Background}

\lipsum[6-15]

\subsection{Aims and scope}

\lipsum[16-20]

\section{Conclusions}

\lipsum[21-30]

\section*{Acknowledgements}

Thanks to all!

\end{document}

This is the result:

MWE result

It is a little bit strange that the title line gets actually numbered, but it is OK for me that the abstract is not numbered, after reading the answer by @Loop-Space to a similar question regarding lineno: https://tex.stackexchange.com/a/11406/8283, where he points out that lineno is intended to number only the main text.

It's not perfect, but it is OK for me.

4

Moving the \linenumbers command to the beginning of the main text is now an official advice from the company that provides technical support for this style file: FAQ - elsarticle.cls (see p.13 of the "Preamble and Front matter section")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.