home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / MFJOB11L / EMTEX / DOC / ENGLISH / MFJOB.DOC
Text File  |  1992-06-06  |  44KB  |  1,168 lines

  1. ==============================================================================
  2. MFJOB.DOC for MFjob 1.1l                                  VERSION: 06-Jun-1992
  3. ==============================================================================
  4.  
  5. **********************************************************************
  6. **********************************************************************
  7. **                                                                  **
  8. **       ATTENTION: VERSION 1.1l IS A BETA TEST RELEASE!            **
  9. **                                                                  **
  10. **********************************************************************
  11. **********************************************************************
  12.  
  13. Note: this file has been changed by Eberhard Mattes, blame him for all
  14. the poor English.
  15.  
  16.  
  17. MFjob is a program to automate the generation of fonts with METAFONT,
  18. GFtoPXL and GFtoPK.  The fonts to be generated, their magnifications
  19. and the device for which they are intended are supplied in an input
  20. file (mfj file).
  21.  
  22.  
  23. Usage
  24. =====
  25.  
  26. mfjob <mfj_file> [<options>] [<macro>=<definition>]
  27. mfjob /s <master_directory> [<options>]
  28.  
  29. mfj_file:
  30.  
  31.     Name of the mfj file (default extension: mfj).
  32.  
  33. master_directory:
  34.  
  35.     Name of the temporary directory, in which the master MFjob program
  36.     (see /m option) runs.  The master MFjob program will tell you the
  37.     name of the temporary directory.
  38.  
  39. options:
  40.  
  41. All options must be preceded by `-' or `/'. Options may be separated
  42. by spaces or another option may follow immediately: in this case the
  43. following option must start with `/'. If your operating system is
  44. setup to use `-' for options instead of `/', you must precede options
  45. by `-' and you must separate options by spaces.  In this case, you can
  46. use `/' in path names, for example
  47.  
  48.     mfjob -i -1 /mfj/job1
  49.  
  50. With a standard setup (using `/' for options), you should enter
  51.  
  52.     mfjob /i/1 \mfj\job1
  53.  
  54. instead.  Only `/' is used in these instructions.
  55.  
  56. You can use `:', `=', `:=', or nothing (but no spaces) between an
  57. option and its argument, for instance /pvc, /pv:c, /pv=c, and /pv:=c.
  58.  
  59. /1
  60.  
  61.     Call the version of METAFONT for the 80186-processor (mf186.exe or
  62.     bmf186.exe instead of mf.exe or bmf.exe).  This option cannot be
  63.     used under OS/2.  See also /3 and /b.
  64.  
  65. /2
  66.  
  67.     Call the version of METAFONT for the 80286-processor (mf286.exe or
  68.     bmf286.exe instead of mf.exe or bmf.exe).  This option cannot be
  69.     used under OS/2.  See also /3 and /b.  Note: The next emTeX
  70.     release will contain METAFONT versions for the 80186 instead of
  71.     versions for the 80286.  The /2 option will be omitted.
  72.  
  73. /3
  74.  
  75.     Call the version of METAFONT for the 80386-processor (mf386.exe
  76.     instead of mf.exe or bmf.exe).  See also /1 and /b.
  77.  
  78. /a
  79.  
  80.     Create all fonts.  (Default: create only those which do not
  81.     exist.)
  82.  
  83. /b
  84.  
  85.     Call bigMETAFONT instead of the default version (bmf.exe,
  86.     bmf186.exe or bmfp.exe instead of mf.exe, mf186.exe or mfp.exe).
  87.     See also /1.  If /3 is given, /b will be ignored.  This option
  88.     sets the default value for the `big=on|off' declaration.
  89.  
  90. /c<filename>
  91.  
  92.     A batch file will be written using the specified name, but no
  93.     fonts will be created.  Font directories will be created. The
  94.     fonts will be computed by running the batch file.  Advantage: less
  95.     memory will be used. Disadvantages: When using /i, a separate log
  96.     file will be created for each failed computation of a font.  Those
  97.     log files will be named mfj00001.log, mfj00002.log, and so on.
  98.     The file name set with the /g option will be ignored.  Errors
  99.     occuring while copying files will not be noticed.  /m and /s
  100.     cannot be used with /c. The batch file can be written to standard
  101.     output by typing `/c-'.
  102.  
  103. /d<flags>
  104.  
  105.     Do not use expanded memory (DOS).  This option is handed down to
  106.     METAFONT.  Future METAFONT versions will allow arguments for the
  107.     /d option; MFjob simply hands down the arguments unchanged and
  108.     unchecked.
  109.  
  110. /g<filename>
  111.  
  112.     File name of the transcript file used for the /i option.  If /i is
  113.     used, the log files of all failed METAFONT runs will be
  114.     concatenated to a transcript file.  The name of that file can be
  115.     set with the /g option -- the file will be created in the current
  116.     working directory unless a different path name is specified.  If
  117.     /g is not used, mfjob.log in the temporary file will be used as
  118.     transcript file.
  119.  
  120. /i
  121.  
  122.     Ignore errors produced by METAFONT.  When METAFONT recognizes an
  123.     error, a non-zero error code is returned.  If /i is not used,
  124.     MFjob will be aborted as well.  When working with low resolutions,
  125.     however, errors like `strange path' or `Bad pos' will occur more
  126.     frequently. To let MFjob work without supervision, you should use
  127.     /i.  If, when using /i, METAFONT returns a non-zero error code,
  128.     the log file written by METAFONT is appended to the file mfjob.log
  129.     in the temporary directory (unless a different file name has been
  130.     defined with the /g option), and work is continued. If you want to
  131.     abort MFjob while METAFONT is running, you should interrupt
  132.     METAFONT with ^C, end METAFONT with X and then abort MFjob with
  133.     ^C.  This will be easier without /i, as METAFONT returns an error
  134.     code of 2 when interrupted with ^C and X; this will stop MFjob as
  135.     well.
  136.  
  137. /l
  138.  
  139.     Low priority (OS/2 only).  This option is handed down to METAFONT.
  140.  
  141. /m
  142.  
  143.     Master (for network).  MFjob runs in master mode. Slave MFjob
  144.     programs running on other computers of the network can work on the
  145.     same job, thereby reducing the computing time.  The master MFjob
  146.     program will tell you how to start the slaves. One master can work
  147.     with an arbitrary number of slaves (including no slaves at all).
  148.     Each MFjob program (master and slaves) reads the common mfjob.tmp
  149.     file created by the master and computes the next uncomputed font.
  150.     At the same time, that font will be marked already computed in the
  151.     mfjob.tmp file to make the other MFjob programs skip that font.
  152.     If a font has not been computed (because a MFjob program has been
  153.     aborted, for instance), it will remaine marked.  To compute those
  154.     remaining fonts, you should run MFjob again after the master and
  155.     all slaves will have finished work. See also /s.
  156.  
  157. /n
  158.  
  159.     Don't make fonts, just list commands.
  160.  
  161. /pv[:][=]<drive>
  162.  
  163.     Set drive for default directories.  This option is also handed
  164.     down to METAFONT.
  165.  
  166. /s
  167.  
  168.     Slave (for network). You must also give the name of the temporary
  169.     directory used by the master MFjob (see also /m). The slave MFjob
  170.     reads mfjob.tmp in that directory and shares work with the master
  171.     and other slaves.
  172.  
  173. /t<directory>
  174.  
  175.     Set temporary directory.  The temporary directory will be created
  176.     in the current working directory.  Entries like \abc (cannot be
  177.     created in the current working directory), tmp\abc (more than one
  178.     level), and d:abc (not on current drive) cannot be used.  The
  179.     directory must not exist.  If /t is not given, MFjob will choose a
  180.     name like mfj#.tmp, with # replaced by a number.
  181.  
  182. /w
  183.  
  184.     Use Wayne Sullivan's sbmf.  You have to create a batch file by
  185.     using /c, because sbmf requires more memory.  This option also
  186.     causes the environment variable MFINPUTS to be used instead of
  187.     MFINPUT.  The directory \mf\mfinputs will be used instead of
  188.     \emtex\mfinput.
  189.  
  190. <macro>=<definition>:
  191.  
  192.     Define a macro.  See below.
  193.  
  194. Options can be stored in the MFJOBOPT environment variable.  The
  195. options given in MFJOBOPT are read before those given on the command
  196. line.
  197.  
  198.  
  199. mfj file format
  200. ===============
  201.  
  202. The file can contain comments which start with `%', this character and
  203. all other characters to the end of the line being ignored. However, a
  204. `%' within brackets `[' `]' does not start a comment.
  205.  
  206. Here is a small mfj file as an example:
  207.  
  208. ----------------------------------------------------------------------
  209. %
  210. % minimal.mfj
  211. %
  212. {
  213. font=cmr10;
  214. mag=1;
  215. mode=hplaser[300];
  216. output=pk[c:\texfonts\pixel.lj\@Rrdpi];
  217. }
  218. ----------------------------------------------------------------------
  219.  
  220. This file contains a BLOCK, which starts with an open brace and ends
  221. with the matching closing brace.  DECLARATIONs (other than macro
  222. definitions) can only appear within a block.  Blocks can be nested.
  223.  
  224. A definition within a block has no effect outside this block but is
  225. inherited by blocks nested within it. Now for declarations:
  226.  
  227.     font=
  228.     fonts=
  229.  
  230.         This lists the names of the fonts which are to be computed.
  231.         Each name must be separated from the next by a blank or the
  232.         end of the line.  A semicolon terminates the list.  The font
  233.         declaration adds the fonts listed to the set of fonts to be
  234.         generated.  The font names can include the following special
  235.         characters:
  236.  
  237.             ?       matches any character
  238.             *       matches the rest of the name
  239.             #       matches one or more digits
  240.  
  241.         The mask `cmr#', for instance, matches the file names cmr5.mf,
  242.         cmr6.mf, cmr7.mf, cmr8.mf, cmr9.mf, cmr10.mf, cmr12.mf, and
  243.         cmr17.mf (and possibly more).  The mask `cmr#0' doesn't match
  244.         any file names, because `#' skips all successive digits in the
  245.         file names.  No `0' can follow.
  246.  
  247.     mag=
  248.     mags=
  249.  
  250.         This declaration lists the magnifications for which the fonts
  251.         are to be generated.  The numbers must lie in the range 0.1 to
  252.         1000 and may contain a decimal point.  The usual magsteps can
  253.         be abbreviated to s0 (1.0), s1 (1.2), s2 (1.44) and so on to
  254.         s9 (5.15977).  The abbreviation for magstep 0.5 is sh
  255.         (1.09544).  Each magnification must be separated from the next
  256.         by a space, the list ends with a semicolon.  This declaration
  257.         adds the list of magnifications to those already declared.
  258.  
  259.     mode=
  260.  
  261.         This declares the device for which the fonts are to be
  262.         generated.  The mode name (as defined in local.mf) is followed
  263.         by the horizontal resolution (in DPI) in brackets.  If the
  264.         vertical resolution is different from the horizontal
  265.         resolution, you should also give the vertical resolution,
  266.         separated by a space.  The declaration ends with a semicolon.
  267.         Each block can only contain one mode declaration.  However,
  268.         blocks can be nested: see below.
  269.  
  270.     output=
  271.  
  272.         This selects the output files to be generated and how to name
  273.         the files.  The following output file types can be generated:
  274.  
  275.             pxl             pxl file (created by GFtoPXL).
  276.             pk              pk file  (created by GFtoPK).
  277.             gf              gf file  (created by METAFONT).
  278.             log             log file (created by METAFONT).
  279.             tfm             tfm file (created by METAFONT).
  280.  
  281.         The path name template, in brackets, follows the file type.
  282.         Among others, the following special sequences can be used in
  283.         the template:
  284.  
  285.             @Rr             the resolution of the font in DPI
  286.                             (rounded)
  287.             @f              the name of the font
  288.  
  289.         If there is no extension, the usual one (`pxl', `pk', `@Rrgf',
  290.         `log', `tfm') will be used.  Each file type/path combination
  291.         is separated from the next by a space and the list ends with a
  292.         semicolon. Only the file types listed in this declaration will
  293.         be generated, or rather, all tfm, gf and log files not given
  294.         in an output declaration will be deleted.  The output
  295.         declaration replaces previous entries for the separate file
  296.         types.  Example: The declaration
  297.  
  298.             output=pk[c:\texfonts\pixel.lj\@Rrdpi\@f]
  299.                    log[c:\texfonts\log\@f];
  300.  
  301.         with font=cmr10, mode=hplaser[300], and mag=1.2 causes the
  302.         files
  303.  
  304.             c:\texfonts\pixel.lj\360dpi\cmr10.pk
  305.             c:\texfonts\log\cmr10.log
  306.  
  307.         to be created.  Only the first expansion of each template will
  308.         be used.  Therefore, the first expansion should yield a file
  309.         name ending in .PK if you're creating PK fonts.
  310.  
  311.     base=
  312.  
  313.         This selects the METAFONT base to be used for the generation
  314.         of the fonts which FOLLOW it.  The usual declarations are
  315.         base=cm or base=plain; at the beginning of the outermost block
  316.         base=plain has been set.  base=INIMF is a special case: INIMF
  317.         will be called instead of METAFONT.  The base declaration
  318.         replaces the preceding one.  The declaration is followed by a
  319.         semicolon.
  320.  
  321.     big=
  322.  
  323.         This selects the big or normal METAFONT versions.  If you type
  324.         `on', `yes', or `y', bigMETAFONT will be used.  If you type
  325.         `off', `no', or `n', the standard version will be used.  The
  326.         initial value is set by the /b command line option: The
  327.         initial value is `big=on', if /b is given, `big=off',
  328.         otherwise. This declaration replaces the previous value of
  329.         `big' for the current block.  The declaration is followed by a
  330.         semicolon.
  331.  
  332.     driver=
  333.  
  334.         This sets the name of the DVI driver.  That value is used only
  335.         for replacing @d in templates and has no other significance.
  336.         The initial value is empty.  This declaration replaces the
  337.         previous value of `driver' for the current block.  The
  338.         declaration is followed by a semicolon.
  339.  
  340.     fontlib=
  341.  
  342.         This sets the font library files which are to be searched.
  343.         You have to supply a template in brackets.  The default
  344.         extension is `fli'.  The font library files are used only for
  345.         finding out which fonts already exist.  No fonts will be
  346.         copied into the font libraries.  The declaration is followed
  347.         by a semicolon.  Example:
  348.  
  349.             fontlibs=[c:\texfonts\lj_{0,1,2,3,4,5a,5b,sli}];
  350.  
  351.     size=
  352.     sizes=
  353.  
  354.         This declaration lists the sizes (design size in pt) for which
  355.         the fonts are to be generated.  This is used together with
  356.         name= and command= for fonts with selectable design size (see
  357.         command=).  The numbers must lie in the range 1 to 10000 and
  358.         may contain a decimal point.  Each size must be separated from
  359.         the next by a space, the list ends with a semicolon.  This
  360.         declaration adds the list of sizes to those already declared.
  361.  
  362.     name=
  363.     names=
  364.  
  365.         This sets how to construct the name of a font to be generated
  366.         from the name of the mf file and the size.  To be used
  367.         together with size= and command= for fonts with selectable
  368.         design size (see command=).  You have to give a template in
  369.         brackets.  The first expansion will be used for integer sizes,
  370.         the second one for non-integer sizes.  If there is only one
  371.         expansion, that one will be used for all sizes. @f will be
  372.         replaced by the name of the mf file (without `.mf'). Example:
  373.  
  374.             names=[@f@s,@f@Tsp@Fs]
  375.  
  376.         font=dcr and size=10 yields the name `dcr10', font=dcr and
  377.         size=7.5 yields the name `dcr7p5'.
  378.  
  379.     command=
  380.     commands=
  381.  
  382.         If you're using fonts with selectable design size, a driver
  383.         file must be created for each font/size pair, which sets the
  384.         desired design size and calls the mf file.  commands= is used
  385.         to specify what will be written into the driver file.  You
  386.         have to give a template in brackets.  @f will be replaced by
  387.         the name of the mf file (without `.mf').  Use
  388.  
  389.             commands=[design_size:=@s; input b-@f];
  390.  
  391.         for the Sauter fonts, and
  392.  
  393.             commands=[gensize:=@s; generate @f];
  394.  
  395.         for the dc/ec fonts.
  396.  
  397. At the end of every block which does not contain a nested block the
  398. selected fonts with the respective bases in the selected
  399. magnifications for the selected device are set to generate the
  400. selected file types.  The generation of these fonts start after the
  401. mfj file has been read. If the /a option is not used, only those of
  402. the selected fonts which do not already exist will be generated -- if
  403. only the log file is missing, however, the font will not be generated.
  404.  
  405. The following example generates cmr10 and cmbx10 as pk files in
  406. magnifications 1 and 1.2 for the HP LaserJet+ and the Epson FX-80.
  407.  
  408. ----------------------------------------------------------------------
  409. %
  410. % example.mfj
  411. %
  412. {
  413. fonts=cmr10 cmbx10;
  414. mags=s0 s1;
  415.     {
  416.     mode=hplaser[300];
  417.     output=pk[c:\texfonts\pixel.lj\@Rrdpi];
  418.     }
  419.     {
  420.     mode=epsonfx[240 216];
  421.     output=pk[c:\texfonts\pixel.fx\@Rrdpi];
  422.     }
  423. }
  424. ----------------------------------------------------------------------
  425.  
  426.  
  427. Included data files
  428. ===================
  429.  
  430. Files containing mfj declarations can be included with the command
  431.  
  432.     input [name];
  433.  
  434. The default extension is `mfj'.
  435.  
  436.  
  437. Macros
  438. ======
  439.  
  440. Macros can be defined either in the command line (see above) or in the
  441. mfj file with the commands
  442.  
  443.     def macro=[definition];
  444.  
  445. or
  446.  
  447.     redef macro=[definition];
  448.  
  449. If a macro is defined more than once then only the first definition
  450. (for instance, in the command line) will be used.  Macros can be
  451. redefined with `redef' in which case the old definition will be
  452. replaced when it is no longer used.  Example:
  453.  
  454.     def x=[mag=2;redef x=[mag=4;];mag=3;x;mag=5];
  455.     x;
  456.  
  457. This expands to: mag=2;mag=3;mag=4;mag=5
  458.  
  459. Macros are only expanded outside brackets (`[...]').  As macros
  460. containing blanks cannot be defined in the command line, any commas in
  461. a command line macro definition will be replaced by spaces.
  462.  
  463. Example:
  464.  
  465. ----------------------------------------------------------------------
  466. %
  467. % x.mfj
  468. %
  469. input [modes];
  470. def s=[1];
  471. def f=[cmr10];
  472.     {
  473.     fonts=f; mags=s; m;
  474.     }
  475. ----------------------------------------------------------------------
  476.  
  477. The following file comes with emTeX:
  478.  
  479. ----------------------------------------------------------------------
  480. %
  481. % modes.mfj
  482. %
  483. def lj= [mode_lj;  output_lj;  fli_lj;  tfmlog];
  484. def fx= [mode_fx;  output_fx;  fli_fx;  tfmlog];
  485. def mx= [mode_mx;  output_mx;  fli_mx;  tfmlog];
  486. def lql=[mode_lql; output_lql; fli_lql; tfmlog];
  487. def lqm=[mode_lqm; output_lqm; fli_lqm; tfmlog];
  488. def lqh=[mode_lqh; output_lqh; fli_lqh; tfmlog];
  489. def ito=[mode_ito; output_ito; fli_ito; tfmlog];
  490. def kyo=[mode_kyo; output_kyo; fli_kyo; tfmlog];
  491. def FAX=[mode_FAX; output_FAX; fli_FAX; tfmlog];
  492. def qj= [mode_qj;  output_qj;  fli_qj;  tfmlog];
  493.  
  494. def mode_lj= [mode=hplaser[300]];
  495. def mode_fx= [mode=epsonfx[240 216]];
  496. def mode_mx= [mode=epsonmx[120 216]];
  497. def mode_lql=[mode=lqlores[180]];
  498. def mode_lqm=[mode=lqmedres[360 180]];
  499. def mode_lqh=[mode=lqhires[360]];
  500. def mode_ito=[mode=itoh[160 144]];
  501. def mode_kyo=[mode=kyocera[300]];
  502. def mode_FAX=[mode=fax[204 196]];
  503. def mode_qj= [mode=hpquiet[192]];
  504.  
  505. def output_lj= [output=pk[c:\newfonts\pixel.lj\@Rrdpi\@f]];
  506. def output_fx= [output=pk[c:\newfonts\pixel.fx\@Rrdpi\@f]];
  507. def output_mx= [output=pk[c:\newfonts\pixel.mx\@Rrdpi\@f]];
  508. def output_lql=[output=pk[c:\newfonts\pixel.p6l\@Rrdpi\@f]];
  509. def output_lqm=[output=pk[c:\newfonts\pixel.p6m\@Rrdpi\@f]];
  510. def output_lqh=[output=pk[c:\newfonts\pixel.p6h\@Rrdpi\@f]];
  511. def output_ito=[output=pk[c:\newfonts\pixel.ito\@Rrdpi\@f]];
  512. def output_kyo=[output=pk[c:\newfonts\pixel.kyo\@Rrdpi\@f]];
  513. def output_FAX=[output=pk[c:\newfonts\pixel.fax\@Rrdpi\@f]];
  514. def output_qj= [output=pk[c:\newfonts\pixel.qj\@Rrdpi\@f]];
  515.  
  516. def fli_lj= [fontlib=[$DVIDRVFONTS:lj_{0,h,1,2,3,4,5a,5b,sli}]];
  517. def fli_fx= [fontlib=[$DVIDRVFONTS:fx_{0,h,1,2,3,4,5,sli}]];
  518. def fli_mx= [fontlib=[$DVIDRVFONTS:mx_{0,h,1,2,3,4,5,sli}]];
  519. def fli_lql=[fontlib=[$DVIDRVFONTS:p6l_{0,h,1,2,3,4,5,sli}]];
  520. def fli_lqm=[fontlib=[$DVIDRVFONTS:p6m_{0,h,1,2,3,4,5,sli}]];
  521. def fli_lqh=[fontlib=[$DVIDRVFONTS:p6h_{0,h,1,2,3,4,5,r,sli}]];
  522. def fli_ito=[fontlib=[$DVIDRVFONTS:ito_{0,h,1,2,3,4,5,sli}]];
  523. def fli_kyo=[fontlib=[$DVIDRVFONTS:kyo_{0,h,1,2,3,4,5a,5b,sli}]];
  524. def fli_FAX=[fontlib=[$DVIDRVFONTS:fax_{0,h,1,2,3,4,5,sli}]];
  525. def fli_qj= [fontlib=[$DVIDRVFONTS:qj_{0,h,1,2,3,4,5,sli}]];
  526.  
  527. def m=[lj];
  528. def tfmlog=[output=tfm[c:\newfonts\tfm\@f] log[c:\newfonts\log\@f];];
  529. ----------------------------------------------------------------------
  530.  
  531. Call:
  532.  
  533.     mfjob x s=s0,s1 f=cmbx10,cmti10 m=fx
  534.  
  535.  
  536. Note: `fax' isn't the same as 'FAX'.
  537.  
  538.  
  539. Short cuts for fonts=, mags= and sizes=
  540. =======================================
  541.  
  542. Frequently, not all fonts are to be generated in all magnifications or
  543. sizes.  In these cases, one types something like:
  544.  
  545. ----------------------------------------------------------------------
  546. {
  547. input [modes];
  548. mags=1 1.41421;     % 1 and \sqrt{2}
  549. name=[@f@s];
  550. commands=[gensize:=@s; generate @f];
  551. m;
  552.     {font=dcr;  {sizes=5 6 7 8 9 10 12 17;}}
  553.     {font=dcbx; {sizes=10 12 17;}}
  554.     {font=dcsl; {sizes=10 12;}}
  555. }
  556. ----------------------------------------------------------------------
  557.  
  558. This can be abbreviated as follows:
  559.  
  560. ----------------------------------------------------------------------
  561. {
  562. input [modes];
  563. mags=1 1.41421;     % 1 and \sqrt{2}
  564. name=[@f@s];
  565. commands=[gensize:=@s; generate @f];
  566. m;
  567. font(sizes)=dcr  (5 6 7 8 9 10 12 17)
  568.             dcbx (10 12 17) dcsl (10 12);
  569. }
  570. ----------------------------------------------------------------------
  571.  
  572. The declaration font(sizes) creates (internally) exactly the blocks
  573. and declarations shown in the first example.  By analogy, you can use
  574. also size(fonts), font(mags), mag(fonts), size(mags), and mag(sizes).
  575. For instance, sizes(mags) lists sizes, where each size is followed by
  576. a list of magnifications in parentheses.  After a declaration of this
  577. variety, only another declaration of exactly the same type or
  578. appropriate groups may follow until the end of the group is reached.
  579.  
  580.  
  581. Declaration of rules for fonts of arbitrary design size
  582. =======================================================
  583.  
  584. Instead of explicitly declaring size=, you can define rules for
  585. dealing automatically with fonts of arbitrary design size.  These
  586. rules are applied if a font source file for a font cannot be found.
  587. In this case, MFjob tries to split the font name according to a rule
  588. into a base name and a design size.  If successful, the font will be
  589. generated using appropriate settings of name= and command=.  Each rule
  590. specifies a mask for font names -- rules will be only used for
  591. matching font names. Additionally, each rule contains name= and
  592. command= declarations. Optionally, a rule can contain a base=
  593. declaration.
  594.  
  595. A rule declaration starts with rule= which is followed by a list of
  596. font name masks. The masks may contain the special characters ?, * and
  597. #, see font= for details.  Following the list, you have to type an
  598. opening brace. name=, command= and base= declarations follow.  The
  599. base= declaration can be omitted.  The rule= declaration is finished
  600. with a closing brace.  Example:
  601.  
  602.     rule=dc* ec*     % DC and EC fonts
  603.       {
  604.       name=[@f@s];
  605.       commands=[gensize:=@s; generate @f];
  606.       base=dxbase; 
  607.       }
  608.  
  609. rule= cannot be used inside a block.
  610.  
  611. The name= template is somewhat restricted to make extraction of the
  612. base name and the design size simpler.  You can use only the @f and @s
  613. parameters, each of which must be used exactly once (with the
  614. exception of @Fs and @Ts which may occur together in a template).
  615. Only the F and T characters for modifying a parameter are allowed.
  616.  
  617. If the declaration given above is used together with
  618.  
  619.     font=dcr10;
  620.  
  621. MFjob will apply the rule, unless dcr10.mf is found.  Applying the
  622. rule has the same effect as using the name= and command= declaration
  623. of the rule and using, instead of font=dcr10, the declarations
  624.  
  625.     base=dxbase; font=dcr; size=10;
  626.  
  627.  
  628. Templates
  629. =========
  630.  
  631.     Templates are used for telling MFjob how to construct a file name
  632.     (or METAFONT commands) from given parameters such as font size and
  633.     font name.  The template can be a constant, the file name not
  634.     depending on any of the parameters, or it can evaluate to more
  635.     than one filename which will then be used in sequence.  The
  636.     evaluation of a template is called its expansion.
  637.  
  638.     The fontlib= declaration, for instance, makes MFjob search all the
  639.     font library files given by all the expansions of the template.
  640.  
  641.     A template which is not constant will contain one or more template
  642.     characters which are comma (,), dollar sign ($), at sign (@) and
  643.     left and right braces ({}).  A template which contains a dollar
  644.     sign or a comma may expand to more than one filename.  If these
  645.     template characters are to appear as literal characters then they
  646.     must be preceded by the at sign (@) -- a literal dollar sign must
  647.     be written "@$".
  648.  
  649. The simplest example of a template -- a constant template:
  650. ----------------------------------------------------------
  651.  
  652.     \texfonts\lj
  653.  
  654.     This template, intended for the fontlib= declaration, simply
  655.     contains the filename: the expansion does not depend on any
  656.     parameters and is just this filename.  (The fontlib= declaration
  657.     automatically appends .fli if the expansion doesn't contain an
  658.     extension.)
  659.  
  660. A simple example of a template:
  661. -------------------------------
  662.  
  663.     \texfonts\@f
  664.  
  665.     In this template, intended for the output= declaration), "@f" is
  666.     replaced by the name of the font.  When computing font `cmr10',
  667.     the expansion of this template will be `\texfonts\cmr10'.  `.pxl',
  668.     `.pk', `.gf', `.log' or `.tfm' (depending on the details of the
  669.     output= declaration) will be added if -- as in the example -- no
  670.     extension is given.
  671.  
  672. Other parameters
  673. ----------------
  674.  
  675.     The following template parameters are available:
  676.  
  677.         @d  driver name, see driver= declaration
  678.  
  679.         @f  font name, see font= and name= declarations
  680.  
  681.         @p  magstep (0..9, h, u=unknown), see mag= declaration
  682.  
  683.         @m  METAFONT mode, see mode= declaration
  684.  
  685.         @b  base resolution, see mode= declaration (integer, rounded)
  686.  
  687.         @r  font resolution (decimal number), computed from mode= and
  688.             mag= declarations
  689.  
  690.         @s  font size (design size) in pt, see size= declaration
  691.  
  692.         @g  magnification (decimal number), see mag= declaration
  693.  
  694.     These parameters can be modified by inserting one or more letters
  695.     between the `@' and the parameter letter.  The modifiers and the
  696.     parameters which they may be used with are described below.
  697.     Earlier versions of MFjob used `$' instead of `@' for inserting
  698.     parameters: `$r' must be replaced by `@Rr', `$s' must be replaced
  699.     by `@RVr'.
  700.  
  701. Forming multiple expansions with a list
  702. ---------------------------------------
  703.  
  704.     Some declarations require a list of files, for instance, the
  705.     fontlib= declaration takes a list of font library filenames.  The
  706.     simplest way to do this is by entering a list of names separated
  707.     by commas but this is not always very convenient as it requires a
  708.     lot of typing and the length of a template is limited to 127
  709.     characters.  Because of this limitation, this example does not
  710.     contain the usual set of font libraries:
  711.  
  712.         fontlib=[c:\texfonts\fx_0,c:\texfonts\fx_1,c:\texfonts\fx_2]
  713.  
  714.  
  715.     Spaces are not allowed in templates.
  716.  
  717. Forming multiple expansions with alternatives
  718. ---------------------------------------------
  719.  
  720.     It is clear from the preceding example that the expansions have
  721.     quite a lot of text in common, only differing, in this example, by
  722.     one digit.  Templates therefore allow common text to be "factored
  723.     out" with the differing parts presented as a series of
  724.     alternatives enclosed in braces. The example above may be
  725.     expressed in this way as follows:
  726.  
  727.         fontlib=[c:\texfonts\fx_{0,1,2}]
  728.  
  729.     In expanding this template, the alternatives are selected in order
  730.     starting with the first after the opening brace. The template is
  731.     evaluated with this choice and the result used by MFjob; if MFjob
  732.     requests another candidate, the template is evaluated a second
  733.     time using the second alternative which (in this example) lies
  734.     between the first and second commas.  A third expansion would be
  735.     constructed using the third alternative which appears after the
  736.     second comma and before the closing brace.
  737.  
  738.     Any number of alternatives may appear between the opening and
  739.     closing braces.  The text of an alternative may also be null as in
  740.     "{}" or "{,a}": in the first case the expansion is empty, in the
  741.     second case the first choice is empty, the second consisting only
  742.     of "a".  It it also possible to have only one choice as in "{abc}"
  743.     which always evaluates as "abc" -- the braces in this case are not
  744.     needed.  Naturally the choices need not be the same length as, for
  745.     example, in:
  746.  
  747.         fontlib=[c:\texfonts\lj_{0,h,1,2,3,4,5a,5b,sli}.flb]
  748.  
  749.     A simple list of filenames separated by commas is a special case
  750.     of a set of alternatives.  MFjob automatically encloses a template
  751.     in opening and closing braces so the list appears as list of
  752.     alternatives.  If only one filename appears then it is a constant
  753.     choice as shown above in "{abc}".
  754.  
  755. Multiple sets of alternatives
  756. -----------------------------
  757.  
  758.     Sometimes it is useful to be able to construct a pattern with more
  759.     than one set of alternatives in it.  Templates encompass this as
  760.     well as allowing alternatives to be nested.  The expansion of such
  761.     a template consists of all possible combinations in
  762.     lexicographical order, that is, with the rightmost alternative in
  763.     the template changing most rapidly.  An example will best clarify
  764.     this: the template
  765.  
  766.         {1,2}{1,a{1,2}}
  767.  
  768.     will give the following sequence of expansions
  769.  
  770.         11
  771.         1a1
  772.         1a2
  773.         21
  774.         2a1
  775.         2a2
  776.  
  777.     The template
  778.  
  779.       {0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}
  780.  
  781.     will expand into all the three digit numbers from 000 to 999 in
  782.     increasing nuerical order.
  783.  
  784. Environment variables
  785. ---------------------
  786.  
  787.     The names of directories are more conveniently kept in environment
  788.     variables so that, when the disk is reorganized it is not
  789.     necessary to edit all the configuration files.  To further support
  790.     this use of environment variables, they may also appear in
  791.     templates.  The name of the variable is sandwiched between a
  792.     dollar sign ($) and a colon (:) as in $DVIDRVFONTS: for instance.
  793.     The name of an environment variable to be used in a template may
  794.     not contain any of the special template characters, that is, @ { ,
  795.     or } (at sign, comma and opening and closing braces) -- this may
  796.     be changed in a future release).  The environment variable is
  797.     treated as if it was an alternative enclosed in braces, the list
  798.     of directories the variable contains (here separated by
  799.     semicolons, NOT commas) are entered into the expansion one at a
  800.     time in the order they appear in the variable.  If a directory
  801.     name in the environment variable does not end in ':', '/' or '\'
  802.     then a '\' is automatically appended.  Empty directory positions
  803.     in the list (for instance the two in SET PATH=C:\DOS;;\D:\BIN;)
  804.     will be ignored -- a template containing $PATH: set as above would
  805.     expand in exactly the same way if the SET command was SET
  806.     PATH=C:\DOS;\D:\BIN.  The contents of the environment variable may
  807.     include template parameters (@b and @r are likely candidates) but
  808.     alternatives are not allowed.
  809.  
  810.     An example of the use of an environment variable in a template:
  811.  
  812.         fontlib=[$FONTLIBS:p6m_{0,1,2,3,4,5,sli}]
  813.  
  814.     Note that '\' will be appended wherever necessary.  $env: is
  815.     treated like {,} with respect to order of evaluation.
  816.  
  817. Template parameter modifiers
  818. ----------------------------
  819.  
  820.     Template parameters may have their expansion modified by inserting
  821.     one or more characters from the set shown below between the @ and
  822.     the parameter letter.  The modifiers are:
  823.  
  824.   0-99 _   Padding a parameter out to a given width with '0' or '_'.
  825.            A number from 0 to 99 will cause the parameter to be filled
  826.            from the left with '0' or '_' -- the number of positions to
  827.            be filled is given by the number's value.  A number
  828.            appearing with a numeric parameter will fill with zeros but
  829.            appearing with a non-numeric parameter will fill with
  830.            underscores.  Use the underscore modifier to fill a numeric
  831.            parameter with underscores instead of zeros.
  832.  
  833.            An example:
  834.  
  835.            @r     @4r    @4_r              @f        @5f
  836.            1      0001   ___1              a         ____a
  837.            300    0300   _300              abc       __abc
  838.            20000  20000  20000             abcdefgh  abcdefgh
  839.  
  840.   F R T    rounding and truncating real numbers
  841.  
  842.            F   taking the fractional part of the number (may be empty)
  843.            R   rounding the number to get the integer part
  844.            T   truncating the number to get the integer part
  845.  
  846.   .0-99    Decimals.  The number will be rounded to this many
  847.            decimals.  Note: The period must not be used immediately
  848.            following the @, as `@.' has a special meaning.  Specify a
  849.            field width instead, for instance `@0.2r'.
  850.  
  851.            Examples:
  852.  
  853.            @r      @0.3r    @0.2r   @0.1r  @0.0r  @7.1r    @R.3r
  854.            300.75  300.750  300.75  300.8  301    00300.8  301.000
  855.            300.74  300.740  300.74  300.7  301    00300.7  301.000
  856.            300     300.000  300.00  300.0  300    00300.0  300.000
  857.  
  858.   M V      Multiplication by a constant
  859.  
  860.            M multiplies a numeric parameter by 1000 and V multiplies
  861.            by 5.  This allows the generation of directory or file
  862.            names which depend on the font magnification as PXL font
  863.            names do, for instance
  864.  
  865.               @r      @RVr
  866.               300     pxl1500
  867.  
  868.            or names which depend in the magnification
  869.  
  870.               @g      @Mg
  871.               1.44    1440
  872.  
  873.            If more than one M or V modifier appears on the same
  874.            parameter, all but the rightmost one will be ignored.
  875.  
  876.   X Y      horizontal or vertical value
  877.  
  878.            The resolution can be different on the horizontal and
  879.            vertical axes, these modifiers allow the correct value to
  880.            be selected with the @b or @r parameters.  If more than one
  881.            X or Y modifier it used with the same parameter, all but
  882.            the rightmost one will be ignored.
  883.  
  884. Default extension
  885. -----------------
  886.  
  887.     `@.' to add an extension to a file name is not used by MFjob.
  888.     `@.' always inserts `.'.
  889.  
  890. Summary
  891. -------
  892.  
  893. @[0-99][.0-99][_][FRT][MV][XY](dfmbrsg)
  894.  
  895.         0-99  pad out with 0's (numbers) or _ (other parameters)
  896.         _     pad out with _
  897.         .0-99 decimals (@g and @r)
  898.  
  899.         F     fractional part
  900.         R     integer part (round)
  901.         T     integer part (truncate)
  902.  
  903.         M     multiply by 1000
  904.         V     multiply by 5
  905.  
  906.         X     select horizontal value (default, if Y does not appear)
  907.         Y     select vertical value
  908.  
  909.         d     driver name                               text
  910.         f     font name                                 text
  911.         p     magstep (0..9, h, u=unknown)              text
  912.         m     MF mode                                   text
  913.         b     basic font resolution                     integer
  914.         r     font resolution (dpi)                     decimal
  915.         s     design size (pt)                          decimal
  916.         g     magnification (e.g. 1.2)                  decimal
  917.  
  918.   {a1,a2,a3}      alternatives
  919.  
  920.   $env:           environment variables
  921.  
  922.   @@ @, @{ @} @$  special characters in templates
  923.  
  924.  
  925. Notes
  926. =====
  927.  
  928. The font source files are sought in the directories listed in the
  929. environment variable MFINPUT.  If MFINPUT is not set then the default
  930. directory \emtex\mfinput (on the drive set by /pv or EMTEXDRV) is
  931. searched. Use
  932.  
  933.     set emtexdrv=e
  934.  
  935. or
  936.  
  937.     mfjob /pv:e ...
  938.  
  939. to make MFjob search e:\emtex\mfinput (for font files) and
  940. e:\emtex\mfjob (for mfj files).  If you don't use EMTEXDRV and /pv,
  941. the directories \emtex\mfinput and \emtex\mfjob on the current drive
  942. will be searched.  Font source files are NOT sought in the current
  943. working directory!
  944.  
  945. MFjob consists of three programs: mfjob.exe, mfjob1.ovl, mfjob2.ovl.
  946. Besides METAFONT, gftopk.exe and gftopxl.exe are needed.  For
  947. METAFONT, the following file is used:
  948.  
  949.     MFjob call | big= | DOS        | OS/2
  950.     -----------+------+------------+-------------
  951.     MFjob      | off  | mf.exe     | mfp.exe
  952.     MFjob /1   | off  | mf186.exe  | --
  953.     MFjob      | on   | bmf.exe    | bmfp.exe
  954.     MFjob /1   | on   | bmf186.exe | --
  955.     MFjob /3   | --   | mf386.exe  | mf386.exe
  956.  
  957. MFjob always creates a temporary directory in the current working
  958. directory, even if no fonts will be generated.  If you want to use a
  959. certain directory, you can use the /t option to tell MFjob.  The
  960. directory must not exist.  If /t is not given, MFjob will choose a
  961. name like mfj#.tmp, with # replaced by a number.  If MFjob is aborted,
  962. the temporary directory and some files in the temporary directory will
  963. be left.  If you don't need that files (mfjob.log!)  you should delete
  964. the files and the directory.
  965.  
  966. The mfj files are sought first in the directory given (if it exists),
  967. then in the current directory, then in the directories listed in the
  968. MFJOB environment variable (the directories in the list must be
  969. separated from one another with a semicolon), and finally in
  970. \emtex\mfjob (on the drive set by EMTEXDRV or /pv).
  971.  
  972. The less memory is available, the slower runs the DOS version of
  973. emTeX's METAFONT.  MFjob, therefore, shows the message
  974.  
  975.     Warning: poor performance expected due to lack of memory
  976.  
  977. if there isn't enough memory for optimum performance.  If memory is
  978. extremely short, MFjob shows
  979.  
  980.     Warning: very poor performance expected due to lack of memory
  981.  
  982. and the running time may be several hundredfold the optimum running
  983. time (several hours instead of some minutes).  In this case, you
  984. should try to increase available memory by removing resident programs
  985. (from autoexec.bat) and device drivers (from config.sys). You can also
  986. use the /c option to make MFjob write a batch file, which creates the
  987. fonts without MFjob (but there are some restrictions, see /c).
  988.  
  989.  
  990. History
  991. =======
  992.  
  993. Version 1.1a:
  994. -------------
  995.  
  996. -   Error in `input' corrected.
  997.  
  998. -   Environment variable `MFJOB'.
  999.  
  1000.  
  1001. Version 1.1b:
  1002. -------------
  1003.  
  1004. -   The directory \emtex\mfinput is no longer searched if the
  1005.     environment variable `MFINPUT' is set.
  1006.  
  1007.  
  1008. Version 1.1c (21-Feb-90):
  1009. -------------------------
  1010.  
  1011. -   The `_' character can be used (for instance in mode=).
  1012.  
  1013.  
  1014. Version 1.1d (30-Apr-90):
  1015. -------------------------
  1016.  
  1017. -   New option /i to ignore METAFONT error codes.
  1018.  
  1019. -   New option /2 results in using METAFONT's 286 version.
  1020.  
  1021. -   New option /b results in using bigMETAFONT.
  1022.  
  1023. -   New option /d is handed down to METAFONT.
  1024.  
  1025. -   mfjob1.exe and mfjob2.exe renamed to mfjob1.ovl and mfjob2.ovl.
  1026.  
  1027.  
  1028. Version 1.1e (16-Jul-90):
  1029. -------------------------
  1030.  
  1031. -   Default directory for mfj files: \emtex\mfjob.
  1032.  
  1033. -   New option: /pv (set drive for default directories).
  1034.  
  1035. -   New environment variable: EMTEXDRV (drive for default
  1036.     directories).
  1037.  
  1038.  
  1039. Version 1.1f (25-Sep-90):
  1040. -------------------------
  1041.  
  1042. -   Display '======...' after generating of a font.
  1043.  
  1044.  
  1045. Version 1.1g (10-May-91):
  1046. -------------------------
  1047.  
  1048. -   mfjob1.ovl and mfjob2.ovl replaced by mfjob.ovl.
  1049.  
  1050. -   New options: /3 /c /t /w
  1051.  
  1052. -   Master slave mode (/m and /s)
  1053.  
  1054. *** base=plain is the default (instead of base=cm)
  1055.  
  1056. -   When using /n no font directories will be created
  1057.  
  1058. -   New declaration: big=, initial value can be set with /b
  1059.  
  1060. -   New declaration: driver=, for @d in templates
  1061.  
  1062. -   MFjob requires less memory, making METAFONT faster.  (There were
  1063.     no memory problems with the OS/2 version.)
  1064.  
  1065. -   Warning if not enough memory for acceptable computing time
  1066.  
  1067. -   Switch character (`-' or `/') will be obeyed
  1068.  
  1069. *** Templates are now used with output=. The main difference is in the
  1070.     special sequences:
  1071.  
  1072.         old:  $r  %r        new: @r
  1073.         old:  $s  %s        new: @Vr
  1074.  
  1075.     The file name must be inserted with @f
  1076.  
  1077. -   MFjob now uses fixed point arithmetic identical to that used by
  1078.     METAFONT, therefore mag=s0 to s9 delivers slightly different
  1079.     values compared to previous versions of MFjob
  1080.  
  1081. -   You can specify both the horizontal and vertical resolutions with
  1082.     mode=
  1083.  
  1084. -   Font files won't be sought in the current working directory
  1085.  
  1086. -   As MFjob creates a temporary directory, there are no longer
  1087.     problems with multiple concurrently running MFjob programs under
  1088.     OS/2 or in networks
  1089.  
  1090. -   Font library files can be searched (fontlib=)
  1091.  
  1092. -   MFjob complains about missing fonts= and mags= declarations which
  1093.     cause fonts not to be computed
  1094.  
  1095. -   New declarations for the dc/ec and Sauter fonts:
  1096.     name=, command=, size=
  1097.  
  1098. -   New declaration: font(size)= etc.
  1099.  
  1100. -   The font file names aren't truncated to 8.3 characters in the
  1101.     METAFONT command line
  1102.  
  1103. -   MFjob displays how many fonts have been computed, how many fonts
  1104.     are to be computed and how much time has been spent running MFjob.
  1105.     Additionally, MFjob displays an estimate of the time required for
  1106.     computing all the fonts
  1107.  
  1108.  
  1109. Version 1.1h (18-May-91):
  1110. -------------------------
  1111.  
  1112. -   New option: /1 (the /2 option will be removed soon)
  1113.  
  1114. -   Usage message corrected (/m and /s are implemented)
  1115.  
  1116. -   /d takes optional arguments
  1117.  
  1118.  
  1119. Version 1.1i (18-Nov-91):
  1120. -------------------------
  1121.  
  1122. -   Bug in master slave mode fixed (copying the same output file at
  1123.     the same time by more than one machine)
  1124.  
  1125. *** @r in templates now inserts a decimal fraction, therefore you
  1126.     should use `@Rr' (and `@RVr') to insert the rounded value (as in
  1127.     MFjob versions up to and including 1.1h)
  1128.  
  1129. -   @b fixed
  1130.  
  1131. -   Templates implemented completely
  1132.  
  1133. -   Sequence of computation changed
  1134.  
  1135. -   base=INIMF
  1136.  
  1137.  
  1138. Version 1.1j (11-Apr-92):
  1139. -------------------------
  1140.  
  1141. -   Rounding problem fixed (for instance, at 300 DPI with mag=0.625)
  1142.  
  1143. -   New option: /g
  1144.  
  1145. -   New declaration: rule=
  1146.  
  1147.  
  1148. Version 1.1k (13-Apr-92):
  1149. -------------------------
  1150.  
  1151. -   Bug fixed: the extension of the GF file wasn't computed correctly
  1152.     for big values of mag
  1153.  
  1154.  
  1155. Version 1.1l (30-May-92):
  1156. -------------------------
  1157.  
  1158. -   Option /3 under OS/2
  1159.  
  1160. -   Options can be stored in the MFJOBOPT environment variable
  1161.  
  1162. -   English documentation for templates
  1163.  
  1164. -   Switch character (`-' or `/') is used for generating METAFONT options
  1165.  
  1166.  
  1167.                -------- End of MFJOB.DOC -------------
  1168.