Changes

Jump to navigation Jump to search
1,629 bytes added ,  19:31, 30 May 2020
< [[StructuralsBasics]]| [[Description]] >
= Overview of commands =
</texcode>
The <{{cmd>|startitemize</cmd> }} command takes optional parameters (see the documentation of <{{cmd>|startitemgroup</cmd> }} for a complete list), for example a number conversion may be given, with the following predefined types:
<table>
It is also possible to define your own number conversions; see [[User-Defined Enumerations]]. If you have loaded the [[Chinese]] module, you can also use <tt>c</tt> (and some more) for Chinese numbers.
 
When the selected language is Slovenian or Spanish, items are numbered using their proper alphabets (the Slovenian enumeration includes č, š and ž; the Spanish enumeration includes ñ). You can change to the international enumeration with <code>alphabetic</code>, <code>Alphabetic</code>.
Additional parameters include
* <tt>continue</tt> (start where the previous itemization was finished, to allow text injections),
* <tt>reverse</tt> (numbers the items in reverse, i.e. descending, order),
* <tt>packed</tt> (less vertical space between items),
* <tt>inmargin</tt> (place enumeration symbols into the margin), and
== \setupitemize ==
To change the general layout of enumerations, there is <{{cmd>|setupitemize</cmd>}}. It accepts an integer as its first parameter to denote for which level of itemization the subsequent settings should apply.
You will find more about <{{cmd>|setupitemize</}} at {{cmd> at <|setupitemgroup}} and {{cmd>|defineitemgroup</cmd>}}.
== \defineitemgroup ==
For finer control, it is advisable to create new types of itemization, using the command <{{cmd>|defineitemgroup</cmd> (which unfortunately seems undocumented)}}. For example:
{|
To specify that item numbers should also be leading numbers in any subitemizations, use the {{code|repeat}} keyword.
 
<context source=yes>
% Indentation is a bit odd; cannot reproduce off-wiki.
\definesymbol[1][$\triangleright$]
\startcolumns
{\bf joinedup:} \par before \startitemize[joinedup] \item test \item test \stopitemize after \par{\bf joinedup,nowhite:} \par before \startitemize[joinedup,nowhite] \item test \item test \stopitemize after \column{\bf joinedup,nowhite,before:} \par before \startitemize[joinedup,nowhite,before] \item test \item test \stopitemize after \par{\bf joinedup,nowhite,after:} \par before \startitemize[joinedup,nowhite,after] \item test \item test \stopitemize after
\stopcolumns
</context>
 
 
 
It is also (at least in mkiv) possible to do
<texcode>
Text before
\startitemize[before={\blank[small]},after={\blank[small]},inbetween={\blank[medium]}]
\item test
\item test
\stopitemize
Text after
</texcode>
to control the vertical space.
 
\stopitemize
</texcode>
 
==Horizontal spacing==
\item one
\item two
\stopitemize
 
And the text continues after the list
 
\stoptext
 
</context>
|}
 
From a discussion on the mailing list, the following was suggested (note that you have to enclose your items in <cmd>startitem</cmd> and <cmd>stopitem</cmd>, using <cmd>item</cmd> only does not work):
 
{|
! width="35%"|
! width="5%"|
! width="60%"|
|-
| <texcode>
\starttext
 
Some previous sentence before the list
 
\startitemize[a,horizontal,three]
\startitem first \stopitem
\startitem second \stopitem
\startitem third \stopitem
\startitem fourth \stopitem
\startitem fifth \stopitem
\startitem sixth \stopitem
\stopitemize
 
And the text continues after the list
 
\stoptext
</texcode>
|
|<context>
\starttext
 
Some previous sentence before the list
 
\startitemize[a,horizontal,two]
\startitem first \stopitem
\startitem second \stopitem
\startitem third \stopitem
\startitem fourth \stopitem
\stopitemize
=Further Reading=
 
* [[User-Defined Enumerations]]: Defining a new numbering scheme.
* [[\startitemize]]
* The source: {{src|strc-itm.mkvi}}
* [[Description]] (definition lists)

Navigation menu