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

# Errore LaTeX: ambiente XXX non definito

Se provi a usare un ambiente che LaTeX non riconosce, genererai un messaggio di errore come quello qui sotto:

main.tex, riga 5

Errore LaTeX: ambiente equation\* non definito.

Consulta il manuale LaTeX o LaTeX Companion per una spiegazione. Digita H per assistenza immediata. ... l.5 \begin{equation\*} Il tuo comando è stato ignorato. Digita I per sostituirlo con un altro comando, oppure per continuare senza di esso.

## Cause comuni

**Hai dimenticato di caricare un pacchetto**

Una causa comune di questo errore è quando stai cercando di usare un ambiente che fa parte di un pacchetto specifico, ma hai dimenticato di caricare il pacchetto nel tuo preambolo. Un esempio di questo è l' **`align`** ambiente. L' **`align`** ambiente fa parte del **`amsmath`** pacchetto. Pertanto, ogni volta che usi l' **`align`** ambiente, devi includere **`\\usepackage{amsmath}`** nel tuo preambolo come mostrato di seguito:

```latex
% Nel preambolo

\\usepackage{amsmath}

% Nel tuo file .tex principale

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

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

Se non includi **`\\usepackage{amsmath}`** nel tuo preambolo, genererai un messaggio di errore.

**Hai scritto male il nome dell'ambiente:**

Un altro esempio comune di questo errore è quando un ambiente è scritto correttamente. Un esempio di questo errore è mostrato qui sotto:

```latex
\begin{lisQ}
    \item Questo è un elemento dell'elenco
    \item Questo è un altro elemento dell'elenco
\end{lisQ}
```

Qui apparirà un errore, poiché il **`elenco`** ambiente è stato scritto erroneamente come **`lisQ`**. Per risolvere questo problema, controlla semplicemente l'ortografia ogni volta che richiami un particolare ambiente.

**L'ambiente non esiste**

Un altro modo in cui può comparire questo errore è se provi a usare un ambiente che non esiste. Per saperne di più sugli ambienti consentiti in LaTeX, così come su come crearne uno tuo, consulta la nostra [documentazione](/latex/it/comandi/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/it/errori-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.
