FMTUTIL(1)
π fmtutil(1) β the User Commands girlies π
okay so real talk: this is the fmtutil family of scripts, living in the User Commands section of your manual, and it's about to become your new hyperfixation. buckle up π
β¨ NAME β¨
fmtutilβ manage TeX formats and Metafont bases, per-user π«Άfmtutil-sysβ manage TeX formats and Metafont bases, system-wide πmktexfmtβ create a TeX format or Metafont base πΈ
π¦ SYNOPSIS π¦
fmtutil [-user|-sys] [OPTION] ... [COMMAND]
fmtutil-sys [OPTION] ... [COMMAND]
fmtutil-user [OPTION] ... [COMMAND]
mktexfmt FORMAT.fmt|BASE.base|FMTNAME
π DESCRIPTION π
this is fmtutil version r71424 (2024-06-04 12:25:53 +0200), no cap, that's literally the version string β¨
so what does it do? it rebuilds and manages TeX fmts and Metafont bases, and everybody just collectively calls them "formats" here, that's the vibe. (MetaPost no longer uses the past-equivalent "mems", so don't come at me with that, it's giving retired π)
here's the rules of the game, bestie:
- if you're not operating in mktexfmt mode, exactly one command must be given β one, not two, not zero, we're not doing that today π
- filename suffixes should generally not be specified
- no non-option arguments are allowed
- and multiple formats can be generated β slay, multitasking π
if the command name ends in mktexfmt, though, only one format can be created. the only options supported are --help and --version, and the command line must be either a format name, with extension, or a plain name that is passed as the argument to --byfmt (see below, it's down there β¬οΈ). the full name of the generated file (if any) is written to stdout, and nothing else β stdout gets the filename and nothing but the filename, main character energy only. the system directories are used if they are writable, else the user directories.
by default, the return status is zero if all formats requested are successfully built, else nonzero. periodt. π―
π OPTIONS π
--sysβ useTEXMFSYS{VAR,CONFIG}π--userβ useTEXMF{VAR,CONFIG}π«Ά--cnffileFILE β read FILE instead offmtutil.cnf. and yes it can be given multiple times, in which case all the files are used, we love a repeatable option β¨--dry-run,-nβ don't actually build formts. (yes "formts", that's literally how it's spelled in the source, we're keeping it, it's iconic π)--fmtdirDIR β write formats under DIR instead ofTEXMF[SYS]VAR--no-engine-subdirβ don't use engine-specific subdir of the fmtdir--no-error-if-no-formatβ exit successfully if no format is selected--no-error-if-no-engine=ENGINE1,ENGINE2,...β exit successfully even if a required ENGINE is missing, if it is included in the list--no-strictβ exit successfully even if a format fails to build (we're being chill about it, we're healing π)--nohashβ don't updatels-Rfiles--recorderβ pass the-recorderoption and save.flsfiles--refreshβ recreate only existing format files--status-fileFILE β append status information about built formats to FILE--quietβ be silent π€«--catcfgβ (does nothing, exists for compatibility)--dolinksβ (does nothing, exists for compatibility)--forceβ (does nothing, exists for compatibility)--testβ (does nothing, exists for compatibility)
lowkey obsessed with the little compatibility squad at the bottom who do absolutely nothing but are still invited to the party π«Ά
π― Commands (exactly one must be specified):
--allβ recreate all format files--missingβ create all missing format files--byengineENGINE β (re)create formats built with ENGINE--byfmtFORMAT β (re)create format FORMAT--byhyphenHYPHENFILE β (re)create formats that depend on HYPHENFILE--enablefmtFORMAT[/ENGINE] β enable FORMAT, as built with ENGINE--disablefmtFORMAT[/ENGINE] β disable FORMAT, as built with ENGINE. if multiple formats have the same name and different engines, the/ENGINEspecifier is required β no guessing, bestie, you gotta say which one π--listcfgβ list (enabled and disabled) configurations, filtered to available formats--showhyphenFORMAT β print name of hyphen file for FORMAT--versionβ show version information and exit--helpβ show this message and exit
πΏ ENVIRONMENT πΏ
explanation of trees and files normally used π§
if --cnffile is specified on the command line (possibly multiple times), its value(s) are used. otherwise, fmtutil reads all the fmtutil.cnf files found by running kpsewhich -all fmtutil.cnf, in the order returned by kpsewhich. files specified via --cnffile are first tried to be loaded directly, and if not found and the file names don't contain directory parts, are searched via kpsewhich.
in any case, if multiple fmtutil.cnf files are found, all the format definitions found in all the fmtutil.cnf files are merged. it's a whole group chat of config files, everybody gets to speak π
thus, if fmtutil.cnf files are present in all trees, and the default layout is used as shipped with TeX Live, the following files are read, in the given order.
for fmtutil-sys:
TEXMFSYSCONFIG $TEXLIVE/YYYY/texmf-config/web2c/fmtutil.cnf
TEXMFSYSVAR $TEXLIVE/YYYY/texmf-var/web2c/fmtutil.cnf
TEXMFLOCAL $TEXLIVE/texmf-local/web2c/fmtutil.cnf
TEXMFDIST $TEXLIVE/YYYY/texmf-dist/web2c/fmtutil.cnf
for fmtutil-user:
TEXMFCONFIG $HOME/.texliveYYYY/texmf-config/web2c/fmtutil.cnf
TEXMFVAR $HOME/.texliveYYYY/texmf-var/web2c/fmtutil.cnf
TEXMFHOME $HOME/texmf/web2c/fmtutil.cnf
TEXMFSYSCONFIG $TEXLIVE/YYYY/texmf-config/web2c/fmtutil.cnf
TEXMFSYSVAR $TEXLIVE/YYYY/texmf-var/web2c/fmtutil.cnf
TEXMFLOCAL $TEXLIVE/texmf-local/web2c/fmtutil.cnf
TEXMFDIST $TEXLIVE/YYYY/texmf-dist/web2c/fmtutil.cnf
(where YYYY is the TeX Live release version, okay, that's what the placeholder means, iykyk π)
according to the actions, fmtutil might update one of the existing cnf files or create a new fmtutil.cnf, as described below. β¬οΈ
where format files are written ποΈ
by default, format files are (re)written in $TEXMFSYSVAR/ENGINE by fmtutil-sys, and $TEXMFVAR/ENGINE by fmtutil-user, where /ENGINE is a subdirectory named for the engine used, such as "pdftex".
for mktexfmt, TEXMFSYSVAR is used if it is writable, else TEXMFVAR.
if the --fmtdir=DIR option is specified, DIR is used instead of TEXMF[SYS]VAR, but the /ENGINE subdir is still used by default.
in all cases, if the --no-engine-subdir option is specified, the /ENGINE subdir is omitted. bye subdir π¨
where configuration changes are saved πΎ
if config files are given on the command line, then the first one given will be used to save any changes from --enable or --disable.
if the config files are taken from kpsewhich output, then the algorithm is more complicated β not me explaining this, but here we go:
- if
$TEXMFCONFIG/web2c/fmtutil.cnfor$TEXMFHOME/web2c/fmtutil.cnfappears in the list of used files, then the one listed first bykpsewhich --all(equivalently, the one returned by"kpsewhich fmtutil.cnf"), is used. - if neither of the above two are present and changes are made, a new config file is created in
$TEXMFCONFIG/web2c/fmtutil.cnf.
in general, the idea is that if a given config file is not writable, a higher-level one can be used. that way, the distribution's settings can be overridden system-wide using TEXMFLOCAL, and system settings can be overridden again in a particular user's TEXMFHOME or TEXMFCONF. it's the circle of configs π«
resolving multiple definitions of a format π₯
if a format is defined in more than one config file, then the definition coming from the first-listed fmtutil.cnf is used. first come, first served, no drama π
disabling formats π«
fmtutil.cnf files with higher priority (listed earlier) can disable formats in lower priority (listed later) fmtutil.cnf files by writing a line like this in the higher-priority fmtutil.cnf file:
#! <fmtname> <enginename> <hyphen> <args>
the #! must be at the beginning of the line, with at least one space or tab afterward, and there must be whitespace between each word on the list. rules are rules, bestie, the parser is not flexible π
for example, you can disable the luajitlatex format by creating the file $TEXMFCONFIG/web2c/fmtutil.cnf with the line
#! luajitlatex luajittex language.dat,language.dat.lua lualatex.ini
(as it happens, the luajittex-related formats are precisely why the --no-error-if-no-engine option exists, since luajittex cannot be compiled on all platforms. so this is not needed.) cute lore drop, honestly π
fmtutil-user (fmtutil -user) vs. fmtutil-sys (fmtutil -sys) βοΈ
when fmtutil-sys is run or the command line option -sys is used, TEXMFSYSCONFIG and TEXMFSYSVAR are used instead of TEXMFCONFIG and TEXMFVAR, respectively. this is the primary difference between fmtutil-sys and fmtutil-user. that's it. that's the whole beef π₯
see https://tug.org/texlive/scripts-sys-user.html for details.
other locations may be used if you give them on the command line, or these trees don't exist, or you are not using the original TeX Live. flexibility is the moment β¨
supporting development binaries π§ͺ
if an engine name ends with "-dev", formats are created in the respective directory with the -dev stripped. this allows for easily running development binaries in parallel with the released binaries. parallel play but make it TeX π
πΏ ENVIRONMENT πΏ (round two, bestie)
this script runs TeX and Metafont to generate the fmt/base file, and thus all normal environment variables and search path rules for TeX/MF apply. so like, yes, your env vars matter here, they always did πΈ
π REPORTING BUGS π
got beef with a bug? don't suffer in silence, tell the group chat π
- Report bugs to:
tex-live@tug.org - TeX Live home page:
https://tug.org/texlive/
okay that's the whole page!! this was TeX Live, dated February 2025, FMTUTIL(1), and honestly? she ate. go build yourself a format, bestie, you've earned it ππβ¨
π¦ 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