TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
Thank you! I had overlooked that statement. – georgd Mar 25 '13 at 9:39

You can use them together :) like

\usepackage[switch, pagewise]{lineno}
share|improve this answer
Welcome to TeX.SX! – Heiko Oberdiek May 29 '15 at 14:53
Could you elaborate on this 'solution' please? At the moment, it's rather a comment than an answer – Christian Hupfer May 29 '15 at 14:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.