# Linenumbers don’t reset with switch option

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

MWE:

\documentclass{article}
\usepackage[switch]{lineno}
\usepackage{lipsum}
\begin{document}
\begin{linenumbers}
\lipsum[1-2]
\end{linenumbers}\clearpage
\begin{linenumbers}\resetlinenumber
\lipsum[3-4]
\end{linenumbers}
\end{document}


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

-

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.

-
Thank you! I had overlooked that statement. –  georgd Mar 25 '13 at 9:39