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

2 Answers 2

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
1  
Welcome to TeX.SX! –  Heiko Oberdiek May 29 at 14:53
2  
Could you elaborate on this 'solution' please? At the moment, it's rather a comment than an answer –  Christian Hupfer May 29 at 14:56
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  Kurt May 29 at 16:03

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.