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

# هل يمكنني اختيار أي ملف هو ملف tex الرئيسي في مشروع على Overleaf؟

نعم، باتباع هذه الخطوات:

1. انقر على أيقونة قائمة Overleaf (![OLmenu.png](/files/4aa654399cdf8e719b2c1ef064c623d2fe85f5a0))، الموجودة أعلى قائمة الملفات.
2. داخل القائمة، ابحث عن **المستند الرئيسي** الخيار واضبطه على ما تفضله `.tex` :

   ![SettingMainTeX.png](/files/8a20e9008e76a6af3d13f545b9d911a7dfcd4b12)
3. سيؤدي ذلك إلى تعيين الملف ليتم تجميعه ومعاينته في كل مرة تعود فيها إلى مشروعك.

**ملاحظات**:

* لضمان عمل ميزات Overleaf بشكل صحيح، نوصي بوضع الملف الرئيسي للمشروع `.tex` في المجلد العلوي للمشروع. على سبيل المثال، تشمل الميزات المتأثرة [الانتقال إلى الموقع](/latex/ar/qaadh-almarfh/022-can-t-find-jump-to-location-arrows.md), [عدد الكلمات](/latex/ar/qaadh-almarfh/099-is-there-a-way-to-run-a-word-count-that-doesn-t-include-latex-commands.md) والبرامج النصية مثل [makeglossaries](/latex/ar/bnyh-almstnd/05-glossaries.md) إلخ،
* أي ملف مشروع يحتوي على `\documentclass` أمر يمكن تجميعه عند فتحه في المحرر عن طريق تحديد **إعادة التحويل** الزر. يتيح لك ذلك تجميع عدة مستندات داخل مشروع Overleaf واحد دون تغيير إعداد الملف الرئيسي للمشروع.


---

# 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/ar/qaadh-almarfh/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.
