luatex, texlua, texluac - An extended version of pdfTeX using Lua as an embedded scripting language


luatex [--lua=FILE] [OPTION]... [TEXNAME[.tex]] [COMMANDS]

luatex [--lua=FILE] [OPTION]... \FIRST-LINE

luatex [--lua=FILE] [OPTION]... \fB&FMT ARGS


Run the lua\*(TX typesetter on TEXNAME, usually creating TEXNAME.pdf. Any remaining COMMANDS are processed as lua\*(TX 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 lua\*(TX 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 lua interpreter. If called as texluac it acts as lua bytecode compiler. Lua\*(TX is an extended version of pdf\*(TX with Unicode and OpenType font support, embeded Lua scripting language, the e-\*(TX and Omega extensions, as well as integrated MetaPost engine, that can create PDF files as well as DVI files. For more information about luatex, see http://www.luatex.org, you can read Lua\*(TX manual using texdoc utility (texdoc luatex). All Lua\*(TX text input and output is considered to be Unicode text. In DVI mode, lua\*(TX can be used as a complete replacement for the \*(TX engine. In PDF mode, lua\*(TX can natively handle the PDF, JPG, JBIG2, and PNG graphics formats. lua\*(TX cannot include PostScript or Encapsulated PostScript (EPS) graphics files; first convert them to PDF using epstopdf (1).


When the Lua\*(TX executable starts, it looks for the --lua commandline option. If there is no --lua option, the commandline is interpreted in a similar fashion as in traditional pdf\*(TX and Aleph. But if the option is present, Lua\*(TX will enter an alternative mode of commandline 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. .ig Here is the list of possibly affected switches/functionality, and why:

  • --lua= FILE
        .rb The lua initialization file.

The following two options alter the executable behaviour:


    .rb Start Lua\*(TX 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 commandline in the positive values, just like the Lua interpreter. Lua\*(TX will exit immediately after executing the specified Lua script.

  • --luaconly
        .rb Start Lua\*(TX as a Lua byte compiler. In this mode, Lua\*(TX 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 loading.


    .rb Sets \pdfdraftmode so lua\*(TX doesn't write a PDF and doesn't read any included images, thus speeding up execution.


Synonym for --shell-escape.


Synonym for --no-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.


Disable the \write18{ command } construct and the other Lua functions, even if it is enabled in the texmf.cnf file.


    .rb Enable restricted version of \write18, os.execute(), os.exec(), os.spawn(), and io.popen(), only commands listed in texmf.cnf file are allowed.


    .rb Print error messages in the form file:line:error which is similar to the way many compilers format them.


    .rb Disable printing error messages in the file:line:error style.

  • --fmt= FORMAT
        .rb Use FORMAT as the name of the format to be used, instead of the name by which lua\*(TX was called or a %& line.


    .rb Print help message and exit.


    .rb Start in INI mode, which is used to dump formats. The INI mode can be used for typesetting, but no format is preloaded, and basic initializations like setting catcodes may be required.

  • --interaction= MODE
        .rb 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 corresponding \commands.
  • --jobname= NAME
        .rb Use NAME for the job name, instead of deriving it from the name of the input file.
  • --kpathsea-debug= BITMASK
        .rb Sets path searching debugging flags according to the BITMASK. See the Kpathsea manual for details.
  • --mktex= FMT
        .rb Enable mktexFMT generation, where FMT must be either tex or tfm.


    .rb Disable the luasocket (network) library.

  •     --output-comment= STRING
        .rb In DVI mode, use STRING for the DVI file comment instead of the date. This option is ignored inPDF mode.
  • --output-directory= DIRECTORY
        .rb 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
        .rb Set the output format mode, where FORMAT must be either pdf or dvi. This also influences the set of graphics formats understood by lua\*(TX.
  • --progname= NAME
        .rb Pretend to be program NAME (only for kpathsea).


    .rb Enable the filename recorder. This leaves a trace of the files opened for input and output in a file with extension .fls.


    .rb Disable some Lua commands that can easily be abused by a malicious document.

  • --synctex= NUMBER
        .rb Enable/disable Sync\*(TX extension.


    .rb Print version information and exit.


    .rb Print credits and version details.

  • The following options are ignored:


    "--no-parse-first-line" .rb These are always on.

  • --default-translate-file= TCXNAME ,   --translate-file=
        TCXNAME .rb These are always off.


R pdftex (1),

R etex (1),

R aleph (1),

R omega (1),

R lua (1).


The primary authors of Lua\*(TX are Hartmut Henkel, Taco Hoekwater, and Hans Hagen, with help from Martin Schr\[:o]der, Karel Skoupy, and Han The Thanh.

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