Go to the first, previous, next, last section, table of contents.


MFT: Prettyprinting Metafont source

MFT translates a Metafont program into a TeX document suitable for typesetting, with the aid of TeX macros defined in the file `mftmac.tex'. Synopsis:

mft [option]... mfname[.mf]

MFT searches the usual places for mfname (see section `Supported file formats' in Kpathsea). To see all the relevant paths, set the environment variable KPATHSEA_DEBUG to `-1' before running the program. The output goes to the basename of mfname extended with `.tex', e.g., `mft /wherever/foo.mf' creates `./foo.tex'.

Line breaks in the input are carried over into the output; moreover, blank spaces at the beginning of a line are converted to quads of indentation in the output. Thus, you have full control over the indentation and line breaks. Each line of input is translated independently of the others.

Further control is allowed via Metafont comments:

(The above description was edited from `mft.web', written by D.E. Knuth.)

The program accepts the following options, as well as the standard `-help' and `-version' (see section Common options):

`-change=chfile[.ch]'
Apply the change file chfile as with Tangle and Weave (see section WEB: Literate programming).
`-style=mftfile[.mft]'
Read mftfile before anything else; a MFT style file typically contains only MFT directives as described above. The default style file is named `plain.mft', which defines this properly for programs using plain Metafont. The MFT files is searched along the MFTINPUTS path; see section `Supported file formats' in Kpathsea. Other examples of MFT style files are `cmbase.mft', which defines formatting rules for the macros defined in `cm.base', and `e.mft', which was used in the production of Knuth's Volume E, Computer Modern Typefaces. Using an appropriate MFT style file, it is also possible to configure MFT for typesetting MetaPost sources. However, MFT does not search the usual places for MetaPost input files.

If you use eight-bit characters in the input file, they are passed on verbatim to the TeX output file; it is up to you to configure TeX to print these properly.


Go to the first, previous, next, last section, table of contents.