Changes

Jump to navigation Jump to search
588 bytes added ,  09:50, 19 November 2021
no edit summary
You will find more about {{cmd|setupitemize}} at {{cmd|setupitemgroup}} and {{cmd|defineitemgroup}}.
 
== \item (and friends) ==
 
* {{cmd|item}} to print ordinary items
* {{cmd|sym}} to print an item with a custom symbol
* {{cmd|mar}} to print an item with margin text
* {{cmd|sub}} to print an item with a continuation mark
* {{cmd|its}} to print an item with a row of marks (for response ranges)
* {{cmd|ran}} to print a range for the {{cmd|its}} row
* {{cmd|head}} to print a head within the list
* {{cmd|but}} to print an item whose mark is an interactive button
== \defineitemgroup ==
|
| <context>
\setuppapersize[A7]
\defineitemgroup[ltxitm][levels=5]
%
|-
|<context>
\setuppapersize[A8,landscape]
\starttext
\setupitemize[left=(, right=), margin=4em, stopper=]
|-
|<context>
\setuppapersize[A8,landscape]
\starttext
\startitemize[R,fit][itemalign=flushright,stopper={ --- }]
|-
|<context>
\setuppapersize[A8,landscape]
\starttext
\startitemize[n,packed][start=42,stopper={\space}]
|-
|<context>
\setuppapersize[A8,landscape]
\starttext
\startitemize[a,packed]
<context source=yes>
\setuppapersize[A7]
 
% Indentation is a bit odd; cannot reproduce off-wiki.
<context source=yes mode=mkiv>
\setuppapersize[A7]
 
\setupitemgroup[itemize][1][n,repeat][width=1em]
\setupitemgroup[itemize][2][a,repeat][width=2em]
<context>
\setuppapersize[A7]
\setuplayout[scale=0.8,width=9cm]
\setupwhitespace[big]
|
|<context>
\setuppapersize[A7]
\startitemize[width=1em,distance=0pt]
\item Using width=1em,distance=0pt
|
|<context>
\setuppapersize[A8,landscape]
\starttext
|
|<context>
\setuppapersize[A8,landscape]
\starttext
== Randomizing items ==
It is possible to make ConTeXt randomize the items in enumerations; this can come handy when, e.g., typesetting tests. You have to add a <tt>random</tt> option to {{cmd|startitemize}}. There are two caveatsis a caveat:
# You have to say {{cmd|startitem}} ... {{cmd|stopitem}} instead of {{cmd|item}} ... .
# Somehow the first item does not get randomized. (I learned from the mailing list - thanks, Aditya! - that adding a {{cmd|nextrandom}} somewhere earlier helps.)
Example:
|-
| <texcode>
\nextrandom
\startitemize[random]
\startitem A \stopitem
|
| <context>
\nextrandom
\startitemize[random]
\startitem A \stopitem
|
| <context>
\setuppapersize[A8,landscape]
\starttext
\startitemize[n]

Navigation menu