Difference between revisions of "Enumerations"
m (Added link to UserDefinedEnumerations) |
m (Corrected small-cap letters conversion name from "A" to "AK".) |
||
Line 18: | Line 18: | ||
<tr><td><tt>a</tt></td><td>Items are numbered a., b., c., …</td></tr> | <tr><td><tt>a</tt></td><td>Items are numbered a., b., c., …</td></tr> | ||
<tr><td><tt>A</tt></td><td>Items are numbered A., B., C., …</td></tr> | <tr><td><tt>A</tt></td><td>Items are numbered A., B., C., …</td></tr> | ||
− | <tr><td><tt> | + | <tr><td><tt>AK</tt></td><td>Items are numbered A., B., C., …, 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 lowercase Roman numerals.</td></tr> | ||
<tr><td><tt>R</tt></td><td>Items are numbered in uppercase Roman numerals.</td></tr> | <tr><td><tt>R</tt></td><td>Items are numbered in uppercase Roman numerals.</td></tr> |
Revision as of 06:43, 28 July 2005
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 or N | Usually the default: a numbered list |
m | A numbered list, with lowercase (“medieval”, aka “oldstyle”) numbers. |
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., … |
AK | 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. |
It is also possible to define your own number conversions; see UserDefinedEnumerations.
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 itemize environment can be defined as follows:
\defineitemgroup[ltxitm][levels=5] % \setupitemgroup[ltxitm][1][1] \setupitemgroup[ltxitm][2][2] \setupitemgroup[ltxitm][3][3,packed] \setupitemgroup[ltxitm][4][4,packed] \setupitemgroup[ltxitm][5][5,packed] % \starttext % \startltxitm \item Consider \startltxitm \item this part \item and also these subpoints: \startltxitm \item one \item two \item three \startltxitm \item threeandahalf \stopltxitm \item four \stopltxitm \stopltxitm \stopltxitm % \stoptext
gives
Changing the Signs
For a enumeration like this:
(a) one item (b) next item
you must fill \setupitemize like this:
- you get parentheses by left=(, right=)
- margin is from left margin to start of item text
- stopper is the dot (or whatever) after the "number"
\setupitemize[left=(, right=), margin=4em, stopper=] \startitemize[a] \item here we list the points, \item one after the other. \stopitemize
You find more about \setupitemize at \defineitemgroup.