home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / useful / dist / text / tex / pastex / macros / latex / nfss2 / dccrstd.tex < prev    next >
Text File  |  1993-08-05  |  8KB  |  280 lines

  1.  
  2. % This file is part of the NFSS2 (New Font Selection Scheme) package.
  3. % -------------------------------------------------------------------
  4. %
  5. % Copyright (C) 1993 Frank Mittelbach and Rainer Schoepf,
  6. % All rights reserved
  7. %
  8. % IMPORTANT NOTICE:
  9. %
  10. % You are not allowed to change this file. 
  11.  
  12. % This files generates MF source files for producing Concrete Roman
  13. % fonts with Cork encoding. You need to have the DC/EC source
  14. % distribution which is *not* part of NFSS2 but can be found on the
  15. % usual archives or can be ordered from TeX organizations.
  16. %
  17. % This file is a copy of one of the DC distribution files with the
  18. % table entries changed so that it will produce Concrete Roman instead
  19. % of Computer Modern fonts. As an alternative you can copy the first
  20. % line which is flagged with `FMi' and place it in the table of the
  21. % file {\tt dcstdedt.tex} in order to produce all Metafont sources from
  22. % a single file.
  23. %
  24. % Usage:
  25. %
  26. % Run this file through TeX. This will generate a number of Metafont
  27. % source files for the Concrete Roman fonts. This will also generate a
  28. % single page of output showing a table of the fonts generated. (This
  29. % is much more interesting if you combined the table entry from this
  30. % file with the standard table entries for the Computer Modern fonts.)
  31. %
  32. % Then produce the fonts by running Metafont on the generated fonts.
  33. % For this you can use the batch file {\tt mfccr.bat} which was
  34. % generated by the previous step. This batch file is set up to run
  35. % under DOS and you may have to edit it first.
  36. %
  37. % The rest of this this file, except for the lines flagged with `FMi'
  38. % correspond to the original one from Norbert Schwarz.
  39. %
  40. % --------------------------------------------------------
  41. %
  42. %
  43. % Generating MF-files for DC/EC fonts            Version 1.1 / 22.3.1992
  44. %
  45. %  Running TeX with this file as an input results in a lot of
  46. %  Metafont font driver files (dcr5.mf, dcr6.mf, ..). The files
  47. %  which should be generated are marked in the following macro
  48. %  \FontsToBeGenerated. For each font there has to be an entry
  49. %  with the pt sizes the font should be generate with. Additionally
  50. %  in the heading \tablevalues all used pt sizes have to be mentioned,
  51. %  just to get an fine printout.
  52. %
  53. %  Furthermore there is a batch file which can be customized for the
  54. %  Metafont batch run.
  55. %
  56. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  57. %
  58. %  please change only here:
  59. %
  60. \long\def\FontsToBeGenerated{
  61.  
  62.      \tablevalues       ( 5 6 7 8 9 10 10.95[11] 12 14.4[14] 17.28[17] )
  63.  
  64.      % following line changed by FMi
  65.      \makefont dccr     ( 5 6 7 8 9 10 10.95[11] 12 14.4[14] 17.28[17] )
  66. }
  67. % If a font with a fraction, e.g. "7.5", should be generated
  68. % and the file name is not allowed to contain a period, an
  69. % optional file name part can be specified.
  70. %
  71. %      7.5[7h]
  72. %
  73. %      result in - may be - "dcr7h.mf" and an entry of "gensize:=7.5;"
  74. %      (The new value has to be specified in the \tablevalues-line too!
  75. %
  76. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  77. %
  78. %  The Batch file entries   ( #1 contains the fontname )
  79. %
  80. %   should be of the following form:
  81. %
  82. %    \def\BatchOutput{\BatchLine{...}%
  83. %                          ...
  84. %                     \BatchLine{...}}
  85. %
  86. %
  87. %  preset value, change \BatchOutput if you like ....
  88. %
  89. \def\BatchOutput#1{
  90.      \BatchLine{mf "&plain \string\mode:=oce; input #1"}
  91. }
  92. %
  93. %   File naming conventions:
  94. %
  95. \def\BatchFileName{mfccr.bat}      % FMi
  96. %
  97. %
  98. \def\MetafontFileExtension{.mf}
  99. %
  100. \def\modedef{} % e.g.  \def\modedef{\string\mode:=hplaser;}
  101. %
  102. %
  103. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  104. %
  105. % please  n o  changes from here, thanks !
  106. %
  107. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  108. %
  109. %
  110. % (Avoiding inspecting the macros (sigh!)
  111. %
  112. %   Norbert Schwarz, Dezember 1990
  113. %
  114. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  115. \magnification\magstep1
  116. \overfullrule=0pt
  117. %\tracingonline1
  118. %\tracingcommands=1
  119. %\tracingmacros=1
  120. % some token handling
  121. \let\EA\expandafter
  122. \def\JoinToks#1=(#2+#3){#1=\EA\EA\EA{\EA\the\EA#2\the#3}}
  123. \def\UpToHere{\relax}
  124. \def\IgnoreRest#1#2\UpToHere{#1}
  125. \def\IgnoreFirst#1#2\relax\UpToHere{#2}
  126. \def\First#1{\EA\IgnoreRest\the#1{}\UpToHere}
  127. \def\FirstOf#1{\EA\EA\EA{\EA\IgnoreRest\the#1{}\UpToHere}}
  128. \def\MoveFirst(#1to#2){#2\FirstOf#1}
  129. \def\Rest#1{\EA\IgnoreFirst\the#1\relax\UpToHere}
  130. \def\RestOf#1{\EA\EA\EA{\EA\IgnoreFirst\the#1\relax\UpToHere}}
  131. \def\MoveRest(#1to#2){#2=\RestOf{#1}}
  132. % borrowed from p. 132 in N.Schwarz, Introduction to TeX
  133. % (some advertising ..)
  134.  
  135. \newtoks\Basis
  136. \newtoks\Table
  137. \def\storetoks#1{\toks0={#1}\JoinToks\Table=(\Table+\toks0)}
  138. \Table={}
  139. %
  140. \newwrite \batchoutput
  141. \newwrite \fontoutput
  142. \def\today{\ifcase\month\or
  143.     January\or Februar\or March\or April\or May\or June\or
  144.     July\or August\or September\or October\or November\or December\fi,
  145.     \number\day,
  146.     \space\number\year}
  147.  
  148. \def\BatchLine#1{\immediate\write\batchoutput{#1}}
  149. \immediate\openout\batchoutput=\BatchFileName
  150.  
  151. \def\empty{}
  152. \def\minus{-}
  153. \def\blank{ }
  154. \def\singlefont#1 {%
  155.         \def\fontsize{#1}%\message{<#1>}%
  156.         \ifx\fontsize\minus\let\next\relax
  157.         \else
  158.             \ifx\fontsize\empty\let\next\singlefont
  159.             \else
  160.                 \ifx\fontsize\blank\let\next\singlefont
  161.                 \else
  162.                     \let\next\dofont
  163.           \fi\fi\fi
  164.         \next}
  165.  
  166. \def\doentry{\MoveFirst(\Workbase to\Htok)%
  167.              \Workbase=\RestOf\Workbase
  168.              \edef\doou{\the\Htok}%
  169.              \ifx\doou\fontsize
  170.                  \def\dooU{\storetoks{\hfill $\bullet$\hfill&}}%
  171.                  \let\weiter\dooU
  172.              \else
  173.                  \def\weiter{\storetoks{~\hfill&}\doentry}%
  174.              \fi\weiter}
  175.  
  176.  
  177. \def\singletablevalue#1 {%
  178.         \def\fontsize{#1}%
  179.         \ifx\fontsize\blank\let\next\singletablevalue
  180.         \else
  181.                 \ifx\minus\fontsize\let\next\relax
  182.                 \else\let\next\dotablevalue\fi
  183.         \fi
  184.         \next}
  185.  
  186. \newtoks\Htok
  187. \newtoks\Workbase
  188. \def\dotablevalue{\edef\dooo{\Htok={{\fontsize}}}%
  189.         \dooo
  190.         \EA\storetoks\EA{\fontsize&}%
  191.         \JoinToks\Basis=(\Basis+\Htok)\singletablevalue}
  192.  
  193. \def\tablevalues(#1){\storetoks{\bf Fonts &}\singletablevalue#1 -
  194.         \storetoks{\cr}}
  195.  
  196. \def\makefont #1 (#2){\JoinToks\Workbase=(\Basis+\Basis)%
  197.         \myc=0\immediate\write16{}%
  198.         \edef\fontnamebody{#1}%
  199.         \def\dostoretoks{\storetoks{#1 &}}\dostoretoks
  200.          \singlefont #2 - \storetoks{\cr}}
  201.  
  202. \def~{\ifdim\dimen0>0pt
  203.         \message{\number\dimen0}%
  204.         \global\advance\dimen0 by -5.25pt
  205.         \message{ }\fi}
  206.  
  207. \newcount\myc
  208. \def\extraspaces{\setbox0=\hbox{\tt\fontname}%
  209. \dimen0=78.75pt
  210. \advance\dimen0 by -\wd0\relax
  211.         \advance\myc by 1
  212.         \ifnum \myc=5
  213.         \immediate\write16{}%
  214.         \myc=0 \fi}
  215.  
  216.  
  217. \def\dofonttest#1[#2]#3\nothing{%
  218. \def\fontsize{#2}%
  219. \ifx\fontsize\empty
  220.         \def\fontsizename{#1}%
  221.         \def\fontsize{#1}%
  222. \else
  223.         \def\fontsize{#1}%
  224.         \def\fontsizename{#2}%
  225. \fi}
  226. \def\dofont{\doentry\expandafter\dofonttest\fontsize[]\nothing\Dofont}
  227.  
  228. {\catcode`\%=11
  229. \catcode`\|=14
  230. \gdef\Dofont{|
  231.   \edef\fontname{\fontnamebody\fontsizename\MetafontFileExtension}|
  232.   \edef\dowrite{|
  233.   \immediate\openout \fontoutput = \fontname|
  234.   \immediate\write
  235.      \fontoutput {% This is \fontname\space
  236.      in text format as of \today}|
  237.   \immediate\write \fontoutput {if unknown dxbase: input dxbase fi;}|
  238.   \immediate\write \fontoutput {}|
  239.   \immediate\write \fontoutput {\modedef}|
  240.   \immediate\write \fontoutput {gensize:=\fontsize;}|
  241.   \immediate\write \fontoutput {generate \fontnamebody}|
  242.   \immediate\closeout \fontoutput|
  243.   \BatchOutput{\fontnamebody\fontsizename}
  244.   \message{\fontname\blank}|\extraspaces~~~~~~~~~~~|
  245. }\dowrite\singlefont}}
  246. \immediate\write16{generated mf-files:}
  247. \immediate\write16{-------------------}
  248.  
  249. \nopagenumbers
  250.  
  251. \def\minimumbox#1{\setbox0=\hbox{#1}%
  252.         \ifdim\wd0>15pt \box0\else \hbox to 15pt{\hfil
  253.         \box0\hfil}\fi}
  254. \storetoks{\hrule
  255. \medskip
  256. \centerline{Overview DC/EC - Standard font set}
  257. \medskip
  258. \hrule
  259. \bigskip
  260. \noindent The following table describes the generated {*.mf} files which
  261. are needed for the setup of the s