> For the complete documentation index, see [llms.txt](https://docs.papers.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.papers.ai/writing-and-editing/compiling-and-fixing-errors.md).

# Compiling and fixing errors

This page covers **LaTeX**, **Typst**, and **MyST**: the three formats that produce diagnostics through the Problems panel. LaTeX and Typst compile to a paged PDF preview; MyST renders a live prose preview instead, but still surfaces the same Output and Problems panels for anything that fails to parse.

Plain **Markdown** doesn't go through this pipeline at all. It renders live with no compile step and nothing to diagnose, so there's nothing on this page for `.md` files specifically. See [Working with Markdown and MyST](/writing-and-editing/working-with-markdown-and-myst.md).

## Compile and preview

{% stepper %}
{% step %}

### Open a compilable file

`.tex`, `.typ`, or `.myst`.
{% endstep %}

{% step %}

### Set compile mode

In the preview toolbar: **Auto** (recompiles as you type), **On Save**, or **Manual**.
{% endstep %}

{% step %}

### Compile

Click **Compile** if you're not on Auto.
{% endstep %}

{% step %}

### Check diagnostics

Open the bottom panel to check **Output** (the raw log) and **Problems** (a structured list of issues).
{% endstep %}

{% step %}

### Jump to the issue

Click a problem to jump straight to that line in your source.
{% endstep %}

{% step %}

### Fix and recompile

Repeat until the Problems list is clear.
{% endstep %}
{% endstepper %}

{% hint style="success" %}
Paste a confusing error from the Output log into the AI and ask it to explain what's wrong. It's often faster than tracing the log yourself. See [Using AI](/using-ai/using-ai.md).
{% endhint %}

## Things to know

* Compile controls and the Problems panel only appear for `.tex`, `.typ`, and `.myst` files. A `.docx` file or a plain `.md` file has neither, since there's nothing to compile or diagnose.
* Compiling runs in your browser. Some LaTeX packages aren't included in the built-in distribution and can't be installed on demand.
* Exporting directly to Word or PowerPoint from a compiled file isn't supported. Export the PDF and convert it elsewhere if you need another format.
* PDF export is available from the preview toolbar for formats that produce a paged PDF (LaTeX, Typst).

## Troubleshooting

<details>

<summary>No Compile button</summary>

The active file isn't a compilable format.

</details>

<details>

<summary>Preview looks stale</summary>

Recompile manually and check for source errors.

</details>

<details>

<summary>Compile fails with a package error</summary>

The log names the missing package. Not everything can be installed on demand; check whether there's a browser-compatible alternative.

</details>

## Next steps

* [Working with LaTeX and Typst](/writing-and-editing/working-with-latex-and-typst.md)
* [Working with Markdown and MyST](/writing-and-editing/working-with-markdown-and-myst.md)
* [Editing modes](/writing-and-editing/editing-modes.md)
* [Using AI](/using-ai/using-ai.md)
