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

Basically, I would like a way to number the lines in a block of text, without resorting to verbatim mode.

I have tried

  Thus, I came to the conclusion that
  the designer of a new system must not
  only be the implementer and first
  large-scale user; the designer should
  also write the first user manual.

but this preserves the whitespace; I would like ConTeXt to lay out the paragraph normally and then number the lines. The numbering does not need to be in the margin, but I would like to be able to skip every n numbers and use columns. The solution with definetyping is quite close; I simply would like to avoid having to manually adjust line breaks and possibly have hyphenation.

I found Show the number of lines in margin for LaTeX, but that doesn't apply here, unless there is a ConTeXt equivalent (the wiki does not mention one and Google turns up nothing).

share|improve this question
up vote 6 down vote accepted

Use \startlinenumbering, it re-wraps the text and does not preserve the line endings. The step key and hyphenation work as well.

  \startlinenumbering [step=5]
    \input knuth


For further information see the ConTeXT wiki - \startlinenumbering.

share|improve this answer
Thanks! I can't believe I didn't see that searching the wiki... – li.davidm Jan 28 '13 at 23:42

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.