Command/setupenumeration

Unofficial ConTeXt Wiki mirror

Last modified: 2025-10-08

Summary

Use \setupenumeration for the settings of numbered environments.

Settings

\setupenumeration[...,...][...=...,...]
[...,...] name
title yes no
number yes no
numbercommand oneargument
titledistance dimension
titlestyle style command
titlecolor color
titlecommand oneargument
titleleft command
titleright command
left command
right command
symbol command
starter command
stopper command
coupling name
counter name
level number
text text
headcommand oneargument
before command
after command
inbetween command
alternative left right inmargin inleft inright margin leftmargin rightmargin innermargin outermargin serried hanging top empty command name
align see \setupalign
headalign see \setupalign
indenting see \setupindenting
display yes no
indentnext yes no auto
width fit broad line dimension
distance none dimension
stretch number
shrink number
hang fit broad none margin number
closesymbol command
closecommand oneargument
expansion yes no xml
referenceprefix + - text
sample text
margin yes no standard dimension
style style command
color color
headstyle style command
headcolor color
aligntitle yes no
...=...,... inherits from \setupcounter

Option Explanation
title
Typeset a title (additionally to the number) or not.
number
Typeset a number (additionally to the title) or not.
titledistance
Distance between number and title.
titlecolor
Color of the title.
titleleft
Command/text to apply left of the title.
titleright
Command/text to apply right of the title.
left
Command/text to apply left of the number.
right
Command/text to apply right of the number, e.g. a separator.
starter
Command/text to apply before typesetting the number.
stopper
Command/text to apply after typesetting the number.
text
Text to add left of the number, e.g. "Theorem" or "Lemma".
before
Command/text to apply before typesetting anything else.
after
Command/text to apply after typesetting everything else.
inbetween
Command/text to apply between the enumeration title and the text.
alternative
Specify the layout/location of the enumeration number and title.
left Typeset number + title in the left column, the text in the right.
right Typeset number + title in the right column, the text in the left.
margin Within the margin of the page.
top Above the text with a small space following.
empty Do not typeset number + title.
margin
dimension Extra space to add to the left margin to indent to the right.
color
Color of the text.
headcolor
Color of the header (number + title). Setting a titlecolor overrides the color for the title.

Description

Examples

Demonstration of the different command arguments

  • \defineenumeration[test][
    	alternative=top,
    	left={ tleft },
    	right={ tright },
    	inbetween={ tinbetween },
    	starter={ tstarter },
    	stopper={ tstopper },
    	text=text,
    	title=yes,
    	titleleft={ ttitleleft },
    	titleright={ ttitleright },
    	titledistance=1cm,
    	headstyle=bold,
    ]
    
    Some text:
    
    \starttest[title=ttitle]
    body
    \stoptest
    

    This produces:

Adding extra text to the text body as well ( source )

  • \definehspace[dist][1em]
    \startsetups[question:intro]
       \setupparagraphintro[first][{\bold{Answer:}\hspace[dist]}]
       \blank
    \stopsetups
    
    \defineenumeration[question][
            alternative=top,
            text=Question,
            title=yes,
            titleleft=,
            titledistance=1em,
            titleright=,
            right={:},
            headstyle=bold,
       inbetween=\setup{question:intro},
    ]
    
    \starttext
    Some text:
    
    \startquestion[title={How long does a loop last?}]
    For a while.
    \stopquestion
    \stoptext
    

    This produces:

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: