In LaTeX, you can add line numbers to your document by adding
to your document preamble. However, sometimes the line numbers for
whole paragraphs are missing - this is related to the math environment
and occurs depending on whether you have a blank line before your
equations or not. This can be fixed by adding the following to your
preamble (http://phaseportrait.blogspot.com.au/2007/08/lineno-and-amsmath-compatibility.html)