Changes

Jump to navigation Jump to search
2,548 bytes added ,  11:42, 10 August 2004
First notes on itemgroups
The most basic form of using enumerations in ConTeXt is

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

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

<table>
<tr><td><tt>n</tt></td><td>Usually the default: a numbered list</td></tr>
<tr><td><tt>1</tt> &hellip; <tt>8</tt></td><td>Different kinds of bullets. All items get the same symbol.</td></tr>
<tr><td><tt>a</tt></td><td>Items are numbered a., b., c., &hellip;</td></tr>
<tr><td><tt>A</tt></td><td>Items are numbered A., B., C., &hellip;</td></tr>
<tr><td><tt>A</tt></td><td>Items are numbered A., B., C., &hellip;, in small caps.</td></tr>
<tr><td><tt>r</tt></td><td>Items are numbered in lowercase Roman numerals.</td></tr>
<tr><td><tt>R</tt></td><td>Items are numbered in uppercase Roman numerals.</td></tr>
<tr><td><tt>KR</tt></td><td>Items are numbered in uppercase Roman numerals, small caps style.</td></tr>
</table>

TODO: What is the difference between <tt>n</tt> and <tt>N</tt>?

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

To change the general layout of enumerations, there is <tt>\setupitemize</tt>. 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 <tt>\defineitemgroup</tt> (which unfortunately seems undocumented). For example, something similar to the LaTeX <tt>enumerate</tt> 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
9

edits

Navigation menu