Add line numbers using lineno.sty in RevTex 4

  1. Download the lineno Latex package.
  2. Unpack it (unzip lineno.zip) and copy all lineno/*.sty files into the directory that contains your Latex document.
  3. 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}

  4. Line numbers can be activated by adding the line
    \linenumbers
    after \begin{document}

6 Responses to “Add line numbers using lineno.sty in RevTex 4”


  1. 1 RevTeX4-er November 3, 2008 at 09:33

    Thanks! Any idea how to get the lineno package to put the line numbers always on the outside margin in two-column mode?

  2. 2 fourforces November 12, 2008 at 22:36

    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

  3. 3 Simon January 21, 2009 at 10:27

    It’s working for me this way except that a paragraph that includes an equation is not numbered. Any clue why?

  4. 5 Chrisitan April 17, 2009 at 12:38

    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

  5. 6 Jesse September 7, 2011 at 14:43

    I cannot get his to work. There is an options clash for the lineno package.

    Any suggestions?


Leave a comment




RSS Feeds

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 6 other subscribers