Page Layout ⇒ Alternate lstlisting line number side on twoside document
Alternate lstlisting line number side on twoside document
I am currently writing my thesis.
My document is twosided and I have lots of listings in it.
I would like to have an automated check for odd and nonodd pages to allign the line numbers on the correct side.
Can anyone help me?
thanks
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Alternate lstlisting line number side on twoside documen
the chance is high, that most of your lines are rather short. Compare with the table of contents, where dotted lines are introduced to keep the eye on the line. If no lines are there, it is quite easy to confuse the line.
Do you really want thos? Which document class are you using?
To be honest, i am not sure if this is easy to implement.