Engines (compilers)

pdfLaTeX, XeLaTeX, LuaLaTeX, upLaTeX, pLaTeX and LaTeX. How the app picks one from your document, and how to choose one for a project.

Applies to iPhone · iPad · Android · Windows · Mac · Linux Free

The server has six engines: pdfLaTeX, XeLaTeX, LuaLaTeX, upLaTeX, pLaTeX and LaTeX (through DVI). You rarely need to choose: the app picks one from your document.

How the engine is chosen

With Automatic (from the Source), the default, the server reads the top of your main file:

  1. A % !TEX program = xelatex line (or lualatex, uplatex, platex, pdflatex, latex) wins — the way Overleaf and TeXShop projects often say it.
  2. Then the document class and the packages:
    • jsarticle, jsbook, jsreport and the other pLaTeX classes → pLaTeX; ujarticle and the like, or the uplatex class option → upLaTeX.
    • jlreq → LuaLaTeX, or pLaTeX / upLaTeX when its platex / dvipdfmx option asks for them.
    • luatexja → LuaLaTeX.
    • ctex classes, Chinese university templates such as thuthesis, or the packages ctex, xeCJK or fontspec → XeLaTeX.
  3. Otherwise pdfLaTeX.

Choose one for a project 3.0.0 or later

When the automatic choice is wrong — for example fontspec loaded inside your own .sty file, or unicode-math, which needs XeLaTeX or LuaLaTeX — set the engine for that project:

  • iPhone · iPadTools › Compiler, then the engine.
  • Android · Windows · Mac · LinuxCompiler in the bar above the editor.

The choice is saved with the project (in its .rectoly-latex.json) and used from the next compile. It wins over a % !TEX program line. Choose Automatic (from the Source) to go back.

Japanese and Chinese papers

  • Japanese: jsarticle and the other Japanese classes compile with pLaTeX or upLaTeX and dvipdfmx, jlreq with LuaLaTeX (or pLaTeX / upLaTeX). LuaLaTeX (luatexja) and XeLaTeX documents compile as they are.
  • Chinese: ctex documents and thesis templates such as thuthesis compile with XeLaTeX.
  • No setup is needed: the fonts are on the server. Two of the templates are Japanese and one is Chinese.

Fonts

With XeLaTeX or LuaLaTeX you can choose fonts by name with fontspec. The fonts you can use are those on the server (TeX Live's fonts and the CJK fonts it uses) and font files you put in the project. Fonts installed on your own device are not on the server. If a font is not found, see Troubleshooting.

Updated November 27, 2026