1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23\setvariables
24 [ tugboat ]
25 [ type = article ,
26 columns = yes ,
27 grid = no ]
28
29\setvariables
30 [ tugboat ]
31 [ year = 1 9 0 0 ,
32 volume = 0 ,
33 number = 0 ,
34 page = 9 0 0 ]
35
36\setvariables
37 [ tugboat ]
38 [ title = ConTeXt style for TUGboat ,
39 subtitle = ,
40 keywords = ,
41 author = T . Boat ,
42 address = Pragmatically Advanced tugboats \\ 3 1 4 Pi Ave . \\ 8 0 6 1 GH Hasselt NL ,
43 email = { pragboat @ tug . org } ]
44
45
46
47
48
49\definebodyfontenvironment [ 8 pt ] [ interlinespace = 9 . 5 pt , big = 9 pt , small = 7 pt ]
50\definebodyfontenvironment [ 9 pt ] [ interlinespace = 1 1 pt , big = 1 0 pt , small = 8 pt ]
51\definebodyfontenvironment [ 1 0 pt ] [ interlinespace = 1 2 pt , big = 1 2 pt , small = 9 pt ]
52\definebodyfontenvironment [ 1 2 pt ] [ interlinespace = 1 4 pt , big = 1 4 . 4 pt , small = 1 0 pt ]
53\definebodyfontenvironment [ 1 4 . 4 pt ] [ interlinespace = 1 8 pt , big = 1 4 . 4 pt , small = 1 2 pt ]
54
55
56
57
58\setupbodyfont [ 1 0 pt ]
59
60
61
62\setupbodyfontenvironment
63 [ default ]
64 [ em = italic ]
65
66
67
68\sethyphenatedurlafter
69\sethyphenatedurlafter .
70\sethyphenatedurlafter
71
72
73
74
75
76
77\setuppapersize
78 [ letter ]
79 [ letter ]
80
81\setuplayout
82 [ topspace = 3 . 8 pc ,
83 header = 1 pc ,
84 headerdistance = 1 . 5 pc ,
85 height = middle ,
86 footerdistance = 2 pc ,
87 footer = 1 pc ,
88 bottomspace = 3 pc ,
89
90 backspace = 6 pc ,
91 width = middle ,
92 cutspace = 6 pc ,
93
94 margin = 4 pc ,
95 margindistance = 1 pc ,
96 ]
97
98
99
100
101\enablemode [ pagecolumns ]
102
103
104
105
106
107
108
109
110
111\setuppagenumbering
112 [ location = ,
113 alternative = doublesided ]
114
115
116
117
118
119
120\installpagebreakhandler { last } {}
121
122
123
124
125
126
127\setupindenting [ 2 0 pt , yes ]
128
129
130
131\setupenumerations [ indentnext = no ]
132\setupdescriptions [ indentnext = no ]
133
134
135
136
137
138\setupitemgroup
139 [ itemize ]
140 [ indentnext = no ,
141 align = right ]
142
143
144
145
146\setupitemgroup
147 [ itemize ]
148 [ each ]
149 [ margin = 1 pc ,
150 width = 1 em ,
151 distance = 0 pt ]
152
153\setupitemgroup
154 [ itemize ]
155 [ 1 ]
156 [ packed ]
157
158
159
160
161
162
163
164
165
166\setuphead
167 [ section , subsection , subsubsection ,
168 subject , subsubject , subsubsubject ]
169 [ style = bold ,
170 align = right ,
171 before = { \blank [ 8 pt ] } ,
172 after = { \blank [ 4 pt ] } ]
173
174
175
176
177
178
179\defineblank
180 [ tugblank ]
181 [ 3 pt ]
182
183
184
185
186\setupblank
187 [ 3 pt ]
188
189\setupitemize
190 [ 1 ]
191 [ before = { \blank [ tugblank ] } ,
192 after = { \blank [ tugblank ] } ,
193 inbetween = { \blank [ tugblank ] } ]
194
195\setuplines
196 [ before = { \blank [ tugblank ] } ,
197 after = { \blank [ tugblank ] } ,
198 inbetween = { \blank [ tugblank ] } ]
199
200
201
202
203
204
205\setuptyping
206 [ option = none ,
207 bodyfont = 9 pt ,
208 before = { \blank [ nowhite , tugblank ] } ,
209 after = { \blank [ back , nowhite , tugblank ] } ]
210
211
212
213\setuptyping [ LUA ][ option =]
214\setuptyping [ TEX ][ option =]
215\setuptyping [ MP ] [ option =]
216
217
218
219\setuplinenumbering [ style = \tfxx ]
220
221
222
223
224
225
226\setupcaptions
227 [ headstyle = \AcroFontBold ,
228 style = { \AcroFont \advance\baselineskip by 1 pt } ,
229 align = right ]
230
231
232
233\let \floatcaptionsuffix = :
234
235
236
237\setupfloat [ figure ][ align = middle , default = here ]
238\setupfloat [ table ] [ align = middle , default = here ]
239
240
241
242
243
244
245
246\setupfootnotes
247 [ bodyfont = 9 pt ]
248
249\doif { \getvariable { tugboat }{ columns }} { yes } {
250 \setupfootnotes
251 [ location = columns ]
252}
253
254\setupnotation
255 [ footnote ]
256 [ location = joinedup ,
257 width = fit ,
258 headstyle = normal ,
259 distance = . 5 em ]
260
261
262
263
264
265\definedescription
266 [ description ]
267 [ location = hanging ,
268 width = broad ,
269 before = { \blank [ tugblank ] } ,
270 after = { \blank [ tugblank ] } ]
271
272\defineenumeration
273 [ enumeration ]
274 [ location = hanging ,
275 width = broad ,
276 before = { \blank [ tugblank ] } ,
277 after = { \blank [ tugblank ] } ]
278
279
280
281
282
283\setupbtx
284 [ default : list : numbering ]
285 [ left = { [ } ,
286 right = { ] } ]
287
288\setupbtxlist
289 [ default ]
290 [ width = 2 em ,
291 style = { \frenchspacing } ,
292 align = { raggedright , verystrict } ]
293
294
295
296\setupcolors
297 [ conversion = always ]
298
299
300
301\defineblank [ tugbefore ] [ big ]
302\defineblank [ tuginbetween ][ big ]
303\defineblank [ tugafter ] [ tugbefore ]
304
305
306
307\def \StartAbstract
308 { \dostartbuffer [ abstract ][ StartAbstract ][ StopAbstract ] }
309
310\startsetups tugboat : abstract : setup
311
312
313
314
315 \setupnarrower
316 [ before = { \blank [ . 5 \baselineskip ] } ,
317
318 after = { \blank [ 1 0 pt ] } ,
319 middle = 4 . 8 7 5 pc ]
320
321 \setupindenting
322 [ 2 0 pt , yes ]
323
324\stopsetups
325
326
327
328\startsetups tugboat : banner : text : article
329
330 { \sl TUGboat } , \space
331 Volume \getvariable { tugboat }{ volume } \space
332 ( \getvariable { tugboat }{ year } ) , \space
333 No . \space \getvariable { tugboat }{ number }
334
335\stopsetups
336
337\def \postissno { Proceedings of the \tubyear \ Annual Meeting }
338
339\startsetups tugboat : banner : text : proceedings
340
341 \setups { tugboat : banner : text : article }
342 \thinspace \thinspace
343 \postissno
344
345\stopsetups
346
347\startsetups tugboat : banner : setup : article
348
349 \setupheadertexts
350 [ \setups { tugboat : banner : text : article } ]
351 [ \pagenumber ]
352
353
354
355 \setupfootertexts
356 [][ \getvariable { tugboat }{ author } ]
357 [ \getvariable { tugboat }{ title } ][]
358
359\stopsetups
360
361
362
363\setups { tugboat : banner : setup : article }
364
365
366
367\def \StartArticle { \setups { tugboat : \getvariable { tugboat }{ type } : start }}
368\def \StopArticle { \setups { tugboat : article : stop }}
369
370\startsetups tugboat : grid : setup : settings : yes
371
372 \setupblank
373 [ line ]
374
375 \defineblank [ tugbefore ] [ halfline ]
376 \defineblank [ tuginbetween ] [ halfline ]
377
378\stopsetups
379
380
381
382
383
384
385
386
387
388
389
390
391\startsetups tugboat : introduction : article
392
393
394
395 \start
396 \def \\ { \unskip \space \& \space \ignorespaces }
397 \hbox { \indent \getvariable { tugboat }{ author }}
398 \par
399 \stop
400
401\stopsetups
402
403\startsetups tugboat : article : start
404
405 \starttext
406
407 \setups { tugboat : columns : \getvariable { tugboat }{ columns }}
408 \setups { tugboat : banner : setup : \getvariable { tugboat }{ type }}
409
410 \doif { \getvariable { tugboat }{ columns }} { yes } {
411 \doifmodeelse { columnset } {
412 \startcolumnset
413 } {
414 \doifmodeelse { pagecolumns } {
415 \startpagecolumns
416 } {
417 \startcolumns
418 }
419 }
420 }
421
422 \setcounter
423 [ userpage ]
424 [ \getvariable { tugboat }{ page } ]
425
426 \setups { tugboat : grid : setup : \getvariable { tugboat }{ grid }}
427
428 \snaptogrid \vbox \bgroup
429
430 \forgetall
431 \hrule height . 6 pt
432 \blank [ halfline ]
433 \start
434 \let \\ = \par
435 { \bf \getvariable { tugboat }{ title }}
436 \par
437 \blank [ halfline ]
438 \hskip 2 0 pt \getvariable { tugboat }{ author }
439 \stop
440
441 \blank [ line ]
442
443 \doiftext { \getbuffer [ abstract ] } {
444 \let \\ = \endgraf
445 \setups { tugboat : abstract : setup }
446 \subject { Abstract }
447 \getbuffer [ abstract ]
448 }
449
450 \egroup
451
452\stopsetups
453
454\startsetups tugboat : affiliation : article
455
456 \blank [ line ]
457 \begingroup
458 \leftskip = 5 . 7 pc
459 \noindent
460 \llap { \sym { \diamond } \enspace }
461 \getvariable { tugboat }{ author }
462 \\
463 \getvariable { tugboat }{ address }
464 \\
465 { \tt \getvariable { tugboat }{ email }}
466 \par
467 \endgroup
468
469\stopsetups
470
471\startsetups tugboat : article : stop
472
473 \setups { tugboat : affiliation : \getvariable { tugboat }{ type }}
474
475
476
477 \ifx \writelastpage \undefined \else
478 \begingroup
479 \count 0 = \count 1
480 \writelastpage { 1 }
481 \endgroup
482 \fi
483
484 \stoptext
485
486\stopsetups
487
488
489
490\setuptolerance
491 [ strict ]
492
493
494
495\setupalign [ hz ]
496
497
498
499\overfullrule = 2 pt
500\hfuzz = . 5 pt
501
502
503
504
505\startsetups tugboat : columns : yes
506
507 \doifmodeelse { columnset } {
508 \setuplayout
509 [ grid = no ]
510 \setupcolumnset
511 [ distance = 1 . 5 pc ]
512 } {
513 \doifmodeelse { pagecolumns } {
514 \setuplayout
515 [ grid = no ]
516 \setuppagecolumns
517 [ distance = 1 . 5 pc ]
518 } {
519 \setupcolumns
520 [ distance = 1 . 5 pc ]
521 }
522 }
523
524\stopsetups
525
526
527
528
529
530
531
532\font \mflogo = logo 1 0
533
534
535
536
537
538\newcount \TestCount
539\newbox \TestBox
540
541\def \La
542 { \dontleavehmode
543 \begingroup
544 \TestCount = \the\fam
545 \setbox \TestBox = \hbox {$ \fam \TestCount \scriptstyle A $}
546 L \kern . 5 \wd \TestBox \raise . 4 2 ex \box \TestBox
547 \endgroup }
548
549
550
551
552
553
554
555
556
557
558\def \ALEPH { Aleph }
559\def \API { \acro { API }}
560\def \CCODE { C }
561\def \CD { \acro { CD }}
562\def \CMYK { \acro { CMYK }}
563\def \CONTEXT { C \kern . 0 3 3 3 emon \- \kern . 0 6 6 7 em \TeX \kern . 0 3 3 3 emt }
564\def \Cplusplus { C \plusplus }
565\def \CPU { \acro { CPU }}
566\def \DVI { \acro { DVI }}
567\def \DVIPDFMX { dvipdfmx }
568\def \DVIPS { dvips }
569\def \ETEX {$ \varepsilon $ \kern . 1 2 5 em \TeX }
570\def \FTP { \acro { FTP }}
571\def \HTTP { \acro { HTTP }}
572\def \IO { \acro { I O }}
573\def \ISO { \acro { ISO }}
574\def \KPSE { \acro { KPSE }}
575\def \KPSEWHICH { kpsewhich }
576\def \LATEX { \La \kern . 1 5 em \TeX }
577\def \LATEXE { \LaTeX {} \kern . 0 5 em 2 $ { \textstyle \varepsilon }$}
578\def \LINUX { Linux }
579\def \LPEG { Lpeg }
580\def \LUA { Lua }
581\def \LUAJIT { Lua \acro { JIT }}
582\def \LUATEX { Lua \- \TeX }
583\def \LUATOOLS { lua \- tools }
584\def \MATHML { Math \acro { ML }}
585\def \METAFUN { Metafun }
586\def \METAPOST { MetaPost }
587\def \METATEX { Meta \TeX {}}
588\def \MF {{ \mflogo META \- FONT }}
589\def \MKII { Mk \acro { II }}
590\def \MKIV { Mk \acro { IV }}
591\def \MPLIB { \acro { MP } lib }
592\def \MPTOPDF { mp \- to \- pdf }
593\def \MSWINDOWS { Windows }
594\def \MTXTOOLS { mtx \- tools }
595\def \NFSS { \acro { NFSS }}
596\def \OPENMATH { Open \- Math }
597\def \OPENTYPE { Open \- Type }
598\def \PASCAL { Pascal }
599\def \PDF { \acro { PDF }}
600\def \PDFTEX { pdf \/ \- \TeX }
601\def \plusplus { \lower . 4 5 ex \hbox {$ { }$}}
602\def \POSIX { \acro { POSIX }}
603\def \POSTSCRIPT { Post \- Script }
604\def \PRAGMA { Pragma \acro { ADE }}
605\def \RGB { \acro { RGB }}
606\def \RUBY { Ruby }
607\def \SCITE { Sci \acro { TE }}
608\def \TDS { \acro { TDS }}
609\def \TEX { \TeX }
610\def \TEXBOOK {{ \sl The \TeX book }}
611\def \TEXEXEC { \TeX exec }
612\def \TFM { \acro { TFM }}
613\def \TRUETYPE { True \- Type }
614\def \TYPEONE { Type 1 }
615\def \UTF { \acro { UTF }}
616\def \WEBC { Web 2 C }
617\def \XETEX { X \lower . 5 ex \hbox { \kern . 1 5 em \mirror { E }} \kern . 1 6 6 7 em \TeX }
618\def \XML { \acro { XML }}
619\def \XPATH { \acro { XP } ath }
620\def \XSLT { \acro { XSLT }}
621\def \XSLTPROC { \acro { XSLTPROC }}
622\def \ZIP { zip }
623
624\def \Dash { \unskip \nobreak \thinspace \thinspace \ignorespaces }
625\def \slash { \penalty 0 \hskip 0 pt \relax }
626
627
628
629\definefont [ AcroFont ] [ Serif * default sa . 9 1 ]
630\definefont [ AcroFontBold ] [ SerifBold * default sa . 9 1 ]
631\definefont [ AcroFontSmall ][ Serif * default sa . 8 0 ]
632
633\unexpanded \def \acro # 1 {{ \AcroFont # 1 }}
634\unexpanded \def \acrobf # 1 {{ \AcroFontBold # 1 }}
635\unexpanded \def \acrosmall # 1 {{ \AcroFontSmall # 1 }}
636
637
638
639
640\setuplanguage
641 [ en ]
642 [ lefthyphenmin = 2 ,
643 righthyphenmin = 3 ]
644
645
646
647
648\mainlanguage
649 [ en ]
650
651\hyphenation {
652 Post Script
653 data base
654 data bases
655}
656
657
658
659\doifelsefileexists { . . tugboat . dates } {
660
661 \newif \ifPrelimDraft
662 \newcount \issueseqno
663
664 \def \vol # 1 , # 2 . { \gdef \tubvol { # 1 }
665 \gdef \tubnum { # 2 }}
666 \def \issyear # 1 . { \gdef \tubyear { # 1 }}
667
668 \input . . tugboat . dates
669
670 \setevariables
671 [ tugboat ]
672 [ year = \tubyear ,
673 volume = \tubvol ,
674 number = \tubnum ,
675 page = \the\count 0 ]
676
677} {
678
679}
680
681
682
683\continueifinputfile { s tugboat . mkiv }
684
685
686
687\starttext
688
689\StartArticle
690
691\StartAbstract
692 \samplefile { bryson }
693\StopAbstract
694
695\dorecurse { 3 0 }{ \input ward \endgraf } \page
696
697\startitemize
698 \startitem \samplefile { ward } \stopitem
699 \startitem \samplefile { ward } \stopitem
700\stopitemize
701
702\StopArticle
703
704\setvariables [ tugboat ][ columns = yes ]
705
706\StartArticle
707
708\StartAbstract
709 \samplefile { bryson }
710\StopAbstract
711
712\dorecurse { 3 0 } {
713 \samplefile { ward } \endgraf
714} \page
715
716\StopArticle
717
718\stoptext
719
720
721 |