home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega Top 1
/
os2_top1.zip
/
os2_top1
/
APPS
/
TEKST
/
MFJOB11L
/
EMTEX
/
DOC
/
ENGLISH
/
MFJOB.DOC
Wrap
Text File
|
1992-06-06
|
44KB
|
1,168 lines
==============================================================================
MFJOB.DOC for MFjob 1.1l VERSION: 06-Jun-1992
==============================================================================
**********************************************************************
**********************************************************************
** **
** ATTENTION: VERSION 1.1l IS A BETA TEST RELEASE! **
** **
**********************************************************************
**********************************************************************
Note: this file has been changed by Eberhard Mattes, blame him for all
the poor English.
MFjob is a program to automate the generation of fonts with METAFONT,
GFtoPXL and GFtoPK. The fonts to be generated, their magnifications
and the device for which they are intended are supplied in an input
file (mfj file).
Usage
=====
mfjob <mfj_file> [<options>] [<macro>=<definition>]
mfjob /s <master_directory> [<options>]
mfj_file:
Name of the mfj file (default extension: mfj).
master_directory:
Name of the temporary directory, in which the master MFjob program
(see /m option) runs. The master MFjob program will tell you the
name of the temporary directory.
options:
All options must be preceded by `-' or `/'. Options may be separated
by spaces or another option may follow immediately: in this case the
following option must start with `/'. If your operating system is
setup to use `-' for options instead of `/', you must precede options
by `-' and you must separate options by spaces. In this case, you can
use `/' in path names, for example
mfjob -i -1 /mfj/job1
With a standard setup (using `/' for options), you should enter
mfjob /i/1 \mfj\job1
instead. Only `/' is used in these instructions.
You can use `:', `=', `:=', or nothing (but no spaces) between an
option and its argument, for instance /pvc, /pv:c, /pv=c, and /pv:=c.
/1
Call the version of METAFONT for the 80186-processor (mf186.exe or
bmf186.exe instead of mf.exe or bmf.exe). This option cannot be
used under OS/2. See also /3 and /b.
/2
Call the version of METAFONT for the 80286-processor (mf286.exe or
bmf286.exe instead of mf.exe or bmf.exe). This option cannot be
used under OS/2. See also /3 and /b. Note: The next emTeX
release will contain METAFONT versions for the 80186 instead of
versions for the 80286. The /2 option will be omitted.
/3
Call the version of METAFONT for the 80386-processor (mf386.exe
instead of mf.exe or bmf.exe). See also /1 and /b.
/a
Create all fonts. (Default: create only those which do not
exist.)
/b
Call bigMETAFONT instead of the default version (bmf.exe,
bmf186.exe or bmfp.exe instead of mf.exe, mf186.exe or mfp.exe).
See also /1. If /3 is given, /b will be ignored. This option
sets the default value for the `big=on|off' declaration.
/c<filename>
A batch file will be written using the specified name, but no
fonts will be created. Font directories will be created. The
fonts will be computed by running the batch file. Advantage: less
memory will be used. Disadvantages: When using /i, a separate log
file will be created for each failed computation of a font. Those
log files will be named mfj00001.log, mfj00002.log, and so on.
The file name set with the /g option will be ignored. Errors
occuring while copying files will not be noticed. /m and /s
cannot be used with /c. The batch file can be written to standard
output by typing `/c-'.
/d<flags>
Do not use expanded memory (DOS). This option is handed down to
METAFONT. Future METAFONT versions will allow arguments for the
/d option; MFjob simply hands down the arguments unchanged and
unchecked.
/g<filename>
File name of the transcript file used for the /i option. If /i is
used, the log files of all failed METAFONT runs will be
concatenated to a transcript file. The name of that file can be
set with the /g option -- the file will be created in the current
working directory unless a different path name is specified. If
/g is not used, mfjob.log in the temporary file will be used as
transcript file.
/i
Ignore errors produced by METAFONT. When METAFONT recognizes an
error, a non-zero error code is returned. If /i is not used,
MFjob will be aborted as well. When working with low resolutions,
however, errors like `strange path' or `Bad pos' will occur more
frequently. To let MFjob work without supervision, you should use
/i. If, when using /i, METAFONT returns a non-zero error code,
the log file written by METAFONT is appended to the file mfjob.log
in the temporary directory (unless a different file name has been
defined with the /g option), and work is continued. If you want to
abort MFjob while METAFONT is running, you should interrupt
METAFONT with ^C, end METAFONT with X and then abort MFjob with
^C. This will be easier without /i, as METAFONT returns an error
code of 2 when interrupted with ^C and X; this will stop MFjob as
well.
/l
Low priority (OS/2 only). This option is handed down to METAFONT.
/m
Master (for network). MFjob runs in master mode. Slave MFjob
programs running on other computers of the network can work on the
same job, thereby reducing the computing time. The master MFjob
program will tell you how to start the slaves. One master can work
with an arbitrary number of slaves (including no slaves at all).
Each MFjob program (master and slaves) reads the common mfjob.tmp
file created by the master and computes the next uncomputed font.
At the same time, that font will be marked already computed in the
mfjob.tmp file to make the other MFjob programs skip that font.
If a font has not been computed (because a MFjob program has been
aborted, for instance), it will remaine marked. To compute those
remaining fonts, you should run MFjob again after the master and
all slaves will have finished work. See also /s.
/n
Don't make fonts, just list commands.
/pv[:][=]<drive>
Set drive for default directories. This option is also handed
down to METAFONT.
/s
Slave (for network). You must also give the name of the temporary
directory used by the master MFjob (see also /m). The slave MFjob
reads mfjob.tmp in that directory and shares work with the master
and other slaves.
/t<directory>
Set temporary directory. The temporary directory will be created
in the current working directory. Entries like \abc (cannot be
created in the current working directory), tmp\abc (more than one
level), and d:abc (not on current drive) cannot be used. The
directory must not exist. If /t is not given, MFjob will choose a
name like mfj#.tmp, with # replaced by a number.
/w
Use Wayne Sullivan's sbmf. You have to create a batch file by
using /c, because sbmf requires more memory. This option also
causes the environment variable MFINPUTS to be used instead of
MFINPUT. The directory \mf\mfinputs will be used instead of
\emtex\mfinput.
<macro>=<definition>:
Define a macro. See below.
Options can be stored in the MFJOBOPT environment variable. The
options given in MFJOBOPT are read before those given on the command
line.
mfj file format
===============
The file can contain comments which start with `%', this character and
all other characters to the end of the line being ignored. However, a
`%' within brackets `[' `]' does not start a comment.
Here is a small mfj file as an example:
----------------------------------------------------------------------
%
% minimal.mfj
%
{
font=cmr10;
mag=1;
mode=hplaser[300];
output=pk[c:\texfonts\pixel.lj\@Rrdpi];
}
----------------------------------------------------------------------
This file contains a BLOCK, which starts with an open brace and ends
with the matching closing brace. DECLARATIONs (other than macro
definitions) can only appear within a block. Blocks can be nested.
A definition within a block has no effect outside this block but is
inherited by blocks nested within it. Now for declarations:
font=
fonts=
This lists the names of the fonts which are to be computed.
Each name must be separated from the next by a blank or the
end of the line. A semicolon terminates the list. The font
declaration adds the fonts listed to the set of fonts to be
generated. The font names can include the following special
characters:
? matches any character
* matches the rest of the name
# matches one or more digits
The mask `cmr#', for instance, matches the file names cmr5.mf,
cmr6.mf, cmr7.mf, cmr8.mf, cmr9.mf, cmr10.mf, cmr12.mf, and
cmr17.mf (and possibly more). The mask `cmr#0' doesn't match
any file names, because `#' skips all successive digits in the
file names. No `0' can follow.
mag=
mags=
This declaration lists the magnifications for which the fonts
are to be generated. The numbers must lie in the range 0.1 to
1000 and may contain a decimal point. The usual magsteps can
be abbreviated to s0 (1.0), s1 (1.2), s2 (1.44) and so on to
s9 (5.15977). The abbreviation for magstep 0.5 is sh
(1.09544). Each magnification must be separated from the next
by a space, the list ends with a semicolon. This declaration
adds the list of magnifications to those already declared.
mode=
This declares the device for which the fonts are to be
generated. The mode name (as defined in local.mf) is followed
by the horizontal resolution (in DPI) in brackets. If the
vertical resolution is different from the horizontal
resolution, you should also give the vertical resolution,
separated by a space. The declaration ends with a semicolon.
Each block can only contain one mode declaration. However,
blocks can be nested: see below.
output=
This selects the output files to be generated and how to name
the files. The following output file types can be generated:
pxl pxl file (created by GFtoPXL).
pk pk file (created by GFtoPK).
gf gf file (created by METAFONT).
log log file (created by METAFONT).
tfm tfm file (created by METAFONT).
The path name template, in brackets, follows the file type.
Among others, the following special sequences can be used in
the template:
@Rr the resolution of the font in DPI
(rounded)
@f the name of the font
If there is no extension, the usual one (`pxl', `pk', `@Rrgf',
`log', `tfm') will be used. Each file type/path combination
is separated from the next by a space and the list ends with a
semicolon. Only the file types listed in this declaration will
be generated, or rather, all tfm, gf and log files not given
in an output declaration will be deleted. The output
declaration replaces previous entries for the separate file
types. Example: The declaration
output=pk[c:\texfonts\pixel.lj\@Rrdpi\@f]
log[c:\texfonts\log\@f];
with font=cmr10, mode=hplaser[300], and mag=1.2 causes the
files
c:\texfonts\pixel.lj\360dpi\cmr10.pk
c:\texfonts\log\cmr10.log
to be created. Only the first expansion of each template will
be used. Therefore, the first expansion should yield a file
name ending in .PK if you're creating PK fonts.
base=
This selects the METAFONT base to be used for the generation
of the fonts which FOLLOW it. The usual declarations are
base=cm or base=plain; at the beginning of the outermost block
base=plain has been set. base=INIMF is a special case: INIMF
will be called instead of METAFONT. The base declaration
replaces the preceding one. The declaration is followed by a
semicolon.
big=
This selects the big or normal METAFONT versions. If you type
`on', `yes', or `y', bigMETAFONT will be used. If you type
`off', `no', or `n', the standard version will be used. The
initial value is set by the /b command line option: The
initial value is `big=on', if /b is given, `big=off',
otherwise. This declaration replaces the previous value of
`big' for the current block. The declaration is followed by a
semicolon.
driver=
This sets the name of the DVI driver. That value is used only
for replacing @d in templates and has no other significance.
The initial value is empty. This declaration replaces the
previous value of `driver' for the current block. The
declaration is followed by a semicolon.
fontlib=
This sets the font library files which are to be searched.
You have to supply a template in brackets. The default
extension is `fli'. The font library files are used only for
finding out which fonts already exist. No fonts will be
copied into the font libraries. The declaration is followed
by a semicolon. Example:
fontlibs=[c:\texfonts\lj_{0,1,2,3,4,5a,5b,sli}];
size=
sizes=
This declaration lists the sizes (design size in pt) for which
the fonts are to be generated. This is used together with
name= and command= for fonts with selectable design size (see
command=). The numbers must lie in the range 1 to 10000 and
may contain a decimal point. Each size must be separated from
the next by a space, the list ends with a semicolon. This
declaration adds the list of sizes to those already declared.
name=
names=
This sets how to construct the name of a font to be generated
from the name of the mf file and the size. To be used
together with size= and command= for fonts with selectable
design size (see command=). You have to give a template in
brackets. The first expansion will be used for integer sizes,
the second one for non-integer sizes. If there is only one
expansion, that one will be used for all sizes. @f will be
replaced by the name of the mf file (without `.mf'). Example:
names=[@f@s,@f@Tsp@Fs]
font=dcr and size=10 yields the name `dcr10', font=dcr and
size=7.5 yields the name `dcr7p5'.
command=
commands=
If you're using fonts with selectable design size, a driver
file must be created for each font/size pair, which sets the
desired design size and calls the mf file. commands= is used
to specify what will be written into the driver file. You
have to give a template in brackets. @f will be replaced by
the name of the mf file (without `.mf'). Use
commands=[design_size:=@s; input b-@f];
for the Sauter fonts, and
commands=[gensize:=@s; generate @f];
for the dc/ec fonts.
At the end of every block which does not contain a nested block the
selected fonts with the respective bases in the selected
magnifications for the selected device are set to generate the
selected file types. The generation of these fonts start after the
mfj file has been read. If the /a option is not used, only those of
the selected fonts which do not already exist will be generated -- if
only the log file is missing, however, the font will not be generated.
The following example generates cmr10 and cmbx10 as pk files in
magnifications 1 and 1.2 for the HP LaserJet+ and the Epson FX-80.
----------------------------------------------------------------------
%
% example.mfj
%
{
fonts=cmr10 cmbx10;
mags=s0 s1;
{
mode=hplaser[300];
output=pk[c:\texfonts\pixel.lj\@Rrdpi];
}
{
mode=epsonfx[240 216];
output=pk[c:\texfonts\pixel.fx\@Rrdpi];
}
}
----------------------------------------------------------------------
Included data files
===================
Files containing mfj declarations can be included with the command
input [name];
The default extension is `mfj'.
Macros
======
Macros can be defined either in the command line (see above) or in the
mfj file with the commands
def macro=[definition];
or
redef macro=[definition];
If a macro is defined more than once then only the first definition
(for instance, in the command line) will be used. Macros can be
redefined with `redef' in which case the old definition will be
replaced when it is no longer used. Example:
def x=[mag=2;redef x=[mag=4;];mag=3;x;mag=5];
x;
This expands to: mag=2;mag=3;mag=4;mag=5
Macros are only expanded outside brackets (`[...]'). As macros
containing blanks cannot be defined in the command line, any commas in
a command line macro definition will be replaced by spaces.
Example:
----------------------------------------------------------------------
%
% x.mfj
%
input [modes];
def s=[1];
def f=[cmr10];
{
fonts=f; mags=s; m;
}
----------------------------------------------------------------------
The following file comes with emTeX:
----------------------------------------------------------------------
%
% modes.mfj
%
def lj= [mode_lj; output_lj; fli_lj; tfmlog];
def fx= [mode_fx; output_fx; fli_fx; tfmlog];
def mx= [mode_mx; output_mx; fli_mx; tfmlog];
def lql=[mode_lql; output_lql; fli_lql; tfmlog];
def lqm=[mode_lqm; output_lqm; fli_lqm; tfmlog];
def lqh=[mode_lqh; output_lqh; fli_lqh; tfmlog];
def ito=[mode_ito; output_ito; fli_ito; tfmlog];
def kyo=[mode_kyo; output_kyo; fli_kyo; tfmlog];
def FAX=[mode_FAX; output_FAX; fli_FAX; tfmlog];
def qj= [mode_qj; output_qj; fli_qj; tfmlog];
def mode_lj= [mode=hplaser[300]];
def mode_fx= [mode=epsonfx[240 216]];
def mode_mx= [mode=epsonmx[120 216]];
def mode_lql=[mode=lqlores[180]];
def mode_lqm=[mode=lqmedres[360 180]];
def mode_lqh=[mode=lqhires[360]];
def mode_ito=[mode=itoh[160 144]];
def mode_kyo=[mode=kyocera[300]];
def mode_FAX=[mode=fax[204 196]];
def mode_qj= [mode=hpquiet[192]];
def output_lj= [output=pk[c:\newfonts\pixel.lj\@Rrdpi\@f]];
def output_fx= [output=pk[c:\newfonts\pixel.fx\@Rrdpi\@f]];
def output_mx= [output=pk[c:\newfonts\pixel.mx\@Rrdpi\@f]];
def output_lql=[output=pk[c:\newfonts\pixel.p6l\@Rrdpi\@f]];
def output_lqm=[output=pk[c:\newfonts\pixel.p6m\@Rrdpi\@f]];
def output_lqh=[output=pk[c:\newfonts\pixel.p6h\@Rrdpi\@f]];
def output_ito=[output=pk[c:\newfonts\pixel.ito\@Rrdpi\@f]];
def output_kyo=[output=pk[c:\newfonts\pixel.kyo\@Rrdpi\@f]];
def output_FAX=[output=pk[c:\newfonts\pixel.fax\@Rrdpi\@f]];
def output_qj= [output=pk[c:\newfonts\pixel.qj\@Rrdpi\@f]];
def fli_lj= [fontlib=[$DVIDRVFONTS:lj_{0,h,1,2,3,4,5a,5b,sli}]];
def fli_fx= [fontlib=[$DVIDRVFONTS:fx_{0,h,1,2,3,4,5,sli}]];
def fli_mx= [fontlib=[$DVIDRVFONTS:mx_{0,h,1,2,3,4,5,sli}]];
def fli_lql=[fontlib=[$DVIDRVFONTS:p6l_{0,h,1,2,3,4,5,sli}]];
def fli_lqm=[fontlib=[$DVIDRVFONTS:p6m_{0,h,1,2,3,4,5,sli}]];
def fli_lqh=[fontlib=[$DVIDRVFONTS:p6h_{0,h,1,2,3,4,5,r,sli}]];
def fli_ito=[fontlib=[$DVIDRVFONTS:ito_{0,h,1,2,3,4,5,sli}]];
def fli_kyo=[fontlib=[$DVIDRVFONTS:kyo_{0,h,1,2,3,4,5a,5b,sli}]];
def fli_FAX=[fontlib=[$DVIDRVFONTS:fax_{0,h,1,2,3,4,5,sli}]];
def fli_qj= [fontlib=[$DVIDRVFONTS:qj_{0,h,1,2,3,4,5,sli}]];
def m=[lj];
def tfmlog=[output=tfm[c:\newfonts\tfm\@f] log[c:\newfonts\log\@f];];
----------------------------------------------------------------------
Call:
mfjob x s=s0,s1 f=cmbx10,cmti10 m=fx
Note: `fax' isn't the same as 'FAX'.
Short cuts for fonts=, mags= and sizes=
=======================================
Frequently, not all fonts are to be generated in all magnifications or
sizes. In these cases, one types something like:
----------------------------------------------------------------------
{
input [modes];
mags=1 1.41421; % 1 and \sqrt{2}
name=[@f@s];
commands=[gensize:=@s; generate @f];
m;
{font=dcr; {sizes=5 6 7 8 9 10 12 17;}}
{font=dcbx; {sizes=10 12 17;}}
{font=dcsl; {sizes=10 12;}}
}
----------------------------------------------------------------------
This can be abbreviated as follows:
----------------------------------------------------------------------
{
input [modes];
mags=1 1.41421; % 1 and \sqrt{2}
name=[@f@s];
commands=[gensize:=@s; generate @f];
m;
font(sizes)=dcr (5 6 7 8 9 10 12 17)
dcbx (10 12 17) dcsl (10 12);
}
----------------------------------------------------------------------
The declaration font(sizes) creates (internally) exactly the blocks
and declarations shown in the first example. By analogy, you can use
also size(fonts), font(mags), mag(fonts), size(mags), and mag(sizes).
For instance, sizes(mags) lists sizes, where each size is followed by
a list of magnifications in parentheses. After a declaration of this
variety, only another declaration of exactly the same type or
appropriate groups may follow until the end of the group is reached.
Declaration of rules for fonts of arbitrary design size
=======================================================
Instead of explicitly declaring size=, you can define rules for
dealing automatically with fonts of arbitrary design size. These
rules are applied if a font source file for a font cannot be found.
In this case, MFjob tries to split the font name according to a rule
into a base name and a design size. If successful, the font will be
generated using appropriate settings of name= and command=. Each rule
specifies a mask for font names -- rules will be only used for
matching font names. Additionally, each rule contains name= and
command= declarations. Optionally, a rule can contain a base=
declaration.
A rule declaration starts with rule= which is followed by a list of
font name masks. The masks may contain the special characters ?, * and
#, see font= for details. Following the list, you have to type an
opening brace. name=, command= and base= declarations follow. The
base= declaration can be omitted. The rule= declaration is finished
with a closing brace. Example:
rule=dc* ec* % DC and EC fonts
{
name=[@f@s];
commands=[gensize:=@s; generate @f];
base=dxbase;
}
rule= cannot be used inside a block.
The name= template is somewhat restricted to make extraction of the
base name and the design size simpler. You can use only the @f and @s
parameters, each of which must be used exactly once (with the
exception of @Fs and @Ts which may occur together in a template).
Only the F and T characters for modifying a parameter are allowed.
If the declaration given above is used together with
font=dcr10;
MFjob will apply the rule, unless dcr10.mf is found. Applying the
rule has the same effect as using the name= and command= declaration
of the rule and using, instead of font=dcr10, the declarations
base=dxbase; font=dcr; size=10;
Templates
=========
Templates are used for telling MFjob how to construct a file name
(or METAFONT commands) from given parameters such as font size and
font name. The template can be a constant, the file name not
depending on any of the parameters, or it can evaluate to more
than one filename which will then be used in sequence. The
evaluation of a template is called its expansion.
The fontlib= declaration, for instance, makes MFjob search all the
font library files given by all the expansions of the template.
A template which is not constant will contain one or more template
characters which are comma (,), dollar sign ($), at sign (@) and
left and right braces ({}). A template which contains a dollar
sign or a comma may expand to more than one filename. If these
template characters are to appear as literal characters then they
must be preceded by the at sign (@) -- a literal dollar sign must
be written "@$".
The simplest example of a template -- a constant template:
----------------------------------------------------------
\texfonts\lj
This template, intended for the fontlib= declaration, simply
contains the filename: the expansion does not depend on any
parameters and is just this filename. (The fontlib= declaration
automatically appends .fli if the expansion doesn't contain an
extension.)
A simple example of a template:
-------------------------------
\texfonts\@f
In this template, intended for the output= declaration), "@f" is
replaced by the name of the font. When computing font `cmr10',
the expansion of this template will be `\texfonts\cmr10'. `.pxl',
`.pk', `.gf', `.log' or `.tfm' (depending on the details of the
output= declaration) will be added if -- as in the example -- no
extension is given.
Other parameters
----------------
The following template parameters are available:
@d driver name, see driver= declaration
@f font name, see font= and name= declarations
@p magstep (0..9, h, u=unknown), see mag= declaration
@m METAFONT mode, see mode= declaration
@b base resolution, see mode= declaration (integer, rounded)
@r font resolution (decimal number), computed from mode= and
mag= declarations
@s font size (design size) in pt, see size= declaration
@g magnification (decimal number), see mag= declaration
These parameters can be modified by inserting one or more letters
between the `@' and the parameter letter. The modifiers and the
parameters which they may be used with are described below.
Earlier versions of MFjob used `$' instead of `@' for inserting
parameters: `$r' must be replaced by `@Rr', `$s' must be replaced
by `@RVr'.
Forming multiple expansions with a list
---------------------------------------
Some declarations require a list of files, for instance, the
fontlib= declaration takes a list of font library filenames. The
simplest way to do this is by entering a list of names separated
by commas but this is not always very convenient as it requires a
lot of typing and the length of a template is limited to 127
characters. Because of this limitation, this example does not
contain the usual set of font libraries:
fontlib=[c:\texfonts\fx_0,c:\texfonts\fx_1,c:\texfonts\fx_2]
Spaces are not allowed in templates.
Forming multiple expansions with alternatives
---------------------------------------------
It is clear from the preceding example that the expansions have
quite a lot of text in common, only differing, in this example, by
one digit. Templates therefore allow common text to be "factored
out" with the differing parts presented as a series of
alternatives enclosed in braces. The example above may be
expressed in this way as follows:
fontlib=[c:\texfonts\fx_{0,1,2}]
In expanding this template, the alternatives are selected in order
starting with the first after the opening brace. The template is
evaluated with this choice and the result used by MFjob; if MFjob
requests another candidate, the template is evaluated a second
time using the second alternative which (in this example) lies
between the first and second commas. A third expansion would be
constructed using the third alternative which appears after the
second comma and before the closing brace.
Any number of alternatives may appear between the opening and
closing braces. The text of an alternative may also be null as in
"{}" or "{,a}": in the first case the expansion is empty, in the
second case the first choice is empty, the second consisting only
of "a". It it also possible to have only one choice as in "{abc}"
which always evaluates as "abc" -- the braces in this case are not
needed. Naturally the choices need not be the same length as, for
example, in:
fontlib=[c:\texfonts\lj_{0,h,1,2,3,4,5a,5b,sli}.flb]
A simple list of filenames separated by commas is a special case
of a set of alternatives. MFjob automatically encloses a template
in opening and closing braces so the list appears as list of
alternatives. If only one filename appears then it is a constant
choice as shown above in "{abc}".
Multiple sets of alternatives
-----------------------------
Sometimes it is useful to be able to construct a pattern with more
than one set of alternatives in it. Templates encompass this as
well as allowing alternatives to be nested. The expansion of such
a template consists of all possible combinations in
lexicographical order, that is, with the rightmost alternative in
the template changing most rapidly. An example will best clarify
this: the template
{1,2}{1,a{1,2}}
will give the following sequence of expansions
11
1a1
1a2
21
2a1
2a2
The template
{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}
will expand into all the three digit numbers from 000 to 999 in
increasing nuerical order.
Environment variables
---------------------
The names of directories are more conveniently kept in environment
variables so that, when the disk is reorganized it is not
necessary to edit all the configuration files. To further support
this use of environment variables, they may also appear in
templates. The name of the variable is sandwiched between a
dollar sign ($) and a colon (:) as in $DVIDRVFONTS: for instance.
The name of an environment variable to be used in a template may
not contain any of the special template characters, that is, @ { ,
or } (at sign, comma and opening and closing braces) -- this may
be changed in a future release). The environment variable is
treated as if it was an alternative enclosed in braces, the list
of directories the variable contains (here separated by
semicolons, NOT commas) are entered into the expansion one at a
time in the order they appear in the variable. If a directory
name in the environment variable does not end in ':', '/' or '\'
then a '\' is automatically appended. Empty directory positions
in the list (for instance the two in SET PATH=C:\DOS;;\D:\BIN;)
will be ignored -- a template containing $PATH: set as above would
expand in exactly the same way if the SET command was SET
PATH=C:\DOS;\D:\BIN. The contents of the environment variable may
include template parameters (@b and @r are likely candidates) but
alternatives are not allowed.
An example of the use of an environment variable in a template:
fontlib=[$FONTLIBS:p6m_{0,1,2,3,4,5,sli}]
Note that '\' will be appended wherever necessary. $env: is
treated like {,} with respect to order of evaluation.
Template parameter modifiers
----------------------------
Template parameters may have their expansion modified by inserting
one or more characters from the set shown below between the @ and
the parameter letter. The modifiers are:
0-99 _ Padding a parameter out to a given width with '0' or '_'.
A number from 0 to 99 will cause the parameter to be filled
from the left with '0' or '_' -- the number of positions to
be filled is given by the number's value. A number
appearing with a numeric parameter will fill with zeros but
appearing with a non-numeric parameter will fill with
underscores. Use the underscore modifier to fill a numeric
parameter with underscores instead of zeros.
An example:
@r @4r @4_r @f @5f
1 0001 ___1 a ____a
300 0300 _300 abc __abc
20000 20000 20000 abcdefgh abcdefgh
F R T rounding and truncating real numbers
F taking the fractional part of the number (may be empty)
R rounding the number to get the integer part
T truncating the number to get the integer part
.0-99 Decimals. The number will be rounded to this many
decimals. Note: The period must not be used immediately
following the @, as `@.' has a special meaning. Specify a
field width instead, for instance `@0.2r'.
Examples:
@r @0.3r @0.2r @0.1r @0.0r @7.1r @R.3r
300.75 300.750 300.75 300.8 301 00300.8 301.000
300.74 300.740 300.74 300.7 301 00300.7 301.000
300 300.000 300.00 300.0 300 00300.0 300.000
M V Multiplication by a constant
M multiplies a numeric parameter by 1000 and V multiplies
by 5. This allows the generation of directory or file
names which depend on the font magnification as PXL font
names do, for instance
@r @RVr
300 pxl1500
or names which depend in the magnification
@g @Mg
1.44 1440
If more than one M or V modifier appears on the same
parameter, all but the rightmost one will be ignored.
X Y horizontal or vertical value
The resolution can be different on the horizontal and
vertical axes, these modifiers allow the correct value to
be selected with the @b or @r parameters. If more than one
X or Y modifier it used with the same parameter, all but
the rightmost one will be ignored.
Default extension
-----------------
`@.' to add an extension to a file name is not used by MFjob.
`@.' always inserts `.'.
Summary
-------
@[0-99][.0-99][_][FRT][MV][XY](dfmbrsg)
0-99 pad out with 0's (numbers) or _ (other parameters)
_ pad out with _
.0-99 decimals (@g and @r)
F fractional part
R integer part (round)
T integer part (truncate)
M multiply by 1000
V multiply by 5
X select horizontal value (default, if Y does not appear)
Y select vertical value
d driver name text
f font name text
p magstep (0..9, h, u=unknown) text
m MF mode text
b basic font resolution integer
r font resolution (dpi) decimal
s design size (pt) decimal
g magnification (e.g. 1.2) decimal
{a1,a2,a3} alternatives
$env: environment variables
@@ @, @{ @} @$ special characters in templates
Notes
=====
The font source files are sought in the directories listed in the
environment variable MFINPUT. If MFINPUT is not set then the default
directory \emtex\mfinput (on the drive set by /pv or EMTEXDRV) is
searched. Use
set emtexdrv=e
or
mfjob /pv:e ...
to make MFjob search e:\emtex\mfinput (for font files) and
e:\emtex\mfjob (for mfj files). If you don't use EMTEXDRV and /pv,
the directories \emtex\mfinput and \emtex\mfjob on the current drive
will be searched. Font source files are NOT sought in the current
working directory!
MFjob consists of three programs: mfjob.exe, mfjob1.ovl, mfjob2.ovl.
Besides METAFONT, gftopk.exe and gftopxl.exe are needed. For
METAFONT, the following file is used:
MFjob call | big= | DOS | OS/2
-----------+------+------------+-------------
MFjob | off | mf.exe | mfp.exe
MFjob /1 | off | mf186.exe | --
MFjob | on | bmf.exe | bmfp.exe
MFjob /1 | on | bmf186.exe | --
MFjob /3 | -- | mf386.exe | mf386.exe
MFjob always creates a temporary directory in the current working
directory, even if no fonts will be generated. If you want to use a
certain directory, you can use the /t option to tell MFjob. The
directory must not exist. If /t is not given, MFjob will choose a
name like mfj#.tmp, with # replaced by a number. If MFjob is aborted,
the temporary directory and some files in the temporary directory will
be left. If you don't need that files (mfjob.log!) you should delete
the files and the directory.
The mfj files are sought first in the directory given (if it exists),
then in the current directory, then in the directories listed in the
MFJOB environment variable (the directories in the list must be
separated from one another with a semicolon), and finally in
\emtex\mfjob (on the drive set by EMTEXDRV or /pv).
The less memory is available, the slower runs the DOS version of
emTeX's METAFONT. MFjob, therefore, shows the message
Warning: poor performance expected due to lack of memory
if there isn't enough memory for optimum performance. If memory is
extremely short, MFjob shows
Warning: very poor performance expected due to lack of memory
and the running time may be several hundredfold the optimum running
time (several hours instead of some minutes). In this case, you
should try to increase available memory by removing resident programs
(from autoexec.bat) and device drivers (from config.sys). You can also
use the /c option to make MFjob write a batch file, which creates the
fonts without MFjob (but there are some restrictions, see /c).
History
=======
Version 1.1a:
-------------
- Error in `input' corrected.
- Environment variable `MFJOB'.
Version 1.1b:
-------------
- The directory \emtex\mfinput is no longer searched if the
environment variable `MFINPUT' is set.
Version 1.1c (21-Feb-90):
-------------------------
- The `_' character can be used (for instance in mode=).
Version 1.1d (30-Apr-90):
-------------------------
- New option /i to ignore METAFONT error codes.
- New option /2 results in using METAFONT's 286 version.
- New option /b results in using bigMETAFONT.
- New option /d is handed down to METAFONT.
- mfjob1.exe and mfjob2.exe renamed to mfjob1.ovl and mfjob2.ovl.
Version 1.1e (16-Jul-90):
-------------------------
- Default directory for mfj files: \emtex\mfjob.
- New option: /pv (set drive for default directories).
- New environment variable: EMTEXDRV (drive for default
directories).
Version 1.1f (25-Sep-90):
-------------------------
- Display '======...' after generating of a font.
Version 1.1g (10-May-91):
-------------------------
- mfjob1.ovl and mfjob2.ovl replaced by mfjob.ovl.
- New options: /3 /c /t /w
- Master slave mode (/m and /s)
*** base=plain is the default (instead of base=cm)
- When using /n no font directories will be created
- New declaration: big=, initial value can be set with /b
- New declaration: driver=, for @d in templates
- MFjob requires less memory, making METAFONT faster. (There were
no memory problems with the OS/2 version.)
- Warning if not enough memory for acceptable computing time
- Switch character (`-' or `/') will be obeyed
*** Templates are now used with output=. The main difference is in the
special sequences:
old: $r %r new: @r
old: $s %s new: @Vr
The file name must be inserted with @f
- MFjob now uses fixed point arithmetic identical to that used by
METAFONT, therefore mag=s0 to s9 delivers slightly different
values compared to previous versions of MFjob
- You can specify both the horizontal and vertical resolutions with
mode=
- Font files won't be sought in the current working directory
- As MFjob creates a temporary directory, there are no longer
problems with multiple concurrently running MFjob programs under
OS/2 or in networks
- Font library files can be searched (fontlib=)
- MFjob complains about missing fonts= and mags= declarations which
cause fonts not to be computed
- New declarations for the dc/ec and Sauter fonts:
name=, command=, size=
- New declaration: font(size)= etc.
- The font file names aren't truncated to 8.3 characters in the
METAFONT command line
- MFjob displays how many fonts have been computed, how many fonts
are to be computed and how much time has been spent running MFjob.
Additionally, MFjob displays an estimate of the time required for
computing all the fonts
Version 1.1h (18-May-91):
-------------------------
- New option: /1 (the /2 option will be removed soon)
- Usage message corrected (/m and /s are implemented)
- /d takes optional arguments
Version 1.1i (18-Nov-91):
-------------------------
- Bug in master slave mode fixed (copying the same output file at
the same time by more than one machine)
*** @r in templates now inserts a decimal fraction, therefore you
should use `@Rr' (and `@RVr') to insert the rounded value (as in
MFjob versions up to and including 1.1h)
- @b fixed
- Templates implemented completely
- Sequence of computation changed
- base=INIMF
Version 1.1j (11-Apr-92):
-------------------------
- Rounding problem fixed (for instance, at 300 DPI with mag=0.625)
- New option: /g
- New declaration: rule=
Version 1.1k (13-Apr-92):
-------------------------
- Bug fixed: the extension of the GF file wasn't computed correctly
for big values of mag
Version 1.1l (30-May-92):
-------------------------
- Option /3 under OS/2
- Options can be stored in the MFJOBOPT environment variable
- English documentation for templates
- Switch character (`-' or `/') is used for generating METAFONT options
-------- End of MFJOB.DOC -------------