> 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/14-latex-error-environment-xxx-undefined.md).

# خطأ LaTeX: البيئة XXX غير معرّفة

إذا حاولت استخدام بيئة لا يتعرف عليها LaTeX، فستحصل على رسالة خطأ مثل التالية:

main.tex، السطر 5

خطأ في LaTeX: البيئة equation\* غير معرّفة.

راجع دليل LaTeX أو LaTeX Companion للحصول على شرح. اكتب H للحصول على مساعدة فورية. ... l.5 \begin{equation\*} تم تجاهل أمرك. اكتب I لاستبداله بأمر آخر، أو للمتابعة من دونه.

## الأسباب الشائعة

**لقد نسيت تحميل حزمة**

من الأسباب الشائعة لهذا الخطأ أنك تحاول استخدام بيئة هي جزء من حزمة معينة، لكنك نسيت تحميل الحزمة في المقدمة الخاصة بك. ومن أمثلة ذلك **`align`** البيئة. إن **`align`** البيئة تأتي ضمن **`amsmath`** الحزمة. لذلك، كلما استخدمتَ **`align`** البيئة، يجب عليك تضمين **`\usepackage{amsmath}`** في المقدمة الخاصة بك كما هو موضح أدناه:

```latex
% في المقدمة الخاصة بك

\usepackage{amsmath}

% في ملف .tex الرئيسي

\begin{align}
2x + 3y &= 7\\
5x - 2y &= 2
\end{align}
```

![Align.PNG](/files/fb59da1e7415a2c3a0c28759de7a24988697ba7d)

إذا لم تُضمّن **`\usepackage{amsmath}`** في المقدمة الخاصة بك، فستحصل على رسالة خطأ.

**لقد كتبت اسم البيئة بشكل غير صحيح:**

مثال شائع آخر على هذا الخطأ هو عندما تُكتب اسم البيئة بشكل صحيح. ويُعرض مثال على هذا الخطأ أدناه:

```latex
\begin{lisQ}
    \item هذه فقرة في قائمة
    \item هذه فقرة أخرى في قائمة
\end{lisQ}
```

سيظهر خطأ هنا، لأن **`القائمة`** البيئة كُتبت بالخطأ على أنها **`lisQ`**. لإصلاح ذلك، ما عليك سوى التحقق من الإملاء كلما استدعيتَ بيئة معينة.

**البيئة غير موجودة**

طريقة أخرى يمكن أن يظهر بها هذا الخطأ هي إذا حاولت استخدام بيئة غير موجودة. لمعرفة المزيد عن البيئات المسموح بها في LaTeX، وكذلك كيفية إنشاء بيئتك الخاصة، راجع [التوثيق](/latex/ar/alawamr/02-environments.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/14-latex-error-environment-xxx-undefined.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.
