Debian Codegraph @

doc/tugboat.cmn

raw
1 %% @latexfile{
2 %% filename="tugboat.cmn",
3 %% version="1.13g",
4 %% date="4-Nov-1995",
5 %% filetype="common macros for TUGboat",
6 %% copyright="Copyright (C) TeX Users Group.
7 %% Copying of this file is authorized only if either:
8 %% (1) you make absolutely no changes to your copy, OR
9 %% (2) if you do make changes, you first rename it to some
10 %% other name.",
11 %% author="TeX Users Group",
12 %% address="TeX Users Group,
13 %% 1850 Union Street, \#1637,
14 %% San Francisco, CA 94123,
15 %% USA",
16 %% telephone="415-982-8449",
17 %% email="Internet: [email protected]",
18 %% codetable="ISO/ASCII",
19 %% checksumtype="line count",
20 %% checksum="997",
21 %% keywords="tex users group, tugboat, common macros",
22 %% abstract="This file contains macros common to both
23 %% the PLAIN and LaTeX style files for TUGboat,
24 %% the Communications of the TeX Users Group.
25 %% Among other things, it contains supplementary
26 %% definitions for abbreviations and logos that
27 %% appear in TUGboat."
28 %% }
29 %%
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31
32 \def\fileversion{v1.13f}
33 \def\filedate{15 Apr 1994}
34
35 \message{File `TUGBOAT.CMN' \fileversion \space\space <\filedate>}
36
37 %
38 % ***** TUGBOAT.CMN *****
39 %
40 % See the bottom of the file (after \endinput) for a list of
41 % items defined.
42 %
43
44 % *************************************************************************
45
46 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47 %
48 % ***** helpful shorthand *****
49 %
50
51 % The following allow for easier changes of category. These require that
52 % the character be addressed as a control-sequence: e.g. \makeescape\/ will
53 % make the / an escape character.
54
55 \def\makeescape#1{\catcode`#1=0 }
56 \def\makebgroup#1{\catcode`#1=1 }
57 \def\makeegroup#1{\catcode`#1=2 }
58 \def\makemath#1{\catcode`#1=3 }
59 \def\makealign#1{\catcode`#1=4 }
60 \def\makeeol#1{\catcode`#1=5 }
61 \def\makeparm#1{\catcode`#1=6 }
62 \def\makesup#1{\catcode`#1=7 }
63 \def\makesub#1{\catcode`#1=8 }
64 \def\makeignore#1{\catcode`#1=9 }
65 \def\makespace#1{\catcode`#1=10 }
66 \def\makeletter#1{\catcode`#1=11 }
67 \def\makeother#1{\catcode`#1=12 }
68 \def\makeactive#1{\catcode`#1=13 }
69 \def\makecomment#1{\catcode`#1=14 }
70
71 \def\makeatletter{\catcode`\@=11 } % included for historical reasons
72 \chardef\other=12
73 \def\makeatother{\catcode`\@=\other}
74
75 % alternative to localization
76 \def\savecat#1{%
77 \expandafter\xdef\csname\string#1savedcat\endcsname{\the\catcode`#1}}
78 \def\restorecat#1{\catcode`#1=\csname\string#1savedcat\endcsname}
79
80
81 \savecat\@
82 \makeletter\@ % used, as in PLAIN, in protected control sequences
83
84 % for restoring meanings of global control sequences
85 \def\SaveCS#1{%
86 \def\scratch{\expandafter\let\csname saved@@#1\endcsname}%
87 \expandafter\scratch\csname#1\endcsname}
88 \def\RestoreCS#1{%
89 \def\scratch{\expandafter\let\csname#1\endcsname}%
90 \expandafter\scratch\csname saved@@#1\endcsname}
91
92
93 % To distinguish between macro files loaded
94
95 \def\plaintubstyle{plain}
96 \def\latextubstyle{latex}
97 \ifx\tugstyloaded@\undefined\let\tugstyloaded@\plaintubstyle\fi
98
99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
100 %
101 % ***** abbreviations and logos *****
102 %
103
104 \def\AllTeX{(\La)\TeX}
105
106 \def\AMS{American Mathematical Society}
107
108 \def\AmS{{\the\textfont2 A}\kern-.1667em\lower.5ex\hbox
109 {\the\textfont2 M}\kern-.125em{\the\textfont2 S}}
110 \def\AmSLaTeX{\AmS-\LaTeX}
111 \def\AmSTeX{\AmS-\TeX}
112
113 \def\aw{A\kern.1em-W}
114 \def\AW{Addison\kern.1em-\penalty\z@\hskip\z@skip Wesley}
115
116 \def\BibTeX{{\rm B\kern-.05em{\smc i\kern-.025emb}\kern-.08em\TeX}}
117
118 \def\CandT{{\sl Computers \& Typesetting}}
119
120 \def\CTAN{{\SMC CTAN}\spacefactor1000 }
121
122 \def\DVItoVDU{DVIto\kern-.12em VDU}
123
124 \def\ISBN{{\SMC ISBN} }
125 \def\ISSN{{\SMC ISSN} }
126
127 % Japanese TeX
128 \def\JTeX{\leavevmode\hbox{\lower.5ex\hbox{J}\kern-.18em\TeX}}
129
130 \def\JoT{{\sl The Joy of \TeX}}
131
132 \def\LAMSTeX{L\raise.42ex\hbox{\kern-.3em\the\scriptfont2 A}%
133 \kern-.2em\lower.376ex\hbox{\the\textfont2 M}\kern-.125em
134 {\the\textfont2 S}-\TeX}
135
136 % note -- \LaTeX definition is from LATEX.TEX 2.09 of 7 Jan 86,
137 % adapted for additional flexibility in TUGboat
138 %\def\LaTeX{\TestCount=\the\fam \leavevmode L\raise.42ex
139 % \hbox{$\fam\TestCount\scriptstyle\kern-.3em A$}\kern-.15em\TeX}
140 % note -- broken in two parts, to permit separate use of La,
141 % as in (La)TeX
142 \def\La{\TestCount=\the\fam \leavevmode L%
143 \setbox\TestBox=\hbox{$\fam\TestCount\scriptstyle A$}%
144 \kern-.5\wd\TestBox\raise.42ex\box\TestBox}
145 \def\LaTeX{\La\kern-.15em\TeX}
146 \def\LaTeXe{\LaTeX{}\kern.05em2$_{\textstyle\varepsilon}$}
147
148 % for Robert McGaffey
149 \def\Mc{\setbox\TestBox=\hbox{M}M\vbox to\ht\TestBox{\hbox{c}\vfil}}
150
151 \font\manual=logo10 % font used for the METAFONT logo, etc.
152 \def\MF{{\manual META}\-{\manual FONT}\spacefactor1000 }
153 \def\MP{{\manual META}\-{\manual POST}\spacefactor1000 }
154 \def\mf{{\smc Metafont}}
155 \def\MFB{{\sl The \slMF book}}
156
157 % multilingual (INRS) TeX
158 \def\mtex{T\kern-.1667em\lower.5ex\hbox{\^E}\kern-.125emX\spacefactor1000 }
159
160 \def\pcMF{\leavevmode\raise.5ex\hbox{p\kern-.3ptc}MF\spacefactor1000 }
161 \def\PCTeX{PC\thinspace\TeX}
162 \def\pcTeX{\leavevmode\raise.5ex\hbox{p\kern-.3ptc}\TeX}
163
164 \def\Pas{Pascal}
165
166 \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC\spacefactor1000 }
167 \def\PiCTeX{\PiC\kern-.11em\TeX}
168
169 \def\plain{{\tt plain}}
170
171 \def\POBox{P.\thinspace O.~Box }
172 \def\POBoxTUG{\POBox\unskip~9506, Providence, RI~02940}
173
174 \def\PS{{Post\-Script}}
175
176 \def\SC{Steering Committee}
177
178 \def\SGML{{\SMC SGML}\spacefactor1000 }
179
180 \def\SliTeX{{\rm S\kern-.06em{\smc l\kern-.035emi}\kern-.06em\TeX}}
181
182 \def\slMF{\MF}
183 % Use \font\manualsl=logosl10 instead, if it's available,
184 % for \def\slMF{{\manualsl META}\-{\manualsl FONT}\spacefactor1000 }
185
186 % Atari ST (Klaus Guntermann)
187 \def\stTeX{{\smc st\rm\kern-0.13em\TeX}}
188
189 \def\TANGLE{{\tt TANGLE}\spacefactor1000 }
190
191 \def\TB{{\sl The \TeX book}}
192 \def\TP{{\sl \TeX\/}: {\sl The Program\/}}
193
194 \def\TeX{T\kern-.1667em\lower.424ex\hbox{E}\kern-.125emX\spacefactor1000 }
195
196 \def\TeXhax{\TeX hax}
197
198 % Don Hosek
199 \def\TeXMaG{\TeX M\kern-.1667em\lower.5ex\hbox{A}\kern-.2267emG%
200 \spacefactor1000 }
201
202 %\def\TeXtures{\TestCount=\the\fam
203 % \TeX\-\hbox{$\fam\TestCount\scriptstyle TURES$}}
204 \def\TeXtures{{\it Textures}}
205 \let\Textures=\TeXtures
206
207 \def\TeXXeT{\TeX-{}-\XeT}
208
209 \def\ttn{{\sl TTN}\spacefactor1000 }
210 \def\TTN{{\sl \TeX{} and TUG NEWS}\spacefactor1000 }
211
212 \def\tubfont{\sl} % redefined in other situations
213 \def\TUB{{\tubfont TUGboat\/}}
214
215 \def\TUG{\TeX\ \UG}
216
217 \def\UG{Users Group}
218
219 \def\UNIX{{\SMC UNIX}\spacefactor1000 }
220
221 \def\VAX{V\kern-.12em A\kern-.1em X\spacefactor1000 }
222
223 \def\VorTeX{V\kern-2.7pt\lower.5ex\hbox{O\kern-1.4pt R}\kern-2.6pt\TeX}
224
225 \def\XeT{X\kern-.125em\lower.424ex\hbox{E}\kern-.1667emT\spacefactor1000 }
226
227 \def\WEB{{\tt WEB}\spacefactor1000 }
228 \def\WEAVE{{\tt WEAVE}\spacefactor1000 }
229
230
231
232 %********************************************************************
233
234 \newlinechar=`\^^J
235 \normallineskiplimit=1pt
236
237 \clubpenalty=10000
238 \widowpenalty=10000
239
240 \def\NoParIndent{\parindent=\z@}
241 \newdimen\normalparindent \normalparindent=20pt % plain = 20pt
242 \def\NormalParIndent{\global\parindent=\normalparindent}
243 \NormalParIndent
244
245 \def\BlackBoxes{\overfullrule=5pt }
246 \def\NoBlackBoxes{\overfullrule=\z@ }
247 \def\newline{\hskip\z@ plus \pagewd \break}
248 \def\nohyphens{\hyphenpenalty\@M\exhyphenpenalty\@M}
249
250 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
251 %
252 % ***** utility registers and definitions *****
253 %
254
255 % test registers for transient use; paired - internal/external
256 \newbox\T@stBox \newbox\TestBox
257 \newcount\T@stCount \newcount\TestCount
258 \newdimen\T@stDimen \newdimen\TestDimen
259 \newif\ifT@stIf \newif\ifTestIf
260
261
262 % \cs existence test, stolen from TeXbook exercise 7.7
263 \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax }
264
265 % LaTeX conventions which are also useful here.
266 \ifx\tugstyloaded@\plaintubstyle
267 \let\@@input\input
268 \def\iinput#1{\@@input#1 }
269 \def\@inputcheck{\if\@nextchar\bgroup
270 \expandafter\iinput\else\expandafter\@@input\fi}
271 \def\input{\futurelet\@nextchar\@inputcheck}
272 \fi
273
274 % Smashes repeated from AMS-TeX; PLAIN implements only full \smash .
275 \newif\iftop@ \newif\ifbot@
276 \def\topsmash{\top@true\bot@false\smash@}
277 \def\botsmash{\top@false\bot@true\smash@}
278 \def\smash{\top@true\bot@true\smash@}
279 \def\smash@{\relax\ifmmode\def\next{\mathpalette\mathsm@sh}%
280 \else\let\next\makesm@sh\fi \next }
281 \def\finsm@sh{\iftop@\ht\z@\z@\fi\ifbot@\dp\z@\z@\fi\box\z@}
282
283
284 % Vertical `laps'; cf. \llap and \rlap
285 \long\def\ulap#1{\vbox to \z@{\vss#1}}
286 \long\def\dlap#1{\vbox to \z@{#1\vss}}
287
288 % And centered horizontal and vertical `laps'
289 \def\xlap#1{\hbox to \z@{\hss#1\hss}}
290 \long\def\ylap#1{\vbox to \z@{\vss#1\vss}}
291 \long\def\zlap#1{\ylap{\xlap{#1}}}
292
293
294 % Avoid unwanted vertical glue when making up pages.
295 \def\basezero{\baselineskip\z@skip \lineskip\z@skip}
296
297
298 % Empty rules for special occasions
299 \def\nullhrule{\hrule height\z@ depth\z@ width\z@ }
300 \def\nullvrule{\vrule height\z@ depth\z@ width\z@ }
301
302 % Support ad-hoc strut construction.
303 \def\makestrut[#1;#2]{\vrule height#1 depth#2 width\z@ }
304
305 % Construct box for figure pasteup, etc.
306 % height = #1, width = #2, rule thickness = #3
307 \def\drawoutlinebox[#1;#2;#3]{\T@stDimen=#3
308 \vbox to#1{\hrule height\T@stDimen depth\z@
309 \vss\hbox to#2{\vrule width\T@stDimen
310 \hfil\makestrut[#1;\z@]%
311 \vrule width\T@stDimen}\vss
312 \hrule height\T@stDimen depth\z@}}
313
314
315 % Today's date, to be printed on drafts. Based on TeXbook, p.406.
316
317 \def\today{\number\day\space \ifcase\month\or
318 Jan \or Feb \or Mar \or Apr \or May \or Jun \or
319 Jul \or Aug \or Sep \or Oct \or Nov \or Dec \fi
320 \number\year}
321
322 % Current time; this may be system dependent!
323 \newcount\hours
324 \newcount\minutes
325 \def\SetTime{\hours=\time
326 \global\divide\hours by 60
327 \minutes=\hours
328 \multiply\minutes by 60
329 \advance\minutes by-\time
330 \global\multiply\minutes by-1 }
331 \SetTime
332 \def\now{\number\hours:\ifnum\minutes<10 0\fi\number\minutes}
333
334 \def\Now{\today\ \now}
335
336 \newif\ifPrelimDraft \PrelimDraftfalse
337
338 \def\midrtitle{\ifPrelimDraft {{\tensl preliminary draft, \Now}}\fi}
339
340 % Section heads. The following set of macros is used to set the large
341 % TUGboat section heads (e.g. "General Delivery", "Fonts", etc.)
342
343 \newdimen\PreTitleDrop \PreTitleDrop=\z@
344
345 \newskip\AboveTitleSkip \AboveTitleSkip=12pt
346 \newskip\BelowTitleSkip \BelowTitleSkip=8pt
347
348 \newdimen\strulethickness \strulethickness=.6pt
349 \def\sthrule{\hrule height\strulethickness depth \z@ }
350 \def\stvrule{\vrule width\strulethickness }
351
352 \newdimen\stbaselineskip \stbaselineskip=18pt
353
354 \def\@sectitle #1{%
355 \par \SecTitletrue
356 \penalty-1000
357 \secsep
358 \vbox{
359 \sthrule
360 \hbox{%
361 \stvrule
362 \vbox{
363 \advance\hsize by -2\strulethickness
364 \raggedcenter
365 \def\\{\unskip\break}%
366 \sectitlefont
367 \makestrut[2\stfontheight;\z@]
368 #1\unskip
369 \makestrut[\z@;\stfontheight]\endgraf
370 }%
371 \stvrule }
372 \sthrule }
373 \nobreak
374 \vskip\baselineskip }
375
376 % distance between articles which are run together
377 \def\secsep{\vskip 5\baselineskip}
378
379 \newif\ifSecTitle
380 \SecTitlefalse
381
382
383
384 % Registration marks
385
386 \def\HorzR@gisterRule{\vrule height 0.2pt depth \z@ width 0.5in }
387 \def\DownShortR@gisterRule{\vrule height 0.2pt depth 1pc width 0.2pt }
388 \def\UpShortR@gisterRule{\vrule height 1pc depth \z@ width 0.2pt }
389
390
391 % ``T'' marks centered on top and bottom edges of paper
392
393 \def\ttopregister{\dlap{%
394 \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
395 \HorzR@gisterRule \hfil \HorzR@gisterRule}%
396 \hbox to \trimwd{\hfil \DownShortR@gisterRule \hfil}}}
397 \def\tbotregister{\ulap{%
398 \hbox to \trimwd{\hfil \UpShortR@gisterRule \hfil}%
399 \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
400 \HorzR@gisterRule \hfil \HorzR@gisterRule}}}
401
402 \def\topregister{\ttopregister}
403 \def\botregister{\tbotregister}
404
405
406
407 % PLAIN's definition of \raggedright doesn't permit any stretch, and
408 % results in too many overfull boxes. We also turn off hyphenation.
409 \newdimen\raggedskip \raggedskip=\z@
410 \newdimen\raggedstretch \raggedstretch=5em % ems of font set now (10pt)
411 \newskip\raggedparfill \raggedparfill=\z@ plus 1fil
412
413 \def\raggedspaces{\spaceskip=.3333em \relax \xspaceskip=.5em \relax }
414 % Some applications may have to add stretch, in order to avoid
415 % all overfull boxes.
416
417 \def\raggedright{%
418 \nohyphens
419 \rightskip=\raggedskip plus\raggedstretch \raggedspaces
420 \parfillskip=\raggedparfill }
421 \def\raggedleft{%
422 \nohyphens
423 \leftskip=\raggedskip plus\raggedstretch \raggedspaces
424 \parfillskip=\z@skip }
425 \def\raggedcenter{%
426 \nohyphens
427 \leftskip=\raggedskip plus\raggedstretch
428 \rightskip=\leftskip \raggedspaces
429 \parindent=\z@ \parfillskip=\z@skip }
430
431 \def\normalspaces{\spaceskip\z@skip \xspaceskip\z@skip }
432
433
434 % Miscellaneous useful stuff
435
436 \def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
437
438 %\def~{\penalty\@M \ } % tie -- this is PLAIN value; it is reset in AMS-TeX
439 \def~{\unskip\nobreak\ \ignorespaces} % AMS-TeX value
440
441 \def\newbox{\alloc@4\box\chardef\insc@unt} % remove \outer
442 \def\boxcs#1{\box\csname#1\endcsname}
443 \def\setboxcs#1{\setbox\csname#1\endcsname}
444 \def\newboxcs#1{\expandafter\newbox\csname#1\endcsname}
445
446 \def\gobble#1{}
447
448 \def\vellipsis{%
449 \leavevmode\kern0.5em
450 \raise1pt\vbox{\baselineskip6pt\vskip7pt\hbox{.}\hbox{.}\hbox{.}}
451 }
452
453 \def\bull{\vrule height 1ex width .8ex depth -.2ex } % square bullet
454 \def\cents{{\rm\raise.2ex\rlap{\kern.05em$\scriptstyle/$}c}}
455 \def\Dag{\raise .6ex\hbox{$\scriptstyle\dagger$}}
456
457 \def\careof{\leavevmode\hbox{\raise.75ex\hbox{c}\kern-.15em
458 /\kern-.125em\smash{\lower.3ex\hbox{o}}} \ignorespaces}
459 \def\sfrac#1/#2{\leavevmode\kern.1em
460 \raise.5ex\hbox{\the\scriptfont\z@ #1}\kern-.1em
461 /\kern-.15em\lower.25ex\hbox{\the\scriptfont\z@ #2}}
462
463 \def\thinskip{\hskip 0.16667em\relax}
464 \def\endash{--}
465 \def\emdash{\endash-}
466 \def\d@sh#1#2{\unskip#1\thinskip#2\thinskip\ignorespaces}
467 \def\dash{\d@sh\nobreak\endash}
468 \def\Dash{\d@sh\nobreak\emdash}
469 \def\ldash{\d@sh\empty{\hbox{\endash}\nobreak}}
470 \def\rdash{\d@sh\nobreak\endash}
471 \def\Ldash{\d@sh\empty{\hbox{\emdash}\nobreak}}
472 \def\Rdash{\d@sh\nobreak\emdash}
473
474 % Hack to permit automatic hyphenation after an actual hyphen.
475
476 \def\hyph{-\penalty\z@\hskip\z@skip }
477
478 \def\slash{/\penalty\z@\hskip\z@skip } % "breakable" slash
479
480 % Adapted from c.t.t posting by Donald Arseneau, 26 May 93.
481 \def\nth#1{\TestCount=#1\relax
482 \ifnum\TestCount <0 \multiply\TestCount by\m@ne \fi % subdue negatives
483 \T@stCount=\TestCount
484 \divide\T@stCount by 100 \multiply\T@stCount by 100
485 \advance\TestCount by-\T@stCount % n mod 100
486 \ifnum\TestCount >20 \T@stCount=\TestCount
487 \divide\T@stCount by 10 \multiply\T@stCount by 10
488 \advance\TestCount by-\T@stCount % n mod 10
489 \fi
490 \T@stCount=\the\fam\relax
491 $\fam\T@stCount#1^{\fam\T@stCount
492 \ifcase\TestCount th% 0th
493 \or st% 1st
494 \or nd% 2nd
495 \or rd% 3rd
496 \else th% nth
497 \fi
498 }$}
499
500
501 % Format information on reviewed items for book review articles.
502
503 \def\Review:#1{\ifx[#1\@Rev[%
504 \else Book review:\enspace\sl #1%
505 \fi
506 }
507 \def\@Rev[#1]{\ignorespaces#1\unskip:\enspace\ignorespaces\sl}
508 \def\reviewitem{%
509 \def\revauth##1{\def\therevauth{##1, }\ignorespaces}%
510 \def\revtitle##1{\def\therevtitle{{\sl##1}. }\ignorespaces}%
511 \def\revpubinfo##1{\def\therevpubinfo{##1.}\ignorespaces}%
512 }
513 \def\endreviewitem{{\noindent\interlinepenalty=10000
514 \therevauth\therevtitle\therevpubinfo\endgraf}%
515 \vskip\medskipamount
516 \ifx\tugstyloaded@\plaintubstyle
517 \DeleteOptionalSpacesandPars{\noindent\ignorespaces}%
518 \fi
519 }
520
521 \def\booktitle#1{{\sl #1\/}}
522
523
524 % Dates and other items which identify the volume and issue
525
526 % To use: \vol 5, 2.
527 % \issdate October 1984.
528 % \issueseqno=10
529 % For production, these are set in a separate file, TUGBOT.DATES,
530 % which is issue-specific.
531
532 \newcount\issueseqno \issueseqno=-1
533
534 \def\v@lx{\gdef\volx{Volume~\volno~(\volyr), No.~\issno}}
535 \def\volyr{}
536 \def\volno{}
537 \def\vol #1,#2.{\gdef\volno{#1\unskip}%
538 \gdef\issno{\ignorespaces#2\unskip}%
539 \setbox\TestBox=\hbox{\volyr}%
540 \ifdim \wd\TestBox > .2em \v@lx \fi }
541
542 \def\issdate #1#2 #3.{\gdef\issdt{#1#2 #3}\gdef\volyr{#3}%
543 \gdef\bigissdt{#1{\smc\uppercase{#2}} #3}%
544 \setbox\TestBox=\hbox{\volno}%
545 \ifdim \wd\TestBox > .2em \v@lx \fi }
546
547
548 \vol 0, 0. % volume, issue.
549 \issdate Thermidor, 2001. % month, year of publication
550
551
552 \ifx\tugstyloaded@\plaintubstyle
553 \def\tubissue#1(#2){\TUB~#1, no.~#2}
554 \else
555 \def\tubissue#1#2{\TUB~#1, no.~#2}
556 \fi
557
558 \def\xEdNote{{\tenuit Editor's note:\enspace }}
559
560
561 % TUGboat conventions include the issue number in the file name.
562 % Permit this to be incorporated into file names automatically.
563 % If issue number = 11, \Input filnam will read tb11filnam.tex.
564
565
566 \def\infil@{\jobname}
567 \def\Input #1 {\ifnum\issueseqno<0 \def\infil@{#1}%
568 \else \def\infil@{tb\number\issueseqno#1}\fi
569 \edef\jobname{\infil@}\@readFLN
570 \@@input \infil@\relax
571 \ifRMKopen\immediate\closeout\TBremarkfile\RMKopenfalse\fi}
572
573 \newif\ifRMKopen \RMKopenfalse
574 \newwrite\TBremarkfile
575 \def\TBremarkON#1{%
576 \ifRMKopen\else\RMKopentrue\immediate\openout\TBremarkfile=\[email protected] \fi
577 \toks@={#1}%
578 \immediate\write\TBremarkfile{^^J\the\toks@}%
579 \immediate\write16{^^JTBremark:: \the\toks@^^J}}
580 \def\TBremarkOFF#1{}
581 \let\TBremark=\TBremarkOFF
582
583 % for marking locations in articles that pertain to remarks
584 % in another file of editorial comments
585 \def\TUBedit#1{}
586
587 % for using different filenames in Providence than those supplied
588 % by authors
589
590 \def\TUBfilename#1#2{\expandafter\def\csname file@@#1\endcsname{#2}}
591 \newread\@altfilenames
592 \def\@readFLN{\immediate\openin\@altfilenames=\jobname.fln
593 \ifeof\@altfilenames\let\@result\relax\else
594 \def\@result{\@@input\jobname.fln }\fi
595 \immediate\closein\@altfilenames
596 \@result}
597 \@readFLN
598 \everyjob=\expandafter{\the\everyjob\@readFLN}
599
600 % Following needs to work entirely in TeX's mouth
601 \def\@tubfilename#1{\expandafter\ifx\csname file@@#1\endcsname\relax
602 #1\else\csname file@@#1\endcsname\fi}
603
604 \def\fileinput#1{\@@input\@tubfilename{#1} }
605
606 % Write out (both to a file and to the log) the starting page number
607 % of an article, to be used for cross references and in contents.
608 % \pagexref is used for articles fully processed in the TUGboat run.
609 % \PageXref is used for "extra" pages, where an item is submitted
610 % as camera copy, and only running heads (at most) are run.
611
612 \ifx\tugstyloaded@\plaintubstyle
613 \def\pagexrefON#1{%
614 \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}%
615 \write\ppoutfile{%
616 \def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}%
617 }
618 \def\PageXrefON#1{%
619 \immediate\write-1{\def\expandafter
620 \noexpand\csname#1\endcsname{\number\pageno}}%
621 \immediate\write\ppoutfile{\def\expandafter
622 \noexpand\csname#1\endcsname{\number\pageno}}}
623 \else
624 \def\pagexrefON#1{%
625 \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
626 \write\ppoutfile{%
627 \def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
628 }
629 \def\PageXrefON#1{%
630 \immediate\write-1{\def\expandafter
631 \noexpand\csname#1\endcsname{\number\c@page}}%
632 \immediate\write\ppoutfile{\def\expandafter
633 \noexpand\csname#1\endcsname{\number\c@page}}}
634 \fi
635
636 \def\pagexrefOFF#1{}
637 \let\pagexref=\pagexrefOFF
638 \def\PageXrefOFF#1{}
639 \let\PageXref=\PageXrefOFF
640
641 \def\xreftoON#1{%
642 \ifundefined{#1}%
643 ???\TBremark{Need cross reference for #1.}%
644 \else\csname#1\endcsname\fi}
645 \def\xreftoOFF#1{???}
646 \let\xrefto=\xreftoOFF
647
648 \def\TBdriver#1{}
649
650
651 % Authors, addresses, signatures
652
653 \def\theauthor#1{\csname theauthor#1\endcsname}
654 \def\theaddress#1{\csname theaddress#1\endcsname}
655 \def\thenetaddress#1{\csname thenetaddress#1\endcsname}
656
657 \newcount\count@@
658 \def\@defaultauthorlist{% % standard way of listing authors
659 \count@=\authornumber
660 \advance\count@ by -2
661 \count@@=0
662 \loop
663 \ifnum\count@>0
664 \advance\count@@ by 1
665 \ignorespaces\csname theauthor\number\count@@\endcsname\unskip,
666 \advance\count@ by -1
667 \repeat
668 \count@=\authornumber
669 \advance\count@ by -\count@@
670 \ifnum\authornumber>0
671 \ifnum\count@>1
672 \count@=\authornumber
673 \advance\count@ by -1
674 \ignorespaces\csname theauthor\number\count@\endcsname\unskip\ and
675 \fi
676 \ignorespaces\csname theauthor\number\authornumber\endcsname\unskip
677 \fi
678 }
679
680 \def\signature#1{\def\@signature{#1}}
681 \def\@signature{\@defaultsignature}
682
683 \def\@defaultsignature{%
684 \count@=0
685 \loop
686 \ifnum\count@<\authornumber
687 \medskip
688 \advance\count@ by \@ne
689 \signaturemark
690 \theauthor{\number\count@}\\
691 \leavevmode\theaddress{\number\count@}\\
692 \leavevmode\thenetaddress{\number\count@}\\
693 \repeat
694 }
695
696 \newdimen\signaturewidth \signaturewidth=12pc
697 \def\makesignature{%
698 \par
699 \penalty9000
700 \vskip\medskipamount
701 \rightline{%
702 \vbox{\hsize\signaturewidth \ninepoint \raggedright
703 \parindent \z@ \everypar={\hangindent 1pc }
704 \parskip \z@skip
705 \netaddrat
706 \netaddrpercent
707 \def\|{\unskip\hfil\break}%
708 \def\\{\endgraf}%
709 \def\net{\tt}%
710 \def\phone{\rm Phone: } \rm
711 \@signature}}
712 }
713
714 {\makeactive\@
715 \gdef\signatureat{\makeactive\@\def@{\char"40\discretionary{}{}{}}}
716 \makeactive\%
717 \gdef\signaturepercent{\makeactive\%\def%{\char"25\discretionary{}{}{}}}
718 }
719
720 \def\signaturemark{\leavevmode\llap{$\diamond$\enspace}}
721
722
723
724
725 % some hyphenation exceptions:
726 \hyphenation{Eijk-hout man-u-script man-u-scripts}
727
728
729 \restorecat\@
730
731 \endinput
732
733
734 % *************************************************************************
735
736 Contents and Notes
737 ------------------
738
739 \makeescape, ..., \makecomment allow users to change category
740 codes a little more easily.
741
742 \savecat#1 and \restorecat#1 will save and restore the category
743 of a given character. These are useful in cases where one doesn't
744 wish to localize the settings and therefore be required to globally
745 define or set things.
746
747 \SaveCS#1 and \RestoreCS#1 save and restore `meanings' of control
748 sequences. Again this is useful in cases where one doesn't want to
749 localize or where global definitions clobber a control sequence which
750 is needed later with its `old' definition.
751
752 Abbreviations. Just a listing with indications of expansion where
753 that may not be obvious. For full definitions, see real code above.
754
755 \AllTeX (\La)\TeX
756 \AMS American Mathematical Society
757 \AmSTeX
758 \aw A-W (abbreviation for Addison-Wesley)
759 \AW Addison-Wesley
760 \BibTeX
761 \CandT Computers \& Typesetting
762 \DVItoVDU DVItoVDU
763 \ISBN ISBN
764 \JTeX
765 \JoT The Joy of \TeX
766 \LaTeX
767 \Mc M ``w/ raised c''
768 \MF METAFONT
769 \mf Metafont (using small caps)
770 \MFB The Metafont book
771 \MP METAPOST
772 \mtex multilingual TeX
773 \pcMF pcMF
774 \PCTeX
775 \pcTeX
776 \Pas Pascal
777 \PiCTeX
778 \plain plain (in typewriter font)
779 \POBox P. O. Box
780 \POBoxTUG TUG PO Box
781 \PS PostScript
782 \SC Steering Committee
783 \SGML SGML
784 \SliTeX
785 \slMF Metafont (slanted)
786 \stTeX TeX for the Atari ST
787 \TANGLE
788 \TB The \TeX book
789 \TeX
790 \TeXhax
791 \TeXMaG
792 \TeXtures
793 \TeXXeT
794 \TUB TUGboat
795 \TUG TeX Users Group
796 \UNIX
797 \VAX
798 \VorTeX
799 \XeT
800 \WEB
801 \WEAVE
802
803 \NoBlackBoxes turns off marginal rules marking overfull boxes
804 \BlackBoxes turns them back on
805 \newline horizontal glue plus a break
806
807 \ifundefined#1 checks argument with \csname against \relax
808
809 \topsmash smashes above baseline (from AMSTeX)
810 \botsmash smashes below baseline (from AMSTeX)
811 \smash smashes both (from plain)
812
813 \ulap lap upwards
814 \dlap lap downwards
815 \xlap reference point at center horizontally; 0 width
816 \ylap reference point at center vertically; 0 height, depth
817 \zlap combination \xlap and \ylap
818
819 \basezero to avoid insertion of baselineskip and lineskip glue
820
821 \nullhrule empty \hrule
822 \nullvrule empty \vrule
823
824 \makestrut[#1;#2] ad hoc struts; #1=height, #2=depth
825
826 \today today's date
827 \SetTime converts \time to hours, minutes
828 \now displays time in hours and minutes
829 \Now shows current date and time
830
831 \ifPrelimDraft flag to indicate status as preliminary draft
832
833 \rtitlex TUGboat volume and number info for running head
834 \midrtitle information for center of running head
835
836 \HorzR@gisterRule pieces of registration marks ("trimmarks")
837 \DownShortR@gisterRule
838 \UpShortR@gisterRule
839
840 \ttopregister top registration line with `T' in center
841 \tbotregister bottom registration line with inverted `T' in center
842 \topregister register actually used
843 \botregister
844
845
846 \raggedskip parameters used for ragged settings
847 \raggedstretch
848 \raggedparfill
849 \raggedspaces
850
851 \raggedright
852 \raggedleft
853 \raggedcenter
854 \normalspaces
855 \raggedbottom
856
857 \bull square bullet
858 \cents ``cents'' sign
859 \Dag superscripted dagger
860 \careof c/o
861 \sfrac slashed fraction
862
863 \dash en-dash surrounded by thinspaces; only breakable AFTER
864 \Dash em-dash, as above
865
866 \hyph permit automatic hyphenation after an actual hyphen
867
868 \slash "breakable" slash
869 \nth for obtaining "1^{st}", "2^{nd}", 3^{rd}, etc.
870
871 \tubissue gets \TUB followed by volume and issue numbers
872
873 \xEdNote Editor's Note:
874
875 \Review: Review: (for title of book review article)
876 \reviewitem begin data for item being reviewed
877 \revauth with one argument, author(s) of item being reviewed
878 \revtitle with one argument, title of ...
879 \revpubinfo with one argument, other info pertaining to ...
880 \endreviewitem end data for item being reviewed
881 \booktitle with one argument, format book title in text
882
883 \Input \input with some other bookkeeping for
884 case where multiple articles are put together
885
886 \TBremark reminder to TUGboat editorial staff
887 \TBremarkON
888 \TBremarkOFF
889
890 \pagexref used to write out page numbers to screen and
891 \pagexrefON external files
892 \pagexrefOFF
893 \PageXref
894 \PageXrefON
895 \PageXrefOFF
896
897 \xrefto used for symbolic cross-reference to other pages
898 \xreftoON in TUGboat
899 \xreftoOFF
900
901 \TBdriver marks code which only takes effect when articles
902 are run together in a driver file
903
904 \signatureat items for signatures
905 \signaturepercent
906 \signaturemark
907 \signaturewidth
908
909
910 % *************************************************************************
911
912 % Change history
913
914 Version Date Changes
915 ------- --------- ---------------------------------------------------
916 1.136 4 Nov 95 added \MP for METAPOST
917
918 1.13f 15 Apr 94 added \@Rev[...] to permit variable text for reviews
919
920 1.13e 14 Mar 94 revised definition of \La to use actual width of A
921 added \LaTeXe definition
922
923 1.13d 5 Jan 94 added {} to \TeX-{}-\Xet
924
925 1.13c 11 Nov 93 removed extraneous " from header
926 added \AmSLaTeX, \CTAN, \ISSN
927
928 1.13b 4 Nov 93 added \hyphenation{Eijk-hout}
929
930 1.13a 18 Aug 93 corrected \nth to produce ordinal in current font
931
932 1.13 27 May 93 upgraded \nth based on algorithm by Donald Arseneau
933 in comp.text.tex, 26 May 93
934
935 1.12 19 Feb 93 added \spacefactor1000 to all replacement text that ends
936 with a capital letter, so that if these items end a
937 sentence, there will be a normal end-of-sentence space
938 removed \hbox from definitions of \TeX, etc.; no longer
939 needed
940 changed definition of \TeXXeT to use \XeT rather than
941 unique dimensions
942 installed new TUG address and phone number in header
943 reformatted change history, similar to tugboat.sty
944
945 1.11c 29 Nov 92 added macros to format book review and related items for
946 review articles
947 added \SGML
948 changed def of \UNIX to use \SMC rather than \smc
949
950 1.11b 20 Oct 92 added font code for \ISBN font ("big small caps")
951 added \Textures as the current form
952
953 1.11a 6 Jun 92 added \drawoutlinebox
954
955 1.11 15 Mar 92 added \ttn and \TTN
956
957 1.10 8 Mar 92 added \AllTeX
958 changed file name from .COM to .CMN to avoid objection
959 that .COM files have a special significance on DOS
960 and other operating systems
961 added standard headers, prepared for archive installation
962
963 1.09 5 May 91 inserted large penalty at top of \makesignature to
964 inhibit break between article and signature
965
966 1.08 24 Oct 90 modified signature slightly (took \medskip out of box)
967 fixed bug in previous rendition of \@readFLN
968
969 1.07 16 Oct 90 added \TUBedit to facilitate editorial marking
970 added \iinput variant from LaTeX; \input redefined now
971 as with LaTeX
972 added mechanism for local file names in Providence
973 (\TUBfilename, \fileinput, etc.)
974 \tugstyload@ defaults to plain if it's not defined
975
976 1.06 3 Aug 90 added \leavevmode to \@defaultsignature so that
977 \everypar is not executed inside a group
978 dash routines modified and corrected (to suppress
979 insertion of discretionary node after -- and ---;
980 and to allow hyphenation of ensuing word)
981 changed \lDash to \Ldash and \rDash to \Rdash
982
983 1.05 29 Mar 90 added \lDash and \rDash for `parenthetical' dashing
984 added \TP for TeX: The Program
985 added \relax after file input of \Input
986 added \relax before \ifmmode of \,
987
988 1.04 28 Feb 90 modified pagexref macros to work in both plain and
989 latex styles (this should NOT affect authors)
990
991 1.03 26 Feb 90 removed <tab>s and adjusted definition of \slMF
992
993 1.02 25 Feb 90 added definitions of \plaintubissue, \latextubissue
994 added definition of \tubissue
995
996 1.01 19 Feb 90 added \signaturewidth to allow for modification
997 added \nth to obtain 1^{st}, etc.