ma-cb-en-enumerations.tex /size: 2543 b    last modification: 2020-07-01 14:35
1\startcomponent ma-cb-en-enumerations
2
3\enablemode[**en-us]
4
5\project ma-cb
6
7\startchapter[title=Numbered definitions]
8
9\index{numbered definition}
10
11\Command{\tex{defineenumeration}}
12\Command{\tex{setupenumerations}}
13
14With \type{\defineenumeration} you can number text elements like remarks or
15questions. If you want to make numbered remarks in your document you use:
16
17\shortsetup{defineenumeration}
18
19For example:
20
21\startbuffer[a]
22\defineenumeration
23  [remark]
24  [alternative=top,
25   text=Remark,
26   inbetween={\blank[none]},
27   after=\blank]
28\stopbuffer
29
30\typebuffer[a]
31
32Now the new commands \type{\remark}, \type{\subremark}, \type{\resetremark} and
33\type{\nextremark} are available and you can type remarks like this:
34
35\startbuffer[b]
36\remark In the early medieval times Hasselt was a place of
37pilgrimage. The {\em Heilige Stede} (Holy Place) was torn down during
38the Reformation. In 1930, after 300 years, the {\em Heilige Stede} was
39reopened.
40
41\subremark Nowadays the {\em Heilige Stede} is closed again but once
42a year an open air service is held on the same spot. \par
43\stopbuffer
44
45\typebuffer[b]
46
47This becomes:
48
49\start
50\getbuffer[a]\getbuffer[b]
51\stop
52
53You can reset numbering with \type{\resetremark} or \type{\resetsubremark} or
54increment a number with \type{\nextremark} or \type{\nextsubremark}. This is
55normally done automatically per chapter, section or whatever.
56
57You can set up the layout of \type{\defineenumeration} with:
58
59\shortsetup{setupenumerations}
60
61You can also vary the layout of \type{remark} and \type{subremark} in the example
62above with:
63
64\starttyping
65\setupenumeration[remark][headstyle=bold]
66\setupenumeration[subremark][headstyle=slanted]
67\stoptyping
68
69If a number becomes obsolete you can type:
70
71\starttyping
72\remark[-]
73\stoptyping
74
75If the \type{remark} contains several paragraphs you should use the command
76pair \type{\start ... \stopremark} that becomes available after defining
77\type{remark} with \type{\defineenumeration[remark]}.
78
79\startbuffer[c]
80\setupenumeration
81   [remark]
82   [alternative=hanging,
83    width=broad]
84
85\startremark
86In the early medieval times Hasselt was a place of pilgrimage. The
87{\em Heilige Stede} (Holy Place) was torn down during the
88Reformation.
89
90After 300 years in 1930 the {\em Heilige Stede} was reopened.
91Nowadays the {\em Heilige Stede} is closed again but once a year an
92open air service is held on the same spot.
93\stopremark
94\stopbuffer
95
96\typebuffer[c]
97
98So the example above would look like this:
99
100\start
101\getbuffer[a]\getbuffer[c] \par
102\stop
103
104\stopchapter
105
106\stopcomponent
107