- Download the lineno Latex package.
- Unpack it (
unzip lineno.zip
) and copy alllineno/*.sty
files into the directory that contains your Latex document. - In the Latex preamble include the line
\RequirePackage{lineno}
before the\documentclass{...}
command.Note: this is necessary due to incompatibilities between the lineno package and RevTex. If you are not using RevTex to prepare your document you can also use the standard way:
\usepackage{lineno}
- Line numbers can be activated by adding the line
\linenumbers
after\begin{document}
Add line numbers using lineno.sty in RevTex 4
Published April 24, 2008 Linux 6 CommentsTags: latex, revtex
Thanks! Any idea how to get the lineno package to put the line numbers always on the outside margin in two-column mode?
Margin switching is possible in lineno by using the \switchlinenumbers command for the outer margins and \switchlinenumbers* for the inner margins.
For more information, please see section 4.2.1 of the lineno users manual which can be found at:
ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/lineno/ulineno.pdf
It’s working for me this way except that a paragraph that includes an equation is not numbered. Any clue why?
This problem — and a workaround — is discussed in the lineno documentation.
Thanks for this workaround.
It works for me, but when I add the line before the documentclass-command, on the first page a “1.” shows up before the title line.
How can I get rid of this “1.”
Christian
I cannot get his to work. There is an options clash for the lineno package.
Any suggestions?