# Problem with elsarticle and lineno

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}

\usepackage{lineno}
\linenumbers

\journal{The Name Of The Journal}

\begin{document}

\begin{frontmatter}

\title{The Tile Of The Article}

\author[]{Name1 Surname1\corref{cor1}}
\cortext[cor1]{Corresponding author. Tel.: WHATEVER; Fax: WHATEVER.}
\author[]{Name2 Surname2}
\author[]{Name2 Surname3}

\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):

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

\usepackage{lineno}
\linenumbers


is the following (see the bottom):

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

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
\makeatother


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}

\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}}
\cortext[cor1]{Corresponding author. Tel.: WHATEVER; Fax: WHATEVER.}
\author[]{Name2 Surname2}
\author[]{Name2 Surname3}

\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:

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.

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")