.TH mtpk 5 "Nov 95" TeXware .SH NAME mtpk.cfg \- configuration file for mtpk and pkfonts .br .de Ex .sp .RS .nf .ft C .. .de Xe .ft P .RE .sp .fi .. .SH DESCRIPTION The configuration file of mtpk(1) is used for defining the interface between a DVI driver and mtpk so that the missing fonts are generated when they are needed in a controlled and flexible way. The following example is typical for UNIX TeX systems: .Ex TEXMF = /usr/local/tex MFINPUTS = .:$TEXMF/fonts/typefaces// mfipath = $MFINPUTS TEXFONTS = .:$TEXMF/fonts/tfm tfmpath = $TEXFONTS logfile = $TEXMF/fonts/pk${res}/mtpk.log TEXPKS = .:$TEXMF/fonts/pk${res} pkpath = $TEXPKS TEXCONFIG = .:$TEXMF/dvips texconfig = $TEXCONFIG PSRESOURCEPATH = .:$TEXMF/dvips psrespath = $PSRESOURCEPATH tolerance = 1+%d/500 forge = /tmp/mtpk.%u pkuser = pkcache gsfontmap = /usr/local/ghostscript-2.61/Fontmap [ # default printer res = 300 mode = imagen ] [ mode = ljfour res = 600 ] .Xe For those who are familiar with Bourne shell the syntax is probably no big surprise. You can define variables on a single line with: .Ex = .Xe In which is a name of letters (no digits) and is a string without double quotes. Whitespace is ignored except when it occurs inside the definition of the string itself. Expressions can have one of the following basic forms: .RS .IP "constant expression" .br An expression without special characters .IP "generic expression" .br An expression with special characters .RE Special characters are needed to refer to the value of another variable within an expression. Accepted are $var, $(var), ${var} or %var%. The latter is the preferred MSDOS way. Comments can be added after the crosshatch (#). It is also possible to use the percent sign followed by a single letter. The following list shows what letters are recognized: .RS .Ex %b basic resolution ($res) %d actual dpi size %f TeX font name %m METAFONT mode definition ($mode) %u unique identification .Xe .RE The main goal of expressions is to define search paths and other configurable parameters. The paths should be defined in terms of the environment names used by the DVI drivers or the programs that mtpk need in order to generate the PK font. When you have setup your TeX system so that the PK fonts of all supported printers and previewers can be expressed with one generic \fIpkpath\fP (mtpk's internal name) you can use it as a global definition for TEXPKS (the name recognized by dvips(1) and the latest xdvi(1)) in the following manner: .Ex TEXMF = /usr/local/tex TEXPKS = .:$TEXMF/fonts/pk$res pkpath = $TEXPKS .Xe When the environment variable TEXPKS is defined by the user its value will be used otherwise the default value of TEXPKS in mtpk.cfg. To cope with systems that organize their METAFONT sources in subdirectories recursive paths can be specified by using two slashes (on UNIX) or two exclamation marks (on MSDOS) in the middle or at the end of a path. The following example shows how to use it for \fImfipath\fP (the internal definition for METAFONT font sources): .Ex MFINPUTS = .:$TEXMF/fonts/typefaces// mfipath = $MFINPUTS .Xe Traditionally scripts that generate PK fonts provide a directory that is world writable for storing PK fonts. With mtpk on UNIX it is also possible to define a dedicated login (\fIpkuser\fP is the internal name for it) that is granted permission to install fonts in directories that are owned by this pseudo-user. In that case mtpk needs to be installed so that it gets execution permission for pkuser at run-time. For extra safety you can log all PK fonts that are created by adding a definition for \fIlogfile\fP. PK fonts are only installed in a public place (owned by pkuser) when the \fIchecksum\fP matches that of its corresponding TFM file unless checksum is set to \fIoff\fP or \fIwarn\fP. When the PK fonts for all printers can not be defined with a single generic expression you can use printer specific values as is demonstrated with the following MSDOS example: .Ex # EmTeX example EMTEXDIR = c:\\emtex DVIDRVFONTS = c:\\texfonts tfmpath = %EMTEXDIR%\\tfm!! [ mode = laserjet res = 300 pkpath = %DVIDRVFONTS%\\pixel.lj\\%ddpi\\%f.pk flipath = %DVIDRVFONTS%\\lj_base;lj_more ] .Xe The printer specific names are defined between square braces which must appear on the very first position of a line. Comments can be added after a crosshatch. After this informal introduction we summarize all internal names used by mtpk in alphabetic order. When a name appears in bold face it is an obligatory variable and must be present. When a variable has a default its value is shown between parenthesis. .IP "checksum (\fBon\fP | off | warn)" Allows to control the way checksums of TFM and PK fonts are treated. With \fIon\fP PK fonts are installed in public and private directories only when the checksum of the PK font matches with its TFM file. Public directories are world writable or owned by \fIpkuser\fP. Private directories are directories owned by the user but not accessable from the current directory. With \fIwarn\fP users get a warning when a mismatch occurs and with \fIoff\fP checksums are ignored but PK fonts are installed if the TFM font exists. .IP flipath To specify font libraries for emTeX. The path consists of a series of FLI filenames separated by a path separator (semicolon on MSDOS and colon on UNIX). The first FLI file should be an absolute file name. The extension `.fli' may be omitted. .IP "forgedir (\fBcurrent directory\fP)" Allows to set the place where PK fonts are generated. If `%u' is used in the definition it will be expanded to an unique identification to avoid that two simultanious users get name clashes. Normally the font forge will be cleaned after a font is installed except when mtpk is run with the -d (debug) flag. .IP gsfontmap Absolute file name of the Fontmap used by GhostScript. Before running gsftopk we check if the font we want to make is available in this file. .IP logfile Name of the file where public PK fonts are logged. The logfile should exist and be writable by the effective user of mtpk(1). For each installed PK font a short line is appended containing the date, time, the uid and the name of the PK font. .IP "margin (\fB0\fP)" When margin is set to a positive value PK sizes within the range [dpi - margin, dpi + margin] are looked at before a new dpi size is made. With margin round-off differences between DVI drivers can be compensated for. Although in normal situations one should be satisfied with the default value of zero (0). .IP \fBmfipath\fP Allows to set the search path for METAFONT fonts. Should be defined in terms of the environment name that your mf(1) uses for locating METAFONT fonts (MFINPUTS on UNIX). .IP \fBmode\fP This definition s needed by METAFONT to make a PK font. This parameter \fImust\fP be defined for each supported printer. .IP "oldfonts (0)" When defined to one (1) old style checksums will be used. The default is to use the new style checksums. .IP "mtpk (mtpk %f %d %b)" Defines the name of the program for generating PK fonts and the arguments given to it. .IP \fBpkpath\fP Allows to set the search path for PK fonts. Should be defined in terms of the environment name that your DVI driver uses for locating PK fonts (TEXPKS on UNIX for dvips(1) and xdvi(1)). .IP pkuser In order to prevent that TeX users need world write permission in directories where PK fonts are stored one can use a special login that is used during the installation of these fonts. The installation of the PK font from a temporary directory (\fIforgedir\fP) to its final destination is implemented as an atomic action so that when two users install the same font at the same time one of them will get the message `permission denied'. When `pkcache' is the account assigned to pkuser and pk300 is a PK directory the following permissions should be set: .RS .Ex -rwsr-x-r-x pkcache mtpk drwxr-x-r-x pkcache pk300 .Xe .RE .IP \fBpsrespath\fP This path should be defined in terms of PSRESOURCEPATH when you want to use ps2pk as renderer for type1 fonts. Without a proper definition ps2pk can not locate type1 fonts, their AFM files and encoding vectors. The path will be checked for existing PostScript resource databases created with mkpsres(1). .IP "rendors (\fBmf+ps2pk+gsftopk\fP)" This item defines which renderers are used and in which order. The default value is mf+ps2pk+gsftopk. The plus sign is used to separate the names of the programs. Ps2pk and gsftopk will be used for PostScript fonts and mf for METAFONT sources. Gsftopk can only be run when \fIgsfontmap\fP is properly defined, and ps2pk only when a PostScript resource database is found in \fIpsrespath\fP. .IP \fBres\fP The basic resolution of the printer. If not provided the value of \fIxres\fP will be used instead. .IP \fBtexconfig\fP The path to locate the files \fIconfig.ps\fP and \fIpsfonts.map\fP used by dvips(1) can be defined in terms of TEXCONFIG. Psfonts.map does contain the mapping info for TeX's PostScript fonts and plays a key role when you use them. Mtpk(1) does support the `m mapfile' and `m +mapfile' options from config.ps. .IP \fBtfmpath\fP Allows to set the search path for TFM fonts. Should be defined in terms of the environment name that your DVI driver uses for locating TFM fonts (TEXFONTS on UNIX). .IP "tolerance (\fB0\fP)" With this parameter dpi sizes close to a whole or a half magstep can be truncated to those values. With a value of zero (0) no truncation will be done what is the default action. With a value greater than zero a dpi size will be truncated if within the range [dpi - tolerance, dpi + tolerance] a whole or half magstep is found. It is possible to set the value of tolerance depending on the actual dpi size by using a generic expression using %d. To get the default value from dvips(1) tolerance needs to be 1+%d/500. .IP vfpath The path for locating VF fonts. Not used by mtpk(1) but by pkfonts(1) to find out what real fonts are needed in order to use virtual fonts. Should be defined in terms of the name used by your DVI drivers (VFFONTS on UNIX). .IP "xres (\fB$res\fP)" The basic X-resolution of the printer. .IP "yres (\fB$res\fP)" The basic Y-resolution of the printer. .SH "SEE ALSO" mtpk(1), pkfonts(1) .SH AUTHOR .nf Piet Tutelaers