LUATEX(1)

๐Ÿ“ฆ
version 77830 ยท 5 versions
, in fedora 44, opensuse-leap 16.0

okay bestie, buckle up โ€” this is luatex(1) from the General Commands Manual, and she is not a normal typesetter, she's a whole personality. Six names, one icon. Let's get into it. ๐Ÿ’…


โœจ NAME โœจ

luatex, dviluatex, luahbtex, luajittex, texlua, texluac โ€” an extended version of TeX using Lua as an embedded scripting language. Yes, TeX. With Lua inside it. It's giving "your fave could never." ๐Ÿ


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

luatex [--lua=FILE] [OPTION]...  [TEXNAME[.tex]] [COMMANDS]
luatex [--lua=FILE] [OPTION]...  \FIRST-LINE
luatex [--lua=FILE] [OPTION]...  &FMT [ARGS]

๐Ÿ’– DESCRIPTION ๐Ÿ’–

So basically: run the luaTeX typesetter on TEXNAME, and it usually makes you a TEXNAME.pdf. Any leftover COMMANDS get processed as luaTeX input, right after TEXNAME is read. slay.

Alternatively โ€” and this is the fun part โ€” if the first non-option argument starts with a backslash, then all the non-option arguments get read as one single line of luaTeX input. iconic behavior honestly.

Alternatively, if that first non-option argument starts with a &, then the next word is taken as the FMT to read, and that overrides everything else. Any remaining arguments get processed like above.

If you pass no arguments and no options at all? It just prompts you for input. shy little thing. ๐Ÿ™ˆ

If you call it as texlua, it acts as a Lua interpreter. If you call it as texluac, it acts as a Lua bytecode compiler. Same girl, different era. ๐Ÿ’€

LuaTeX began as an extended version of pdfTeX, and she came with: Unicode and OpenType font support, an embedded Lua scripting language, the e-TeX and Omega extensions, plus an integrated MetaPost engine โ€” and she can create PDF files as well as DVI files. For more info about luatex, see http://www.luatex.org, and you can read the LuaTeX manual using the texdoc utility (texdoc 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. no cap.

In PDF mode, LuaTeX can natively handle the PDF, JPG, JBIG2, and PNG graphics formats. LuaTeX cannot include PostScript or Encapsulated PostScript (EPS) graphics files โ€” first convert them to PDF using epstopdf (1). that's the rule, bestie, don't fight it. ๐Ÿ˜ญ

The luajittex variant includes the Lua just-in-time compiler. fast girl summer. โšก

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 pdfTeX and Aleph. But if the option is present, LuaTeX will enter an alternative mode of command-line parsing in comparison to the standard web2c programs. And like โ€” heads up โ€” the presence of --lua makes most of the other options unreliable, because the lua initialization file can disable kpathsea and/or hook functions into various callbacks. it's giving "choose your fighter." ๐Ÿ’€

  • --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. zoom zoom. ๐ŸŽ๏ธ
  • --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.
โš ๏ธ bestie. this one runs shell commands. it is normally disallowed for security reasons. treat it with the respect it demands, fr fr.
  • --no-shell-escape โ€” disable the \write18{command} construct and the other Lua functions, even if it is enabled 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 compilers 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 typesetting, 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 corresponding \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 influences 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), etex(1), aleph(1), lua(1). the whole friend group. ๐Ÿซถ


๐Ÿฆ‹ 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. absolute legends, every one. ๐Ÿ‘‘

TeX was designed by Donald E. Knuth, who implemented it using his Web 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 TeX distribution is that generated by the Web to C system (web2c), originally written by Tomas Rokicki and Tim Morgan.

The LuaTeX home page is http://luatex.org. ๐Ÿฆ‹


okay that's the whole page bestie, tysm for reading ๐Ÿ’– this was Web2C 2025, dated 17 November 2019 โ€” go typeset something gorgeous, mwah ๐Ÿ’…โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from