> 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/dalsi-temata/09-commands-and-environments.md).

# Příkazy a prostředí

## Příkazy

Chování dokumentů LaTeX lze řídit pomocí speciálního příkazu. Typická struktura příkazu je následující:

```
\commandname[optional argument]{main argument}
```

Všimněte si, že všechny příkazy **musí** musí být předcházeny znakem zpětného lomítka a hlavní argument musí být uzavřen do dvojice {..}.

Některé příkazy mají více než jeden argument, například:

```
\multicolumn{number of columns joined}{alignment}{content}
```

Některé příkazy ke správnému fungování nepotřebují dvojici {}, například:

```
\item Text tvoří obsah položky
```

Některé příkazy mají volitelné argumenty, například:

```
\item[--] Text tvoří obsah položky
\\[2ex]
```

## Prostředí

Zvláštním typem příkazu je prostředí. Typická struktura prostředí je následující:

```
\begin{environmentname}
 obsah
\end{environmentname}
```

Například:

```latex
\begin{center}
Ukázkový text
\end{center}
```

nebo

```latex
\begin{enumerate}
\item První bod
\item Druhý bod
\end{enumerate}
```

Všimněte si, že všechna prostředí **musí** začínají \begin{environmentname} a končí \end{environmentname}.

Některá prostředí přijímají argumenty a volitelné argumenty, stejně jako příkazy. Například

```latex
\begin{tabular}[table position]{column specifications}
 obsah tabulky
\end{tabular}
```


---

# 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/dalsi-temata/09-commands-and-environments.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.
