> 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/nl/kennisbank/006-can-i-choose-which-file-is-the-main-tex-file-in-a-project-on-overleaf.md).

# Kan ik kiezen welk bestand het hoofd-.tex-bestand is in een project op Overleaf?

Ja, door deze stappen te volgen:

1. Klik op het Overleaf-menupictogram (![OLmenu.png](/files/f7342287d8fca6df14e66aaaa56b2c414d676a91)), dat boven de bestandenlijst staat.
2. Zoek in het menu de **Hoofddocument** optie en stel deze in op uw gewenste `.tex` bestand:

   ![SettingMainTeX.png](/files/1cce08c772897839e58651a047bee1dbf8f9a531)
3. Hiermee wordt ingesteld welk bestand bij elke terugkeer naar uw project wordt gecompileerd en weergegeven als voorbeeld.

**Opmerkingen**:

* Om ervoor te zorgen dat de functies van Overleaf correct werken, raden we aan het hoofd `.tex` bestand van het project in de hoofdmap van het project te plaatsen. Bijvoorbeeld, getroffen functies zijn onder andere [springen-naar-locatie](/latex/nl/kennisbank/022-can-t-find-jump-to-location-arrows.md), [woordenaantal](/latex/nl/kennisbank/099-is-there-a-way-to-run-a-word-count-that-doesn-t-include-latex-commands.md) en scripts zoals [makeglossaries](/latex/nl/documentstructuur/05-glossaries.md) enz.,
* Elk projectbestand dat een `\documentclass` opdracht bevat, kan worden gecompileerd wanneer het in de editor wordt geopend door op de **Opnieuw compileren** knop te klikken. Hiermee kunt u meerdere documenten binnen één Overleaf-project compileren zonder de hoofdbestandinstelling van het project te wijzigen.


---

# 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/nl/kennisbank/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.
