Documentation/Getting Started/What is pdfLaTeX? LaTeX Compilers Explained
Getting Started

What is pdfLaTeX? LaTeX Compilers Explained

pdfLaTeX is the most common LaTeX compiler. It turns your .tex source into PDF directly. Understanding compilers helps you choose the right one and fix build errors.

What pdfLaTeX Does

pdfLaTeX reads your .tex file and produces a PDF. It uses the original TeX engine with PDF output and supports standard LaTeX packages:

% Compile from terminal:
pdflatex mydoc.tex

% Typical workflow (with bibliography):
pdflatex mydoc.tex
bibtex mydoc
pdflatex mydoc.tex
pdflatex mydoc.tex

The Three Main Compilers

LaTeX distributions offer several engines. Choose based on your needs:

% pdfLaTeX - default, best compatibility
% - Standard fonts (Computer Modern, Latin Modern)
% - Most packages work out of the box
% - No native Unicode file paths (use ASCII)

% XeLaTeX - Unicode and system fonts
% - Use any system font (\setmainfont)
% - Native UTF-8, great for non-Latin scripts
% - Some packages need extra care

% LuaLaTeX - scripting and Unicode
% - Lua scripting inside documents
% - Unicode and OpenType fonts
% - Growing package support

When to Use pdfLaTeX

Stick with pdfLaTeX when you use standard fonts, English/math-heavy documents, and classic packages:

% pdfLaTeX is ideal for:
% - Research papers (most journal templates)
% - Math-heavy documents (amsmath, etc.)
% - Conference templates (NeurIPS, ACL, etc.)
% - When you don't need custom system fonts

When to Use XeLaTeX or LuaLaTeX

Switch to XeLaTeX or LuaLaTeX for Unicode and fonts:

% XeLaTeX / LuaLaTeX when you need:
% - Non-Latin scripts (CJK, Arabic, etc.)
\setmainfont{Noto Serif CJK SC}

% - Custom system fonts
\setmainfont{Georgia}

% - Complex OpenType features
% - LuaLaTeX: programmatic graphics (e.g. TikZ + Lua)

Compiler Selection in Your Document

Some editors and build systems detect the engine. You can hint it in the file:

% !TEX program = pdflatex
% (used by TeXShop, TeXworks, some IDEs)

% In Bibby and many editors you pick the compiler
% in project or build settings (pdfLaTeX, XeLaTeX, LuaLaTeX).

💡 Tips

  • •Most templates and journals expect pdfLaTeX—check submission guidelines
  • •If you get font or encoding errors, try switching to XeLaTeX
  • •Run pdfLaTeX twice (or more with bibtex) so references and citations resolve

Try This in Bibby AI

Write LaTeX faster with AI auto-complete and instant compilation.

Start Writing Free

Related Tutorials

What is pdfLaTeX? LaTeX Compilers Explained | Bibby AI | Bibby AI