home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / pastex13.lha / DVIPS / dvips5519.lha / dvips / contrib / psfntmac / ps_plain.tex < prev   
Text File  |  1992-09-21  |  44KB  |  1,236 lines

  1. % This is the plain TeX format that's described in The TeXbook.
  2. % N.B.: A version number is defined at the very end of this file;
  3. %       please change that number whenever the file is modified!
  4. % And don't modify the file under any circumstances.
  5. % Modified for Postcript built-in fonts, 29 Apr 87,
  6. %   John Robinson (jr@bbn.com), version 1.6PS
  7. % Modifications extended to version 2.3 by Larry Denenberg (larry@bbn.com)
  8. % 5 Apr 88, and then to version 3.0 on 13 Feb 91.
  9. % PS font names changed to use Karl Berry's names like dvips does,
  10. %  Stephen Gildea, Sep 92.
  11.  
  12. \catcode`\{=1 % left brace is begin-group character
  13. \catcode`\}=2 % right brace is end-group character
  14. \catcode`\$=3 % dollar sign is math shift
  15. \catcode`\&=4 % ampersand is alignment tab
  16. \catcode`\#=6 % hash mark is macro parameter character
  17. \catcode`\^=7 \catcode`\^^K=7 % circumflex and uparrow are for superscripts
  18. \catcode`\_=8 \catcode`\^^A=8 % underline and downarrow are for subscripts
  19. \catcode`\^^I=10 % ascii tab is a blank space
  20. \chardef\active=13 \catcode`\~=\active % tilde is active
  21. \catcode`\^^L=\active \outer\def^^L{\par} % ascii form-feed is "\outer\par"
  22.  
  23. \message{Preloading the plain format: codes,}
  24.  
  25. % We had to define the \catcodes right away, before the message line,
  26. % since \message uses the { and } characters.
  27. % When INITEX (the TeX initializer) starts up,
  28. % it has defined the following \catcode values:
  29. % \catcode`\^^@=9 % ascii null is ignored
  30. % \catcode`\^^M=5 % ascii return is end-line
  31. % \catcode`\\=0 % backslash is TeX escape character
  32. % \catcode`\%=14 % percent sign is comment character
  33. % \catcode`\ =10 % ascii space is blank space
  34. % \catcode`\^^?=15 % ascii delete is invalid
  35. % \catcode`\A=11 ... \catcode`\Z=11 % uppercase letters
  36. % \catcode`\a=11 ... \catcode`\z=11 % lowercase letters
  37. % all others are type 12 (other)
  38.  
  39. % Here is a list of the characters that have been specially catcoded:
  40. \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
  41.   \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~}
  42. % (not counting ascii null, tab, linefeed, formfeed, return, delete)
  43. % Each symbol in the list is preceded by \do, which can be defined
  44. % if you want to do something to every item in the list.
  45.  
  46. % We make @ signs act like letters, temporarily, to avoid conflict
  47. % between user names and internal control sequences of plain format.
  48. \catcode`@=11
  49.  
  50. % INITEX sets up \mathcode x=x, for x=0..127, except that
  51. % \mathcode x=x+"7100, for x = `A to `Z and `a to `z;
  52. % \mathcode x=x+"7000, for x = `0 to `9.
  53. % The following changes define internal codes as recommended
  54. % in Appendix C of The TeXbook:
  55. \mathcode`\^^@="2201 % \cdot
  56. \mathcode`\^^A="3223 % \downarrow
  57. \mathcode`\^^B="010B % \alpha
  58. \mathcode`\^^C="010C % \beta
  59. \mathcode`\^^D="225E % \land
  60. \mathcode`\^^E="023A % \lnot
  61. \mathcode`\^^F="3232 % \in
  62. \mathcode`\^^G="0119 % \pi
  63. \mathcode`\^^H="0115 % \lambda
  64. \mathcode`\^^I="010D % \gamma
  65. \mathcode`\^^J="010E % \delta
  66. \mathcode`\^^K="3222 % \uparrow
  67. \mathcode`\^^L="2206 % \pm
  68. \mathcode`\^^M="2208 % \oplus
  69. \mathcode`\^^N="0231 % \infty
  70. \mathcode`\^^O="0140 % \partial
  71. \mathcode`\^^P="321A % \subset
  72. \mathcode`\^^Q="321B % \supset
  73. \mathcode`\^^R="225C % \cap
  74. \mathcode`\^^S="225B % \cup
  75. \mathcode`\^^T="0238 % \forall
  76. \mathcode`\^^U="0239 % \exists
  77. \mathcode`\^^V="220A % \otimes
  78. \mathcode`\^^W="3224 % \leftrightarrow
  79. \mathcode`\^^X="3220 % \leftarrow
  80. \mathcode`\^^Y="3221 % \rightarrow
  81. \mathcode`\^^Z="8000 % \ne
  82. \mathcode`\^^[="2205 % \diamond
  83. \mathcode`\^^\="3214 % \le
  84. \mathcode`\^^]="3215 % \ge
  85. \mathcode`\^^^="3211 % \equiv
  86. \mathcode`\^^_="225F % \lor
  87. \mathcode`\ ="8000 % \space
  88. \mathcode`\!="5021
  89. \mathcode`\'="8000 % ^\prime
  90. \mathcode`\(="4028
  91. \mathcode`\)="5029
  92. \mathcode`\*="2203 % \ast
  93. \mathcode`\+="202B
  94. \mathcode`\,="613B
  95. \mathcode`\-="2200
  96. \mathcode`\.="013A
  97. \mathcode`\/="013D
  98. \mathcode`\:="303A
  99. \mathcode`\;="603B
  100. \mathcode`\<="313C
  101. \mathcode`\=="303D
  102. \mathcode`\>="313E
  103. \mathcode`\?="503F
  104. \mathcode`\[="405B
  105. \mathcode`\\="026E % \backslash
  106. \mathcode`\]="505D
  107. \mathcode`\_="8000 % \_
  108. \mathcode`\{="4266
  109. \mathcode`\|="026A
  110. \mathcode`\}="5267
  111. \mathcode`\^^?="1273 % \smallint
  112.  
  113. % INITEX sets \uccode`x=`X and \uccode `X=`X for all letters x,
  114. % and \lccode`x=`x, \lccode`X=`x; all other values are zero.
  115. % No changes to those tables are needed in plain TeX format.
  116.  
  117. % INITEX sets \sfcode x=1000 for all x, except that \sfcode`X=999
  118. % for uppercase letters. The following changes are needed:
  119. \sfcode`\)=0 \sfcode`\'=0 \sfcode`\]=0
  120. % The \nonfrenchspacing macro will make further changes to \sfcode values.
  121.  
  122. % Finally, INITEX sets all \delcode values to -1, except \delcode`.=0
  123. \delcode`\(="028300
  124. \delcode`\)="029301
  125. \delcode`\[="05B302
  126. \delcode`\]="05D303
  127. \delcode`\<="26830A
  128. \delcode`\>="26930B
  129. \delcode`\/="02F30E
  130. \delcode`\|="26A30C
  131. \delcode`\\="26E30F
  132. % N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!
  133.  
  134. % To make the plain macros more efficient in time and space,
  135. % several constant values are declared here as control sequences.
  136. % If they were changed, anything could happen; so they are private symbols.
  137. \chardef\@ne=1
  138. \chardef\tw@=2
  139. \chardef\thr@@=3
  140. \chardef\sixt@@n=16
  141. \chardef\@cclv=255
  142. \mathchardef\@cclvi=256
  143. \mathchardef\@m=1000
  144. \mathchardef\@M=10000
  145. \mathchardef\@MM=20000
  146.  
  147. % Allocation of registers
  148.  
  149. % Here are macros for the automatic allocation of \count, \box, \dimen,
  150. % \skip, \muskip, and \toks registers, as well as \read and \write
  151. % stream numbers, \fam codes, \language codes, and \insert numbers.
  152.  
  153. \message{registers,}
  154.  
  155. % When a register is used only temporarily, it need not be allocated;
  156. % grouping can be used, making the value previously in the register return
  157. % after the close of the group.  The main use of these macros is for
  158. % registers that are defined by one macro and used by others, possibly at
  159. % different nesting levels.  All such registers should be defined through
  160. % these macros; otherwise conflicts may occur, especially when two or more
  161. % more macro packages are being used at once.
  162.  
  163. % The following counters are reserved:
  164. %   0 to 9  page numbering
  165. %       10  count allocation
  166. %       11  dimen allocation
  167. %       12  skip allocation
  168. %       13  muskip allocation
  169. %       14  box allocation
  170. %       15  toks allocation
  171. %       16  read file allocation
  172. %       17  write file allocation
  173. %       18  math family allocation
  174. %       19  language allocation
  175. %       20  insert allocation
  176. %       21  the most recently allocated number
  177. %       22  constant -1
  178. % New counters are allocated starting with 23, 24, etc.  Other registers are
  179. % allocated starting with 10.  This leaves 0 through 9 for the user to play
  180. % with safely, except that counts 0 to 9 are considered to be the page and
  181. % subpage numbers (since they are displayed during output). In this scheme,
  182. % \count 10 always contains the number of the highest-numbered counter that
  183. % has been allocated, \count 14 the highest-numbered box, etc.
  184. % Inserts are given numbers 254, 253, etc., since they require a \count,
  185. % \dimen, \skip, and \box all with the same number; \count 19 contains the
  186. % lowest-numbered insert that has been allocated. Of course, \box255 is
  187. % reserved for \output; \count255, \dimen255, and \skip255 can be used freely.
  188.  
  189. % It is recommended that macro designers always use
  190. % \global assignments with respect to registers numbered 1, 3, 5, 7, 9, and
  191. % always non-\global assignments with respect to registers 0, 2, 4, 6, 8, 255.
  192. % This will prevent ``save stack buildup'' that might otherwise occur.
  193.  
  194. \count10=22 % allocates \count registers 23, 24, ...
  195. \count11=9 % allocates \dimen registers 10, 11, ...
  196. \count12=9 % allocates \skip registers 10, 11, ...
  197. \count13=9 % allocates \muskip registers 10, 11, ...
  198. \count14=9 % allocates \box registers 10, 11, ...
  199. \count15=9 % allocates \toks registers 10, 11, ...
  200. \count16=-1 % allocates input streams 0, 1, ...
  201. \count17=-1 % allocates output streams 0, 1, ...
  202. \count18=3 % allocates math families 4, 5, ...
  203. \count19=0 % allocates \language codes 1, 2, ...
  204. \count20=255 % allocates insertions 254, 253, ...
  205. \countdef\insc@unt=20 % the insertion counter
  206. \countdef\allocationnumber=21 % the most recent allocation
  207. \countdef\m@ne=22 \m@ne=-1 % a handy constant
  208. \def\wlog{\immediate\write\m@ne} % write