# Choose a document engine

Understand how LaTeX, Typst, and Markdown become a PDF, and choose the compiler your project needs.

An engine turns your source into the document people read. Choose the document language when you create a project. For a LaTeX project, you can also choose which LaTeX compiler runs the build.

## Choose a language

| Your work | Start with | How it becomes a PDF |
|---|---|---|
| A journal submission, an established thesis class, or an existing `.tex` project | LaTeX | Tectonic, or a compiler run through `latexmk` |
| A new paper, report, or resume with concise typesetting syntax | Typst | The bundled Typst compiler |
| A prose draft, notes, or a document you want to export to several formats | Markdown | Pandoc converts the source to LaTeX; Tectonic produces the PDF |

The choice determines the editor toolbar, source syntax, and available export formats. Changing a LaTeX compiler does not translate the document into Typst or Markdown.

## Tectonic

Use **Tectonic** for a straightforward LaTeX setup. It comes with Oleafly, downloads the TeX packages a build needs, and caches them for later builds. Start here when your template does not require a particular compiler.

Compile once while online before traveling. A cached project can compile offline; a new package may still need a download. Enable **Settings → General → Offline mode** to tell Tectonic to use its cache.

## pdfLaTeX

Choose **pdfLaTeX** when a publisher or existing project specifies it. It follows the traditional LaTeX workflow and is a useful match for older classes and package combinations. It needs a TeX distribution with `latexmk` installed.

## XeLaTeX

Choose **XeLaTeX** for a project that asks for it, particularly one using `fontspec`, OpenType fonts, or multilingual text. Make sure the fonts named by the source are installed or included with the project. It also runs through `latexmk`.

## LuaLaTeX

Choose **LuaLaTeX** for a template that requires it, Lua-based typesetting, or Oleafly's tagged-PDF workflow. Tagged PDFs carry document structure that assistive technology can use. Run the [preflight checks](/docs/preflight/) to inspect the result; the compiler choice alone does not establish the quality of the tags.

## Typst

The Typst compiler is bundled with Oleafly. Create a Typst project, write in `.typ` files, and click **Recompile**. There is no separate TeX installation to configure for this workflow.

Typst has its own syntax, packages, and font handling. Use the [Typst writing guide](/docs/writing/typst/) for a complete starting document and the toolbar controls.

## Markdown

Markdown uses **Pandoc** to prepare a typeset document and Tectonic to build its PDF. Open **Settings → Engines → Markdown** to install Pandoc when it is missing. Then open your Markdown project and compile it.

Use [Markdown writing](/docs/writing/markdown/) for headings, lists, math, and the visual editor. The [export guide](/docs/export/) explains which output formats the project offers.

## Set a default for new projects

Open **Settings → Engines → LaTeX** and choose the default compile engine. This sets the starting preference for new LaTeX projects. An existing project's saved compiler remains its own choice.

## Change the current project's compiler

Open the compiler control in the [project toolbar](/docs/project-toolbar/). Choose Tectonic, pdfLaTeX, XeLaTeX, or LuaLaTeX, then compile. Read the log if a template needs a package or font that the selected installation does not have.

## Detect an existing TeX distribution

Open **Settings → Engines → LaTeX** and review the detected toolchain. Oleafly checks for a complete compiler setup, including `latexmk` and the supporting tools. A partial system installation does not take priority over a working managed installation.

## Install managed TinyTeX

Use the install control in the LaTeX engine settings if you need a traditional compiler and do not have one. Oleafly downloads its own TinyTeX installation under `~/.oleafly/tinytex`; administrator access is not required. Allow roughly 250 MB for the initial download and additional space for packages.

## Manage packages

The package list in LaTeX engine settings lets you filter packages, inspect descriptions, and add or remove them. Tagging badges identify packages that need extra attention when producing a tagged PDF. These controls manage the TeX distribution used by `latexmk`; Tectonic has a separate cache.

[Read the LaTeX package and tagged-PDF guide →](/docs/latex-engines/)
