I have two column document in which I wish insert line numbers. I have used \usepackege{lineno}, I used \linenumbers for inserting line numbers at the left of the left column, and \rightlinenumbers for inserting line numbers at the right of the right column. But there are several problems:

1- I wish to have automatically left and right numbering and not manually. In the above mentioned procedure, we have to manually insert for example \rightlinenumbers.

2- I could not understand how we can insert some numbers and not all numbers: For example, 1, 5, 15, 20,... and not 1,2,3,4,....

How can I do these wishes?!

Also, upon below answer, we used \usepackage[switch]{lineno} but result is as

enter image description here

Unfortunately it does not work!!! Numbers does not emerge at the left of the left column!!!

  • Regarding your second request, the lineno package option modulo might be useful. If you want a dfferent numbering scheme than numbering every fifth line, \modulolinenumbers[<number>] might be interesting. – leandriis Jul 17 '19 at 14:03
  • 1
  • Wonderful, thankx – Inzo Babaria Jul 17 '19 at 15:04
  • You need to run twice to get the line number in the proper columns. – John Jul 17 '19 at 15:53

To accomplish this, you can invoke lineno with the option switch. Be sure to run twice for the correct outcome.




enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.