\engines{formatex}
pdfLaTeX, XeLaTeX, LuaLaTeX y latexmk — cada motor tiene fortalezas distintas. Elija la herramienta correcta para cada documento. Cambie con un solo parámetro.
\engine{pdflatex}
The Workhorse
Fast, reliable, and universally compatible.
pdfLaTeX is the default engine for a reason: it has the widest package support in the TeX ecosystem, the fastest compilation times, and decades of battle-testing across millions of academic papers. If your document doesn't require custom system fonts or RTL text, pdfLaTeX is almost always the right choice.
Typical speed
80–200ms
Fastest
Passes
1 (2–3 with references)
Font support
Type1, OTF via pdffonts — no system fonts
\begin{example}
\documentclass{article}
\usepackage{amsmath}
\usepackage{geometry}
\begin{document}
\section{Euler's Identity}
One of the most beautiful results in mathematics:
\[ e^{i\pi} + 1 = 0 \]
\section{Series Expansion}
\[
\sum_{n=0}^{\infty} \frac{x^n}{n!} = e^x
\]
\end{document}Use cases
Academic papers
IEEE, ACM, Springer templates all target pdfLaTeX. Most conference submission systems expect it.
Math-heavy documents
amsmath, amssymb, amsthm — full support. Complex equations, theorem environments, proofs.
Technical reports
Standard CTAN packages, stable rendering, predictable output across TeX Live versions.
Presentations
Beamer class works best with pdfLaTeX. Fastest rebuild cycle during development.
Popular packages
Skip if...
\usepackage{formatex-api}
{
"latex": "\\documentclass{article}...",
"engine": "pdflatex"
}\engine{xelatex}
The Typographer
Native Unicode. System fonts. OpenType.
XeLaTeX was built from the ground up to embrace modern typography. It reads UTF-8 input directly, loads any font installed on the system via fontspec, and exposes the full feature set of OpenType: ligatures, small caps, stylistic alternates, and more. The go-to engine for multilingual documents and design-forward typesetting.
Typical speed
150–350ms
Fast
Passes
1 (2 with bibliography)
Font support
Any OpenType or TrueType system font via fontspec
\begin{example}
\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainfont{Noto Serif}[
Ligatures = TeX,
Numbers = OldStyle
]
\setmainlanguage{english}
\setotherlanguage{arabic}
\begin{document}
English paragraph with old-style numerals: 1234.
\begin{Arabic}
هذا نص باللغة العربية مع ترقيم صحيح.
\end{Arabic}
\end{document}Use cases
Multilingual documents
polyglossia handles 80+ languages. Mix Arabic and English in one document with proper RTL/LTR switching.
Brand typography
Use any OTF/TTF font via fontspec. Corporate fonts, editorial typefaces, custom branding.
Linguistic papers
IPA characters, Unicode phonetic symbols, custom scripts — all handled natively from source.
Design-forward PDFs
Full OpenType feature access: ligatures, discretionary hyphens, stylistic sets, kerning pairs.
Popular packages
Skip if...
\usepackage{formatex-api}
{
"latex": "\\documentclass{article}...",
"engine": "xelatex"
}\engine{lualatex}
The Programmer
Lua scripting inside your document.
LuaLaTeX embeds a full Lua 5.3 interpreter directly inside the typesetting engine. You can write Lua code that manipulates TeX internals, generates content programmatically, loops over data structures, and builds dynamic tables at compile time — all within a single .tex file. It also shares XeLaTeX's font capabilities via fontspec.
Typical speed
200–500ms
Moderate
Passes
1–3 typical
Font support
Same as XeLaTeX — full OpenType via fontspec
\begin{example}
\documentclass{article}
\usepackage{luacode}
\usepackage{booktabs}
\begin{document}
\begin{luacode*}
local items = {
{ "January", "\$12,400" },
{ "February", "\$15,830" },
{ "March", "\$9,220" },
}
tex.print("\\begin{tabular}{lr}")
tex.print("\\toprule Month & Revenue \\\\ \\midrule")
for _, row in ipairs(items) do
tex.print(row[1] .. " & " .. row[2] .. " \\\\")
end
tex.print("\\bottomrule \\end{tabular}")
\end{luacode*}
\end{document}Use cases
Data-driven documents
Loop over arrays, build tables from data, compute values — all in Lua at compile time. No external scripts.
Programmatic content
Generate repetitive structures (e.g. 50-row tables, parametric figures) without copy-paste LaTeX.
Advanced typography
Access low-level TeX internals via Lua. Custom kerning, glyph manipulation, hyphenation overrides.
Dynamic reports
Embed business logic in the document itself. Conditionals, calculations, formatted output.
Popular packages
Skip if...
\usepackage{formatex-api}
{
"latex": "\\documentclass{article}...",
"engine": "lualatex"
}\engine{latexmk}
The Orchestrator
Automatic multi-pass compilation. Every reference resolved.
latexmk is not a TeX engine — it's an intelligent build system that wraps pdfLaTeX and runs it as many times as necessary to fully resolve all forward references, citations, table of contents entries, and indices. When you specify latexmk, FormaTeX uses pdfLaTeX as the underlying driver and handles the pass logic automatically.
Typical speed
400ms–3s
Variable
Passes
Auto-detected (usually 2–4)
Font support
Same as pdfLaTeX (latexmk drives pdfLaTeX by default)
\begin{example}
\documentclass{article}
\usepackage[backend=biber, style=ieee]{biblatex}
\usepackage{hyperref}
\addbibresource{references.bib}
\begin{document}
\section{Related Work}
Neural scaling laws were studied by \cite{kaplan2020scaling}.
The attention mechanism was introduced in \cite{vaswani2017attention}.
See \autoref{sec:method} for our approach.
\section{Method}\label{sec:method}
...
\printbibliography
\end{document}Use cases
Academic papers with citations
BibTeX and Biber bibliographies require at least two passes. latexmk handles this automatically.
Books and theses
Table of contents, list of figures, indices, glossaries — all resolved across multiple passes.
Cross-referenced documents
\ref, \pageref, \eqref, \autoref all need a second pass. latexmk detects and reruns as needed.
Documents with \label/\ref pairs
Any document with internal references. latexmk checks the .aux file after each pass for completeness.
Popular packages
Skip if...
\usepackage{formatex-api}
{
"latex": "\\documentclass{article}...",
"engine": "latexmk"
}\begin{tabular}
All four engines available on every plan. No configuration required.
| Feature | pdfLaTeX | XeLaTeX | LuaLaTeX | latexmk |
|---|---|---|---|---|
| Typical speed | 80–200ms | 150–350ms | 200–500ms | 400ms–3s |
| Compilation passes | 1 | 1 | 1 | Auto (2–4) |
| Unicode input | Partial | Yes | Yes | Inherited |
| System fonts (OTF/TTF) | No | Yes | Yes | No |
| Lua scripting | No | No | Yes | No |
| Auto bibliography | No | No | No | Yes |
| Package compatibility | highest | high | high | pdflatex |
\DeclareMathOperator{choose}
Answer these questions in order. Stop when you have a match.
Does your document have citations or a bibliography?
Do you need a custom system font or RTL/multilingual text?
Do you need Lua scripting or programmatic content?
Standard document — math, tables, figures?
\note
La mayoría de las cargas de trabajo en producción usan pdfLaTeX para el 80% de los documentos. Agregue XeLaTeX cuando surjan requisitos de fuentes. Reserve latexmk para artículos de investigación con muchas citas.
Use pdfLaTeX por defecto
Si genera documentos programáticos (facturas, certificados, informes) sin fuentes personalizadas, pdfLaTeX ofrece el tiempo de inicio en frío más rápido.
Cambie de motor por solicitud
El parámetro de motor es por compilación. Una sola clave API puede manejar pdfLaTeX, XeLaTeX y latexmk para diferentes tipos de documentos simultáneamente.
Usuarios académicos: use latexmk
Los artículos con citas casi siempre necesitan múltiples pasadas. latexmk gestiona esto automáticamente — sin contar pasadas manualmente.
LuaLaTeX para salidas de IA
Si su LLM genera LaTeX con lógica Lua en línea, LuaLaTeX lo maneja limpiamente. El entorno de ejecución Lua está aislado en nuestro lado.
\begin{document}
Sin configuración. Sin instalaciones de TeX Live. Cambie de motor con un solo parámetro.
Una cosa rápida
Registramos el uso anónimo — visitas a páginas, uso de funciones, eventos de compilación — para entender qué funciona y qué no. Sin publicidad, sin datos personales, sin compartir con terceros.