lualatex
Compile LaTeX documents using LuaTeX engine
TLDR
Start texlua to act as a Lua interpreter
Compile a Tex file to PDF
Compile a Tex file without error interruption
Compile a Tex file with a specific output file name
SYNOPSIS
lualatex [OPTIONS] FILE
PARAMETERS
-output-directory=DIR
Place all output files (PDF, log, etc.) in the specified DIR.
-jobname=NAME
Use NAME for all output files, instead of the input file's base name (e.g., NAME.pdf, NAME.log).
-interaction=MODE
Set the interaction mode. Common modes include batchmode (no user interaction), nonstopmode (don't pause for errors), scrollmode (don't pause for errors, print less), and errorstopmode (pause on errors, default).
-shell-escape
Enable the execution of external commands via \write18 or Lua's os.execute. This is a security risk and should be used with caution.
-no-shell-escape
Disable the execution of external commands. This is the default and recommended for security.
-draftmode
Process the document quickly, skipping image inclusion and some complex operations. Useful for quick compilation checks.
-file-line-error
Print error messages in a standard file:line:error format, which is useful for integration with text editors and IDEs.
-halt-on-error
Exit immediately upon encountering the first error during compilation.
-recorder
Write a .fls file (file list) that records all files opened for input and output during compilation. Useful for tracking dependencies.
-version
Display the version information of lualatex and exit.
-help
Display a brief usage message and exit.
DESCRIPTION
lualatex is a typesetting engine for LaTeX documents, part of the TeX Live and MiKTeX distributions. It is built upon LuaTeX, which combines the powerful Lua scripting language directly into the TeX engine. This integration allows users to extend TeX's capabilities with arbitrary Lua code, enabling highly customized typesetting, advanced macro programming, and dynamic content generation.
lualatex natively supports Unicode (UTF-8) input and OpenType fonts, providing superior typographic control and simplifying multilingual document creation compared to older TeX engines. It typically outputs PDF files directly. Its flexibility makes it a preferred choice for complex documents requiring features like microtypography, advanced graphics integration, and programmatic document manipulation that are difficult or impossible with traditional LaTeX.
CAVEATS
Performance: Can be slower than pdflatex for very large or complex documents due to the overhead of the Lua interpreter.
Memory Usage: May consume more memory, especially with large Lua scripts or complex font setups.
Package Compatibility: While largely compatible, some older LaTeX packages designed for latex or pdflatex might not work perfectly or require specific adjustments.
Debugging: Debugging Lua code within lualatex can be more complex than debugging traditional TeX macros.
<I>KEY ADVANTAGES:</I>
Lua Integration: Allows for powerful programmatic control over typesetting, macro development, and dynamic content generation directly within the TeX engine.
Native Unicode (UTF-8) Support: Simplifies multilingual document creation without needing complex input encoding packages.
OpenType Font Support: Direct access to advanced typographic features (ligatures, stylistic sets, etc.) provided by OpenType fonts, without external utilities.
Microtypography: Enhanced control over character spacing, protrusion, and expansion for better justification and overall appearance.
HISTORY
lualatex emerged as part of the LuaTeX project, which began development around 2006 as a successor to pdfTeX. The primary goal was to build a TeX engine with modern features like Unicode support, OpenType font capabilities, and, most importantly, direct integration of the Lua scripting language. This integration allows for powerful extensibility and programmatic control over the typesetting process, moving beyond the limitations of TeX's macro language. lualatex specifically refers to using the LuaTeX engine to process LaTeX documents, leveraging the LaTeX format alongside LuaTeX's advanced features. It has gained significant traction in the LaTeX community for its flexibility and power, especially for complex typographic tasks and dynamic document generation.