TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to add line number to a 2 column document where the line number must appear on the left for the left column and on the right for the right column. The lineno package does not seem to provide this option.

share|improve this question
This is one of the things that's HARD - if not impossible - in LaTeX, while it probably just works in ConTeXt. – Martin Schröder Jun 10 '11 at 6:54
up vote 17 down vote accepted

Use the switch option for the lineno package.

\usepackage{lipsum} %Creates example text
share|improve this answer
The line numbers appear on the right of the left column in this answer. – Sony Nov 12 '11 at 1:04
For numbering of lines on a per-column basis, add the columnwise option to lineno. – Werner Nov 13 '11 at 21:16
@Sony --- Not so on my machine. Make sure you compile twice so that the warning about line number reference goes away. – Ian Thompson Nov 22 '11 at 16:14
This didn't work for me either. Neither did adding the 'columnwise' option as per @Werner – DKS Feb 13 '15 at 10:24
@DKS --- What TeX distribution are you using? – Ian Thompson Feb 13 '15 at 22:40

The following is a partial solution.


enter image description here

share|improve this answer
Using lineno with the switch option, you need to compile at least twice. Your solution works in a different context just as well. – Werner Nov 13 '11 at 21:15

Simply add [columnwise] in the options of the package:

share|improve this answer

Your Answer


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.