.png)
私は使用しておりscrartcl
、…したいと思っています。
- 目次に図表リストと表リストが記載されている
- 目次のセクションとページ番号の間のスペースをドットで埋める
- 目次の残りの部分は変更しないでください。
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
追加のパッケージを避け、LOF と LOT を TOC に手動で追加するなど、可能な限り最小限のソリューションを希望します。
代わりに使用しようとしましたtocloft
が、他のものが壊れます:
\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}