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=1900,
32 volume=0,
33 number=0,
34 page=900]
35
36\setvariables
37 [tugboat]
38 [title=ConTeXt style for TUGboat,
39 subtitle=,
40 keywords=,
41 author=T. Boat,
42 address=Pragmatically Advanced tugboats\\314 Pi Ave.\\8061GH Hasselt NL,
43 email={pragboat@tug.org}]
44
45
46
47
48
49\definebodyfontenvironment [8pt] [interlinespace=9.5pt, big=9pt, small=7pt]
50\definebodyfontenvironment [9pt] [interlinespace=11pt, big=10pt, small=8pt]
51\definebodyfontenvironment [10pt] [interlinespace=12pt, big=12pt, small=9pt]
52\definebodyfontenvironment [12pt] [interlinespace=14pt, big=14.4pt,small=10pt]
53\definebodyfontenvironment [14.4pt] [interlinespace=18pt, big=14.4pt,small=12pt]
54
55
56
57
58\setupbodyfont [10pt]
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.8pc,
83 header=1pc,
84 headerdistance=1.5pc,
85 height=middle,
86 footerdistance=2pc,
87 footer=1pc,
88 bottomspace=3pc,
89
90 backspace=6pc,
91 width=middle,
92 cutspace=6pc,
93
94 margin=4pc,
95 margindistance=1pc,
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[20pt,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=1pc,
150 width=1em,
151 distance=0pt]
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[8pt]},
172 after={\blank[4pt]}]
173
174
175
176
177
178
179\defineblank
180 [tugblank]
181 [3pt]
182
183
184
185
186\setupblank
187 [3pt]
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=9pt,
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 1pt},
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=9pt]
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=.5em]
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=2em,
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[10pt]},
319 middle=4.875pc]
320
321 \setupindenting
322 [20pt,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 \enforced\protected\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 .6pt
432 \blank[halfline]
433 \start
434 \enforced\let\\\par
435 {\bf\getvariable{tugboat}{title}}
436 \par
437 \blank[halfline]
438 \hskip20pt\getvariable{tugboat}{author}
439 \stop
440
441 \blank[line]
442
443 \doiftext {\getbuffer[abstract]} {
444 \enforced\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.7pc
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 \count0=\count1
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 = 2pt
500\hfuzz = .5pt
501
502
503
504
505\startsetups tugboat:columns:yes
506
507 \doifmodeelse {columnset} {
508 \setuplayout
509 [grid=no]
510 \setupcolumnset
511 [distance=1.5pc]
512 } {
513 \doifmodeelse {pagecolumns} {
514 \setuplayout
515 [grid=no]
516 \setuppagecolumns
517 [distance=1.5pc]
518 } {
519 \setupcolumns
520 [distance=1.5pc]
521 }
522 }
523
524\stopsetups
525
526
527
528
529
530
531
532\font\mflogo=logo10
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.42ex\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.0333emon\-\kern.0667em\TeX\kern.0333emt}
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.125em\TeX}
570\def\FTP {\acro{FTP}}
571\def\HTTP {\acro{HTTP}}
572\def\IO {\acro{IO}}
573\def\ISO {\acro{ISO}}
574\def\KPSE {\acro{KPSE}}
575\def\KPSEWHICH {kpsewhich}
576\def\LATEX {\La\kern.15em\TeX}
577\def\LATEXE {\LaTeX{}\kern.05em2${\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.45ex\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 {Type1}
615\def\UTF {\acro{UTF}}
616\def\WEBC {Web2C}
617\def\XETEX {X\lower.5ex\hbox{\kern.15em\mirror{E}}\kern.1667em\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 {\penalty0 \hskip0pt \relax}
626
627
628
629\definefont[AcroFont] [Serif*default sa .91]
630\definefont[AcroFontBold] [SerifBold*default sa .91]
631\definefont[AcroFontSmall][Serif*default sa .80]
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 PostScript
653 database
654 databases
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\count0]
676
677} {
678
679}
680
681
682
683\continueifinputfile{stugboat.mkiv}
684
685
686
687\starttext
688
689\StartArticle
690
691\StartAbstract
692 \samplefile{bryson}
693\StopAbstract
694
695\dorecurse{30}{\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 {30} {
713 \samplefile{ward}\endgraf
714} \page
715
716\StopArticle
717
718\stoptext
719
720
721 |