> 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/alaselh-walajwbh/05-can-i-run-plain-tex-on-overleaf.md).

# هل يمكنني تشغيل plain TeX على Overleaf؟

نعم—يمكنك تهيئة مشروعك ليتم تجميعه باستخدام Plain TeX باتباع إجراء الإعداد الموضح أدناه.

1. في محرر Overleaf، انقر على الزر **القائمة** ثم اضبط خيار **المترجم** على `LaTeX`—اختر `LaTeX` من القائمة المنسدلة كما هو موضح في مقطع الفيديو التالي:

{% embed url="<https://www.filepicker.io/api/file/Iw9UYRbxRBy3Bk61YKqj>" %}

3. أضف ملفًا فارغًا إلى مشروعك، واحفظه باسم `latexmkrc`—يجب ألا يكون له أي امتداد ملف (قد لا تحتاج إلى إضافة هذا إذا كان مشروعك يحتوي بالفعل على ملف `latexmkrc` ).
4. أضف السطر التالي إلى ملف `latexmkrc` :

```
$latex = 'tex %O %S';
```

#### ماذا يفعل هذا الملف latexmkrc بالفعل؟

من دون الخوض في التفاصيل، تستخدم خوادم Overleaf برنامجًا يُسمى [`latexmk`](https://mg.readthedocs.io/latexmk.html) لتشغيل وضبط التنضيد القائم على TeX/LaTeX. ويتيح برنامج `latexmk` لمستخدمي Overleaf التأثير في تنضيد مشاريعهم من خلال إضافة ملف تهيئة يُسمى `latexmkrc`. ويمكن للقراء الذين يرغبون في التعمق أكثر في هذا الموضوع أن يقرأوا عن `latexmkrc` ملف التهيئة على [موقع `latexmk` إلكتروني](https://mg.readthedocs.io/latexmk.html#configuration-files).

#### أمثلة

ال `latexmk` البرنامج مكتوب بلغة [لغة البرمجة بيرل](https://www.perl.org/) التي تستخدم الرمز (#) كرمز للتعليق (كما يستخدم TeX/LaTeX عادةً الرمز %). إذا كنت ترغب في التجربة باستخدام Plain TeX مع محركات TeX مختلفة، يمكنك إنشاء ملف `latexmkrc` ونسخ/لصق النص التالي فيه:

```
# $latex = 'tex %O %S'; # لاستخدام محرك TeX الأصلي من كنوث
# $latex = 'pdftex %O %S'; # لاستخدام محرك pdfTeX
# $latex = 'luatex %O %S'; # لاستخدام محرك LuaTeX
# $latex = 'xetex %O %S';  # لاستخدام محرك XeTeX
```

لاستخدام محرك TeX معيّن، أزِل التعليق عن السطر (احذف الرمز '#' في بدايته) الخاص بمحرك TeX الذي تريد استخدامه. على سبيل المثال، لتشغيل XeTeX، أزِل التعليق عن السطر الأخير بحيث يصبح ملفك `latexmkrc` يبدو كالتالي—لاحظ أن السطر الأخير لا يبدأ بالرمز '#'، ولذلك يتم تنفيذه/تشغيله لتنضيد مستند Plain TeX الخاص بك باستخدام XeTeX:

```
# $latex = 'tex %O %S'; # لاستخدام محرك TeX الأصلي من كنوث
# $latex = 'pdftex %O %S'; # لاستخدام محرك pdfTeX
# $latex = 'luatex %O %S'; # لاستخدام محرك LuaTeX
$latex = 'xetex %O %S';  # لاستخدام محرك XeTeX
```

يعرض الفيديو القصير التالي ما سبق `latexmkrc` يتم تحرير الملف بشكل انتقائي لتشغيل كل محرك TeX بالتتابع—بدءًا من XeTeX. وقد استُعيرت شيفرة المصدر الخاصة بـ Plain TeX المستخدمة في هذا المثال من [مقال بقلم D. R. Wilkins](https://www.ntg.nl/doc/wilkins/pllong.pdf).

{% embed url="<https://www.filepicker.io/api/file/9PVmkgTSSny7gjNliTdt>" %}

### قراءة إضافية

لدينا مادتان مترابطتان في المساعدة قد تهمان أي قارئ يرغب في فهم استخدام Overleaf لـ `latexmk` و `latexmkrc`:

* [كيف يقوم Overleaf بتجميع مشروعي؟](/latex/ar/qaadh-almarfh/064-how-does-overleaf-compile-my-project.md)
* [كيفية استخدام latexmkrc مع Overleaf: أمثلة وتقنيات](/latex/ar/mqalat-mtamqh/28-how-to-use-latexmkrc-with-overleaf.md)


---

# 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/alaselh-walajwbh/05-can-i-run-plain-tex-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.
