Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 3 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
add comment

Your Answer

 
discard

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.