> 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/uk/pomilki-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/f5c5dd588afd2a444fca0de8f0efb46619307dd1)

Якщо ви не включите **`\usepackage{amsmath}`** у преамбулі, ви отримаєте повідомлення про помилку.

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

Інший поширений приклад цієї помилки — коли середовище написано правильно. Приклад цієї помилки наведено нижче:

```latex
\begin{lisQ}
    \item Це елемент списку
    \item Це ще один елемент списку
\end{lisQ}
```

Тут з’явиться помилка, оскільки **`список`** середовище було помилково написано як **`lisQ`**. Щоб виправити це, просто перевіряйте написання щоразу, коли викликаєте певне середовище.

**Середовище не існує**

Ще один спосіб, за якого може з’явитися ця помилка, — це спроба використати середовище, якого не існує. Щоб дізнатися більше про дозволені середовища в LaTeX, а також про те, як створити власні, перегляньте нашу [документацію](/latex/uk/komandi/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/uk/pomilki-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.
