ma-cb-en-paragraphs.tex /size: 6807 b    last modification: 2020-07-01 14:35
1\startcomponent ma-cb-en-paragraphs
2
3\enablemode[**en-us]
4
5\project ma-cb
6
7\startchapter[title=Paragraph spacing]
8
9\startsection[title=Introduction]
10
11\index{paragraph}
12
13\Command{\tex{par}}
14\Command{\tex{paragraph}}
15
16In \TEX\ and \CONTEXT\ the most important unit of text is the paragraph. You can
17start a new paragraph by:
18
19\startitemize[packed]
20\item an empty line
21\item the \TEX\ command \type{\par}
22\stopitemize
23
24In your \ASCII\ input file you should use empty lines as paragraph separators.
25This will lead to a readable, clearly structured and well organized file and will
26prevent mistakes.
27
28In situations where a command has to be closed explicitly you should use
29\type{\par}.
30
31\startbuffer
32During one of the wars Hasselt lay under siege. After some
33time the city was famine stricken, everything edible was
34eaten. Except for one cow. The cow was kept alive and
35treated very well. \par
36Once a day the citizens of Hasselt took the cow for a walk
37on the ramparts. The besiegers saw the well fed cow and
38became very discouraged. They broke up their camps and
39Hasselt was saved. \par
40In the Hoogstraat in Hasselt there is a stone tablet with a
41representation of the cow that commemorates the siege and
42the shrewdness of the citizens of Hasselt.
43\stopbuffer
44
45\typebuffer
46
47This could also be typed without \type{\par}s and a few empty lines.
48
49\startbuffer
50During one of the wars Hasselt lay under siege. After some
51time the city was famine stricken, everything edible was
52eaten. Except for one cow. The cow was kept alive and
53treated very well.
54
55Once a day the citizens of Hasselt took the cow for a walk
56on the ramparts. The besiegers saw the well fed cow and
57became very discouraged. They broke up their camps and
58Hasselt was saved.
59
60In the Hoogstraat in Hasselt there is a stone tablet with a
61representation of the cow that commemorates the siege and
62the wisdom of the citizens of Hasselt.
63\stopbuffer
64
65\typebuffer
66
67\stopsection
68
69\startsection[title=Inter paragraph spacing]
70
71\index{inter paragraph spacing}
72
73\Command{\tex{setupwhitespace}}
74\Command{\tex{nowhitespace}}
75\Command{\tex{whitespace}}
76\Command{\tex{startlinecorrection}} % VZ 2006-11-15 setup->start
77\Command{\tex{blank}}
78\Command{\tex{setupblank}}
79\Command{\tex{startpacked}}
80\Command{\tex{startunpacked}}
81
82The vertical spacing between paragraphs can be specified by:
83
84\shortsetup{setupwhitespace}
85
86This document is produced with \type{\setupwhitespace[medium]}.
87
88When inter paragraph spacing is specified there are two commands available that
89are seldom needed:
90
91\starttyping
92\nowhitespace
93\whitespace
94\stoptyping
95
96When a paragraph consists of a horizontal line or a framed text like this:
97
98\startbuffer
99\framed{Ridderstraat 27, 8061GH Hasselt}
100\stopbuffer
101
102\getbuffer
103
104Sometimes spacing is suboptimal. For that purpose you could carry out a
105correction with:
106
107\shortsetup{startlinecorrection}
108
109So if you would type:
110
111\startbuffer
112\startlinecorrection
113\framed{Ridderstraat 27, 8061GH Hasselt}
114\stoplinecorrection
115\stopbuffer
116
117\typebuffer
118
119you will get a better output. Only use these commands if really needed!
120
121\getbuffer
122
123Another command to deal with vertical spacing is:
124
125\shortsetup{blank}
126
127The bracket pair is optional and within the bracket pair you can type the amount
128of spacing. Keywords like \type{small}, \type{medium} and \type{big} are related
129to the fontsize.
130
131\startbuffer
132In official writings Hasselt always has the affix Ov. This is an
133abbrevation for the province of {\em Overijssel}.
134\blank[2*big]
135The funny thing is that there is no other Hasselt in the Netherlands.
136So it is redundant.
137\blank
138The affix is a leftover from the times that the Netherlands and
139Belgium were one country under the reign of King Philip II of Spain.
140\blank[2*big]
141Hasselt in Belgium lies in the province of Limburg. One wonders if
142the Belgian people write Hasselt (Li) on their letters.
143\stopbuffer
144
145\typebuffer
146
147The command \type{\blank} without the bracket pair is the default space.
148
149The example would become:
150
151\getbuffer
152
153The default spacing can be set up with:
154
155\shortsetup{setupblank}
156
157If you want to surpress vertical spacing you can use:
158
159\shortsetup{startpacked}
160
161In this manual the whitespace is set at \type{medium}. In the next situation this
162set up is ignored and the lines are packed.
163
164\startbuffer
165\startpacked
166Hasselt (Ov) lies in Overijssel.
167
168Hasselt (Li) lies in Limburg.
169
170Watch out: we talk about Limburg in Belgium. There is
171also a Dutch Limburg.
172\stoppacked
173\stopbuffer
174
175\typebuffer
176
177This will become:
178
179\getbuffer
180
181It is not hard to imagine why there is also:
182
183\shortsetup{startunpacked}
184
185You can force vertical space with \type{\godown}. The distance is specified
186within the brackets.
187
188\shortsetup{godown}
189
190Try not to use this command. It is always better use the \type{\setup...} commands
191to setup your spacing model.
192
193\stopsection
194
195\startsection[title=Whitespace before and after text components]
196
197Most text components that are coded with \CONTEXT\ have a \type{\setup...} command
198with which you can define the whitespace before and after that component.
199
200\starttyping
201\setupitemize
202    [before=,after=]
203
204\setuphead
205    [chapter]
206    [before=,after=]
207
208\setupframedtexts
209    [before=,after=]
210\stoptyping
211
212The use of the \type{\setup...} commands prevents you from having to code
213whitespaces throughout your \TEX\ document. This would lead to unreadable sources
214and inconsistent use of whitepaces.
215
216\stopsection
217
218\startsection[title=Skipping space]
219
220\Command{\tex{hskip}}
221\Command{\tex{vskip}}
222
223You can introduce horizontal and vertical space with \type{\hskip} and
224\type{\vskip} commands.
225
226Try to avoid these commands in your text. It will probably lead to inconsistent
227spacing.
228
229\stopsection
230
231\startsection[title=Indentation]
232
233\index{indentation}
234\index{paragraph+indentation}
235
236\Command{\tex{indenting}}
237\Command{\tex{noindenting}}
238\Command{\tex{setupindenting}}
239
240You can set up the amount of the indentation with:
241
242\shortsetup{setupindenting}
243
244A reasonable indentation is achieved by:
245
246\starttyping
247\setupindenting[yes,]
248\stoptyping
249
250This will lead to indented paragraphs. By default, indentation after white space
251(as issued by \type {\blank}) is suppressed.
252
253You can locally influence the indentation state by using:
254
255\shortsetup{indenting}
256
257When for instance you say \type {never}, from that moment on indentation will be
258surpressed. Saying \type {none}, only influences the next paragraph.
259
260If you choose to use indentations, and at a certain place you explicitly {\em do
261not} want to indent, you can also say:
262
263\starttyping
264\noindenting
265\stoptyping
266
267In some \type{\setup...} commands you can set the parameter \type{indent=yes}. This means
268that the paragraph that follows the textcomponent will indent:
269
270\startbuffer
271\setupitemize[indentnext=yes]
272\stopbuffer
273
274\typebuffer
275
276\stopsection
277
278\stopchapter
279
280\stopcomponent
281