home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / pastex13.lha / DVIPS / PSLATEX / psfonts.sty < prev    next >
Text File  |  1992-09-19  |  12KB  |  267 lines

  1. % psfonts.sty - re-work of lfonts.tex to allow postscript fonts
  2. % to replace cmr fonts.  Original by LA Carr.  Hacked by Van
  3. % Jacobson.
  4. %
  5. % $Header: psfonts.sty,v 1.2 88/01/23 17:52:49 van Exp $
  6. %
  7. \def\@@getfont#1#2#3#4#5#6#7{%
  8. \@ifundefined{\string #1\string #5}{\global\expandafter
  9.     \font \csname \string #1\string #5\endcsname #4\@ptscale{#5}\relax}{}%
  10. \@ifundefined{\string #1\string #6}{\global\expandafter
  11.     \font \csname \string #1\string #6\endcsname #4\@ptscale{#6}\relax}{}%
  12. \@ifundefined{\string #1\string #7}{\global\expandafter
  13.     \font \csname \string #1\string #7\endcsname #4\@ptscale{#7}\relax}{}%
  14. \@ifundefined{\string #1\string #3}{\global\expandafter
  15.     \let \csname \string #1\string #3\endcsname #3\relax 
  16.      \@addfontinfo#3{\textfont #2\csname \string #1\string #5\endcsname 
  17.      \scriptfont #2\csname \string #1\string #6\endcsname 
  18.      \scriptscriptfont #2\csname \string #1\string #7\endcsname 
  19.      \def#1{\fam #2\csname\string #1\string #5\endcsname}}}{}#3#1}
  20. \def\@@@getfont#1#2#3#4#5{%
  21. \@ifundefined{\string #1\string #5}{\global\expandafter
  22.     \font \csname \string #1\string #5\endcsname #4\@ptscale{#5}\relax}{}%
  23. \@ifundefined{\string #1\string #3}{\global\expandafter
  24.     \let \csname \string #1\string #3\endcsname #3\relax 
  25.      \@addfontinfo#3{\def#1{\fam #2\csname\string #1\string #5\endcsname}}}{}#3#1}
  26.  
  27. \def\@psfonts#1#2#3#4{%
  28. \def\prm{\@@getfont\prm\z@#1\@mrm{#2}{#3}{#4}}%
  29. \def\pit{\@@getfont\pit\itfam#1\@mit{#2}{#3}{#4}}%
  30. \def\psl{\@@getfont\psl\slfam#1\@msl{#2}{#3}{#4}}%
  31. \def\pbf{\@@getfont\pbf\bffam#1\@mbf{#2}{#3}{#4}}%
  32. \def\ptt{\@@getfont\ptt\ttfam#1\@mtt{#2}{#3}{#4}%
  33. \@nohyphens\ptt {#2}\@nohyphens\ptt {#3}\@nohyphens\ptt {#4}}%
  34. \def\psf{\@@getfont\psf\sffam#1\@mss{#2}{#3}{#4}}%
  35. \def\psc{\@@getfont\psc\scfam#1\@mcsc{#2}{#3}{#4}}}
  36.  
  37. % math stuff: we want to use cmr operator characters but Times
  38. % letters.  So, we make a new family to hold cmrX & re-mathcode
  39. % to force the operators to come from that family.
  40. \newfam\@cmrfam
  41. \newcount\@cmrscale
  42. \def\@mathmap#1{\@cmrscale=\@cmrfam \multiply\@cmrscale by 256
  43. \advance\@cmrscale by \the\mathcode#1 \mathcode#1=\@cmrscale\relax}
  44. \def\@cmrset#1#2#3{\textfont\@cmrfam #1%
  45. \scriptfont\@cmrfam #2\scriptscriptfont\@cmrfam #3\relax}
  46.  
  47. \@mathmap{`\(}
  48. \@mathmap{`\)}
  49. \@mathmap{`\+}
  50. \@mathmap{`\=}
  51. \@mathmap{`\[}
  52. \@mathmap{`\]}
  53.  
  54. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  55. \def\vpt{\textfont\z@\fivrm 
  56.   \scriptfont\z@\fivrm \scriptscriptfont\z@\fivrm
  57. \textfont\@ne\fivmi \scriptfont\@ne\fivmi \scriptscriptfont\@ne\fivmi
  58. \textfont\tw@\fivsy \scriptfont\tw@\fivsy \scriptscriptfont\tw@\fivsy
  59. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  60. \def\unboldmath{\everymath{}\everydisplay{}\@nomath
  61.   \unboldmath\fam\@ne\@boldfalse}\@boldfalse
  62. \def\boldmath{\@subfont\boldmath\unboldmath}%
  63. \@psfonts\@vpt555%
  64. \@cmrset\fivrm\fivrm\fivrm%
  65. \def\ly{\fam\lyfam\fivly}\textfont\lyfam\fivly 
  66.     \scriptfont\lyfam\fivly \scriptscriptfont\lyfam\fivly 
  67. \@setstrut\rm}
  68. \def\@vpt{}
  69. \def\vipt{\textfont\z@\sixrm 
  70.   \scriptfont\z@\sixrm \scriptscriptfont\z@\sixrm
  71. \textfont\@ne\sixmi \scriptfont\@ne\sixmi \scriptscriptfont\@ne\sixmi
  72. \textfont\tw@\sixsy \scriptfont\tw@\sixsy \scriptscriptfont\tw@\sixsy
  73. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  74. \def\unboldmath{\everymath{}\everydisplay{}\@nomath
  75.   \unboldmath\@boldfalse}\@boldfalse
  76. \def\boldmath{\@subfont\boldmath\unboldmath}%
  77. \@psfonts\@vipt666%
  78. \@cmrset\sixrm\sixrm\sixrm%
  79. \def\ly{\fam\lyfam\sixly}\textfont\lyfam\sixly 
  80.     \scriptfont\lyfam\sixly \scriptscriptfont\lyfam\sixly 
  81. \@setstrut\rm}
  82. \def\@vipt{}
  83. \def\viipt{\textfont\z@\sevrm 
  84.   \scriptfont\z@\sixrm \scriptscriptfont\z@\fivrm
  85. \textfont\@ne\sevmi \scriptfont\@ne\fivmi \scriptscriptfont\@ne\fivmi
  86. \textfont\tw@\sevsy \scriptfont\tw@\fivsy \scriptscriptfont\tw@\fivsy
  87. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  88. \def\unboldmath{\everymath{}\everydisplay{}\@nomath
  89. \unboldmath\@boldfalse}\@boldfalse
  90. \def\boldmath{\@subfont\boldmath\unboldmath}%
  91. \@psfonts\@viipt755%
  92. \@cmrset\sevrm\sixrm\fivrm%
  93. \def\ly{\fam\lyfam\sevly}\textfont\lyfam\sevly 
  94.     \scriptfont\lyfam\fivly \scriptscriptfont\lyfam\fivly 
  95. \@setstrut \rm}
  96. \def\@viipt{}
  97. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  98. \def\viiipt{\textfont\z@\egtrm 
  99.   \scriptfont\z@\sixrm \scriptscriptfont\z@\fivrm
  100. \textfont\@ne\egtmi \scriptfont\@ne\sixmi \scriptscriptfont\@ne\fivmi
  101. \textfont\tw@\egtsy \scriptfont\tw@\sixsy \scriptscriptfont\tw@\fivsy
  102. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  103. \def\unboldmath{\everymath{}\everydisplay{}\@nomath
  104. \unboldmath\@boldfalse}\@boldfalse
  105. \def\boldmath{\@subfont\boldmath\unboldmath}%
  106. \@psfonts\@viiipt865%
  107. \@cmrset\egtrm\sixrm\fivrm%
  108. \def\ly{\fam\lyfam\egtly}\textfont\lyfam\egtly 
  109.     \scriptfont\lyfam\sixly \scriptscriptfont\lyfam\fivly 
  110. \@setstrut \rm}
  111. \def\@viiipt{}
  112. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  113. \def\ixpt{\textfont\z@\ninrm 
  114.   \scriptfont\z@\sixrm \scriptscriptfont\z@\fivrm
  115. \textfont\@ne\ninmi \scriptfont\@ne\sixmi \scriptscriptfont\@ne\fivmi
  116. \textfont\tw@\ninsy \scriptfont\tw@\sixsy \scriptscriptfont\tw@\fivsy
  117. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  118. \def\unboldmath{\everymath{}\everydisplay{}\@nomath\unboldmath
  119.     \@boldfalse}\@boldfalse
  120. \def\boldmath{\@subfont\boldmath\unboldmath}%
  121. \@psfonts\@ixpt965%
  122. \@cmrset\ninrm\sixrm\fivrm%
  123. \def\ly{\fam\lyfam\ninly}\textfont\lyfam\ninly 
  124.    \scriptfont\lyfam\sixly \scriptscriptfont\lyfam\fivly 
  125. \@setstrut \rm}
  126. \def\@ixpt{}
  127. \def\xpt{\textfont\z@\tenrm 
  128.   \scriptfont\z@\sevrm \scriptscriptfont\z@\fivrm
  129. \textfont\@ne\tenmi \scriptfont\@ne\sevmi \scriptscriptfont\@ne\fivmi
  130. \textfont\tw@\tensy \scriptfont\tw@\sevsy \scriptscriptfont\tw@\fivsy
  131. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  132. \def\unboldmath{\everymath{}\everydisplay{}\@nomath\unboldmath
  133.           \textfont\@ne\tenmi 
  134.           \textfont\tw@\tensy \textfont\lyfam\tenly
  135.           \@boldfalse}\@boldfalse
  136. \def\boldmath{\@ifundefined{tenmib}{\global\font\tenmib\@mbi 
  137.    \global\font\tensyb\@mbsy 
  138.    \global\font\tenlyb\@lasyb\relax\@addfontinfo\@xpt
  139.    {\def\boldmath{\everymath{\mit}\everydisplay{\mit}\@prtct\@nomathbold
  140.         \textfont\@ne\tenmib \textfont\tw@\tensyb 
  141.         \textfont\lyfam\tenlyb \@prtct\@boldtrue}}}{}\@xpt\boldmath}%
  142. \@psfonts\@xpt{10}75%
  143. \@cmrset\tenrm\sevrm\fivrm%
  144. \def\ly{\fam\lyfam\tenly}\textfont\lyfam\tenly 
  145.    \scriptfont\lyfam\sevly \scriptscriptfont\lyfam\fivly 
  146. \@setstrut \rm}
  147. \def\@xpt{}
  148. \def\xipt{\textfont\z@\elvrm 
  149.   \scriptfont\z@\egtrm \scriptscriptfont\z@\sixrm
  150. \textfont\@ne\elvmi \scriptfont\@ne\egtmi \scriptscriptfont\@ne\sixmi
  151. \textfont\tw@\elvsy \scriptfont\tw@\egtsy \scriptscriptfont\tw@\sixsy
  152. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  153. \def\unboldmath{\everymath{}\everydisplay{}\@nomath\unboldmath
  154.           \textfont\@ne\elvmi \textfont\tw@\elvsy 
  155.           \textfont\lyfam\elvly \@boldfalse}\@boldfalse
  156. \def\boldmath{\@ifundefined{elvmib}{\global\font\elvmib\@mbi\@halfmag 
  157.          \global\font\elvsyb\@mbsy\@halfmag
  158.          \global\font\elvlyb\@lasyb\@halfmag\relax\@addfontinfo\@xipt
  159.          {\def\boldmath{\everymath{\mit}\everydisplay{\mit}\@prtct\@nomathbold
  160.                 \textfont\@ne\elvmib \textfont\tw@\elvsyb 
  161.                 \textfont\lyfam\elvlyb\@prtct\@boldtrue}}}{}\@xipt\boldmath}%
  162. \@psfonts\@xipt{11}86%
  163. \@cmrset\elvrm\egtrm\sixrm%
  164. \def\ly{\fam\lyfam\elvly}\textfont\lyfam\elvly 
  165.    \scriptfont\lyfam\egtly \scriptscriptfont\lyfam\sixly 
  166. \@setstrut \rm}
  167. \def\@xipt{}
  168. \def\xiipt{\textfont\z@\twlrm 
  169.   \scriptfont\z@\egtrm \scriptscriptfont\z@\sixrm
  170. \textfont\@ne\twlmi \scriptfont\@ne\egtmi \scriptscriptfont\@ne\sixmi
  171. \textfont\tw@\twlsy \scriptfont\tw@\egtsy \scriptscriptfont\tw@\sixsy
  172. \textfont\thr@@\tenex \scriptfont\thr@@\tenex \scriptscriptfont\thr@@\tenex
  173. \def\unboldmath{\everymath{}\everydisplay{}\@nomath\unboldmath
  174.           \textfont\@ne\twlmi 
  175.           \textfont\tw@\twlsy \textfont\lyfam\twlly
  176.           \@boldfalse}\@boldfalse
  177. \def\boldmath{\@ifundefined{twlmib}{\global\font\twlmib\@mbi\@magscale