> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/it/base-di-conoscenza/006-can-i-choose-which-file-is-the-main-tex-file-in-a-project-on-overleaf.md).

# Posso scegliere quale file è il file tex principale in un progetto su Overleaf?

Sì, seguendo questi passaggi:

1. Fai clic sull'icona del menu di Overleaf (![OLmenu.png](/files/f0e586254d6bd17acb764271643fe9b63754ed08)), situata sopra l'elenco dei file.
2. Nel menu, individua l' **Documento principale** opzione e impostala secondo la tua preferenza `.tex` file:

   ![SettingMainTeX.png](/files/84868b602bbb967037b92a9211e33db45b9cb231)
3. In questo modo il file verrà compilato e visualizzato in anteprima ogni volta che tornerai al tuo progetto.

**Note**:

* Per garantire che le funzionalità di Overleaf funzionino correttamente, ti consigliamo di collocare il file principale del progetto `.tex` nella cartella di primo livello del progetto. Ad esempio, le funzionalità interessate includono [salta alla posizione](/latex/it/base-di-conoscenza/022-can-t-find-jump-to-location-arrows.md), [conteggio parole](/latex/it/base-di-conoscenza/099-is-there-a-way-to-run-a-word-count-that-doesn-t-include-latex-commands.md) e script come [makeglossaries](/latex/it/struttura-del-documento/05-glossaries.md) ecc.,
* Qualsiasi file del progetto che contenga un `\documentclass` comando può essere compilato quando viene aperto nell'editor selezionando il **Ricompila** pulsante. Ciò ti consente di compilare più documenti all'interno di un unico progetto Overleaf senza modificare l'impostazione del file principale del progetto.


---

# 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, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/it/base-di-conoscenza/006-can-i-choose-which-file-is-the-main-tex-file-in-a-project-on-overleaf.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
