\engines{formatex}
pdfLaTeX و XeLaTeX و LuaLaTeX و latexmk — لكل محرك نقاط قوة مميزة. اختر الأداة المناسبة لكل مستند. بدّل بمعامل واحد.
\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
معظم أحمال الإنتاج تستخدم pdfLaTeX في 80% من المستندات. أضف XeLaTeX عند ظهور متطلبات الخطوط. احتفظ بـ latexmk للأوراق البحثية الكثيفة بالاستشهادات.
افتراضياً استخدم pdfLaTeX
إذا كنت تنشئ مستندات برمجية (فواتير، شهادات، تقارير) بدون خطوط مخصصة، يوفر pdfLaTeX أسرع وقت بدء تشغيل.
بدّل المحركات لكل طلب
معامل المحرك لكل ترجمة. يمكن لمفتاح API واحد تشغيل pdfLaTeX و XeLaTeX و latexmk لأنواع مستندات مختلفة في آنٍ واحد.
المستخدمون الأكاديميون: استخدموا latexmk
الأوراق البحثية ذات الاستشهادات تحتاج دائماً تقريباً إلى مرات تشغيل متعددة. latexmk يتولى هذا تلقائياً — لا حاجة لعدّ المرات يدوياً.
LuaLaTeX لمخرجات الذكاء الاصطناعي
إذا كان نموذج اللغة الكبير لديك يُنشئ LaTeX مع منطق Lua مضمّن، فإن LuaLaTeX يتعامل معه بنظافة. بيئة تشغيل Lua معزولة على جانبنا.
\begin{document}
بدون تهيئة. بدون تثبيت TeX Live. بدّل المحركات بمعامل واحد.
ملاحظة سريعة
نتتبع الاستخدام المجهول — مشاهدات الصفحات واستخدام الميزات وأحداث الترجمة — لفهم ما يعمل وما لا يعمل. بدون إعلانات، بدون بيانات شخصية، بدون مشاركة مع أطراف ثالثة.