> ## Documentation Index
> Fetch the complete documentation index at: https://resources.latex-cloud-studio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fix Compiler and Engine Errors in LaTeX

> Resolve compiler mismatch errors by selecting the correct engine: pdfLaTeX, XeLaTeX, or LuaLaTeX.

Some packages and fonts require a specific engine.

## Common Symptoms

* Unicode glyph failures under pdfLaTeX.
* `fontspec` errors with pdfLaTeX.
* CJK or RTL rendering issues.

## Rule of Thumb

* pdfLaTeX: classic latin workflows.
* XeLaTeX/LuaLaTeX: modern Unicode, system fonts, CJK, RTL.

## Example

```latex engine-choice.tex theme={null}
% Requires XeLaTeX or LuaLaTeX
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
```

## Related Pages

* [Choosing a compiler](/learn/latex/basics/choosing-compiler)
* [Languages hub](/learn/latex/languages)
