home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / textutil / tex / source / tex_extra / !TeX / Misc / TeXmacros / tugboat / com next >
Encoding:
Text File  |  1991-01-29  |  22.9 KB  |  785 lines

  1. % version 1.05
  2. % 29 Mar 90
  3. %
  4. %               *****     TUGBOAT.COM   *****
  5. %
  6. %       This file contains macros which are common to both the PLAIN
  7. %       and LaTeX style files for TUGboat.
  8.  
  9. %       Among other things, it contains supplementary definitions for
  10. %       abbreviations and logos that appear in TUGboat.  See the bottom
  11. %       of the file (after \endinput) for a list of items defined.
  12.  
  13. % *************************************************************************
  14.  
  15. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  16. %
  17. %     *****  helpful shorthand  *****
  18. %
  19.  
  20. %  The following allow for easier changes of category.  These require that
  21. %  the character be addressed as a control-sequence: e.g. \makeescape\/ will
  22. %  make the / an escape character.
  23.  
  24. \def\makeescape#1{\catcode`#1=0 }
  25. \def\makebgroup#1{\catcode`#1=1 }
  26. \def\makeegroup#1{\catcode`#1=2 }
  27. \def\makemath#1{\catcode`#1=3 }
  28. \def\makealign#1{\catcode`#1=4 }
  29. \def\makeeol#1{\catcode`#1=5 }
  30. \def\makeparm#1{\catcode`#1=6 }
  31. \def\makesup#1{\catcode`#1=7 }
  32. \def\makesub#1{\catcode`#1=8 }
  33. \def\makeignore#1{\catcode`#1=9 }
  34. \def\makespace#1{\catcode`#1=10 }
  35. \def\makeletter#1{\catcode`#1=11 }
  36. \def\makeother#1{\catcode`#1=12 }
  37. \def\makeactive#1{\catcode`#1=13 }
  38. \def\makecomment#1{\catcode`#1=14 }
  39.  
  40. \def\makeatletter{\catcode`\@=11 }      % included for historical reasons
  41. \chardef\other=12
  42. \def\makeatother{\catcode`\@=\other}
  43.  
  44.                                         % alternative to localization
  45. \def\savecat#1{%
  46.   \expandafter\xdef\csname\string#1savedcat\endcsname{\the\catcode`#1}}
  47. \def\restorecat#1{\catcode`#1=\csname\string#1savedcat\endcsname}
  48.  
  49.  
  50. \savecat\@
  51. \makeletter\@           % used, as in PLAIN, in protected control sequences
  52.  
  53.                         % for restoring meanings of global control sequences
  54. \def\SaveCS#1{%
  55.   \def\scratch{\expandafter\let\csname saved@@#1\endcsname}%
  56.   \expandafter\scratch\csname#1\endcsname}
  57. \def\RestoreCS#1{%
  58.   \def\scratch{\expandafter\let\csname#1\endcsname}%
  59.   \expandafter\scratch\csname saved@@#1\endcsname}
  60.  
  61.  
  62. % To distinguish between macro files loaded
  63.  
  64. \def\plaintubstyle{plain}
  65. \def\latextubstyle{latex}
  66.  
  67. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  68. %
  69. %     *****  abbreviations and logos  *****
  70. %
  71.  
  72.  
  73. \def\AMS{American Mathematical Society}
  74.  
  75. \def\AmSTeX{{\the\textfont2 A}\kern-.1667em\lower.5ex\hbox
  76.         {\the\textfont2 M}\kern-.125em{\the\textfont2 S}-\TeX}
  77.  
  78. \def\aw{A\kern.1em-W}
  79. \def\AW{Addison\kern.1em-\penalty\z@\hskip\z@skip Wesley}
  80.  
  81. \def\BibTeX{{\rm B\kern-.05em{\smc i\kern-.025emb}\kern-.08em\TeX}}
  82.  
  83. \def\CandT{{\sl Computers \& Typesetting}}
  84.  
  85. \def\DVItoVDU{DVIto\kern-.12em VDU}
  86.  
  87. %       Japanese TeX
  88. \def\JTeX{\leavevmode\hbox{\lower.5ex\hbox{J}\kern-.18em\TeX}}
  89.  
  90. \def\JoT{{\sl The Joy of \TeX}}
  91.  
  92. %       note -- \LaTeX definition is from LATEX.TEX 2.09 of 7 Jan 86,
  93. %               adapted for additional flexibility in TUGboat
  94. %\def\LaTeX{\TestCount=\the\fam \leavevmode L\raise.42ex
  95. %       \hbox{$\fam\TestCount\scriptstyle\kern-.3em A$}\kern-.15em\TeX}
  96. %       note -- broken in two parts, to permit separate use of La,
  97. %               as in (La)TeX
  98. \def\La{\TestCount=\the\fam \leavevmode L\raise.42ex
  99.         \hbox{$\fam\TestCount\scriptstyle\kern-.3em A$}}
  100. \def\LaTeX{\La\kern-.15em\TeX}
  101.  
  102.  
  103. %       for Robert McGaffey
  104. \def\Mc{\setbox\TestBox=\hbox{M}M\vbox to\ht\TestBox{\hbox{c}\vfil}}
  105.  
  106. \font\manual=logo10 % font used for the METAFONT logo, etc.
  107. \def\MF{{\manual META}\-{\manual FONT}}
  108. \def\mf{{\smc Metafont}}
  109. \def\MFB{{\sl The \slMF book}}
  110.  
  111. %       multilingual (INRS) TeX
  112. \def\mtex{T\kern-.1667em\lower.5ex\hbox{\^E}\kern-.125emX}
  113.  
  114. \def\pcMF{\leavevmode\raise.5ex\hbox{p\kern-.3ptc}MF}
  115. \def\PCTeX{PC\thinspace\TeX}
  116. \def\pcTeX{\leavevmode\raise.5ex\hbox{p\kern-.3ptc}\TeX}
  117.  
  118. \def\Pas{Pascal}
  119.  
  120. \def\PiC{P\kern-.12em\lower.5ex\hbox{I}\kern-.075emC}
  121. \def\PiCTeX{\PiC\kern-.11em\TeX}
  122.  
  123. \def\plain{{\tt plain}}
  124.  
  125. \def\POBox{P.\thinspace O.~Box }
  126. \def\POBoxTUG{\POBox\unskip~9506, Providence, RI~02940}
  127.  
  128. \def\PS{{Post\-Script}}
  129.  
  130. \def\SC{Steering Committee}
  131.  
  132. \def\SliTeX{{\rm S\kern-.06em{\smc l\kern-.035emi}\kern-.06em\TeX}}
  133.  
  134. \def\slMF{\MF}
  135. %       Use \font\manualsl=logosl10 instead, if it's available,
  136. %       for \def\slMF{{\manualsl META}\-{\manualsl FONT}}
  137.  
  138. %       Atari ST (Klaus Guntermann)
  139. \def\stTeX{{\smc st\rm\kern-0.13em\TeX}}
  140.  
  141. \def\TANGLE{{\tt TANGLE}}
  142.  
  143. \def\TB{{\sl The \TeX book}}
  144. \def\TP{{\sl \TeX\/}: {\sl The Program\/}}
  145.  
  146. \def\TeX{T\hbox{\kern-.1667em\lower.424ex\hbox{E}\kern-.125emX}}
  147.  
  148. \def\TeXhax{\TeX hax}
  149.  
  150. %       Don Hosek
  151. \def\TeXMaG{\TeX M\kern-.1667em\lower.5ex\hbox{A}\kern-.2267emG}
  152.  
  153. %\def\TeXtures{\TestCount=\the\fam
  154. %       \TeX\-\hbox{$\fam\TestCount\scriptstyle TURES$}}
  155. \def\TeXtures{{\it Textures}}
  156.  
  157. \def\TeXXeT{\TeX--X\kern-.125em\lower.5ex\hbox{E}\kern-.1667emT}
  158.  
  159. \def\tubfont{\sl}               % redefined in other situations
  160. \def\TUB{{\tubfont TUGboat\/}}
  161.  
  162. \def\TUG{\TeX\ \UG}
  163.  
  164. \def\UG{Users Group}
  165.  
  166. \def\UNIX{{\smc unix}}
  167.  
  168. \def\VAX{\leavevmode\hbox{V\kern-.12em A\kern-.1em X}}
  169.  
  170. \def\VorTeX{V\kern-2.7pt\lower.5ex\hbox{O\kern-1.4pt R}\kern-2.6pt\TeX}
  171.  
  172. \def\XeT{\leavevmode\hbox{X\kern-.125em\lower.424ex\hbox{E}\kern-.1667emT}}
  173.  
  174. \def\WEB{{\tt WEB}}
  175. \def\WEAVE{{\tt WEAVE}}
  176.  
  177.  
  178.  
  179. %********************************************************************
  180.  
  181. \newlinechar=`\^^J
  182. \normallineskiplimit=1pt
  183.  
  184. \clubpenalty=10000
  185. \widowpenalty=10000
  186.  
  187. \def\NoParIndent{\parindent=\z@}
  188. \newdimen\normalparindent        \normalparindent=20pt          % plain = 20pt
  189. \def\NormalParIndent{\global\parindent=\normalparindent}
  190. \NormalParIndent
  191.  
  192. \def\BlackBoxes{\overfullrule=5pt }
  193. \def\NoBlackBoxes{\overfullrule=\z@ }
  194. \def\newline{\hskip\z@ plus \pagewd \break}
  195. \def\nohyphens{\hyphenpenalty\@M\exhyphenpenalty\@M}
  196.  
  197. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  198. %
  199. %     *****  utility registers and definitions  *****
  200. %
  201.  
  202. %       test registers for transient use; paired - internal/external
  203. \newbox\T@stBox                 \newbox\TestBox
  204. \newcount\T@stCount             \newcount\TestCount
  205. \newdimen\T@stDimen             \newdimen\TestDimen
  206. \newif\ifT@stIf                 \newif\ifTestIf
  207.  
  208.  
  209. %       \cs existence test, stolen from TeXbook exercise 7.7
  210. \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax }
  211.  
  212. %       Smashes repeated from AMS-TeX; PLAIN implements only full \smash .
  213. \newif\iftop@           \newif\ifbot@
  214. \def\topsmash{\top@true\bot@false\smash@}
  215. \def\botsmash{\top@false\bot@true\smash@}
  216. \def\smash{\top@true\bot@true\smash@}
  217. \def\smash@{\relax\ifmmode\def\next{\mathpalette\mathsm@sh}%
  218.         \else\let\next\makesm@sh\fi \next }
  219. \def\finsm@sh{\iftop@\ht\z@\z@\fi\ifbot@\dp\z@\z@\fi\box\z@}
  220.  
  221.  
  222. %       Vertical `laps'; cf. \llap and \rlap
  223. \long\def\ulap#1{\vbox to \z@{\vss#1}}
  224. \long\def\dlap#1{\vbox to \z@{#1\vss}}
  225.  
  226. %       And centered horizontal and vertical `laps'
  227. \def\xlap#1{\hbox to \z@{\hss#1\hss}}
  228. \long\def\ylap#1{\vbox to \z@{\vss#1\vss}}
  229. \long\def\zlap#1{\ylap{\xlap{#1}}}
  230.  
  231.  
  232. %       Avoid unwanted vertical glue when making up pages.
  233. \def\basezero{\baselineskip\z@skip \lineskip\z@skip}
  234.  
  235.  
  236. %  Empty rules for special occasions
  237. \def\nullhrule{\hrule height\z@ depth\z@ width\z@ }
  238. \def\nullvrule{\vrule height\z@ depth\z@ width\z@ }
  239.  
  240. %       Support ad-hoc strut construction.
  241. \def\makestrut[#1;#2]{\vrule height#1 depth#2 width\z@ }
  242.  
  243.  
  244. %       Today's date, to be printed on drafts.  Based on TeXbook, p.406.
  245.  
  246. \def\today{\number\day\space \ifcase\month\or
  247.         Jan \or Feb \or Mar \or Apr \or May \or Jun \or
  248.         Jul \or Aug \or Sep \or Oct \or Nov \or Dec \fi
  249.         \number\year}
  250.  
  251. %       Current time; this may be system dependent!
  252. \newcount\hours
  253. \newcount\minutes
  254. \def\SetTime{\hours=\time
  255.         \global\divide\hours by 60
  256.         \minutes=\hours
  257.         \multiply\minutes by 60
  258.         \advance\minutes by-\time
  259.         \global\multiply\minutes by-1 }
  260. \SetTime
  261. \def\now{\number\hours:\ifnum\minutes<10 0\fi\number\minutes}
  262.  
  263. \def\Now{\today\ \now}
  264.  
  265. \newif\ifPrelimDraft            \PrelimDraftfalse
  266.  
  267. \def\midrtitle{\ifPrelimDraft {{\tensl preliminary draft, \Now}}\fi}
  268.  
  269. %  Section heads.  The following set of macros is used to set the large
  270. %  TUGboat section heads (e.g. "General Delivery", "Fonts", etc.)
  271.  
  272. \newdimen\PreTitleDrop   \PreTitleDrop=\z@
  273.  
  274. \newskip\AboveTitleSkip  \AboveTitleSkip=12pt
  275. \newskip\BelowTitleSkip  \BelowTitleSkip=8pt
  276.  
  277. \newdimen\strulethickness       \strulethickness=.6pt
  278. \def\sthrule{\hrule height\strulethickness depth \z@ }
  279. \def\stvrule{\vrule width\strulethickness }
  280.  
  281. \newdimen\stbaselineskip        \stbaselineskip=18pt
  282.  
  283. \def\@sectitle #1{%
  284.   \par \SecTitletrue
  285.   \penalty-1000
  286.   \secsep
  287.   \vbox{
  288.     \sthrule
  289.     \hbox{%
  290.       \stvrule
  291.       \vbox{
  292.         \advance\hsize by -2\strulethickness
  293.         \raggedcenter
  294.         \def\\{\unskip\break}%
  295.         \sectitlefont
  296.         \makestrut[2\stfontheight;\z@]
  297.         #1%
  298.         \makestrut[\z@;\stfontheight]\endgraf
  299.         }%
  300.       \stvrule }
  301.     \sthrule }
  302.   \nobreak
  303.   \vskip\baselineskip }
  304.  
  305. %  distance between articles which are run together
  306. \def\secsep{\vskip 5\baselineskip}
  307.  
  308. \newif\ifSecTitle
  309. \SecTitlefalse
  310.  
  311.  
  312.  
  313.  
  314.  
  315. %  Registration marks
  316.  
  317. \def\HorzR@gisterRule{\vrule height 0.2pt depth \z@ width 0.5in }
  318. \def\DownShortR@gisterRule{\vrule height 0.2pt depth 1pc width 0.2pt }
  319. \def\UpShortR@gisterRule{\vrule height 1pc depth \z@ width 0.2pt }
  320.  
  321.  
  322. %               ``T'' marks centered on top and bottom edges of paper
  323.  
  324. \def\ttopregister{\dlap{%
  325.         \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
  326.                         \HorzR@gisterRule \hfil \HorzR@gisterRule}%
  327.         \hbox to \trimwd{\hfil \DownShortR@gisterRule \hfil}}}
  328. \def\tbotregister{\ulap{%
  329.         \hbox to \trimwd{\hfil \UpShortR@gisterRule \hfil}%
  330.         \hbox to \trimwd{\HorzR@gisterRule \hfil \HorzR@gisterRule
  331.                         \HorzR@gisterRule \hfil \HorzR@gisterRule}}}
  332.  
  333. \def\topregister{\ttopregister}
  334. \def\botregister{\tbotregister}
  335.  
  336.  
  337.  
  338. %       PLAIN's definition of \raggedright doesn't permit any stretch, and
  339. %       results in too many overfull boxes.  We also turn off hyphenation.
  340. \newdimen\raggedskip    \raggedskip=\z@
  341. \newdimen\raggedstretch \raggedstretch=5em    % ems of font set now (10pt)
  342. \newskip\raggedparfill  \raggedparfill=\z@ plus 1fil
  343.  
  344. \def\raggedspaces{\spaceskip=.3333em \relax \xspaceskip=.5em \relax }
  345. %       Some applications may have to add stretch, in order to avoid
  346. %       all overfull boxes.
  347.  
  348. \def\raggedright{%
  349.   \nohyphens
  350.   \rightskip=\raggedskip plus\raggedstretch \raggedspaces
  351.   \parfillskip=\raggedparfill }
  352. \def\raggedleft{%
  353.   \nohyphens
  354.   \leftskip=\raggedskip plus\raggedstretch \raggedspaces 
  355.   \parfillskip=\z@skip }
  356. \def\raggedcenter{%
  357.   \nohyphens
  358.   \leftskip=\raggedskip plus\raggedstretch
  359.   \rightskip=\leftskip \raggedspaces 
  360.   \parindent=\z@ \parfillskip=\z@skip }
  361.  
  362. \def\normalspaces{\spaceskip\z@skip \xspaceskip\z@skip }
  363.  
  364.  
  365. %       Miscellaneous useful stuff
  366.  
  367. \def\,{\relax\ifmmode\mskip\thinmuskip\else\thinspace\fi}
  368.  
  369. %\def~{\penalty\@M \ } % tie -- this is PLAIN value; it is reset in AMS-TeX
  370. \def~{\unskip\nobreak\ \ignorespaces} % AMS-TeX value
  371.  
  372. \def\newbox{\alloc@4\box\chardef\insc@unt}   % remove \outer
  373. \def\boxcs#1{\box\csname#1\endcsname}
  374. \def\setboxcs#1{\setbox\csname#1\endcsname}
  375. \def\newboxcs#1{\expandafter\newbox\csname#1\endcsname}
  376.  
  377. \def\gobble#1{}
  378.  
  379. \def\vellipsis{%
  380.   \leavevmode\kern0.5em
  381.   \raise1pt\vbox{\baselineskip6pt\vskip7pt\hbox{.}\hbox{.}\hbox{.}}
  382.   }
  383.  
  384. \def\bull{\vrule height 1ex width .8ex depth -.2ex } % square bullet
  385. \def\cents{{\rm\raise.2ex\rlap{\kern.05em$\scriptstyle/$}c}}
  386. \def\Dag{\raise .6ex\hbox{$\scriptstyle\dagger$}}
  387.  
  388. \def\careof{\leavevmode\hbox{\raise.75ex\hbox{c}\kern-.15em
  389.                 /\kern-.125em\smash{\lower.3ex\hbox{o}}} \ignorespaces}
  390. \def\sfrac#1/#2{\leavevmode\kern.1em
  391.         \raise.5ex\hbox{\the\scriptfont\z@ #1}\kern-.1em
  392.         /\kern-.15em\lower.25ex\hbox{\the\scriptfont\z@ #2}}
  393.  
  394. \def\d@sh#1{\nobreak\thinspace#1\penalty\z@\thinspace}
  395. \def\dash{\d@sh{--}}
  396. \def\Dash{\d@sh{---}}
  397. \def\lDash{\unskip\ ---\nobreak\thinspace\ignorespaces}
  398. \def\rDash{\unskip\nobreak\thinspace---\ \ignorespaces}
  399.  
  400. %       Hack to permit automatic hyphenation after an actual hyphen.
  401.  
  402. \def\hyph{-\penalty\z@\hskip\z@skip }
  403.  
  404. \def\slash{/\penalty\z@\hskip\z@skip }        % "breakable" slash
  405.  
  406. %  So far, \nth{n} works only for 0 <= n <= 20.
  407. \def\nth#1{\TestCount=#1
  408.     \ifcase\TestCount \def\next{th}%    0th
  409.     \or   \def\next{st}%                1st
  410.     \or   \def\next{nd}%                2nd
  411.     \or   \def\next{rd}%                3rd
  412.     \else \def\next{th}%                nth
  413.     \fi \TestCount=\the\fam\relax #1$^{\fam\TestCount\next}$}
  414.  
  415.  
  416. %       Dates and other items which identify the volume and issue
  417.  
  418. %       To use: \vol 5, 2.
  419. %               \issdate October 1984.
  420. %               \issueseqno=10
  421. %       For production, these are set in a separate file, TUGBOT.DATES,
  422. %       which is issue-specific.
  423.  
  424. \newcount\issueseqno            \issueseqno=-1
  425.  
  426. \def\v@lx{\gdef\volx{Volume~\volno~(\volyr), No.~\issno}}
  427. \def\volyr{}
  428. \def\volno{}
  429. \def\vol #1,#2.{\gdef\volno{#1\unskip}%
  430.         \gdef\issno{\ignorespaces#2\unskip}%
  431.         \setbox\TestBox=\hbox{\volyr}%
  432.         \ifdim \wd\TestBox > .2em \v@lx \fi }
  433.  
  434. \def\issdate #1#2 #3.{\gdef\issdt{#1#2 #3}\gdef\volyr{#3}%
  435.         \gdef\bigissdt{#1{\smc\uppercase{#2}} #3}%
  436.         \setbox\TestBox=\hbox{\volno}%
  437.         \ifdim \wd\TestBox > .2em \v@lx \fi }
  438.  
  439.  
  440. \vol 0, 0.                      % volume, issue.
  441. \issdate Thermidor, 2001.       % month, year of publication
  442.  
  443.  
  444. \ifx\tugstyloaded@\plaintubstyle
  445.   \def\tubissue#1(#2){\TUB~#1, no.~#2}
  446. \else
  447.   \def\tubissue#1#2{\TUB~#1, no.~#2}
  448. \fi
  449.  
  450. \def\xEdNote{{\tenuit Editor's note:\enspace }}
  451.  
  452.  
  453. %       TUGboat conventions include the issue number in the file name.
  454. %       Permit this to be incorporated into file names automatically.
  455. %       If issue number = 11, \Input filnam  will read tb11filnam.tex.
  456.  
  457.  
  458. \def\infil@{\jobname}
  459. \def\Input #1 {\ifnum\issueseqno<0 \def\infil@{#1}%
  460.                 \else \def\infil@{tb\number\issueseqno#1}\fi
  461.                 \input \infil@\relax
  462.                 \ifRMKopen\immediate\closeout\TBremarkfile\RMKopenfalse\fi}
  463.  
  464. \newif\ifRMKopen        \RMKopenfalse
  465. \newwrite\TBremarkfile
  466. \def\TBremarkON#1{%
  467.   \ifRMKopen\else\RMKopentrue\immediate\openout\TBremarkfile=\infil@.rmk \fi
  468.   \toks@={#1}%
  469.   \immediate\write\TBremarkfile{^^J\the\toks@}%
  470.   \immediate\write16{^^JTBremark:: \the\toks@^^J}}
  471. \def\TBremarkOFF#1{}
  472. \let\TBremark=\TBremarkOFF
  473.  
  474.  
  475. %       Write out (both to a file and to the log) the starting page number
  476. %       of an article, to be used for cross references and in contents.
  477. %       \pagexref  is used for articles fully processed in the TUGboat run.
  478. %       \PageXref  is used for "extra" pages, where an item is submitted
  479. %               as camera copy, and only running heads (at most) are run.
  480.  
  481. \ifx\tugstyloaded@\plaintubstyle
  482. \def\pagexrefON#1{%
  483.         \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}%
  484.         \write\ppoutfile{%
  485.                 \def\expandafter\noexpand\csname#1\endcsname{\number\pageno}}%
  486.         }
  487. \def\PageXrefON#1{%
  488.         \immediate\write-1{\def\expandafter
  489.                         \noexpand\csname#1\endcsname{\number\pageno}}%
  490.         \immediate\write\ppoutfile{\def\expandafter
  491.                         \noexpand\csname#1\endcsname{\number\pageno}}}
  492. \else
  493. \def\pagexrefON#1{%
  494.         \write-1{\def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
  495.         \write\ppoutfile{%
  496.                 \def\expandafter\noexpand\csname#1\endcsname{\number\c@page}}%
  497.         }
  498. \def\PageXrefON#1{%
  499.         \immediate\write-1{\def\expandafter
  500.                         \noexpand\csname#1\endcsname{\number\c@page}}%
  501.         \immediate\write\ppoutfile{\def\expandafter
  502.                         \noexpand\csname#1\endcsname{\number\c@page}}}
  503. \fi
  504.  
  505. \def\pagexrefOFF#1{}
  506. \let\pagexref=\pagexrefOFF
  507. \def\PageXrefOFF#1{}
  508. \let\PageXref=\PageXrefOFF
  509.  
  510. \def\xreftoON#1{%
  511.   \ifundefined{#1}%
  512.     ???\TBremark{Need cross reference for #1.}%
  513.   \else\csname#1\endcsname\fi}
  514. \def\xreftoOFF#1{???}
  515. \let\xrefto=\xreftoOFF
  516.  
  517. \def\TBdriver#1{}
  518.  
  519.  
  520. %  Authors, addresses, signatures
  521.  
  522. \def\theauthor#1{\csname theauthor#1\endcsname}
  523. \def\theaddress#1{\csname theaddress#1\endcsname}
  524. \def\thenetaddress#1{\csname thenetaddress#1\endcsname}
  525.  
  526. \newcount\count@@
  527. \def\@defaultauthorlist{%         % standard way of listing authors
  528.    \count@=\authornumber
  529.    \advance\count@ by -2
  530.    \count@@=0
  531.    \loop
  532.    \ifnum\count@>0
  533.       \advance\count@@ by 1
  534.       \ignorespaces\csname theauthor\number\count@@\endcsname\unskip,
  535.       \advance\count@ by -1
  536.    \repeat
  537.    \count@=\authornumber
  538.    \advance\count@ by -\count@@
  539.    \ifnum\authornumber>0
  540.      \ifnum\count@>1
  541.        \count@=\authornumber
  542.        \advance\count@ by -1   
  543.        \ignorespaces\csname theauthor\number\count@\endcsname\unskip\ and
  544.        \fi
  545.      \ignorespaces\csname theauthor\number\authornumber\endcsname\unskip
  546.    \fi
  547.   }
  548.  
  549. \def\signature#1{\def\@signature{#1}}
  550. \def\@signature{\@defaultsignature}
  551.  
  552. \def\@defaultsignature{%
  553.   \count@=0
  554.   \loop
  555.   \ifnum\count@<\authornumber
  556.     \medskip
  557.     \advance\count@ by \@ne
  558.     \signaturemark
  559.     \theauthor{\number\count@}\\
  560.     \theaddress{\number\count@}\\
  561.     \thenetaddress{\number\count@}\\
  562.   \repeat
  563.   }
  564.  
  565. \newdimen\signaturewidth   \signaturewidth=12pc
  566. \def\makesignature{%
  567.   \par
  568.   \rightline{%
  569.     \vbox{\hsize\signaturewidth \ninepoint \raggedright
  570.       \parindent \z@ \everypar={\hangindent 1pc }
  571.       \parskip \z@skip
  572.       \netaddrat
  573.       \netaddrpercent
  574.       \def\|{\unskip\hfil\break}%
  575.       \def\\{\endgraf}%
  576.       \def\net{\tt}%
  577.       \def\phone{\rm Phone: } \rm
  578.       \medskip
  579.       \@signature}}
  580.   }
  581.  
  582. {\makeactive\@
  583.  \gdef\signatureat{\makeactive\@\def@{\char"40\discretionary{}{}{}}}
  584.  \makeactive\%
  585.  \gdef\signaturepercent{\makeactive\%\def%{\char"25\discretionary{}{}{}}}
  586. }
  587.  
  588. \def\signaturemark{\leavevmode\llap{$\diamond$\enspace}}
  589.  
  590.  
  591.  
  592.  
  593. %       some hyphenation exceptions:
  594. \hyphenation{man-u-script man-u-scripts}
  595.  
  596.  
  597. \restorecat\@
  598.  
  599. \endinput
  600.  
  601.  
  602. Contents and Notes
  603. ------------------
  604.  
  605. \makeescape, ..., \makecomment allow users to change category
  606. codes a little more easily.
  607.  
  608. \savecat#1 and \restorecat#1 will save and restore the category
  609. of a given character.  These are useful in cases where one doesn't
  610. wish to localize the settings and therefore be required to globally
  611. define or set things.
  612.  
  613. \SaveCS#1 and \RestoreCS#1 save and restore `meanings' of control
  614. sequences.  Again this is useful in cases where one doesn't want to
  615. localize or where global definitions clobber a control sequence which
  616. is needed later with its `old' definition.
  617.  
  618. Abbreviations.  Just a listing with indications of expansion where
  619. that may not be obvious.  For full definitions, see real code above.
  620.  
  621. \AMS            American Mathematical Society
  622. \AmSTeX
  623. \aw             A-W (abbreviation for Addison-Wesley)
  624. \AW             Addison Wesley
  625. \BibTeX
  626. \CandT          Computers \& Typesetting
  627. \DVItoVDU       DVItoVDU
  628. \JTeX
  629. \JoT            The Joy of \TeX
  630. \LaTeX
  631. \Mc             M ``w/ raised c''
  632. \MF             METAFONT
  633. \mf             Metafont (using small caps)
  634. \MFB            The Metafont book
  635. \mtex           multilingual TeX
  636. \pcMF           pcMF
  637. \PCTeX
  638. \pcTeX
  639. \Pas            Pascal
  640. \PiCTeX
  641. \plain          plain (in typewriter font)
  642. \POBox          P. O. Box
  643. \POBoxTUG       TUG PO Box
  644. \PS             PostScript
  645. \SC             Steering Committee
  646. \SliTeX
  647. \slMF           Metafont (slanted)
  648. \stTeX          TeX for the Atari ST
  649. \TANGLE
  650. \TB             The \TeX book
  651. \TeX
  652. \TeXhax
  653. \TeXMaG
  654. \TeXtures
  655. \TeXXeT
  656. \TUB            TUGboat
  657. \TUG            TeX Users Group
  658. \UNIX
  659. \VAX
  660. \VorTeX
  661. \XeT
  662. \WEB
  663. \WEAVE
  664.  
  665. \NoBlackBoxes           turns off marginal rules marking overfull boxes
  666. \BlackBoxes             turns them back on
  667. \newline                horizontal glue plus a break
  668.  
  669. \ifundefined#1          checks argument with \csname against \relax
  670.  
  671. \topsmash               smashes above baseline  (from AMSTeX)
  672. \botsmash               smashes below baseline  (from AMSTeX)
  673. \smash                  smashes both            (from plain)
  674.  
  675. \ulap                   lap upwards
  676. \dlap                   lap downwards
  677. \xlap                   reference point at center horizontally; 0 width
  678. \ylap                   reference point at center vertically; 0 height, depth
  679. \zlap                   combination \xlap and \ylap
  680.  
  681. \basezero               to avoid insertion of baselineskip and lineskip glue
  682.  
  683. \nullhrule              empty \hrule
  684. \nullvrule              empty \vrule
  685.  
  686. \makestrut[#1;#2]       ad hoc struts;  #1=height, #2=depth
  687.  
  688. \today                  today's date
  689. \SetTime                converts \time to hours, minutes
  690. \now                    displays time in hours and minutes
  691. \Now                    shows current date and time
  692.  
  693. \ifPrelimDraft          flag to indicate status as preliminary draft
  694.  
  695. \rtitlex                TUGboat volume and number info for running head
  696. \midrtitle              information for center of running head
  697.  
  698. \HorzR@gisterRule       pieces of registration marks ("trimmarks")
  699. \DownShortR@gisterRule
  700. \UpShortR@gisterRule
  701.  
  702. \ttopregister           top registration line with `T' in center
  703. \tbotregister           bottom registration line with inverted `T' in center
  704. \topregister            register actually used
  705. \botregister
  706.  
  707.  
  708. \raggedskip             parameters used for ragged settings
  709. \raggedstretch
  710. \raggedparfill
  711. \raggedspaces
  712.  
  713. \raggedright
  714. \raggedleft
  715. \raggedcenter
  716. \normalspaces
  717. \raggedbottom
  718.  
  719. \bull                   square bullet
  720. \cents                  ``cents'' sign
  721. \Dag                    superscripted dagger
  722. \careof                 c/o
  723. \sfrac                  slashed fraction
  724.  
  725. \dash                   en-dash surrounded by thinspaces; only breakable AFTER
  726. \Dash                   em-dash, as above
  727.  
  728. \hyph                   permit automatic hyphenation after an actual hyphen
  729.  
  730. \slash                  "breakable" slash
  731. \nth                    for obtaining "1^{st}", "2^{nd}", 3^{rd}, etc.
  732.  
  733. \tubissue               gets \TUB followed by volume and issue numbers
  734.  
  735. \xEdNote                Editor's Note:
  736.  
  737. \Input                  \input with some other bookkeepping for
  738.                         case where multiple articles are put together
  739.  
  740. \TBremark               reminder to TUGboat editorial staff
  741. \TBremarkON
  742. \TBremarkOFF
  743.  
  744. \pagexref               used to write out page numbers to screen and
  745. \pagexrefON             external files
  746. \pagexrefOFF
  747. \PageXref
  748. \PageXrefON
  749. \PageXrefOFF
  750.  
  751. \xrefto                 used for symbolic cross-reference to other pages
  752. \xreftoON               in TUGboat
  753. \xreftoOFF
  754.  
  755. \TBdriver               marks code which only takes effect when articles
  756.                         are run together in a driver file
  757.  
  758. \signatureat            items for signatures
  759. \signaturepercent
  760. \signaturemark
  761. \signaturewidth
  762.  
  763. % Change history
  764.  
  765. v1.05   29 Mar 90
  766. added \lDash and \rDash for `parenthetical' dashing
  767. added \TP for TeX: The Program
  768. added \relax after file input of \Input
  769. added \relax before \ifmmode of \,
  770.  
  771. v1.04   28 Feb 90
  772. modified pagexref macros to work in both plain and latex styles
  773. (this should affect authors)
  774.  
  775. v1.03   26 Feb 90
  776. removed <tab>s and adjusted definition of \slMF
  777.  
  778. v1.02   25 Feb 90
  779. added definitions of \plaintubissue, \latextubissue
  780. added definition of \tubissue
  781.  
  782. v1.01   19 Feb 90
  783. added \signaturewidth to allow for modification
  784. added \nth to obtain 1^{st}, etc.
  785.