home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-bin0.lha / lib / texmf / tex / tugboat / tugboat.cmn < prev    next >
Text File  |  1996-10-12  |  31KB  |  972 lines

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