1
2
3\startenvironment macbstyle
4
5\usemodule[chart]
6
7\usemodule[s][abr03]
8\usemodule[x][set11]
9
10\unprotect
11
12
13
14
15
16\loadsetups[icontext]
17
18\setupsetup
19 [\c!criterium=\v!used]
20
21\setupframedtexts
22 [setuptext]
23 [\c!before={\blank[\v!big]},
24 \c!after={\blank[\v!big]},
25 \c!background=setupshape,
26 \c!backgroundoffset=10pt,
27 \c!rulethickness=5pt,
28 \c!offset=15pt,
29 \c!frame=\v!off]
30
31\setupexternalfigures
32 [\c!directory={..graphics}]
33
34
35
36
37
38
39\setuplayout
40 [\c!backspace=22.5mm,
41 \c!width=\v!fit,
42 \c!cutspace=22.5mm,
43 \c!margin=20mm,
44 \c!margindistance=5mm,
45 \c!topspace=15mm,
46 \c!header=10mm,
47 \c!headerdistance=5mm,
48 \c!height=\v!fit,
49 \c!footerdistance=5mm,
50 \c!footer=15mm,
51 \c!bottomspace=15mm]
52
53\setuppagenumbering
54 [\c!alternative=\v!doublesided]
55
56
57
58\doifmodeelse {atpragma} {
59 \setupbodyfont[lucidaot,10pt]
60} {
61 \setupbodyfont[palatino,10pt]
62}
63
64
65
66
67
68
69
70\setupwhitespace
71 [\v!medium]
72
73\setupblank
74 [\v!medium]
75
76
77
78\setuptyping
79 [\c!margin=\v!standard,
80 \c!blank=\v!medium]
81
82
83
84
85\setuptolerance
86 [\v!verytolerant,\v!stretch]
87
88
89
90
91\defineoverlay [chapterstate] [\uniqueMPpagegraphic{chapter-state}]
92\defineoverlay [pagenumberstate] [\uniqueMPgraphic{pagenumber-state}]
93
94\defineoverlay [basicshapelight] [\useMPgraphic{basic-shape-light}]
95\defineoverlay [basicshapedark] [\useMPgraphic{basic-shape-dark}]
96
97\defineoverlay [setupshape] [\useMPgraphic{setup-shape}]
98\defineoverlay [noterule] [\uniqueMPgraphic{note-rule}]
99\defineoverlay [columnrule] [\uniqueMPgraphic{column-rule}]
100
101
102
103
104
105\starttexdefinition unexpanded FootnoteRule
106 \blank[2*\v!big]
107 \framed
108 [\c!background=noterule,
109 \c!width=.4\makeupwidth,
110 \c!height=2pt,
111 \c!offset=\v!overlay,
112 \c!rulethickness=2pt,
113 \c!frame=\v!off]
114 {}
115 \blank[\v!small]
116\stoptexdefinition
117
118\setupfootnotes
119 [\c!rule=off,
120 \c!before=\FootnoteRule]
121
122
123
124
125
126\setuphead
127 [\v!chapter]
128 [\c!command=\HeadCommand,
129 \c!page=,
130 \c!before={\blank[3*\v!big]},
131 \c!after={\blank[2*\v!big,\v!samepage]}]
132
133\setuphead
134 [\v!title]
135 [\c!page=\v!right]
136
137\starttexdefinition unexpanded HeadCommand #number #title
138 \alignedline {\v!outer} {\v!left} {
139 \framed [
140 \c!background=basicshapedark,
141 \c!rulethickness=10pt,
142 \c!frame=\v!off,
143 \c!strut=\v!no,
144 \c!offset=24pt,
145 \c!align=\v!middle
146 ] {
147 \doifmode {*\v!sectionnumber} {
148 #number
149 \kern.5em
150 \blackrule [
151 color=green,
152 width=1pt,
153 height=1.5\ht\strutbox,
154 depth=1.25\dp\strutbox
155 ]
156 \kern.5em
157 }
158 #title
159 }
160 }
161\stoptexdefinition
162
163
164
165
166
167
168\setupfootertexts
169 [\v!margin]
170 [][\fastsetup{chapterindicator}]
171
172\startsetups chapterindicator
173 \determineheadnumber[\v!chapter]
174 \ifcase\currentheadnumber\else
175 \vbox to \makeupheight {
176 \scratchcounter=\numexpr\lastpage\realpageno\relax
177 \vskip2cm
178 \vskip0pt plus \realpageno cm
179 \framed [
180 \c!background=chapterstate,
181 \c!width=36pt,
182 \c!height=72pt,
183 \c!backgroundoffset=5pt,
184
185 \c!frame=\v!off
186 ] {
187 \lower.5\dp\strutbox\hbox {
188 \bfb
189 \getmarking[\v!chapter\v!number]
190 }
191 }
192 \vskip0pt plus \scratchcounter cm
193 \vskip2cm
194 }
195 \fi
196\stopsetups
197
198
199
200
201\setupregister
202 [\v!index]
203 [\c!command=\IndexCommand,
204 \c!before={\blank[\v!line]},
205 \c!after=]
206
207\starttexdefinition unexpanded IndexCommand #text
208 \framed [
209 \c!background=basicshapedark,
210 \c!width=36pt,
211 \c!frame=\v!off,
212 \c!offset=4pt,
213 \c!align=\v!middle,
214 \c!rulethickness=4pt
215 ] {
216 #text
217 }
218\stoptexdefinition
219
220
221
222
223\setuppagenumbering
224 [\c!location={\v!footer,\v!middle},
225 \c!command=\PageNumberCommand]
226
227\starttexdefinition unexpanded PageNumberCommand #pagenumber
228 \framed [
229 \c!background=pagenumberstate,
230 \c!backgroundoffset=5pt,
231 \c!frame=\v!off,
232 \c!offset=6pt
233 ] {
234 \lower.5\dp\strutbox\hbox spread 60pt {
235 \hss
236 #pagenumber
237 \hss
238 }
239 }
240\stoptexdefinition
241
242
243
244
245\setupheadertexts
246 [{\getmarking[\v!chapter]}]
247
248
249
250\setupitemgroup
251 [\v!itemize]
252 [1]
253 [\v!autointro]
254
255
256
257\newbox\CoverBackgroundBox
258
259\definebodyfontenvironment[1.9pt]
260
261\defineframed
262 [CoverFramed]
263 [
264 \c!background=basicshapedark,
265 \c!backgroundoffset=1pt,
266 \c!rulethickness=2pt,
267 \c!frame=\v!off]
268
269\starttexdefinition unexpanded ShowSetupOnCover #n #tag #xmlroot
270 \dontleavehmode
271 \CoverFramed {
272 \tttf\showsetupnameonly{#1}{#2}{#3}
273 }
274 \kern\zeropoint
275 \hskip1em plus 1em minus .25em\relax
276\stoptexdefinition
277
278\definecolor[CoverTransparency][a=1,t=.5]
279
280\startsetups coverbackground
281
282 \ifvoid\CoverBackgroundBox
283
284 \global\setbox\CoverBackgroundBox
285 \startnicelyfilledbox
286 [\c!width=\paperwidth,
287 \c!height=\paperheight,
288
289
290 \c!offset=\zeropoint,
291 \c!strut=\v!no]
292 \switchtobodyfont
293 [1.9pt]
294 \starttransparent[CoverTransparency]
295 \placelistofsorts
296 [texcommand]
297 [\c!command=\ShowSetupOnCover,
298 \c!criterium=\v!all]
299 \stoptransparent
300 \stopnicelyfilledbox
301
302 \fi
303
304 \copy\CoverBackgroundBox
305
306\stopsetups
307
308\defineoverlay[coverbackground][\setups{coverbackground}]
309
310\setupdocument
311 [author={Ton Otten\crlf PRAGMA ADE},
312 translator=,
313 contributer=,
314 before=\setups{coverpage},
315 after=\setups{backpage}]
316
317\defineoverlay[gotocontents][\overlaybutton{contents}]
318
319\startsetups coverpage
320
321 \setupbackgrounds
322 [\v!rightpage]
323 [\c!background=coverbackground]
324
325 \setupbackgrounds
326 [\v!text]
327 [\v!text]
328 [\c!background=gotocontents]
329
330 \startmakeup
331 [\v!standard]
332 [\c!doublesided=\v!empty,
333 \c!headerstate=\v!none,
334 \c!footerstate=\v!none]
335
336 \hbox to \hsize \bgroup
337 \hss
338
339 \definedfont[Bold*default at 40pt]
340 \framed
341 [\c!background=basicshapedark,
342 \c!frame=\v!off,
343 \c!rulethickness=30pt,
344 \c!align=\v!middle,
345 \c!offset=40pt]
346 {\dontleavehmode\hbox{\documentvariable{title}}\par
347 \dontleavehmode\hbox{\documentvariable{subtitle}}}
348 \egroup
349
350 \vfill
351
352 \doifsomething {\documentvariable{subtitle}} {
353
354 \hbox to \hsize \bgroup
355
356 \definedfont[Bold*default at 20pt]
357 \framed
358 [\c!background=basicshapedark,
359 \c!frame=\v!off,
360 \c!rulethickness=15pt,
361 \c!align=\v!middle,
362 \c!offset=20pt]
363 {\documentvariable{version}}
364 \hss
365 \egroup
366
367 }
368
369 \hbox to \hsize \bgroup
370 \hss
371
372 \definedfont[Bold*default at 24pt]
373 \framed
374 [\c!background=basicshapedark,
375 \c!frame=\v!off,
376 \c!rulethickness=18pt,
377 \c!align=\v!middle,
378 \c!offset=35pt]
379 {\documentvariable{author}}
380 \egroup
381
382 \stopmakeup
383
384 \setupbackgrounds
385 [\v!text]
386 [\v!text]
387 [\c!background=]
388
389 \setupbackgrounds
390 [\v!rightpage]
391 [\c!background=]
392
393 \doifmode {screen} {
394
395 \setupbackgrounds
396 [\v!page]
397 [\c!background=\v!screen,
398 \c!backgroundscreen=.95]
399
400 \setupbackgrounds
401 [\v!text]
402 [\v!text]
403 [\c!backgroundoffset=.25cm,
404 \c!depth=.125cm,
405 \c!background=\v!color,
406 \c!backgroundcolor=white]
407
408 }
409
410 \component[macbcopyright]
411
412\stopsetups
413
414
415
416\startsetups backpage
417
418 \page
419 [\v!yes,\v!blank,\v!right]
420
421 \component[macbcolofon]
422
423 \page
424 [\v!yes,\v!blank,\v!left]
425
426 \setupbackgrounds
427 [\v!leftpage]
428 [\c!background=coverbackground]
429
430 \startmakeup
431 [\v!standard]
432 [\c!page=,
433 \c!doublesided=\v!no,
434 \c!headerstate=\v!none,
435 \c!footerstate=\v!none]
436
437 \setuptolerance
438 [\v!verytolerant]
439
440 \vfill
441
442 \hbox to \hsize \bgroup
443
444 \framed
445 [\c!background=\v!color,
446 \c!backgroundcolor=white,
447 \c!frame=\v!off,
448 \c!offset=10pt,
449 \c!corner=\v!round,
450 \c!width=.4\makeupwidth,
451 \c!height=\textheight,
452 \c!align=\v!middle,
453 \c!strut=\v!no]
454 {
455 \vfil
456 \component[macbenbackpage]
457 \vfil
458 }
459
460 \hss
461
462 \egroup
463
464 \vfill
465
466 \stopmakeup
467
468\stopsetups
469
470
471
472
473
474\setupsectionblock [\v!frontpart] [\c!page=\v!right,\c!before=\setups{frontpart}]
475\setupsectionblock [\v!bodypart] [\c!page=\v!right,\c!before=\setups{bodypart}]
476\setupsectionblock [\v!appendix] [\c!page=\v!right,\c!before=\setups{appendix}]
477\setupsectionblock [\v!backpart] [\c!page=\v!right,\c!before=\setups{backpart}]
478
479\setuplist
480 [\v!chapter]
481 [\c!criterium=\v!all,
482 \c!before=,
483 \c!after=]
484
485\startsetups frontpart
486
487 \setuphead[\v!chapter][\c!page=\v!right]
488
489 \writebetweenlist[\v!chapter]{\blank}
490
491 \startnamedsection[\v!chapter][\c!title=\labeltext{document:contents}]
492
493 \startmixedcolumns[documentcolumns]
494 \placelist[\v!chapter]
495 \stopmixedcolumns
496
497 \stopnamedsection
498
499 \page[\v!right]
500
501\stopsetups
502
503\startsetups bodypart
504
505 \setuphead[\v!chapter][\c!page=]
506
507 \writebetweenlist[\v!chapter]{\blank}
508
509\stopsetups
510
511\startsetups appendix
512
513 \setuphead[\v!chapter][\c!page=\v!right]
514
515 \writebetweenlist[\v!chapter]{\blank}
516
517 \startnamedsection[\v!chapter][\c!title=\labeltext{document:commanddefinitions},\c!reference=commandsetups]
518
519 \component[macb\currentmainlanguagecommandlist]
520
521 \blank[2*\v!big]
522
523 \start
524
525 \switchtobodyfont[8pt]
526
527
528
529 \setupframedtexts
530 [setuptext]
531 [\c!before={\vskip6pt},
532 \c!after={\vskip6pt}]
533
534
535 \placelistofsorts[texcommand]
536
537
538 \stop
539
540 \stopnamedsection
541
542 \startnamedsection[\v!chapter][\c!title=\labeltext{document:commandindex}]
543
544 \startmixedcolumns[documentcolumns]
545 \placeregister[Command]
546 \stopmixedcolumns
547
548 \stopnamedsection
549
550 \startnamedsection[\v!chapter][\c!title=\labeltext{document:subjectindex}]
551
552 \startmixedcolumns[documentcolumns]
553 \placeregister[\v!index]
554 \stopmixedcolumns
555
556 \stopnamedsection
557
558 \startnamedsection[\v!chapter][\c!title=\labeltext{document:supportandreading}]
559
560 \index{support}
561
562 \startnamedsection[\v!section][\c!title=\labeltext{document:support}]
563
564 \component[macb\currentmainlanguagesupport]
565
566 \stopnamedsection
567
568 \startnamedsection[\v!section][\c!title=\labeltext{document:manuals}]
569
570
571
572 \startlines
573 \goto {Chemical Formulas in \CONTEXT} [ url (manual:chemicex) ]
574 \goto {Color Separation} [ url (manual:color) ]
575 \goto {Columns} [ url (manual:columns) ]
576 \goto {\CONTEXT, the manual} [ url (manual:context) ]
577 \goto {Dealing with \XML} [ url (manual:xml) ]
578 \goto {Extreme Tables} [ url (manual:extab) ]
579 \goto {Figures} [ url (manual:figures) ]
580 \goto {Fonts in \CONTEXT} [ url (manual:fonts) ]
581 \goto {luatools, mtxrun, context} [ url (manual:tools) ]
582 \goto {\METAFUN\ manual} [ url (manual:metafun) ]
583 \goto {Natural Tables} [ url (manual:nattab) ]
584 \goto {\PPCHTEX\ Manual} [ url (manual:chemic) ]
585 \goto {Quick Reference (dutch)} [ url (manual:qrnl) ]
586 \goto {Quick Reference (english)} [ url (manual:qren) ]
587 \goto {\SCITE\ in \CONTEXT} [ url (manual:scite) ]
588 \goto {Units} [ url (manual:units) ]
589 \goto {Widgets} [ url (manual:widgets) ]
590 \stoplines
591
592 \stopnamedsection
593
594 \startnamedsection[\v!section][\c!title=\labeltext{document:magazines}]
595
596
597
598 \startlines
599 \goto {\CONTEXT\ Magazine 1103} [ url (thisway:crossrefs) ]
600 \goto {Project structure} [ url (thisway:projstruc) ]
601 \stoplines
602
603 \stopnamedsection
604
605 \stopnamedsection
606
607\stopsetups
608
609\startsetups backpart
610
611 \setuphead[\v!chapter][\c!page=\v!right]
612
613 \writebetweenlist[\v!chapter]{\blank}
614
615\stopsetups
616
617
618
619
620
621
622
623\installmixedcolumnseparator{ColumnRule}
624 {\framed
625 [\c!background=columnrule,
626 \c!height=\mixedcolumnseparatorheight,
627 \c!depth=\mixedcolumnseparatordepth,
628 \c!width=\mixedcolumnseparatorwidth,
629 \c!offset=\v!overlay,
630 \c!rulethickness=2pt,
631 \c!frame=\v!off]
632 {}}
633
634
635
636
637
638
639
640
641\setupmixedcolumns
642 [\c!n=2,
643 \c!distance=36pt,
644 \c!separator=ColumnRule]
645
646\definemixedcolumns
647 [documentcolumns]
648 [\c!n=2,
649 \c!distance=36pt,
650 \c!separator=ColumnRule]
651
652\defineregister
653 [Command]
654
655\setupregister
656 [Command]
657 [\c!indicator=\v!off,
658 \c!before={\blank[\v!line]}]
659
660\protect
661
662\stopenvironment
663 |