summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/start/en/ma-cb-en-paragraphs.tex
blob: 668b6ab01cea038eebbb3752c9b9a319e5656446 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
\startcomponent ma-cb-en-paragraphs

\enablemode[**en-us]

\project ma-cb

\startchapter[title=Paragraph spacing]

\startsection[title=Introduction]

\index{paragraph}

\Command{\tex{par}}
\Command{\tex{paragraph}}

In \TEX\ and \CONTEXT\ the most important unit of text is the paragraph. You can
start a new paragraph by:

\startitemize[packed]
\item an empty line
\item the \TEX\ command \type{\par}
\stopitemize

In your \ASCII\ input file you should use empty lines as paragraph separators.
This will lead to a readable, clearly structured and well organized file and will
prevent mistakes.

In situations where a command has to be closed explicitly you should use
\type{\par}.

\startbuffer
During one of the wars Hasselt lay under siege. After some
time the city was famine stricken, everything edible was
eaten. Except for one cow. The cow was kept alive and
treated very well. \par
Once a day the citizens of Hasselt took the cow for a walk
on the ramparts. The besiegers saw the well fed cow and
became very discouraged. They broke up their camps and
Hasselt was saved. \par
In the Hoogstraat in Hasselt there is a stone tablet with a
representation of the cow that commemorates the siege and
the shrewdness of the citizens of Hasselt.
\stopbuffer

\typebuffer

This could also be typed without \type{\par}s and a few empty lines.

\startbuffer
During one of the wars Hasselt lay under siege. After some
time the city was famine stricken, everything edible was
eaten. Except for one cow. The cow was kept alive and
treated very well.

Once a day the citizens of Hasselt took the cow for a walk
on the ramparts. The besiegers saw the well fed cow and
became very discouraged. They broke up their camps and
Hasselt was saved.

In the Hoogstraat in Hasselt there is a stone tablet with a
representation of the cow that commemorates the siege and
the wisdom of the citizens of Hasselt.
\stopbuffer

\typebuffer

\stopsection

\startsection[title=Inter paragraph spacing]

\index{inter paragraph spacing}

\Command{\tex{setupwhitespace}}
\Command{\tex{nowhitespace}}
\Command{\tex{whitespace}}
\Command{\tex{startlinecorrection}} % VZ 2006-11-15 setup->start
\Command{\tex{blank}}
\Command{\tex{setupblank}}
\Command{\tex{startpacked}}
\Command{\tex{startunpacked}}

The vertical spacing between paragraphs can be specified by:

\shortsetup{setupwhitespace}

This document is produced with \type{\setupwhitespace[medium]}.

When inter paragraph spacing is specified there are two commands available that
are seldom needed:

\starttyping
\nowhitespace
\whitespace
\stoptyping

When a paragraph consists of a horizontal line or a framed text like this:

\startbuffer
\framed{Ridderstraat 27, 8061GH Hasselt}
\stopbuffer

\getbuffer

Sometimes spacing is suboptimal. For that purpose you could carry out a
correction with:

\shortsetup{startlinecorrection}

So if you would type:

\startbuffer
\startlinecorrection
\framed{Ridderstraat 27, 8061GH Hasselt}
\stoplinecorrection
\stopbuffer

\typebuffer

you will get a better output. Only use these commands if really needed!

\getbuffer

Another command to deal with vertical spacing is:

\shortsetup{blank}

The bracket pair is optional and within the bracket pair you can type the amount
of spacing. Keywords like \type{small}, \type{medium} and \type{big} are related
to the fontsize.

\startbuffer
In official writings Hasselt always has the affix Ov. This is an
abbrevation for the province of {\em Overijssel}.
\blank[2*big]
The funny thing is that there is no other Hasselt in the Netherlands.
So it is redundant.
\blank
The affix is a leftover from the times that the Netherlands and
Belgium were one country under the reign of King Philip II of Spain.
\blank[2*big]
Hasselt in Belgium lies in the province of Limburg. One wonders if
the Belgian people write Hasselt (Li) on their letters.
\stopbuffer

\typebuffer

The command \type{\blank} without the bracket pair is the default space.

The example would become:

\getbuffer

The default spacing can be set up with:

\shortsetup{setupblank}

If you want to surpress vertical spacing you can use:

\shortsetup{startpacked}

In this manual the whitespace is set at \type{medium}. In the next situation this
set up is ignored and the lines are packed.

\startbuffer
\startpacked
Hasselt (Ov) lies in Overijssel.

Hasselt (Li) lies in Limburg.

Watch out: we talk about Limburg in Belgium. There is
also a Dutch Limburg.
\stoppacked
\stopbuffer

\typebuffer

This will become:

\getbuffer

It is not hard to imagine why there is also:

\shortsetup{startunpacked}

You can force vertical space with \type{\godown}. The distance is specified
within the brackets.

\shortsetup{godown}

Try not to use this command. It is always better use the \type{\setup...} commands
to setup your spacing model.

\stopsection

\startsection[title=Whitespace before and after text components]

Most text components that are coded with \CONTEXT\ have a \type{\setup...} command
with which you can define the whitespace before and after that component.

\starttyping
\setupitemize
    [before=,after=]

\setuphead
    [chapter]
    [before=,after=]

\setupframedtexts
    [before=,after=]
\stoptyping

The use of the \type{\setup...} commands prevents you from having to code
whitespaces throughout your \TEX\ document. This would lead to unreadable sources
and inconsistent use of whitepaces.

\stopsection

\startsection[title=Skipping space]

\Command{\tex{hskip}}
\Command{\tex{vskip}}

You can introduce horizontal and vertical space with \type{\hskip} and
\type{\vskip} commands.

Try to avoid these commands in your text. It will probably lead to inconsistent
spacing.

\stopsection

\startsection[title=Indentation]

\index{indentation}
\index{paragraph+indentation}

\Command{\tex{indenting}}
\Command{\tex{noindenting}}
\Command{\tex{setupindenting}}

You can set up the amount of the indentation with:

\shortsetup{setupindenting}

A reasonable indentation is achieved by:

\starttyping
\setupindenting[yes,]
\stoptyping

This will lead to indented paragraphs. By default, indentation after white space
(as issued by \type {\blank}) is suppressed.

You can locally influence the indentation state by using:

\shortsetup{indenting}

When for instance you say \type {never}, from that moment on indentation will be
surpressed. Saying \type {none}, only influences the next paragraph.

If you choose to use indentations, and at a certain place you explicitly {\em do
not} want to indent, you can also say:

\starttyping
\noindenting
\stoptyping

In some \type{\setup...} commands you can set the parameter \type{indent=yes}. This means
that the paragraph that follows the textcomponent will indent:

\startbuffer
\setupitemize[indentnext=yes]
\stopbuffer

\typebuffer

\stopsection

\stopchapter

\stopcomponent