FMTUTIL(1)
π NAME π
okay bestie, this is the FMTUTIL(1) page from the User Commands section π§ it covers three names that all do format stuff β¨
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 π
okay so the version here is fmtutil version r68962 (2023-11-25 00:01:43 +0100) π
This tool rebuilds and manages TeX fmts and Metafont bases. we call them all "formats" here, no cap π (MetaPost doesn't use the old "mems" anymore, that's so last season π)
If you're not in mktexfmt mode, you need exactly one command. filename suffixes should generally be left off, no non-option arguments are allowed, and you're allowed to generate multiple formats at once β¨
If the command name ends in mktexfmt, only one format can be created π The only options it supports are --help and --version. Your command line has to be either a format name with its extension, or a plain name that gets passed as the argument to --byfmt (more on that below). The full name of the generated file (if any) gets written to stdout, and nothing else π«Ά It uses the system directories if they're writable, otherwise the user directories.
By default, the return status is zero if every requested format builds successfully, and nonzero if not π₯Ί
πΈ OPTIONS πΈ
--sysβ useTEXMFSYS{VAR,CONFIG}π--userβ useTEXMF{VAR,CONFIG}π--cnffile FILEβ readFILEinstead offmtutil.cnf. you can give it multiple times, and then all the files get used π§--dry-run,-nβ don't actually build the formats π--fmtdir DIRβ write formats underDIRinstead ofTEXMF[SYS]VARπ¦--no-engine-subdirβ don't use the 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 requiredENGINEis missing, as long as it's in the list β¨--no-strictβ exit successfully even if a format fails to build πΈ--nohashβ don't updatels-Rfiles π--recorderβ pass the-recorderoption and save.flsfiles π--refreshβ only recreate format files that already exist π--status-file FILEβ append status info about built formats toFILEπ--quietβ be silent π€«--catcfgβ (does nothing, only here for compatibility) π«--dolinksβ (does nothing, only here for compatibility) π«--forceβ (does nothing, only here for compatibility) π«--testβ (does nothing, only here for compatibility) π«--versionβ show version info and exit π--helpβ show this message and exit π
π Commands (exactly one must be specified): π
--allβ recreate all format files π₯--missingβ create all the missing format files π--byengine ENGINEβ (re)create formats built withENGINEβ¨--byfmt FORMATβ (re)create formatFORMATπ¦--byhyphen HYPHENFILEβ (re)create formats that depend onHYPHENFILEπ§--enablefmt FORMAT[/ENGINE]β enableFORMAT, as built withENGINEπ--disablefmt FORMAT[/ENGINE]β disableFORMAT, as built withENGINE. if multiple formats share the same name but use different engines, you need the/ENGINEspecifier π--listcfgβ list the (enabled and disabled) configurations, filtered down to the formats that are actually available π--showhyphen FORMATβ print the name of the hyphen file forFORMATπ
π ENVIRONMENT π
πΊοΈ Explanation of trees and files normally used: πΊοΈ
okay so if you pass --cnffile on the command line (once or several times), those values are what get used. otherwise, fmtutil reads every fmtutil.cnf file that kpsewhich -all fmtutil.cnf finds, in whatever order kpsewhich returns them π§ Files given through --cnffile get loaded directly first, and if they aren't found and their names don't include directory parts, they get searched for via kpsewhich π
Either way, if there are multiple fmtutil.cnf files, all the format definitions from all of them get merged π«Ά
So if fmtutil.cnf files exist in every tree and you're using the default layout that ships with TeX Live, these are read, in this 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 πΈ)
depending on the action, fmtutil might update one of the existing cnf files or make a brand new fmtutil.cnf, as described below β¨
π Where format files are written: π
by default, format files get (re)written in $TEXMFSYSVAR/ENGINE by fmtutil-sys, and in $TEXMFVAR/ENGINE by fmtutil-user. the /ENGINE part is a subdirectory named after the engine used, like pdftex π¦
for mktexfmt, TEXMFSYSVAR gets used if it's writable, otherwise TEXMFVAR π§
if you pass --fmtdir=DIR, then DIR is used instead of TEXMF[SYS]VAR, but the /ENGINE subdir still gets used by default π
in every case, if you pass --no-engine-subdir, the /ENGINE subdir gets left out π
πΎ Where configuration changes are saved: πΎ
if config files are given on the command line, the first one given is where any changes from --enable or --disable get saved π«Ά
if the config files come from kpsewhich output, it gets a little more complicated π₯Ί
- if
$TEXMFCONFIG/web2c/fmtutil.cnfor$TEXMFHOME/web2c/fmtutil.cnfshows up in the list of used files, then the one listed first bykpsewhich --all(aka the one returned by"kpsewhich fmtutil.cnf") gets used π - if neither of those is present and changes are made, a new config file gets created at
$TEXMFCONFIG/web2c/fmtutil.cnfβ¨
the big idea is this: if a config file isn't writable, a higher-level one can be used instead π 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 π
π₯ Resolving multiple definitions of a format: π₯
if a format is defined in more than one config file, the definition from the first-listed fmtutil.cnf wins π₯
π« Disabling formats: π«
fmtutil.cnf files with higher priority (listed earlier) can disable formats in lower-priority (listed later) fmtutil.cnf files. to do it, write a line like this in the higher-priority file:
#! <fmtname> <enginename> <hyphen> <args>
the #! has to be at the very start of the line, with at least one space or tab after it, and there has to be whitespace between each word in the list π§
for example, you can disable the luajitlatex format by creating $TEXMFCONFIG/web2c/fmtutil.cnf with this line:
#! luajitlatex luajittex language.dat,language.dat.lua lualatex.ini
(ngl the luajittex formats are exactly why --no-error-if-no-engine exists, since luajittex can't be compiled everywhere. so you don't need the line above π)
π― fmtutil-user (fmtutil -user) vs. fmtutil-sys (fmtutil -sys): π―
when fmtutil-sys runs, or you use the -sys option, TEXMFSYSCONFIG and TEXMFSYSVAR get used instead of TEXMFCONFIG and TEXMFVAR. that's the main difference between fmtutil-sys and fmtutil-user π
check https://tug.org/texlive/scripts-sys-user.html for the deets π
other locations might get used if you pass them on the command line, if these trees don't exist, or if you aren't using the original TeX Live πΈ
π οΈ Supporting development binaries: π οΈ
if an engine name ends in -dev, formats get created in the matching directory with the -dev stripped off. this means you can run development binaries side by side with the released ones π₯
π ENVIRONMENT π
this script runs TeX and Metafont to generate the fmt/base file, so all the normal environment variables and search path rules for TeX/MF apply π«Ά
π REPORTING BUGS π
report bugs to: tex-live@tug.org π TeX Live home page: <https://tug.org/texlive/> π
Bye bestie! This was the TeX Live February 2024 build of FMTUTIL(1) π¦πβ¨
π¦ where this page comes from
- centos-stream 10: texlive-texlive-scripts 13:20240311-6.el10 Β· LPPL-1.3c
- debian trixie: texlive-base 2024.20250309-1
- fedora 44: texlive-texlive-scripts 12:svn78361-105.fc44 Β· LPPL-1.3c
- fedora 44: texlive-texlive-scripts 12:svn78361-111.fc44 Β· LPPL-1.3c
- opensuse-leap 16.0: texlive-scripts-doc 2025.221.svn74474-160000.3.1 Β· LPPL-1.0
- ubuntu questing: texlive-base 2024.20250309-1
- ubuntu resolute: texlive-base 2025.20260124-1
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms