# mktexfmt - create a TeX format or Metafont base - man(1) - [phpMan]

> **TLDR:** Create a TeX format or Metafont base.
>
- Create a format:
  `mktexfmt {{format}}`
- Display help:
  `mktexfmt --help`
- Display version:
  `mktexfmt --version`

*Source: tldr-pages*

---

[_FMTUTIL_(1)](https://www.chedong.com/phpMan.php/man/FMTUTIL/1/markdown)                                  User Commands                                 [_FMTUTIL_(1)](https://www.chedong.com/phpMan.php/man/FMTUTIL/1/markdown)

## 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
       fmtutil version r60154 (2021-08-03 23:55:56 +0200)

       Rebuild and manage TeX fmts and Metafont bases, collectively called "formats" here. (MetaPost
       no longer uses the past-equivalent "mems".)

       If  not  operating  in  mktexfmt  mode,  exactly one command must be given, filename suffixes
       should generally not be specified, no non-option arguments are allowed, and multiple  formats
       can be generated.

       If  the command name ends in mktexfmt, only one format can be created.  The only options sup‐
       ported are **--help **and **--version**, and the command line must be either a format name, with  ex‐
       tension,  or  a  plain  name that is passed as the argument to **--byfmt **(see below).  The full
       name of the generated file (if any) is written to stdout, and nothing else.  The  system  di‐
       rectories 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.

## OPTIONS
       **--sys  **use TEXMFSYS{VAR,CONFIG}

       **--user **use TEXMF{VAR,CONFIG}

       **--cnffile **FILE
              read FILE instead of fmtutil.cnf (can be given multiple times, in which case  all  the
              files are used)

       **--dry-run**, **-n**
              don't actually build formts

       **--fmtdir **DIR
              write formats under DIR instead of TEXMF[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

### --nohash
              don't update ls-R files

### --recorder
              pass the **-recorder **option and save .fls files

### --refresh
              recreate only existing format files

       **--status-file **FILE
              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)

### Commands:
       **--all  **recreate all format files

### --missing
              create all missing format files

       **--byengine **ENGINE
              (re)create formats built with ENGINE

       **--byfmt **FORMAT
              (re)create format FORMAT

       **--byhyphen **HYPHENFILE
              (re)create formats that depend on HYPHENFILE

### --enablefmt
              FORMAT[/ENGINE]  enable FORMAT, as built with ENGINE

       **--disablefmt **FORMAT[/ENGINE]
              disable FORMAT, as built with ENGINE If multiple formats have the same name and

              different engines, _/ENGINE_ specifier is required.

### --listcfg
              list (enabled and disabled) configurations, filtered to available formats

       **--showhyphen **FORMAT
              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  "kpse‐
              which  **-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.

              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).

              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.

       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  com‐
              plicated:

              1)  If  _$TEXMFCONFIG/web2c/fmtutil.cnf_  or _$TEXMFHOME/web2c/fmtutil.cnf_ appears in the
              list of used files, then the one listed first by kpsewhich  **--all  **(equivalently,  the
              one returned by "kpsewhich fmtutil.cnf"), is used.

              2)  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.

       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.

       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.

              For example, you can disable the luajitlatex format by creating  the  file  _$TEXMFCON‐_
              _FIG/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-er‐**
              **ror-if-no-engine **option exists, since luajittex cannot be compiled on  all  platforms.
              So this is not needed.)

       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.

              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.

       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 paral‐
              lel with the released binaries.

## REPORTING BUGS
       Report bugs to: <tex-live@tug.org>
       TeX Live home page: <<https://tug.org/texlive/>>

TeX Live                                     March 2022                                   [_FMTUTIL_(1)](https://www.chedong.com/phpMan.php/man/FMTUTIL/1/markdown)
