6

I'm using the lineno package to print line numbers in my two-sided document, but they are always printed in the left margin.

\documentclass[twoside]{book}

\usepackage{lineno}
\usepackage{lipsum}

\begin{document}

\linenumbers
\lipsum

\end{document} 

enter image description here

If I load lineno with the option right

\usepackage[right]{lineno}

they all are printed in the right margin

enter image description here

What I would like to do is to print line numbers in the right margin in odd pages and in the left margin in even pages, but I haven't been able to find an option to achieve this.

Does anyone know a workaround?

1 Answer 1

6

You are looking for the switch option:

\documentclass[twoside]{book}
\usepackage[switch]{lineno}
\usepackage{lipsum}
\begin{document}
\linenumbers
\lipsum[1-30]
\end{document} 

enter image description here

3
  • Was it so simple...? I tried with manual \switchlinenumbers with no luck! Thank you. BTW: you can suggest this answer in this thread as well: tex.stackexchange.com/q/146587/31910
    – Sterry
    Nov 24, 2013 at 11:10
  • @Sterry. You're welcome. I answered also the other thread.
    – Fran
    Nov 24, 2013 at 17:57
  • Upvoted there, too.
    – Sterry
    Nov 24, 2013 at 19:30

You must log in to answer this question.

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