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

# Chyba LaTeXu: Prostředí XXX není definováno

Pokud se pokusíte použít prostředí, které LaTeX nezná, vygenerujete chybovou zprávu, jako je ta níže:

main.tex, řádek 5

Chyba LaTeXu: Prostředí equation\* není definováno.

Vysvětlení najdete v příručce LaTeX nebo v LaTeX Companion. Pro okamžitou nápovědu napište H. ... l.5 \begin{equation\*} Váš příkaz byl ignorován. Pro jeho nahrazení jiným příkazem napište I, nebo pokračujte bez něj.

## Běžné příčiny

**Zapomněli jste načíst balíček**

Častou příčinou této chyby je, když se snažíte použít prostředí, které je součástí určitého balíčku, ale zapomněli jste balíček načíst ve své preambuli. Příkladem je **`align`** prostředí. **`align`** prostředí je součástí **`amsmath`** balíčku. Proto kdykoli použijete **`align`** prostředí, musíte do své preambule zahrnout **`\usepackage{amsmath}`** jak je ukázáno níže:

```latex
% Ve vaší preambuli

\usepackage{amsmath}

% Ve vašem hlavním souboru .tex

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

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

Pokud nezahrnete **`\usepackage{amsmath}`** do své preambule, vygenerujete chybovou zprávu.

**Prostředí jste napsali nesprávně:**

Dalším běžným příkladem této chyby je, když je prostředí napsáno správně. Příklad této chyby je uveden níže:

```latex
\begin{lisQ}
    \item Toto je položka seznamu
    \item Toto je další položka seznamu
\end{lisQ}
```

Zde se objeví chyba, protože **`prostředí`** bylo omylem napsáno jako **`lisQ`**. Chcete-li to opravit, jednoduše si při volání konkrétního prostředí zkontrolujte pravopis.

**Prostředí neexistuje**

Dalším způsobem, jak se může tato chyba objevit, je, pokud se pokusíte použít prostředí, které neexistuje. Chcete-li se dozvědět více o povolených prostředích v LaTeXu, stejně jako o tom, jak vytvořit vlastní, podívejte se na naši [dokumentaci](/latex/cs/prikazy/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/cs/chyby-latexu/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.
