Text blocks/Environments/Paragraph numbering

Unofficial ConTeXt Wiki mirror

Last modified: 2025-01-30

Standard Paragraph Numbering

ConTeXt has a built-in mechanism for paragraph numbering, which places numbers in the margin. This is accessed with \setupparagraphnumbering.

The mechanism numbers ‘TeX paragraphs’, so a formula or an itemization item will get its own number. For ‘block of thought’ paragraphs that can contain multiple TeX paragraphs, see the t-pararef module described at Paragraph referencing.

The \EveryPar command

An alternate way of numbering paragraphs is to use the \EveryPar command. It's a lower-level command than \setupparagraphnumbering, but allows much more flexibility.

Paragraph numbering in the text

One possible way of numbering paragraphs is to place the numbers in the running text, rather than in the margin. ConTeXt doesn't have a built-in way to do this, but it's not difficult to add a method using the \EveryPar command. The following code was proposed by Taco on the mailing list.

Paragraph numbering at the top

Combining Section Numbering with Paragraph Numbering and Titles

Idris provided a modified version of an enumerated-paragraphs sample provided by Wolfgang. In the modified version, section numbering is combined with paragraph enumeration, with titles optional: