> 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/uk/struktura-dokumenta/02-table-of-contents.md).

# Зміст

У документі LaTeX зміст може автоматично генеруватися та бути змінений відповідно до певного стилю; у цій статті пояснюється, як

## Вступ

Щоб створити зміст, достатньо команди `\tableofcontents` вона виконує свою роботу. Розділи, підрозділи та глави включаються до змісту. Щоб додати записи вручну, наприклад, коли ви хочете ненумерований розділ, використайте команду `\addcontentsline` як показано в наведеному нижче прикладі:

```latex
\documentclass{article}
\usepackage{blindtext}
\usepackage{titlesec}
\title{Розділи та глави}
\author{Gubert Farnsworth}
\date{ }
\begin{document}

\maketitle

\tableofcontents

\section{Вступ}

Це перший розділ.

\blindtext

\addcontentsline{toc}{section}{Ненумерований розділ}
\section*{Ненумерований розділ}

\blindtext

\section{Другий розділ}

\blindtext
\end{document}
```

[Відкрити цей приклад в Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=Table+of+contents+example\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bblindtext%7D%0A%5Cusepackage%7Btitlesec%7D%0A%5Ctitle%7BSections+and+Chapters%7D%0A%5Cauthor%7BGubert+Farnsworth%7D%0A%5Cdate%7B+%7D%0A%5Cbegin%7Bdocument%7D%0A%0A%5Cmaketitle%0A%0A%5Ctableofcontents%0A%0A%5Csection%7BIntroduction%7D%0A%0AThis+is+the+first+section.%0A%0A%5Cblindtext%0A%0A%5Caddcontentsline%7Btoc%7D%7Bsection%7D%7BUnnumbered+Section%7D%0A%5Csection%2A%7BUnnumbered+Section%7D%0A%0A%5Cblindtext%0A%0A%5Csection%7BSecond+Section%7D%0A%0A%5Cblindtext%0A%5Cend%7Bdocument%7D)

Цей приклад дає такий результат:

![Приклад змісту, створеного в LaTeX](/files/8fdf9657ac7ef6528d5344342023c3d4ff351354)

## Змініть назву змісту

Стандартна назва для змісту — **Зміст**; її можна змінити на будь-яку потрібну вам, як показано в наступному прикладі:

```latex
\documentclass{article}
\title{Розділи та глави}
\author{Gubert Farnsworth}
\date{ }
\renewcommand*\contentsname{Підсумок}
\begin{document}
\maketitle
\tableofcontents
\section{Вступ}

Це перший розділ.

Lorem  ipsum  dolor  sit  amet,  consectetuer  adipiscing
elit.   Etiam  lobortisfacilisis sem.  Nullam nec mi et
neque pharetra sollicitudin.  Praesent imperdietmi nec ante.
Donec ullamcorper, felis non sodales...

\addcontentsline{toc}{section}{Ненумерований розділ}
\section*{Ненумерований розділ}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Etiam lobortis facilisissem.  Nullam nec mi et neque pharetra
sollicitudin.  Praesent imperdiet mi necante...

\section{Другий розділ}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Etiam lobortis facilisissem.  Nullam nec mi et neque pharetra
sollicitudin.  Praesent imperdiet mi necante...
\end{document}
```

[Відкрити цей приклад в Overleaf](https://www.overleaf.com/docs?engine=pdflatex\&snip_name=How+to+change+title+of+table+of+contents\&snip=%5Cdocumentclass%7Barticle%7D%0A%5Ctitle%7BSections+and+Chapters%7D%0A%5Cauthor%7BGubert+Farnsworth%7D%0A%5Cdate%7B+%7D%0A%5Crenewcommand%2A%5Ccontentsname%7BSummary%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cmaketitle%0A%5Ctableofcontents%0A%5Csection%7BIntroduction%7D%0A+++%0AThis+is+the+first+section.%0A++++++%0ALorem++ipsum++dolor++sit++amet%2C++consectetuer++adipiscing++%0Aelit.+++Etiam++lobortisfacilisis+sem.++Nullam+nec+mi+et+%0Aneque+pharetra+sollicitudin.++Praesent+imperdietmi+nec+ante.+%0ADonec+ullamcorper%2C+felis+non+sodales...%0A+++++++%0A%5Caddcontentsline%7Btoc%7D%7Bsection%7D%7BUnnumbered+Section%7D%0A%5Csection%2A%7BUnnumbered+Section%7D%0A%0ALorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.++%0AEtiam+lobortis+facilisissem.++Nullam+nec+mi+et+neque+pharetra+%0Asollicitudin.++Praesent+imperdiet+mi+necante...%0A%0A%5Csection%7BSecond+Section%7D%0A+++++++%0ALorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.++%0AEtiam+lobortis+facilisissem.++Nullam+nec+mi+et+neque+pharetra+%0Asollicitudin.++Praesent+imperdiet+mi+necante...%0A%5Cend%7Bdocument%7D)

Цей приклад дає такий результат:

![Зміна назви змісту в LaTeX](/files/a94d1cf2a8cee3c51e61c07f9cd13fdc6f6f6f26)

Рядок `\renewcommand*\contentsname{Підсумок}` запише "Підсумок" замість стандартного значення. Якщо ви використовуєте пакет *babel* для [підтримки міжнародних мов](/latex/uk/movi/03-international-language-support.md), згадану вище команду слід помістити всередину фігурних дужок

```latex
\addto\captionsenglish{ }
```

Замість English у `\captionenglish` напишіть назву мови, яку ви задали в babel.

## Додаткове читання

Докладніше див.:

* [Створення документа в LaTeX](/latex/uk/osnovi-latex/01-learn-latex-in-30-minutes.md)
* [Жирний, курсив і підкреслення](/latex/uk/osnovi-latex/03-bold-italics-and-underlining.md)
* [Підтримка міжнародних мов](/latex/uk/movi/03-international-language-support.md)
* [Перехресні посилання на розділи та рівняння](/latex/uk/struktura-dokumenta/03-cross-referencing-sections-equations-and-floats.md)
* [Покажчики](/latex/uk/struktura-dokumenta/04-indices.md)
* [Глосарії](/latex/uk/struktura-dokumenta/05-glossaries.md)
* [Керування у великому проєкті](/latex/uk/struktura-dokumenta/07-management-in-a-large-project.md)
* [Багатофайлові проєкти LaTeX](/latex/uk/struktura-dokumenta/08-multi-file-latex-projects.md)
* [Гіперпосилання](/latex/uk/struktura-dokumenta/09-hyperlinks.md)
* [Нумерація сторінок](/latex/uk/formatuvannya/03-page-numbering.md)
* [Односторонні та двосторонні документи](/latex/uk/formatuvannya/08-single-sided-and-double-sided-documents.md)
* [Кілька колонок](/latex/uk/formatuvannya/09-multiple-columns.md)
* [Лічильники](/latex/uk/formatuvannya/10-counters.md)
* [Розміри, гарнітури та стилі шрифтів](/latex/uk/shrifti/01-font-sizes-families-and-styles.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/uk/struktura-dokumenta/02-table-of-contents.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.
