> 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/ko/document-structure/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{Introduction}

이것은 첫 번째 절입니다.

\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/732030aec0160d0bd52d50dedf486b2ac7353b55)

## 목차 제목 변경

목차의 기본 제목은 **목차**; 다음 예시에서 보듯 필요에 따라 무엇이든 바꿀 수 있습니다:

```latex
\documentclass{article}
\title{섹션과 장}
\author{Gubert Farnsworth}
\date{ }
\renewcommand*\contentsname{요약}
\begin{document}
\maketitle
\tableofcontents
\section{Introduction}

이것은 첫 번째 절입니다.

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/ee0abaf26f6b9499f42f2cfce5052379a6c66b97)

다음 줄 `\renewcommand*\contentsname{요약}` 은 기본값 대신 "Summary"를 출력합니다. 패키지를 사용 중이라면 *babel* 에는 [국제 언어 지원](/latex/ko/languages/03-international-language-support.md), 앞서 언급한 명령은 다음의 중괄호 안에 넣어야 합니다

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

에서 English 대신 `\captionenglish` babel에서 설정한 언어 이름을 쓰세요.

## 추가 읽을거리

자세한 내용은 다음을 참조하세요:

* [LaTeX에서 문서 만들기](/latex/ko/latex/01-learn-latex-in-30-minutes.md)
* [굵게, 이탤릭체 및 밑줄](/latex/ko/latex/03-bold-italics-and-underlining.md)
* [국제 언어 지원](/latex/ko/languages/03-international-language-support.md)
* [섹션과 방정식의 상호 참조](/latex/ko/document-structure/03-cross-referencing-sections-equations-and-floats.md)
* [색인](/latex/ko/document-structure/04-indices.md)
* [용어집](/latex/ko/document-structure/05-glossaries.md)
* [대규모 프로젝트에서의 관리](/latex/ko/document-structure/07-management-in-a-large-project.md)
* [다중 파일 LaTeX 프로젝트](/latex/ko/document-structure/08-multi-file-latex-projects.md)
* [하이퍼링크](/latex/ko/document-structure/09-hyperlinks.md)
* [페이지 번호 매기기](/latex/ko/formatting/03-page-numbering.md)
* [단면 및 양면 문서](/latex/ko/formatting/08-single-sided-and-double-sided-documents.md)
* [다중 열](/latex/ko/formatting/09-multiple-columns.md)
* [카운터](/latex/ko/formatting/10-counters.md)
* [글꼴 크기, 패밀리 및 스타일](/latex/ko/fonts/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/ko/document-structure/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.
