When I use the package lineno with option [switch], linenumbers don’t reset when asked to (my setup: up to date TL 2012).



Leaving away [switch] will result in resetting linenumbers but this is not an option in the required twoside setup.

2 Answers 2


It is not possible to do this with lineno. Take a look at the manual: http://texdoc.net/texmf-dist/doc/latex/lineno/ulineno.pdf.

It says that there are 2 modes, running and pagewise.

If you use the option switch, but not the option pagewise, it is possible to switch the margin the numbers appear in, but it is no longer possible to reset the linenumbers due to how they are processed.

As it is put in the manual:

Pagewise line numbers. The lines on each page are numbered from one.
Automatic margin switching is possible.

Running mode can be simulated in pagewise mode, to get automatic
margin switching with continuous line numbers, but without the ability
to reset/preset the line numbers anywhere in the document.

Basically, switch without pagewise simulates running mode in the pagewise mode, as per the second paragraph.

You will either have to stop using switch, or include pagewise to number each page from 1.


You can use them together :) like

\usepackage[switch, pagewise]{lineno}
  • 1
    Welcome to TeX.SX! May 29, 2015 at 14:53
  • 3
    Could you elaborate on this 'solution' please? At the moment, it's rather a comment than an answer
    – user31729
    May 29, 2015 at 14:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .