# man > luatex(1)

[_LUATEX_(1)](https://www.chedong.com/phpMan.php/man/LUATEX/1/markdown)                              General Commands Manual                             [_LUATEX_(1)](https://www.chedong.com/phpMan.php/man/LUATEX/1/markdown)

## NAME
       luatex,  dviluatex,  luahbtex,  luajittex, texlua, texluac - An extended version of TeX using
       Lua as an embedded scripting language

## SYNOPSIS
       **luatex **[**--lua=_**FILE_] [_OPTION_]...  [_TEXNAME_[**.tex**]] [_COMMANDS_]
       **luatex **[**--lua=_**FILE_] [_OPTION_]...  **\_**FIRST-LINE_
       **luatex **[**--lua=_**FILE_] [_OPTION_]...  **&_**FMT_ [_ARGS_]

## DESCRIPTION
       Run the luaTeX typesetter on _TEXNAME_, usually creating _TEXNAME_**.pdf**.  Any  remaining  _COMMANDS_
       are processed as luaTeX input, after _TEXNAME_ is read.

       Alternatively,  if  the  first  non-option  argument  begins  with a backslash, interpret all
       non-option arguments as a line of luaTeX input.

       Alternatively, if the first non-option argument begins with a **&**, the next word  is  taken  as
       the _FMT_ to read, overriding all else.  Any remaining arguments are processed as above.

       If no arguments or options are specified, prompt for input.

       If  called  as  **texlua  **it  acts as a Lua interpreter.  If called as **texluac **it acts as a Lua
       bytecode compiler.

       LuaTeX began as an extended version of pdfTeX with Unicode and OpenType font support,  embed‐
       ded **Lua **scripting language, the **e-TeX **and **Omega **extensions, as well as an integrated MetaPost
       engine,  that  can create _PDF_ files as well as _DVI_ files.  For more information about luatex,
       see <http://www.luatex.org>; and you can read the LuaTeX manual using the texdoc utility  (**tex‐**
       **doc luatex**).

       All  LuaTeX  text input and output is considered to be Unicode text, although various filters
       make it possible to support any encoding.

       In _DVI_ mode, LuaTeX can be used as a complete replacement for the TeX engine.

       In _PDF_ mode, LuaTeX can natively handle the _PDF_, _JPG_, _JBIG2_, and _PNG_ graphics formats.   Lua‐
       TeX  cannot include PostScript or Encapsulated PostScript (EPS) graphics files; first convert
       them to PDF using [**epstopdf**(1)](https://www.chedong.com/phpMan.php/man/epstopdf/1/markdown).

       The luajittex variant includes the Lua just-in-time compiler.

       The luahbtex variant can use the HarfBuzz engine  for  glyph  shaping,  instead  of  LuaTeX's
       built-in shaper.


## OPTIONS
       When  the  LuaTeX executable starts, it looks for the **--lua **command-line option.  If there is
       no **--lua **option, the command line is interpreted in a similar fashion as in traditional  pdf‐
       TeX  and  Aleph.  But if the option is present, LuaTeX will enter an alternative mode of com‐
       mand-line parsing in comparison to the standard web2c programs.  The presence of **--lua  **makes
       most  of  other  options unreliable, because the lua initialization file can disable kpathsea
       and/or hook functions into various callbacks.

       **--lua=_**FILE_
              The lua initialization file.

       The following two options alter the executable behaviour:

### --luaonly
              Start LuaTeX as a Lua interpreter.  In this mode, it will  set  Lua's  _arg[0]_  to  the
              found  script  name,  pushing preceding options in negative values and the rest of the
              command line in the positive values, just like the Lua interpreter.  LuaTeX will  exit
              immediately after executing the specified Lua script.

### --luaconly
              Start  LuaTeX  as a Lua byte compiler.  In this mode, LuaTeX is exactly like **luac **from
              the standalone Lua distribution, except that it does not have the **-l **switch, and  that
              it accepts (but ignores) the **--luaconly **switch.

       Then the regular web2c options:

### --debug-format
              Debug format loading.

### --draftmode
              Sets \pdfdraftmode so luaTeX doesn't write a PDF and doesn't read any included images,
              thus speeding up execution.

### --enable-write18
              Synonym for **--shell-escape**.

### --disable-write18
              Synonym for **--no-shell-escape**.

### --shell-escape
              Enable  the  **\write18{_**command_**}  **construct,  and Lua functions **os.execute()**, **os.exec()**,
              **os.spawn()**, and **io.popen()**.  The _command_ can be any shell command.  This construct  is
              normally disallowed for security reasons.

### --no-shell-escape
              Disable the **\write18{_**command_**} **construct and the other Lua functions, even if it is en‐
              abled in the _texmf.cnf_ file.

### --shell-restricted
              Enable  restricted  version  of  **\write18**,  **os.execute()**,  **os.exec()**,  **os.spawn()**, and
              **io.popen()**, only commands listed in _texmf.cnf_ file are allowed.

### --file-line-error
              Print error messages in the form _file:line:error_ which is similar to the way many com‐
              pilers format them.

### --no-file-line-error
              Disable printing error messages in the _file:line:error_ style.

       **--fmt=_**FORMAT_
              Use _FORMAT_ as the name of the format to be used, instead of the name by  which  luaTeX
              was called or a _%&_ line.

       **--help **Print help message and exit.

       **--ini  **Start  in _INI_ mode, which is used to dump formats.  The _INI_ mode can be used for type‐
              setting, but no format is preloaded, and basic initializations like  setting  catcodes
              may be required.

       **--interaction=_**MODE_
              Sets the interaction mode.  The _MODE_ can be either _batchmode_, _nonstopmode_, _scrollmode_,
              and  _errorstopmode_.  The meaning of these modes is the same as that of the correspond‐
              ing \commands.

       **--jobname=_**NAME_
              Use _NAME_ for the job name, instead of deriving it from the name of the input file.

       **--kpathsea-debug=_**BITMASK_
              Sets path searching debugging flags according to the _BITMASK_.  See the _Kpathsea_ manual
              for details.

       **--mktex=_**FMT_
              Enable mktex_FMT_ generation, where _FMT_ must be either _tex_ or _tfm_.

### --nosocket
              Disable the luasocket (network) library.

       **--output-comment=_**STRING_
              In _DVI_ mode, use _STRING_ for the _DVI_ file comment instead of the date.  This option  is
              ignored in_PDF_ mode.

       **--output-directory=_**DIRECTORY_
              Write output files in _DIRECTORY_ instead of the current directory.  Look up input files
              in _DIRECTORY_ first, then along the normal search path.

       **--output-format=_**FORMAT_
              Set  the output format mode, where _FORMAT_ must be either _pdf_ or _dvi_.  This also influ‐
              ences the set of graphics formats understood by luaTeX.

       **--progname=_**NAME_
              Pretend to be program _NAME_ (only for kpathsea).

### --recorder
              Enable the filename recorder.  This leaves a trace of the files opened for  input  and
              output in a file with extension _.fls_.

### --safer
              Disable some Lua commands that can easily be abused by a malicious document.

       **--synctex=_**NUMBER_
              Enable/disable SyncTeX extension.

### --version
              Print version information and exit.

### --credits
              Print credits and version details.

       The following options are ignored:

       **--8bit**, **--etex**, **--parse-first-line**, **--no-parse-first-line**
              These are always on.

       **--default-translate-file=_**TCXNAME_, **--translate-file=_**TCXNAME_
              These are always off.


## SEE ALSO
       [**pdftex**(1)](https://www.chedong.com/phpMan.php/man/pdftex/1/markdown), [**etex**(1)](https://www.chedong.com/phpMan.php/man/etex/1/markdown), [**aleph**(1)](https://www.chedong.com/phpMan.php/man/aleph/1/markdown), [**lua**(1)](https://www.chedong.com/phpMan.php/man/lua/1/markdown).

## AUTHORS
       The  primary  authors  of  LuaTeX  are  Taco Hoekwater, Hartmut Henkel, Hans Hagen, and Luigi
       Scarso, with help from Martin Schröder, Karel Skoupy, and Han The Thanh.

       TeX was designed by Donald E. Knuth, who implemented it using his Web system for Pascal  pro‐
       grams.   It was ported to Unix at Stanford by Howard Trickey, and at Cornell by Pavel Curtis.
       The version now offered with the Unix TeX distribution is that generated by the Web to C sys‐
       tem (**web2c**), originally written by Tomas Rokicki and Tim Morgan.

       The LuaTeX home page is <http://luatex.org>.

Web2C 2023                                17 November 2019                                 [_LUATEX_(1)](https://www.chedong.com/phpMan.php/man/LUATEX/1/markdown)
