> For the complete documentation index, see [llms.txt](https://ayakaleaf-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://ayakaleaf-pro.ayaka.space/latex/ja/wen-shu-gou-zao/01-sections-and-chapters.md).

# セクションと章

## はじめに

文書には通常、「論理構造」が何らかの形であります。章、節、小節などに分けて内容を整理します。LaTeX では文書構造の作成をサポートしており、節の区切りや番号付けもカスタマイズできます。文書を整理するために利用できるコマンドは使用する文書クラスによって異なりますが、最も単純な整理方法である節分けは、どの形式でも利用できます。

## 基本例

まずは基本例で、 `\section{*section title*}` コマンド。これは、「\*section title\*」という新しい節の始まりを示します `*section title*`。節番号は自動で付与され、カスタマイズしたり無効化したりできます。

```latex
\documentclass{article}
\usepackage{blindtext}

\title{Sections and Chapters}
\author{Overleaf}
\date{\today}

\begin{document}
\maketitle
\section{Introduction}

これは最初の節です。

\blindtext

\section{Second Section}
これは2番目の節です

\blindtext
\end{document}
```

[この例を Overleaf で開く。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Basic+document+structure+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bblindtext%7D%0A%0A%5Ctitle%7BSections+and+Chapters%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7B%5Ctoday%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Csection%7BIntroduction%7D%0A%0AThis+is+the+first+section.%0A%0A%5Cblindtext%0A%0A%5Csection%7BSecond+Section%7D%0AThis+is+the+second+section%0A%0A%5Cblindtext%0A%5Cend%7Bdocument%7D)

この例では次の出力が生成されます:

![節と章の例](/files/56312d641f584cef16ed53caf366e0fccfdcb141)

## 文書の節分け

LaTeX では文書の章や節を整理し、番号を付け、索引を付けることができます。文書クラスによっては、節を定義する深さが最大7段階あります：

|    |                                 |
| -- | ------------------------------- |
| -1 | `\part{part}`                   |
| 0  | `\chapter{chapter}`             |
| 1  | `\section{section}`             |
| 2  | `\subsection{subsection}`       |
| 3  | `\subsubsection{subsubsection}` |
| 4  | `\paragraph{paragraph}`         |
| 5  | `\subparagraph{subparagraph}`   |

通常、 `\section` は、ほとんどの文書で最上位の文書コマンドです。ただし、レポートや書籍、および同様の長い文書では、これに当たるのは `\chapter` または `\part`.

## 番号付き節と番号なし節

番号のない章、節、小節などを作るには、アスタリスク（`*`）を、コマンドの末尾、開き中かっこの前に追加します。これらは目次には入りません。上の最初の例を、今度は `\section*` ではなく `\section`:

```latex
\documentclass{article}
\usepackage{blindtext}

\title{Sections and Chapters}
\author{Overleaf}
\date{\today}

\begin{document}
\maketitle
\section*{Introduction}

これは最初の節です。

\blindtext

\section*{Second Section}
これは2番目の節です

\blindtext
\end{document}
```

[この例を Overleaf で開く。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+with+unnumbered+sections\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bblindtext%7D%0A%0A%5Ctitle%7BSections+and+Chapters%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7B%5Ctoday%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Csection%2A%7BIntroduction%7D%0A%0AThis+is+the+first+section.%0A%0A%5Cblindtext%0A%0A%5Csection%2A%7BSecond+Section%7D%0AThis+is+the+second+section%0A%0A%5Cblindtext%0A%5Cend%7Bdocument%7D)

この例では次の出力が生成されます:

![番号なし節の例](/files/19a6f432c4859213325b931471399f9bb8c0f959)

### 目次内の番号なし節

番号なし節を目次に追加するには、次の `\addcontentsline` コマンドを使います。

```latex
\addcontentsline{toc}{section}{Title of the section}
```

ここでは、〜を使った例を示します `\addcontentsline` ただし、記事 [目次](/latex/ja/wen-shu-gou-zao/02-table-of-contents.md) を参照すると、さらに詳しい情報と例があります。

```latex
\documentclass{article}
\title{Sections and Chapters}
\author{Overleaf}
\date{\today}

\begin{document}
\maketitle
\tableofcontents

\newcommand\shortlorem{Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}

\section{Introduction}
これは最初の節（番号あり）です。

\shortlorem
\addcontentsline{toc}{section}{Unnumbered Section}
\section*{Unnumbered Section}
番号なしの節

\shortlorem

\section{Second section}
2番目の番号付き節です。

\shortlorem
\end{document}
```

[この例を Overleaf で開く。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Example+of+unnumbered+sections+in+the+TOC\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Ctitle%7BSections+and+Chapters%7D%0A%5Cauthor%7BOverleaf%7D%0A%5Cdate%7B%5Ctoday%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Ctableofcontents%0A%0A%5Cnewcommand%5Cshortlorem%7BLorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit%2C+sed+do+eiusmod+tempor+incididunt+ut+labore+et+dolore+magna+aliqua.+Ut+enim+ad+minim+veniam%2C+quis+nostrud+exercitation+ullamco+laboris+nisi+ut+aliquip+ex+ea+commodo+consequat.%7D%0A%0A%5Csection%7BIntroduction%7D%0AThis+is+the+first+section+%28numbered%29.%0A%0A%5Cshortlorem%0A%5Caddcontentsline%7Btoc%7D%7Bsection%7D%7BUnnumbered+Section%7D%0A%5Csection%2A%7BUnnumbered+Section%7D%0AAn+unnumbered+section%0A%0A%5Cshortlorem%0A%0A%5Csection%7BSecond+section%7D%0AThe+second+numbered+section.%0A%0A%5Cshortlorem%0A%5Cend%7Bdocument%7D)

この例では次の出力が生成されます:

![TOC内の番号なし節](/files/cb77b5286cbee5e18f1199dcd0fe2fd4614588cd)

## 書籍/レポートにおける文書の章と節

前述のとおり、 `\chapter` は書籍やレポートで使用できます。

### report クラス

以下に例を示します `レポート` Overleafの記事から取ったテキストを使った [LuaTeX 入門（第1部）：それは何か——そして何がそんなに違うのか？](/latex/ja/xiang-xi-ji-shi/07-an-introduction-to-luatex-part-1-what-is-it-and-what-makes-it-so-different.md)

```latex
\documentclass{report}
\title{Sections and Chapters}
\author{Overleaf}
\date{\today}
\begin{document}
\maketitle
\tableofcontents
\chapter{An Introduction to Lua\TeX}

\section{What is it—and what makes it so different?}
Lua\TeX{} は \textit{ツールキット} であり、洗練されたソフトウェアツールやコンポーネントを備えているため、それらを使って幅広い文書を組版できます。この記事のサブタイトルは Lua\TeX について2つの問いも投げかけています。Lua\TeX とは何か、そして何がそんなに違うのか？ 「それは何か？」への答えは明白に思えるかもしれません。「\TeX{} の組版エンジンです！」 そのとおりです。ですが、より広い見方として、この著者が支持するのは、Lua\TeX{} は極めて多用途な、\TeX{} ベースの文書構築・エンジニアリング・システムだということです。

\subsection{Explaining Lua\TeX: Where to start?}
Lua\TeX{} に関するこの最初の記事の目的は、この TeX エンジンが何を提供するのか、そしてその設計がどのように、なぜユーザーに複雑な組版およびデザインの問題に対する幅広い解決策を構築/設計/作成させるのかを理解するための文脈を与えることです。さらに、ある程度の「将来への備え」も提供するかもしれません。

\chapter{Lua\TeX: Background and history}
\section{Introduction}
Lua\TeX{} は、TeX の世界では「新参者」ですが、実際には10年以上にわたって活発に開発されています。

\subsection{Lua\TeX: Opening up \TeX’s “black box”}
Knuth の元祖 \TeX{} プログラムは、今日使われているすべての現代的な \TeX{} エンジンの共通の祖先であり、Lua\TeX{} は実質的には最新の進化段階です。pdf\TeX{} プログラムから派生しており、さらに強力なソフトウェアコンポーネントが追加されていて、多くの追加機能をもたらします。
\end{document}
```

[この例を Overleaf で開く（ `lualatex`)](<https://www.overleaf.com/docs?engine=lualatex\&snip_name=Example+of+a+LaTeX+report\&snip=\documentclass{report}&#xA;\title{Sections+and+Chapters}&#xA;\author{Overleaf}&#xA;\date{\today}&#xA;\begin{document}&#xA;\maketitle&#xA;\tableofcontents&#xA;\chapter{An+Introduction+to+Lua\TeX}&#xA;&#xA;\section{What+is+it—and+what+makes+it+so+different?}&#xA;Lua\TeX{}+is+a+\textit{toolkit}—it+contains+sophisticated+software+tools+and+components+with+which+you+can+construct+(typeset)+a+wide+range+of+documents.+The+sub-title+of+this+article+also+poses+two+questions+about+Lua\TeX:+What+is+it—and+what+makes+it+so+different?+The+answer+to+“What+is+it?”+may+seem+obvious:+“It’s+a+\TeX{}+typesetting+engine!”+Indeed+it+is,+but+a+broader+view,+and+one+to+which+this+author+subscribes,+is+that+Lua\TeX{}+is+an+extremely+versatile+\TeX-based+document+construction+and+engineering+system.&#xA;&#xA;\subsection{Explaining+Lua\TeX:+Where+to+start?}&#xA;The+goal+of+this+first+article+on+Lua\TeX{}+is+to+offer+a+context+for+understanding+what+this+TeX+engine+provides+and+why/how+its+design+enables+users+to+build/design/create+a+wide+range+of+solutions+to+complex+typesetting+and+design+problems—perhaps+also+offering+some+degree+of+“future+proofing”+&#xA;&#xA;\chapter{Lua\TeX:+Background+and+history}&#xA;\section{Introduction}&#xA;Lua\TeX{}+is,+in+\TeX{}+terms,+“the+new+kid+on+the+block”+despite+having+been+in+active+development+for+over+10+years.&#xA;&#xA;\subsection{Lua\TeX:+Opening+up+\TeX’s+“black+box”}&#xA;Knuth’s+original+\TeX{}+program+is+the+common+ancestor+of+all+modern+\TeX{}+engines+in+use+today+and+Lua\TeX{}+is,+in+effect,+the+latest+evolutionary+step:+derived+from+the+pdf\TeX{}+program+but+with+the+addition+of+some+powerful+software+components+which+bring+a+great+deal+of+extra+functionality.&#xA;\end{document}>)

この例では次の出力が生成されます。ここでは、提示しやすいようにページ画像を重ねた 2〜4 ページを示します：

![典型的な LaTeX レポート](/files/98b3c0ae02d8f89a138e62d79d98b07d2531a71f)

### book クラス

次の例は、 `レポート` 例ですが、今回は `\documentclass{book}`、部、章、節、小節、および小小節を含んでいます。例を Overleaf で開くと、 `\subsubsection` は *使用しては* 番号付きです。これは `book` クラスの設計によるものです。この動作を変更したい場合は、文書のプリアンブルに次のコマンドを追加してください：

```latex
\setcounter{secnumdepth}{3}
```

```latex
\documentclass{book}
\title{Sections and Chapters}
\author{Overleaf}
\date{\today}
\begin{document}
\maketitle
\tableofcontents
\part{History of Lua\TeX}

\chapter{An Introduction to Lua\TeX}

\section{What is it—and what makes it so different?}
Lua\TeX{} は \textit{ツールキット} であり、洗練されたソフトウェアツールやコンポーネントを備えているため、それらを使って幅広い文書を組版できます。この記事のサブタイトルは Lua\TeX について2つの問いも投げかけています。Lua\TeX とは何か、そして何がそんなに違うのか？ 「それは何か？」への答えは明白に思えるかもしれません。「\TeX{} の組版エンジンです！」 そのとおりです。ですが、より広い見方として、この著者が支持するのは、Lua\TeX{} は極めて多用途な、\TeX{} ベースの文書構築・エンジニアリング・システムだということです。

\subsection{Explaining Lua\TeX: Where to start?}
Lua\TeX{} に関するこの最初の記事の目的は、この TeX エンジンが何を提供するのか、そしてその設計がどのように、なぜユーザーに複雑な組版およびデザインの問題に対する幅広い解決策を構築/設計/作成させるのかを理解するための文脈を与えることです。さらに、ある程度の「将来への備え」も提供するかもしれません。

\chapter{Lua\TeX: Background and history}
\section{Introduction}
Lua\TeX{} は、TeX の世界では「新参者」ですが、実際には10年以上にわたって活発に開発されています。

\subsection{Lua\TeX: Opening up \TeX’s “black box”}
Knuth の元祖 \TeX{} プログラムは、今日使われているすべての現代的な \TeX{} エンジンの共通の祖先であり、Lua\TeX{} は実質的には最新の進化段階です。pdf\TeX{} プログラムから派生しており、さらに強力なソフトウェアコンポーネントが追加されていて、多くの追加機能をもたらします。

\subsubsection{How Lua\TeX{} processes \texttt{\string\directlua}: A first look}
\verb|\directlua{<code>}| に与えられた⟨code⟩は、まず上で説明した処理と計算を使ってトークンに変換されます。そのトークン列はトークンリストに格納されます。
\end{document}
```

[出力を見るには、 **この例を Overleaf で開いてください** （使用するのは `**lualatex**`)](<https://www.overleaf.com/docs?engine=lualatex\&snip_name=Example+of+a+LaTeX+book\&snip=\documentclass{book}&#xA;\title{Sections+and+Chapters}&#xA;\author{Overleaf}&#xA;\date{\today}&#xA;\begin{document}&#xA;\maketitle&#xA;\tableofcontents&#xA;\part{History+of+Lua\TeX}&#xA;&#xA;\chapter{An+Introduction+to+Lua\TeX}&#xA;&#xA;\section{What+is+it—and+what+makes+it+so+different?}&#xA;Lua\TeX{}+is+a+\textit{toolkit}—it+contains+sophisticated+software+tools+and+components+with+which+you+can+construct+(typeset)+a+wide+range+of+documents.+The+sub-title+of+this+article+also+poses+two+questions+about+Lua\TeX:+What+is+it—and+what+makes+it+so+different?+The+answer+to+“What+is+it?”+may+seem+obvious:+“It’s+a+\TeX{}+typesetting+engine!”+Indeed+it+is,+but+a+broader+view,+and+one+to+which+this+author+subscribes,+is+that+Lua\TeX{}+is+an+extremely+versatile+\TeX-based+document+construction+and+engineering+system.&#xA;&#xA;\subsection{Explaining+Lua\TeX:+Where+to+start?}&#xA;The+goal+of+this+first+article+on+Lua\TeX{}+is+to+offer+a+context+for+understanding+what+this+TeX+engine+provides+and+why/how+its+design+enables+users+to+build/design/create+a+wide+range+of+solutions+to+complex+typesetting+and+design+problems—perhaps+also+offering+some+degree+of+“future+proofing”+&#xA;&#xA;\chapter{Lua\TeX:+Background+and+history}&#xA;\section{Introduction}&#xA;Lua\TeX{}+is,+in+\TeX{}+terms,+“the+new+kid+on+the+block”+despite+having+been+in+active+development+for+over+10+years.&#xA;&#xA;\subsection{Lua\TeX:+Opening+up+\TeX’s+“black+box”}&#xA;Knuth’s+original+\TeX{}+program+is+the+common+ancestor+of+all+modern+\TeX{}+engines+in+use+today+and+Lua\TeX{}+is,+in+effect,+the+latest+evolutionary+step:+derived+from+the+pdf\TeX{}+program+but+with+the+addition+of+some+powerful+software+components+which+bring+a+great+deal+of+extra+functionality.&#xA;&#xA;\subsubsection{How+Lua\TeX{}+processes+\texttt{\string\directlua}:+A+first+look}&#xA;The+⟨code⟩+provided+to+\verb|\directlua{\<code\>}|+is+first+converted+to+tokens+using+the+processes+and+calculations+discussed+above;+that+sequence+of+tokens+is+stored+in+a+token+list.&#xA;\end{document}>)

## 章と節をカスタマイズする

使用できます [`titlesec`](https://ctan.org/pkg/titlesec?lang=en) 章、節、小節のスタイルを簡単にカスタマイズするためのパッケージです。

```latex
\documentclass[a4paper,12pt]{book}
\usepackage[T1]{fontenc}
\usepackage{titlesec}

\titleformat
{\chapter} % command
[display] % shape
{\bfseries\Large\itshape} % format
{Story No. \ \thechapter} % label
{0.5ex} % sep
{
    \rule{\textwidth}{1pt}
    \vspace{1ex}
    \centering
} % before-code
[
\vspace{-0.5ex}%
\rule{\textwidth}{0.3pt}
] % after-code

\titleformat{\section}[wrap]
{\normalfont\bfseries}
{\thesection.}{0.5em}{}

\titlespacing{\section}{12pc}{1.5ex plus .1ex minus .2ex}{1pc}

\begin{document}
\chapter{Let's begin}
\section{First Attempt}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris...

\section{Second attempt}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris...

\end{document}
```

[この `titlesec` 例をOverleafで開いてください。](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=titlesec+example\&snip=%5Cdocumentclass%5Ba4paper%2C12pt%5D%7Bbook%7D%0A%5Cusepackage%5BT1%5D%7Bfontenc%7D%0A%5Cusepackage%7Btitlesec%7D%0A%0A%5Ctitleformat%0A%7B%5Cchapter%7D+%25+command%0A%5Bdisplay%5D+%25+shape%0A%7B%5Cbfseries%5CLarge%5Citshape%7D+%25+format%0A%7BStory+No.+%5C+%5Cthechapter%7D+%25+label%0A%7B0.5ex%7D+%25+sep%0A%7B%0A++++%5Crule%7B%5Ctextwidth%7D%7B1pt%7D%0A++++%5Cvspace%7B1ex%7D%0A++++%5Ccentering%0A%7D+%25+before-code%0A%5B%0A%5Cvspace%7B-0.5ex%7D%25%0A%5Crule%7B%5Ctextwidth%7D%7B0.3pt%7D%0A%5D+%25+after-code%0A%0A%0A%5Ctitleformat%7B%5Csection%7D%5Bwrap%5D%0A%7B%5Cnormalfont%5Cbfseries%7D%0A%7B%5Cthesection.%7D%7B0.5em%7D%7B%7D%0A%0A%5Ctitlespacing%7B%5Csection%7D%7B12pc%7D%7B1.5ex+plus+.1ex+minus+.2ex%7D%7B1pc%7D%0A%0A%5Cbegin%7Bdocument%7D%0A%5Cchapter%7BLet%27s+begin%7D%0A%5Csection%7BFirst+Attempt%7D%0A%0ALorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit%2C+sed+do+%0Aeiusmod+tempor+incididunt+ut+labore+et+dolore+magna+aliqua.+Ut+%0Aenim+ad+minim+veniam%2C+quis+nostrud+exercitation+ullamco+laboris...%0A%0A%5Csection%7BSecond+attempt%7D%0A%0ALorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit%2C+sed+do+%0Aeiusmod+tempor+incididunt+ut+labore+et+dolore+magna+aliqua.+Ut+%0Aenim+ad+minim+veniam%2C+quis+nostrud+exercitation+ullamco+laboris...%0A%0A%5Cend%7Bdocument%7D)

この例では次の出力が生成されます:

![Titlesecolv2.png](/files/e460b400f20ec60c846673ec18b2e5972e5a0e52)

### titlesec のコマンド

一般的なコマンドは2つあります：

```latex
 \titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]
```

ここで `[<shape>]` と `[<after-code>]` は任意のパラメータで、次のとおりです：

* `<command>` は再定義される節分けコマンドです： `\part`, `\chapter`, `\section`, `\subsection`, `\subsubsection`, `\paragraph` または `\subparagraph`.
* `<shape>` は節分けの段落形状です。可能な値は次のとおりです： `hang`, `block`, `display`, `runin`, `leftmargin`, `rightmargin`, `drop`, `wrap` と `frame`.
* `<format>` はタイトル、ラベル、本文に適用される書式です。例えば `\normalfont\Large\bfseries`
* `<label>` は節のラベルを指定します。
* `<sep>` はラベルとタイトル本文の間の水平方向の間隔です。長さで指定する必要があり、空にはできません。
* `<before-code>` はタイトル本文の前に置かれるコードです。
* `<after-code>` はタイトル本文の後に続くコードです。

と

```latex
 \titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}
```

ここで：

* `<left>` 左余白を広げます。
* `<before-sep>` はタイトル前の縦方向の空白です。
* `<after-sep>` はタイトルと節分けされていない本文との間隔です。

このコマンドの \* 付き版（`\titlespacing*`）は、タイトルに続く段落のインデントをなくします。

## さらに読む

詳細は次を参照してください:

* [LaTeX で文書を作成する](/latex/ja/latex-no/01-learn-latex-in-30-minutes.md)
* [太字、斜体、下線](/latex/ja/latex-no/03-bold-italics-and-underlining.md)
* [目次](/latex/ja/wen-shu-gou-zao/02-table-of-contents.md)
* [節と数式の相互参照](/latex/ja/wen-shu-gou-zao/03-cross-referencing-sections-equations-and-floats.md)
* [大規模プロジェクトでの管理](/latex/ja/wen-shu-gou-zao/07-management-in-a-large-project.md)
* [複数ファイルのLaTeXプロジェクト](/latex/ja/wen-shu-gou-zao/08-multi-file-latex-projects.md)
* [ハイパーリンク](/latex/ja/wen-shu-gou-zao/09-hyperlinks.md)
* [ページ番号](/latex/ja/shu-shi-she-ding/03-page-numbering.md)
* [片面文書と両面文書](/latex/ja/shu-shi-she-ding/08-single-sided-and-double-sided-documents.md)
* [複数列](/latex/ja/shu-shi-she-ding/09-multiple-columns.md)
* [カウンタ](/latex/ja/shu-shi-she-ding/10-counters.md)
* [フォントのサイズ、ファミリー、スタイル](/latex/ja/fonto/01-font-sizes-families-and-styles.md)
* [`titlesec` パッケージマニュアル](http://mirrors.ctan.org/macros/latex/contrib/titlesec/titlesec.pdf)


---

# 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://ayakaleaf-pro.ayaka.space/latex/ja/wen-shu-gou-zao/01-sections-and-chapters.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.
