ma-cb-en-structure.tex /size: 2728 b    last modification: 2020-07-01 14:35
1\startcomponent ma-cb-en-structure
2
3\enablemode[**en-us]
4
5\project ma-cb
6
7\startchapter[title=Defining a document]
8
9Every document is started with \type{\starttext} and closed with
10\type{\stoptext}. All textual input is placed between these two commands and
11\CONTEXT\ will only process that information.
12
13Setup information is placed in the set up area just before \type{\starttext}.
14
15\setuptyping
16    [escape=yes]
17
18\definestartstop
19    [comment][style={\rm}]
20
21\starttyping
22
23\setupbodyfont[12pt]              /BTEX \comment{setuparea of document} /ETEX
24
25\starttext
26This is a one line document.      /BTEX \comment{your text} /ETEX
27\stoptext
28\stoptyping
29
30The definition of a (very simple) book could look something like this:
31
32\startbuffer
33\starttext
34
35\startstandardmakeup
36  \midaligned{From Hasselt to America}
37  \midaligned{by}
38  \midaligned{J. Jonker and C. van Marle}
39\stopstandardmakeup
40
41\title{Foreword}
42
43\chapter{Introduction}
44
45\chapter{The Rensselaer family}
46
47\chapter{The Lansing family}
48
49\chapter{The Cuyler family}
50
51\chapter{Appendix: Photos}
52
53\stoptext
54\stopbuffer
55
56\typebuffer
57
58\CONTEXT\ comes with a predefined overall structure in which the document is
59divided into four main document divisions:\footnote{Here we try to avoid the
60word {\em section}.}
61
62\startitemize[n,packed]
63\item front matter
64\item body matter
65\item appendices
66\item back matter
67\stopitemize
68
69The document divisions are defined with:
70
71\starttyping
72\startfrontmatter ... \stopfrontmatter
73\startbodymatter  ... \stopbodymatter
74\startappendices  ... \stopappendices
75\startbackmatter  ... \stopbackmatter
76\stoptyping
77
78The chapters in your book can be divided over these divisions.
79
80\startbuffer
81\starttext
82
83\startstandardmakeup
84  \midaligned{From Hasselt to America}
85  \midaligned{by}
86  \midaligned{J. Jonker and C. van Marle}
87\stopstandardmakeup
88
89\startfrontmatter
90
91    \title{Preface}
92
93    \chapter{Introduction}
94
95\stopfrontmatter
96
97\startbodymatter
98
99    \chapter{The Rensselaer family}
100
101    \chapter{The Lansing family}
102
103    \chapter{The Cuyler family}
104
105\stopbodymatter
106
107\startappendices
108
109    \chapter{Photos}
110
111\stopappendices
112
113\stoptext
114\stopbuffer
115
116\typebuffer
117
118In the front matter as well as back matter the command \type{\chapter}
119produces an un-numbered header in the table of contents. The front matter is mostly
120used for the table of contents, the list of figures and tables, the preface, the
121acknowledgements etc. It often comes with a roman page numbering.
122
123The appendices division is used for (indeed) appendices. Headers may be typeset in
124a different way; for example, \type{\chapter} may be numbered alphabetically.
125
126The style of each document division can be set up with:
127
128\shortsetup{setupsectionblock}
129
130\stopchapter
131
132\stopcomponent
133
134