MFT(1)
π MFT(1) β like, the Metafont/MetaPost prettyprinter, bestie
okay so this is a page from the General Commands Manual and honestly? it's a whole vibe. buckle up π
β¨ NAME β¨
mft β translate Metafont or MetaPost code to TeX for prettyprinting π¦
πΈ SYNOPSIS πΈ
mft [options] source_file[.mf|.mp]
π DESCRIPTION π
okay so mft literally creates a TeX file out of a Metafont or MetaPost program. and it's not just dumping your code in there β it takes appropriate care of all the typographic details, like page layout, indentation, italics, boldface, all of it. it's giving glow-up, and it's exactly what's illustrated in the book Computer Modern Typefaces by Donald Knuth. iconic behavior π
there are also special conventions in Metafont and MetaPost comments that let you control things that would not otherwise come out right. iykyk. section 1 of the mft source program and the mft section in the Web2C manual explain these rules β go read them if you want the full tea β
mft uses an optional change file (which works just as the change files to tangle(1) and weave(1) do) and one or several style files (which are prepended to everything). if no style file is specified, the style file plain.mft for Metafont, or mplain.mft for MetaPost, is used. these files are specified via the options below π
the source_file, as well as any change and style files, are searched for using the MFINPUTS (for Metafont) or MPINPUTS (for MetaPost) and MFTINPUTS environment variables if you have set them, or else the corresponding system defaults. no cap π
the output TeX file name is formed by using .tex in place of the extension of source_file. slay π
π OPTIONS π
see tex(1) for details of command-line parsing. very much a "read the other page" moment but okay π«Ά
-change=change_file[.ch]β apply the change file change_file to mf_file. π-metapostβ consider source_file to be a MetaPost source file; this is the default if mf_file has the extension.mp. lowkey convenient β¨-style=style_file[.mft]β use the style file style_file instead ofplain.mftormplain.mft; this option can be given more than once. stack 'em, bestie π
the standard -help and -version options are also supported. of course they are π
π¦ FILES π¦
mftmac.tex,mptmac.texβ TeX macros used by the output frommftfor Metafont and MetaPost input, respectively.plain.mft,mplain.mftβ default style files. the ones you get when you don't ask for anything πΈcmbase.mftβ style file for Computer Modern.e.mftβ style file for Knuth's Volume E: Computer Modern Typefaces.
π SEE ALSO π
Donald E. Knuth, Computer Modern Typefaces (Volume E of Computers & Typesetting).
Donald E. Knuth et al., Metafontware.
Package page on CTAN: https://ctan.org/pkg/mft
Section in the Web2c manual: https://tug.org/texinfohtml/web2c.html#mft-invocation
Typeset source code, including the typesetting controls: https://ctan.org/pkg/knuth-pdf
π AUTHORS π
Donald E. Knuth wrote and still maintains the program. he ported it to Unix with the help of Pierre MacKay and the Unix port of weave by Howard Trickey and Pavel Curtis. legends, all of them π
Public discussion list and bug reports: https://lists.tug.org/tex-k
okay that's the whole page, no skips, no summaries, we ate and left no crumbs π§
sign-off era: this gorgeous thing is from Web2C 2026, dated 7 January 2026. take care of her, she's been around since forever and she's still serving πβ
π¦ where this page comes from
- alpine 3.24: texmf-dist-doc 2026.0-r0 Β· LPPL-1.0 AND LPPL-1.1 AND LPPL-1.2 AND LPPL-1.3a AND LPPL-1.3c AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms