Difference between revisions of "Command/setupenumerations"

From Wiki
Jump to navigation Jump to search
(Add example, description)
(Typo (which prevented typesetting))
(3 intermediate revisions by 2 users not shown)
Line 24: Line 24:
  
 
== Example ==
 
== Example ==
<context>
+
<context source=yes text="This gives:">
 
\defineenumeration[Potato]
 
\defineenumeration[Potato]
  
 
\Potato  
 
\Potato  
 
+
One potato
One potato \par
 
  
 
\setupenumerations[Potato][location=left]
 
\setupenumerations[Potato][location=left]
Line 35: Line 34:
  
 
\Potato  
 
\Potato  
 +
Two potato
  
Two potato \par
+
</context>
 +
 
 +
The before and after keys control the spacing around enumerations. It you want to achieve something similar to the itemize-option "packed" then use: (MKIV example)
 +
 
 +
<context source=yes text="This gives:">
 +
\defineenumeration[Packed]
 +
 
 +
\setupenumerations
 +
  [Packed]
 +
  [text=,
 +
    headstyle=normal,
 +
    alternative=left,
 +
    distance=0pt,
 +
    width=13pt,
 +
    stopper=\high{o},
 +
    before={\blank[small]},
 +
    after={\blank[small]},
 +
    inbetween=]
 +
 
 +
 
 +
\Packed
 +
  First issue
 +
 
 +
\Packed
 +
  Second issue
  
 
</context>
 
</context>
 
 
== See also ==
 
== See also ==
{{cmd|defineenumeration}}
+
* {{cmd|defineenumeration}} for creating new kinds of numbered objects.
 +
* {{cmd|setupenumerations}} for setting up looks and behaviour.
 +
* {{cmd|enumeration}} for single-paragraph numbered objects.
 +
* {{cmd|startenumeration}} for multiple-paragraph numbered objects.
  
 
== Help from ConTeXt-Mailinglist/Forum ==
 
== Help from ConTeXt-Mailinglist/Forum ==

Revision as of 08:23, 16 August 2016

\setupenumerations

Syntax

\setupenumerations[...,...,...][...,...=...,...]
[...,...,...] name of an enumeration (defined with \defineenumeration)
[...,...=...,...] see \setupdescriptions


Description

Set up the appearance and behaviour of an enumeration. Enumeration environments are actually special description environments, so the keys are described at \setupdescriptions.

Example

\defineenumeration[Potato]

\Potato 
One potato

\setupenumerations[Potato][location=left]
% In mkiv one would use `alternative=left`.

\Potato 
Two potato

This gives:

The before and after keys control the spacing around enumerations. It you want to achieve something similar to the itemize-option "packed" then use: (MKIV example)

\defineenumeration[Packed]

\setupenumerations
   [Packed]
   [text=,
    headstyle=normal,
    alternative=left,
    distance=0pt,
    width=13pt,
    stopper=\high{o},
    before={\blank[small]},
    after={\blank[small]},
    inbetween=]


\Packed
   First issue

\Packed
   Second issue

This gives:

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: