home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / tex / texextr2 / !TeX / Misc / TeXmacros / tugbot / sty next >
Text File  |  1987-09-23  |  44KB  |  1,121 lines

  1. %                       *****     TUGBOT86.STY    *****        8 Jul 87, bb
  2. %
  3. %       WARNING -- UNDER CONSTRUCTION
  4. %
  5. %       This file contains the TeX82 instructions for preparing a document
  6. %       in TUGboat format.  It is based on the TeX80 TUGboat format and on
  7. %       AMSPPT.STY (AMS-TeX82).  It is compatible with, but does not
  8. %       require (or load) AMS-TeX.  It assumes that PLAIN.TEX is preloaded.
  9. %
  10. %       This version differs in significant ways from the production version
  11. %       used at the AMS to generate the published TUGboat; particular
  12. %       features of the production version address idiosyncracies of the
  13. %       Alphatype CRS typesetter, used to prepare camera copy, which are not
  14. %       relevant to output prepared on, e.g., a laser printer.
  15. %
  16. %       Explicit registers:
  17. %               Counters:       0 = \pageno (PLAIN)
  18. %                               1 = \xcol -- column on page (values 1 or 2)
  19. %                               2 = \spoolno -- sequential segment count
  20. %               Files:          1 = page number xref definitions
  21.  
  22.  
  23. \def\makeatletter{\catcode`\@=11 }
  24. \chardef\other=12
  25. \def\makeatother{\catcode`\@=\other}
  26.  
  27. \makeatletter        % used, as in PLAIN, in protected control sequences
  28.  
  29. %      Stuff different from PLAIN, or reiterated for clarity
  30.  
  31. \def~{\penalty\@M \ } % tie -- this is PLAIN value; it is reset in AMS-TeX
  32.  
  33. \clubpenalty=10000
  34. \widowpenalty=10000
  35.  
  36. \normallineskiplimit=1pt
  37.  
  38. \newif\ifNoParIndent            \NoParIndentfalse
  39. \def \NoParIndent{\parindent=0pt \NoParIndenttrue}
  40.  
  41. \newdimen\normalparindent        \normalparindent=20pt          % plain = 20pt
  42. \def \NormalParIndent{\global\parindent=\normalparindent
  43.         \global\NoParIndentfalse}
  44. \NormalParIndent
  45.  
  46. %               set up auxiliary `page numbers'
  47. %               \pageno = \count0  as used in PLAIN
  48. \countdef\xcol=1        \xcol=1
  49. \countdef\spoolno=2     \spoolno=1
  50.  
  51. %       some things with the same names as in, or reiterated from, AMS-TeX
  52.  
  53. \def \BlackBoxes{\overfullrule=5pt }
  54. \def \NoBlackBoxes{\overfullrule=0pt }
  55. \def \document{}                % override an AMS-TeX convention
  56. \def \linebreak{\unskip\break}
  57. \def \newline{\hskip0pt plus\pagewd \break}
  58. %\let\brk=\linebreak            % TeX80 version
  59. %\let\lbrk=\newline             % TeX80 version
  60. \output{\output@}
  61.  
  62. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  63. %                                                                             %
  64. %               *****     utility registers and definitions     *****         %
  65. %                                                                             %
  66. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  67.  
  68.  
  69. %       test registers for transient use; paired - internal/external
  70. \newbox\T@stBox                 \newbox\TestBox
  71. \newcount\T@stCount             \newcount\TestCount
  72. \newdimen\T@stDimen             \newdimen\TestDimen
  73.  
  74.  
  75. %       \cs existence test, stolen from TeXbook exercise 7.7
  76. \def \ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax }
  77.  
  78.  
  79. %       Smashes repeated from AMS-TeX; PLAIN implements only full \smash .
  80. \newif\iftop@           \newif\ifbot@
  81. \def\topsmash{\top@true\bot@false\smash@}
  82. \def\botsmash{\top@false\bot@true\smash@}
  83. \def\smash{\top@true\bot@true\smash@}
  84. \def\smash@{\relax\ifmmode\def\next{\mathpalette\mathsm@sh}%
  85.         \else\let\next\makesm@sh\fi \next }
  86. \def\finsm@sh{\iftop@\ht\z@\z@\fi\ifbot@\dp\z@\z@\fi\box\z@}
  87.  
  88.  
  89. %    Vertical `laps'; cf. \llap and \rlap
  90. \long\def\ulap#1{\vbox to \z@{\vss#1}}
  91. \long\def\dlap#1{\vbox to \z@{#1\vss}}
  92.  
  93. %    And centered horizontal and vertical `laps'
  94. \def\xlap#1{\hbox to \z@{\hss#1\hss}}
  95. \long\def\ylap#1{\vbox to \z@{\vss#1\vss}}
  96. \long\def\zlap#1{\ylap{\xlap{#1}}}
  97.  
  98.  
  99. %       Avoid unwanted vertical glue when making up pages.
  100. \def \basezero{\baselineskip\z@ \lineskip\z@}
  101.  
  102.  
  103. %    Today's date, to be printed on drafts.  Based on TeXbook, p.406.
  104.  
  105. \def\today{\number\day\space \ifcase\month\or
  106.     Jan \or Feb \or Mar \or Apr \or May \or Jun \or
  107.     Jul \or Aug \or Sep \or Oct \or Nov \or Dec \fi
  108.     \number\year}
  109.  
  110. \newif\ifPrelimDraft        \PrelimDraftfalse
  111. \def\PrelimDraft{\PrelimDrafttrue
  112.     \def\midrtitle{\tensl preliminary draft, \today}}
  113.  
  114.  
  115. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  116. %                                                                             %
  117. %                       ***** fonts and friends *****                         %
  118. %                                                                             %
  119. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  120.  
  121.  
  122. %       Struts give ascenders and descenders to assist in baseline alignment
  123. %       (e.g. of adjoining vertical boxes); useful only with text fonts.
  124. %
  125. %       \strut is defined in PLAIN .  The structure of \strutt is equivalent.
  126.  
  127. \newbox\struttbox
  128. \def\strutt{\relax\ifmmode\copy\struttbox\else\unhcopy\struttbox\fi}
  129.  
  130. %       Struts are given the following dimensions for use in TUGboat:
  131. %
  132. %               \strut = height/depth of parenthesis in current font
  133. %                        (not the same as PLAIN)
  134. %               \strutt height + depth = \normalbaselineskip,
  135. %                        height = same as \strut
  136. %                        (equivalent to PLAIN \strut )
  137.  
  138.  
  139. %       The fonts below are sufficient for most ordinary TUGboat production.
  140. %       Additional titling fonts are defined elsewhere, and occasionally an
  141. %       extra font will be needed for a particular item (e.g. the device
  142. %       charts) and defined in that file.
  143.  
  144. %               all PLAIN CM fonts
  145.  
  146. \font\tenrm=cmr10
  147. \font\ninerm=cmr9
  148. \font\eightrm=cmr8
  149. \font\sevenrm=cmr7
  150. \font\sixrm=cmr6
  151. \font\fiverm=cmr5
  152.  
  153. \font\teni=cmmi10 \skewchar\teni='177
  154. \font\ninei=cmmi9 \skewchar\ninei='177
  155. \font\eighti=cmmi8 \skewchar\eighti='177
  156. \font\seveni=cmmi7 \skewchar\seveni='177
  157. \font\sixi=cmmi6 \skewchar\sixi='177
  158. \font\fivei=cmmi5 \skewchar\fivei='177
  159.  
  160. \font\tensy=cmsy10 \skewchar\tensy='60
  161. \font\ninesy=cmsy9 \skewchar\ninesy='60
  162. \font\eightsy=cmsy8 \skewchar\eightsy='60
  163. \font\sevensy=cmsy7 \skewchar\sevensy='60
  164. \font\sixsy=cmsy6 \skewchar\sixsy='60
  165. \font\fivesy=cmsy5 \skewchar\fivesy='60
  166.  
  167. \font\tenex=cmex10
  168.  
  169. \font\tenbf=cmbx10
  170. \font\ninebf=cmbx9
  171. \font\eightbf=cmbx8
  172. \font\sevenbf=cmbx7
  173. \font\sixbf=cmbx6
  174. \font\fivebf=cmbx5
  175.  
  176. \font\tentt=cmtt10
  177. \font\ninett=cmtt9
  178. \font\eighttt=cmtt8
  179.  
  180. \font\tensl=cmsl10
  181. \font\ninesl=cmsl9
  182. \font\eightsl=cmsl8
  183. %\font\sevensl=amsl7
  184. \let\sevensl=\eightsl                % for distribution
  185.  
  186. \font\tenit=cmti10
  187. \font\nineit=cmti9
  188. \font\eightit=cmti8
  189. \font\sevenit=cmti7
  190.  
  191. \font\tenupit=cmu10 
  192.  
  193. \font\tensmc=cmcsc10
  194.  
  195.  
  196. \font\tentex=cmtex10
  197.  
  198. \def \mit{\fam\@ne}
  199. \def \cal{\fam\tw@}
  200. \def \sy{\cal}          % old name
  201.  
  202. %               fonts added at AMS
  203.  
  204. % \font\eightex=amex8
  205.  
  206. % \newfam\cyrfam        % uncomment if needed
  207.  
  208. % \font\tencyr=mcyr10
  209. % \font\ninemcyr=mcyr9
  210. % \font\eightcyr=mcyr8
  211. % \font\sixcyr=mcyr6
  212.  
  213. %\font\ninesmc=amcsc9
  214. \let\ninesmc=\tensmc                    % temporary expedient
  215. %\font\eightsmc=amcsc8
  216. \let\eightsmc=\tensmc                   % temporary expedient
  217.  
  218. %\font \sixteenssb=amssbx16
  219. \font \sixteenssb=cmssbx10 scaled \magstep3    % for distribution
  220. %\font \twelvessb=amssbx12
  221. \font \twelvessb=cmssbx10 scaled \magstep1     % for distribution
  222. \font \tenssb=cmssbx10
  223. %\font \eightssb=amssbx8
  224.  
  225. %\font \seventphon=tphon7               % used in macro index and device list
  226.  
  227. \newfam\titlefam
  228. \def \titlefont{\textfont\titlefam=\sixteenssb
  229.     \scriptfont\titlefam=\twelvessb \scriptscriptfont\titlefam=\tenssb
  230.     \fam\titlefam \sixteenssb \baselineskip=16pt }
  231. %           Formerly \twelvessb and \eightssb
  232.  
  233.  
  234. %       Planned additions and changes:
  235. %
  236. %       Dynamic loading of fonts, probably in groups according to size
  237. %       Removal of \rm, \bf, etc., from \*point expansions, replacement
  238. %               by generic \rm, \bf, etc. definitions
  239. %       Mechanism for switching neatly between serif and sans-serif
  240.  
  241.  
  242. %       Allow text to be a bit stretchier than the built-in setting;
  243. %       TeXbook, page 433, 355
  244.  
  245. \newdimen\normaltenptstretch    \normaltenptstretch=1.6667pt
  246. \newdimen\extratenptstretch     \extratenptstretch=4pt
  247. \def\NormalTenPointSpacing{\fontdimen3\te