패키지
\usepackage{tocbibind}
목차 자체를 포함할 수 있지만 이는 번호를 매기지 않습니다. 목차에 숫자를 포함시켜(섹션과 같도록) 이를 목차에 포함시키는 것이 가능한지 알고 싶습니다.
예를 들면 다음과 같습니다.
- 추상적인
- 내용물
- 섹션 1
그러면 목차에 이 3개가 모두 표시됩니다.
답변1
표준 클래스에서는 package를 사용할 수 있습니다 tocbasic
.
\documentclass{article}
\usepackage{lipsum}% only for dummy text
\usepackage{tocbasic}
\addtotoclist[\jobname]{toc}
\renewcommand*\tableofcontents{\listoftoc[{\contentsname}]{toc}}
\setuptoc{toc}{numbered}
\begin{document}
\section{Abstract}
\lipsum[1]
\tableofcontents
\section{Section 1}
\lipsum[2-3]
\end{document}
패키지는 tocbasic
KOMA-Script 번들의 일부입니다. KOMA-Script 클래스는 이를 자동으로 로드합니다.
\documentclass{scrartcl}
\usepackage{lipsum}% only for dummy text
\setuptoc{toc}{numbered}
\begin{document}
\section{Abstract}
\lipsum[1]
\tableofcontents
\section{Section 1}
\lipsum[2-3]
\end{document}