{
    "mode": "info",
    "parameter": "mft",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/mft/json",
    "generated": "2026-08-01T15:11:13Z",
    "sections": {
        "File: web2c.info,  Node: mft invocation,  Prev: gftodvi invocation,  Up: Metafont": {
            "content": "",
            "subsections": [
                {
                    "name": "6.6 MFT: Prettyprinting Metafont source",
                    "content": "MFT translates a Metafont program into a TeX document suitable for\ntypesetting, with the aid of TeX macros defined in the file\n'mftmac.tex'.  Synopsis:\n\nmft [OPTION]... MFNAME[.mf]\n\nMFT searches the usual places for MFNAME (*note (kpathsea)Supported\nfile formats::).  To see all the relevant paths, set the environment\nvariable 'KPATHSEADEBUG' to '-1' before running the program.  The\noutput goes to the basename of MFNAME extended with '.tex', e.g., 'mft\n/wherever/foo.mf' creates './foo.tex'.\n\nLine breaks in the input are carried over into the output; moreover,\nblank spaces at the beginning of a line are converted to quads of\nindentation in the output.  Thus, you have full control over the\nindentation and line breaks.  Each line of input is translated\nindependently of the others.\n\nFurther control is allowed via Metafont comments:\n* Metafont comments following a single '%' should be valid TeX input.\nBut Metafont material can be included within vertical bars in a\ncomment; this will be translated by MFT as if it were regular\nMetafont code.  For example, a comment like '% |x2r| is the tip of\nthe bowl' will be translated into the TeX '% $x{2r}$ is the ...',\ni.e., the 'x2r' is treated as an identifier.\n\n* '%%' indicates that the remainder of an input line should be copied\nverbatim to the output.  This is typically used to introduce\nadditional TeX material at the beginning or an MFT job, e.g.  code\nto modify the standard layout or the formatting macros defined in\n'mftmac.tex', or to add a line saying '%%\\bye' at the end of the\njob.  (MFT doesn't add this automatically in order to allow\nprocessing several files produces by MFT in the same TeX job.)\n\n* '%%% TOKEN1 OTHER-TOKENS' introduces a change in MFT's formatting\nrules; all the OTHER-TOKENS will henceforth be translated according\nto the current conventions for TOKEN1.  The tokens must be symbolic\n(i.e., not numeric or string tokens).  For example, the input line\n%%% addto fill draw filldraw\nsays to format the 'fill', 'draw', and 'filldraw' operations of\nplain Metafont just like the primitive token 'addto', i.e., in\nboldface type.  Without such reformatting commands, MFT would treat\n'fill' like an ordinary tag or variable name.  In fact, you need a\n'%%%' command even to get parentheses to act like delimiters.\n\n* '%%%%' introduces an MFT comment, i.e., MFT ignores the remainder\nof such a line.\n\n* Five or more '%' signs should not be used.\n\n(The above description was edited from 'mft.web', written by\nD.E. Knuth.)\n\nThe program accepts the following options, as well as the standard\n'-help' and '-version' (*note Common options::):\n'-change=CHFILE[.ch]'\nApply the change file CHFILE as with Tangle and Weave (*note\nWEB::).\n\n'-style=MFTFILE[.mft]'\nRead MFTFILE before anything else; a MFT style file typically\ncontains only MFT directives as described above.  The default style\nfile is named 'plain.mft', which defines this properly for programs\nusing plain Metafont.  The MFT files is searched along the\n'MFTINPUTS' path; see *note (kpathsea)Supported file formats::.\n\nOther examples of MFT style files are 'cmbase.mft', which defines\nformatting rules for the macros defined in 'cm.base', and 'e.mft',\nwhich was used in the production of Knuth's Volume E, 'Computer\nModern Typefaces'.\n\nUsing an appropriate MFT style file, it is also possible to\nconfigure MFT for typesetting MetaPost sources.  However, MFT does\nnot search the usual places for MetaPost input files.\n\nIf you use eight-bit characters in the input file, they are passed on\nverbatim to the TeX output file; it is up to you to configure TeX to\nprint these properly.\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}