Difference between revisions of "Command/defineenumeration"
< Command
Jump to navigation
Jump to search
Line 92: | Line 92: | ||
\setuppapersize[A5] | \setuppapersize[A5] | ||
\setupbodyfont[8pt] | \setupbodyfont[8pt] | ||
− | \setuppagenumbering[ | + | \setuppagenumbering[location=] |
\setupindenting[yes,medium,first] | \setupindenting[yes,medium,first] |
Revision as of 07:00, 6 April 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
\setuppapersize[A5] \setupbodyfont[8pt] \setuppagenumbering[location=] \setupindenting[yes,medium,first] \defineenumeration [remark] [location=top,text=Remark,inbetween=\blank,after=\blank,headstyle=bold,margin=1in] \starttext \remark % One paragraph 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. \remark % The second paragraph IS NOT part of the 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. \startremark[title={Title},head={Head}] % The second paragraph IS part of the remark % "title=" and "head=" seem to be meaningless 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. \stopremark \stoptext
Gives:
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: