# 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 within your project

<figure><img src="https://3502988919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVetOkhFZmAC8QCQK0Pi7%2Fuploads%2FjGaMvhUMxCqTI28nFBFf%2Fimage.png?alt=media&#x26;token=5dcd3740-86df-4e64-986c-7141e2e244f9" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

### On the left hand side click 'Compiler' and select the TeX Live version drop-down&#x20;

<figure><img src="https://3502988919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVetOkhFZmAC8QCQK0Pi7%2Fuploads%2FRldWoBR9osquJMCv8s0s%2Fimage.png?alt=media&#x26;token=7a8721e6-b1de-4447-a91c-0ba8452b5b87" alt=""><figcaption></figcaption></figure>

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

{% step %}

### Choose your TeX Live version

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

<figure><img src="https://3502988919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVetOkhFZmAC8QCQK0Pi7%2Fuploads%2FPSkY7vAs0BvRnoVv7hLa%2Fimage.png?alt=media&#x26;token=56eff327-8edc-4672-b0e2-759b3cbaecf0" alt=""><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](https://docs.overleaf.com/troubleshooting-and-support/tex-live).

## 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 within your project

<figure><img src="https://3502988919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVetOkhFZmAC8QCQK0Pi7%2Fuploads%2F6GTOS2zAbnxOJUBge0lt%2Fimage.png?alt=media&#x26;token=42590f03-4cbe-42c9-ab93-49b91b17320a" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### On the left hand side click 'Compiler' and select the compiler you wish to us in the drop-down list

<figure><img src="https://3502988919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVetOkhFZmAC8QCQK0Pi7%2Fuploads%2FWeHWIvTcHRhuGCz3y6Ha%2Fimage.png?alt=media&#x26;token=c3e5c4e6-9a4e-417a-b5db-ed6d33f5aa40" alt=""><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.
* You can extend LuaLaTeX's capabilities by embedding Lua code directly in your document.

### 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:

1. Make sure you're using only `.eps` and `.ps` images in your project.
2. Click on the gear icon within your project, then click on 'Compiler', and set the **Compiler** setting to **LaTeX**.
3. Recompile your project.
4. Click on the **Logs and output files** button next to the **Recompile** button.
5. Scroll right to the bottom, and click on **Other logs and output files**.
6. You should then be able to download the generated `.dvi` file.

<figure><img src="https://3502988919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVetOkhFZmAC8QCQK0Pi7%2Fuploads%2FH52GxvZbjLQdri6vrUq6%2Fimage.png?alt=media&#x26;token=ba1d7b36-7809-443a-b999-d940d6742e40" alt=""><figcaption><p>Downloading other output files</p></figcaption></figure>
