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

# Czy mogę wybrać, który plik będzie głównym plikiem tex w projekcie w Overleaf?

Tak, wykonując następujące kroki:

1. Kliknij ikonę menu Overleaf (![OLmenu.png](/files/d1b5c8f99df99f05e5e1cf398dfa6dbe51285b3b)), znajdującą się nad listą plików.
2. W menu znajdź **Główny dokument** opcję i ustaw ją na preferowane `.tex` pliku:

   ![SettingMainTeX.png](/files/a6a7639d00d24146ac96c1b4bde7f01baf83079f)
3. Spowoduje to ustawienie pliku do kompilacji i podglądu za każdym razem, gdy wrócisz do swojego projektu.

**Uwagi**:

* Aby mieć pewność, że funkcje Overleaf działają poprawnie, zalecamy umieszczenie głównego `.tex` pliku projektu w głównym folderze projektu. Na przykład dotyczy to funkcji takich jak [przejście do lokalizacji](/latex/pl/baza-wiedzy/022-can-t-find-jump-to-location-arrows.md), [liczba słów](/latex/pl/baza-wiedzy/099-is-there-a-way-to-run-a-word-count-that-doesn-t-include-latex-commands.md) oraz skryptów takich jak [makeglossaries](/latex/pl/struktura-dokumentu/05-glossaries.md) itp.,
* Każdy plik projektu, który zawiera `\documentclass` polecenie, może zostać skompilowany po otwarciu w edytorze przez wybranie **Ponowna kompilacja** przycisku. Dzięki temu możesz kompilować wiele dokumentów w jednym projekcie Overleaf bez zmieniania ustawienia głównego pliku projektu.


---

# 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/pl/baza-wiedzy/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.
