Difference between revisions of "Command/defineenumeration"

From ConTeXt wiki
m (Text replace - "Reference/en/" to "Command/")
m (moved Reference/en/defineenumeration to Command/defineenumeration: Text replace - "Reference/en/" to "Command/")
(No difference)

Revision as of 02:59, 14 March 2012

\defineenumeration

Syntax

\defineenumeration[...,...,...][...][...,...=...,...]
[...,...,...] name
[...] name
[...,...=...,...] see \setupenumerations


Description

With \defineenumeration you can number text elements like remarks or questions.

For example, if you want to make numbered remarks in your document you use:

setup

\defineenumeration
[remark]
[location=top,
text=Remark,
inbetween=\blank,
after=\blank]

You can also vary the layout of Remark and Subremark in the example above by:

\setupenumeration[remark][headstyle=bold]
\setupenumeration[subremark][headstyle=slanted]

Now the new commands \remark, \subremark, \resetremark and \nextremark are available. If the remark contains more than one paragraph you will have to use the command pair \startremark ... \stopremark that becomes available after defining Remark with;

\defineenumeration[remark]

multiple paragraph

So the example above would look like this:

\startremark
In the early medieval times Hasselt was a place of pilgrimage. The
{\em Heilige Stede} (Holy Place) was torn down during the
Reformation.
After 300 years in 1930 the {\em Heilige Stede} was reopened.
Nowadays the {\em Heilige Stede} is closed again but once a year an
open air service is held on the same spot.
\stopremark

input

\remark In the early medieval times Hasselt was a place of
pilgrimage. The {\em Heilige Stede} (Holy Place) was torn down during
the Reformation. In 1930, after 300 years the {\em Heilige Stede} was
reopened.
\subremark Nowadays the {\em Heilige Stede} is closed again but once
a year an open air service is held on the same spot.

output

<b>Remark 1</b>
In the early medieval times Hasselt was a place of pilgrimage. The Heilige Stede (Holy
Place) was torn down during the Reformation. In 1930, after 300 years the Heilige Stede
was reopened.
<b>Remark 1.1</b>
Nowadays the Heilige Stede is closed again but once a year an open air service is held on
the same spot.


Example

See also