# Enumerations

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The most basic form of using enumerations in ConTeXt is

\startitemize
\item here we list the points,
\item one after the other.
\stopitemize


The \startitemize command takes optional parameters (see the documentation of \startitemgroup for a complete list), for example a number conversion may be given, with the following predefined types:

 n Usually the default: a numbered list 1 … 8 Different kinds of bullets. All items get the same symbol. a Items are numbered a., b., c., … A Items are numbered A., B., C., … A Items are numbered A., B., C., …, in small caps. r Items are numbered in lowercase Roman numerals. R Items are numbered in uppercase Roman numerals. KR Items are numbered in uppercase Roman numerals, small caps style.

TODO: What is the difference between n and N?

Additional parameters include continue (start where the previous itemization was finished, to allow text injections), packed (less vertical space between items), and inmargin (place enumeration symbols into the margin).

To change the general layout of enumerations, there is \setupitemize. Itaccepts an integer as its first parameter to denote for which level of itemization the subsequent settings should apply. There is an example below.

For finer control, it is advisable to create new types of itemization, using the command \defineitemgroup (which unfortunately seems undocumented). For example, something similar to the LaTeX enumerate environment can be defined as follows:

 \defineitemgroup[enumerate][levels=5]
%
\setupitemgroup[enumerate][1][1]
\setupitemgroup[enumerate][2][2]
\setupitemgroup[enumerate][3][3,packed]
\setupitemgroup[enumerate][4][4,packed]
\setupitemgroup[enumerate][5][5,packed]
%
\starttext
%
\startenumerate
\item Consider
\startenumerate
\item this part
\item and also these subpoints:
\startenumerate
\item one
\item two
\item three
\startenumerate
\item threeandahalf
\stopenumerate
\item four
\stopenumerate
\stopenumerate
\stopenumerate
%
\stoptext