When editing documents it is convenient to have all the lines on a page numbered (on the left margin) so that the reviewer can refer to them in his report. How can I achieve this with LaTeX?
As Martin Scharrer has pointed out -- and to answer the general question once and for all --: Use the
The following addition to the tex file will cause line numbers to appear (at least in scrbook class using xelatex)
A slightly different approach to that of the faq pointed out by Lockstep.
Firsty, we need to build a box 3em wide to hold the numbers of all the lines. This box will be later positioned at the left margin and unboxed.
We use Knuth's loop to generate the line numbers. We can position the box and typeset the line numbers by using thr
You should place the whole code within a conditional to switch between draft and final mode, depending on your class. The full minimal is shown below.