> 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/ru/oshibki-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/d0b5bafd21560ae0c76ae1c39351316afac706d1)

Если вы не включите **`\usepackage{amsmath}`** в преамбулу, будет выдано сообщение об ошибке.

**Вы неправильно написали название среды:**

Другой распространённый пример этой ошибки — когда название среды написано правильно. Пример этой ошибки показан ниже:

```latex
\begin{lisQ}
    \item Это элемент списка
    \item Это ещё один элемент списка
\end{lisQ}
```

Здесь появится ошибка, так как **`среда`** списка была по ошибке записана как **`lisQ`**. Чтобы исправить это, просто проверяйте правописание каждый раз, когда вызываете определённую среду.

**Среда не существует**

Ещё один способ, при котором может появиться эта ошибка, — это попытка использовать среду, которая не существует. Чтобы узнать больше о допустимых средах в LaTeX, а также о том, как создать собственную, ознакомьтесь с нашей [документацией](/latex/ru/komandy/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/ru/oshibki-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.
