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\usemodule [ pre general ]
29
30
31
32
33
34
35
36\setupbodyfont
37 [ ant , 1 4 . 4 pt ]
38
39
40
41
42
43
44
45\setupcolors
46 [ state = start ]
47
48\definecolor [ BackgroundColor ] [ s = . 8 ]
49\definecolor [ ContrastColor ] [ s = . 9 ]
50\definecolor [ InteractionColor ] [ s = . 6 ]
51
52
53
54
55
56
57
58\setuppapersize
59 [ S 6 ][ S 6 ]
60
61
62
63
64
65
66
67
68
69\setuplayout
70 [ backspace = 2 cm ,
71 topspace = 2 cm ,
72 width = middle ,
73 header = 0 pt ,
74 height = middle ,
75 footer = 0 pt ,
76 bottomdistance = . 5 cm ,
77 bottom = 1 cm ]
78
79
80
81
82
83
84
85
86\setupinteractionmenu
87 [ bottom ]
88 [ rightoffset = 1 cm ]
89
90\startinteractionmenu [ bottom ]
91 \hfill \got [ CloseDocument ] \bfd Quit \\
92\stopinteractionmenu
93
94
95
96
97
98
99
100
101
102
103\setupbackgrounds
104 [ page ]
105 [ background = { color , Joke , GoAround } ,
106 backgroundcolor = BackgroundColor ]
107
108
109
110
111
112
113
114\defineoverlay [ GoAround ] [ \overlaybutton { forward } ]
115
116
117
118
119
120\defineoverlay [ Joke ] [ \useMPgraphic { background } ]
121
122\startuseMPgraphic { background }
123 width : = \overlaywidth ;
124 height : = \overlayheight ;
125 picture p ; p : = char 79 infont " \truefontname{Regular} " scaled 1 ;
126 pwidth : = xpart urcorner bbox p xpart llcorner bbox p ;
127 pheight : = ypart urcorner bbox p ypart llcorner bbox p ;
128 def do ( expr r ) =
129 addto currentpicture also p shifted center p scaled r
130 xscaled ( width pwidth ) yscaled ( height pheight )
131 withcolor \MPcolor { ContrastColor } ;
132 enddef ;
133 do ( 0.9 uniformdeviate 0.1 ) ;
134 do ( 1.4 uniformdeviate 0.1 ) ;
135 do ( 1.9 uniformdeviate 0.1 ) ;
136\stopuseMPgraphic
137
138
139
140
141
142
143
144\setupinteraction
145 [ state = start ,
146 color = InteractionColor ,
147 contrastcolor = InteractionColor ,
148 menu = on ]
149
150\setupinteractionscreen
151 [ option = max ]
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\definehead [ Topic ] [ chapter ]
191\definehead [ Subject ] [ section ]
192
193\definehead [ Nopic ] [ title ]
194
195
196
197
198
199
200
201
202
203
204\setuphead
205 [ Topic , Nopic , Subject ]
206 [ number = no ,
207 after = { \blank [ 2 * big ] \ToTheLeft \everypar { \ToTheRight }} ]
208
209
210
211
212\def \ToTheLeft
213 { \gdef \LeftSkip { 3 0 }
214 \rightskip 0 pt \relax
215 \leftskip 3 0 pt \relax }
216
217
218
219\def \ToTheRight
220 { \doglobal \increment ( \LeftSkip , 2 0 )
221 \leftskip = \LeftSkip pt \relax }
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238\def \Topics # 1
239 { \determinelistcharacteristics [ Topic ]
240 \ifcase \utilitylistlength \else
241 \Nopic [ Topics ] { # 1 }
242 \placelist [ Topic ][ criterium = all ]
243 \fi }
244
245
246
247
248
249
250
251\setuplist
252 [ Topic ]
253 [ alternative = command ,
254 command = \TopicListCommand ]
255
256\def \TopicListCommand # 1 # 2 # 3
257 { \item # 2 \par }
258
259
260
261
262\def \Subjects
263 {}
264
265
266
267
268
269
270
271
272
273
274\def \StartTitlePage
275 { \startstandardmakeup
276 \bfd \setupinterlinespace
277 \everypar { \everypar { \advance\leftskip 3 0 pt \relax }}
278 \let \\ = \blank
279 \begstrut }
280
281\def \StopTitlePage
282 { \endstrut
283 \vfill
284 \stopstandardmakeup }
285
286
287
288
289
290
291\def \TitlePage # 1
292 { \StartTitlePage # 1 \StopTitlePage }
293
294\doifnotmode { demo }{ \endinput }
295
296
297
298\usemodule [ pre antikwa ]
299
300\starttext
301
302\TitlePage { Title Page \\ pre polish }
303
304\Topics { Some Nice Lists }
305
306\Topic { Some Lists }
307
308\Subject { A list }
309
310\startitemize
311\item first
312\item second
313\stopitemize
314
315\Subject { A bigger list }
316
317\startitemize
318\item first
319\item second
320\item third
321\item fourth
322\stopitemize
323
324\stoptext
325 |