To add line numbers you need the package lineno
\usepackage{lineno} % in preamble % [...] \linenumbers % after \begin{document}
lineno
fails in some cases to put line numbers for a paragraph containing equations.
The problem occurs when the paragraph before the equation is not finished (with an empty line between the text and the equation).
There are several ways to fix this.
lineno
. (If the document is an official LHCb publication you should be using this template anyways.)lineno
is the last package you load:\\lineno
fixes at least the equation environment.