MFT(1)

πŸ“¦ version 2026.0, in alpine 3.24

πŸ’… 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 of plain.mft or mplain.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 from mft for 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 πŸ‘‘

mf(1), mpost(1), weave(1).

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