MFT(1)

✨ MFT β€” ok so bestie, let's talk about the Metafont-to-TeX glow-up ✨

This is mft, from section 1 of the General Commands Manual, and it's giving ✨typesetting fairy godmother✨ energy.


🌸 NAME 🌸

mft β€” translate Metafont or MetaPost code to TeX code for prettyprinting πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

mft [OPTIONS] mf_file_name[.mf|.mp]

πŸ’… DESCRIPTION πŸ’…

Okay so real talk first: this manual page is not meant to be exhaustive, bestie. The complete documentation for this version of TeX lives in the info file, or in the manual Web2C: A TeX implementation. So like, this is the vibe summary, not the whole syllabus πŸ“š

The mft program creates a TeX file from a Metafont or MetaPost program. And the way it just handles typographic details? Page layout, indentation, italics, boldface, etc. β€” all of it, no notes. It's literally illustrated in the book Computer Modern Typefaces, that's how serious this is πŸ‘‘

Also there are special conventions in Metafont and MetaPost comments that let you control things that would not otherwise come out right. If you wanna know those rules, section 1 of the MFT source program in the Metafontware report explains them. iykyk 🫢

Now, the plot: mft uses an optional change file (which works just as the change files to tangle(1) and weave(1) do β€” same energy, different program) and one or several style files, which get prepended to everything. Like, everything everything.

If no style file is specified, the style file plain.mft for Metafont (or mplain.mft for MetaPost) is automatically used. No stress, it's got a default 🌈

The mf_file_name, optional change_file_name, and style_file_name 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. So set them or don't, either way it'll figure it out πŸ’«

And the output TeX file name? Formed by using .tex in place of the extension of mf_file_name. Simple. Clean. Iconic. ✨


πŸ”₯ OPTIONS πŸ”₯

  • -change=change_file_name[.ch] β€” Apply the change file change_file_name to mf_file_name. Glow-up via patch file, basically πŸ’…
  • -metapost β€” Assume mf_file_name is a MetaPost source file. (This is the default if mf_file_name has the extension .mp β€” it just knows.)
  • -style=style_file_name[.mft] β€” Use the style file style_file_name instead of plain.mft (or mplain.mft). And bestie β€” this option can be given more than once, so stack those styles, go off πŸ‘‘

πŸ¦‹ FILES πŸ¦‹

  • mftmac.tex β€” TeX macros used by mft output. The scaffolding behind the slay πŸ—οΈ
  • plain.mft, mplain.mft β€” Default style files. The default besties πŸ’œ
  • cmbase.mft β€” Style file for Computer Modern. Fancy πŸ’…

🌈 SEE ALSO 🌈

  • mf(1), weave(1)
  • Donald E. Knuth, Computer Modern Typefaces (Volume E of Computers and Typesetting), Addison-Wesley, 1986, ISBN 0-201-13446-2
  • Donald E. Knuth et al., Metafontware

πŸ‘‘ AUTHORS πŸ‘‘

Donald E. Knuth wrote the program β€” main character behavior fr fr β€” and he ported it to Unix with the help of Pierre MacKay and the Unix port of weave by Howard Trickey and Pavel Curtis. The program is published in the Metafontware technical report, available from the TeX Users Group 🫢


πŸ’€ quick vibe check: this page is a summary only, not the exhaustive docs. For the full lore, hit the info file or Web2C: A TeX implementation. And for the comment conventions that fix stuff that "would not otherwise come out right," section 1 of the MFT source program in Metafontware is the receipt. 🧚

okay that's the whole page, mwah πŸ’– this was Web2C 2025, dated 27 May 2018 β€” slay, bye bestie! βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from