> For the complete documentation index, see [llms.txt](https://docs.overleaf.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overleaf.com/getting-started/recompiling-your-project/selecting-a-tex-live-version-and-latex-compiler.md).

# Selecting a TeX Live version and LaTeX compiler

## How do I change a project’s TeX Live version?

Use the following steps to change a project’s TeX Live version—the TeX Live setting is *specific to each project* and does not affect any other projects you may have.

{% stepper %}
{% step %}
Select the gear icon <picture><source srcset="/files/eKmrf24EUl4UK2su3bAH" media="(prefers-color-scheme: dark)"><img src="/files/41hxXifrDU552RR0tYWG" alt="Image of the settings icon" data-size="line"></picture> within your project.

<div align="center"><figure><picture><source srcset="/files/67mhFzK1NrR7dyynzNhG" media="(prefers-color-scheme: dark)"><img src="/files/Ld9oaos3kHcoAABg1Q4J" alt="Image of the Settings icon in the bottom-left corner of the editor" width="188"></picture><figcaption><p>Option 1: Gear icon</p></figcaption></figure></div>

<div align="center"><figure><picture><source srcset="/files/NdmiBW31Wt39gLzqFXxj" media="(prefers-color-scheme: dark)"><img src="/files/HIFX0hn5PZBjsNP9mGzP" alt="Settings option in File menu in the Overleaf editor" width="242"></picture><figcaption><p>Option 2: File menu</p></figcaption></figure></div>

{% endstep %}

{% step %}
Click **Compiler** in the modal sidebar, and navigate to the **TeX Live version** drop-down menu.

<figure><img src="/files/aTXdKO51PaOYbHLkGH3C" alt="Image of the Compiler tab of the Settings" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
In most cases, the most recent version of Tex Live is recommended. Legacy versions are not recommended for new projects.
{% endhint %}
{% endstep %}

{% step %}
Select the TeX Live version required by your project, then close the menu by clicking anywhere outside the menu list.

<figure><img src="/files/RR38o8NkP8VTX3Hvwy4u" alt="Image of the TeX Live dropdown in the Settings" width="563"><figcaption><p>Image showing how to choose the TeX Live version on Overleaf</p></figcaption></figure>
{% endstep %}
{% endstepper %}

Learn more about TeX Live and considerations for selecting a TeX Live version [here](/troubleshooting-and-support/tex-live.md).

## Changing the compiler

Sometimes for certain languages, classes and packages it may be necessary to use a different compiler than the default `pdflatex`. With Overleaf, you can choose between pdfLaTeX, LaTeX, XeLaTeX, and LuaLaTeX.

To change the compiler:

{% stepper %}
{% step %}
Select the gear icon <picture><source srcset="/files/eKmrf24EUl4UK2su3bAH" media="(prefers-color-scheme: dark)"><img src="/files/41hxXifrDU552RR0tYWG" alt="Image of the settings icon" data-size="line"></picture> within your project.

<div align="center"><figure><picture><source srcset="/files/67mhFzK1NrR7dyynzNhG" media="(prefers-color-scheme: dark)"><img src="/files/Ld9oaos3kHcoAABg1Q4J" alt="Image of the Settings icon in the bottom-left corner of the editor" width="188"></picture><figcaption><p>Option 1: Gear icon</p></figcaption></figure></div>

<div align="center"><figure><picture><source srcset="/files/NdmiBW31Wt39gLzqFXxj" media="(prefers-color-scheme: dark)"><img src="/files/HIFX0hn5PZBjsNP9mGzP" alt="Settings option in File menu in the Overleaf editor" width="242"></picture><figcaption><p>Option 2: File menu</p></figcaption></figure></div>

{% endstep %}

{% step %}
Click **Compiler** in the modal sidebar, and navigate to the **Compiler** drop-down menu.

<figure><img src="/files/Sx96ODeUtTq1xVkrOSnr" alt="Image of the Compiler dropdown in the Settings" width="563"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Why change compilers?

The default and most frequently used LaTeX compiler is pdfLaTeX. Other possible compiler settings are LaTeX, XeLaTeX and LuaLaTeX. In most cases, the default pdfLaTeX compiler is appropriate, but some projects require the use of one of the other compiler options.

* **LaTeX** supports only `.eps` and `.ps` image formats for use with `\includegraphics`. If all the images in your project are `.eps` files, then this compiler setting is recommended.
* **pdfLaTeX** supports `.png`, `.jpg`, `.pdf` image formats. It will convert `.eps` images to `.pdf` on-the-fly during compilation, which may prolong the compilation time required. (pdfLaTeX may not be able to handle `pstricks` well on Overleaf.)
* **XeLaTeX** and **LuaLaTeX** both support UTF-8 robustly, as well as Truetype and OpenType fonts. They are therefore recommended if you need to typeset non-Latin scripts on Overleaf, in conjunction with the `polyglossia` package. They also support all of the `.png`, `.jpg`, `.pdf` *and* `.eps` image formats. Note that XeLaTeX supports `pstricks`; but LuaLaTeX doesn't.

{% hint style="info" %}
You can extend LuaLaTeX's capabilities by embedding Lua code directly in your document.
{% endhint %}

### Producing a DVI output

The DVI (Device Independent) format is an alternative to the PDF, and is the format that is produced by default by the LaTeX compile engine. Some publishers may still request that you provide a DVI file.

On Overleaf, the final compiled output is always a PDF document. If you are required to produce a DVI file from your Overleaf project, here's what you can do:

{% hint style="warning" %}
Make sure you're using only `.eps` and `.ps` images in your project.&#x20;
{% endhint %}

{% stepper %}
{% step %}
[Change the compiler](#changing-the-compiler) to **LaTeX**.
{% endstep %}

{% step %}
[Recompile](/getting-started/recompiling-your-project.md) your project.
{% endstep %}

{% step %}
Click on the **Logs and output files** button (next to the **Recompile** button).

<figure><picture><source srcset="/files/TFnlsEwRSFeZN7UTZ95m" media="(prefers-color-scheme: dark)"><img src="/files/ntmQPTpwZbcSQnNggUa2" alt="Logs and output files button location" width="233"></picture><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Scroll all the way down, and click on **Other logs and output files**.

<figure><picture><source srcset="/files/JtVVIG2wQNpWzjx45PTo" media="(prefers-color-scheme: dark)"><img src="/files/Q84UOBdYcqoDQcwQlOcw" alt="Other logs and files button location" width="354"></picture><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Download the generated `.dvi` file in the list of options.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overleaf.com/getting-started/recompiling-your-project/selecting-a-tex-live-version-and-latex-compiler.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
