> 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/akhtaa-latex/04-double-subscript.md).

# رمز سفلي مزدوج

## مقدمة

بحسب الاصطلاح، يستخدم LaTeX الحرف السفلي (`_`) لكتابة رمز سفلي، مثل `$a_b$` الذي ينتج $$a\_b$$. إذا كتبت `$a_bcde$` فقط الحرف الأول، `b`، يكون رمزًا سفليًا، $$a\_bcde$$، لأن LaTeX لا *يفترض* أنك تريد وضع المجموعة الكاملة من الأحرف في رمز سفلي `bcde`. لكتابة عدة عناصر (رموز) كرموز سفلية، يجب أن تخبر LaTeX بذلك من خلال إحاطتها بمجموعة `{...}`، مثل هذا: `$a_{bcde}$`، والذي ينتج $$a\_{bcde}$$.

## خطأ المؤشر السفلي المزدوج

ينشأ خطأ المؤشر السفلي المزدوج عندما يُطلب من LaTeX إضافة مؤشر سفلي إلى جزء من الصياغة الرياضية الذي *يحتوي بالفعل على* مؤشر سفلي ملحق به. وعادةً ما يُحل هذا الخطأ باستخدام الأقواس المعقوفة `{...}` التي، داخل وضع الرياضيات، تُنشئ ما يُسمى *صيغة فرعية*—وهو مصطلح يُستخدم لوصف جزء من التعبير الرياضي الذي تحاول تنسيقه.

على سبيل المثال، عند كتابة `$a_b_c$` ينتج خطأ المؤشر السفلي المزدوج التالي:

![ظهور خطأ المؤشر السفلي المزدوج في Overleaf](/files/0de5878da5dbd8501ed34255c59886235026e341)

يمكن إصلاح هذا الخطأ تحديدًا بعدة طرق باستخدام الأقواس المعقوفة `{...}`—وتختلف النتائج بحسب موضع الأقواس المعقوفة:

* `$a_{b_c}$` يُنسّق $$\displaystyle a\_{b\_c}$$
* `${a_b}_c$` يُنسّق $${a\_b}\_c$$
* `$a_{bc}$` يُنسّق $$a\_{bc}$$

### خطأ المؤشر السفلي المزدوج: حالة خاصة

سؤال على `tex.stackexchange` يسلّط الضوء على [مثال مفاجئ على خطأ المؤشر السفلي المزدوج](https://tex.stackexchange.com/questions/253080/why-am-i-getting-a-double-subscript-error)، وهو مثال قد يكون من المفيد معرفة سببه وحلّه المقابل. نورد المثال هنا.

المثال التالي يفشل في التجميع، رغم استخدام الأقواس المعقوفة:

```latex
\documentclass{article}
\begin{document}
\({\vec a_b}_c\)
\end{document}
```

[افتح هذا ***المسبّب للخطأ*** المثال في Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=accents+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%28%7B%5Cvec+a_b%7D_c%5C%29%0A%5Cend%7Bdocument%7D)

إحدى طرق حل المشكلة هي إضافة [`حزمة accents` الحزمة](https://ctan.org/pkg/accents?lang=en) (كما هو مقترح [هنا](https://tex.stackexchange.com/a/253094)):

```latex
\documentclass{article}
\usepackage{accents}
\begin{document}
\({\vec a_b}_c\)
\end{document}
```

[افتح هذا المثال في Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=accents+package+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Baccents%7D%0A%5Cbegin%7Bdocument%7D%0A%5C%28%7B%5Cvec+a_b%7D_c%5C%29%0A%5Cend%7Bdocument%7D)

## المزيد عن الرموز السفلية

يمكن تنسيق مستويات إضافية من الرموز السفلية بكتابة LaTeX مثل `$a_{b_{c_{d_e}}}$` والذي يُنسّق $$a\_{b\_{c\_{d\_e}}}$$. تُنسّق جميع الرموز السفلية عند المستوى الثاني أو دونه (الرمز السفلي الفرعي) باستخدام حجم الخط نفسه (بوحدة النقاط)، بينما تُنسّق الرموز السفلية من المستوى الأول باستخدام خط أكبر قليلًا (حجم النقاط). لمعرفة المزيد عن الرموز السفلية، تفضل بزيارة صفحة Overleaf المخصصة لهذا الموضوع [صفحة المساعدة المخصصة لهذا الموضوع](/latex/ar/alryadhyat/02-subscripts-and-superscripts.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/akhtaa-latex/04-double-subscript.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.
