목차의 섹션 항목을 점으로 채웁니다(scrartcl 사용).

목차의 섹션 항목을 점으로 채웁니다(scrartcl 사용).

사용하고 scrartcl싶고…

  1. 목차에 그림 목록과 표 목록이 나열되어 있습니다.
  2. 목차에서 섹션과 페이지 번호 사이의 공간을 점으로 채웁니다.
  3. 나머지 목차는 변경하지 않고 그대로 둡니다.

tocstyle따라서 이것은 (아래 코드)를 사용하여 생성된 원하는 출력입니다 .

\documentclass[listof=totoc]{scrartcl}

% Problem: alpha version and warning.
\usepackage{tocstyle}
\newtocstyle[KOMAlike][leaders]{alldotted}{}
\usetocstyle{alldotted}

\begin{document}
\tableofcontents
\vfill\hrule
\listoffigures
\listoftables

\section{Test section}
\subsection{Test subsection}
\end{document}

질문: 를 사용하지 않고 어떻게 동일한 출력을 얻을 수 있습니까 tocstyle? tocstyle패키지가 향후 변경될 수 있는 알파 버전이라는 경고를 항상 생성하기 때문에 피하고 싶습니다 .

추가 패키지를 피하고 TOC에 LOF 및 LOT를 수동으로 추가하는 등 가능한 최소한의 솔루션을 선호합니다.

이미 대신 사용하려고 시도했지만 tocloft다른 문제가 중단되었습니다. <code>tocloft</code>의 결과

\documentclass[listof=totoc]{scrartcl}

% Problem: LOF and LOT not in TOC; different font style for sections.
\usepackage{tocloft}
\renewcommand{\cftsecdotsep}{\cftdotsep}
\renewcommand{\cftsecleader}{\cftdotfill{\cftsecdotsep}}

\begin{document}
\tableofcontents
\vfill\hrule
\listoffigures
\listoftables

\section{Test section}
\subsection{Test subsection}
\end{document}

답변1

옵션을 사용하세요 toc=sectionentrywithdots. 설명서에는 베타 기능이라고 나와 있지만 경고는 생성되지 않습니다.

\documentclass[listof=totoc,toc=sectionentrywithdots]{scrartcl}  


\begin{document}
\tableofcontents
\vfill\hrule
\listoffigures
\listoftables

\section{Test section}
\subsection{Test subsection}
\end{document}

여기에 이미지 설명을 입력하세요

관련 정보