Add Line Numbers

To add line numbers you need the package lineno

\usepackage{lineno} % in preamble
% [...]
\linenumbers  % after \begin{document}

missing line numbers before equations

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.

  1. use the official LHCb template
    The template modifies the math environments to work propperly with lineno. (If the document is an official LHCb publication you should be using this template anyways.)
  2. make sure lineno is the last package you load:\\lineno fixes at least the equation environment.
  3. adjust the environment your self:
    \let\oldeq\equation{}\def\equation{\par\vspace{-\parskip}\oldeq}