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

# コマンドと環境

## コマンド

LaTeX文書の動作は、特定のコマンドを使用することで制御できます。典型的なコマンド構造は次のとおりです：

```
\commandname[任意引数]{主引数}
```

なお、すべてのコマンドは **を** バックスラッシュ記号で始まり、主引数は {..} のペア内に含める必要があります。

複数の引数を持つコマンドもあります。たとえば：

```
\multicolumn{結合する列数}{配置}{内容}
```

一部のコマンドは、正常に動作するために {} の組を必要としません。たとえば：

```
\item テキストが項目の内容
```

オプション引数を持つコマンドもあります。たとえば：

```
\item[--] テキストが項目の内容
\\[2ex]
```

## 環境

コマンドの特別な種類として、環境があります。典型的な環境構造は次のとおりです：

```
\begin{環境名}
 内容
\end{環境名}
```

例：

```latex
\begin{center}
サンプルテキスト
\end{center}
```

または

```latex
\begin{enumerate}
\item 1つ目の項目
\item 2つ目の項目
\end{enumerate}
```

なお、すべての環境は **を** \begin{environmentname} で始まり、\end{environmentname} で終わります。

コマンドと同様に、引数やオプション引数を取る環境もあります。例えば

```latex
\begin{tabular}[表の位置]{列指定}
 表の内容
\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/ja/sononotopikku/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.
