在我的表格列表,数字和标题文本太靠近,有时会重叠,导致数字过宽。
为此会生成一个警报(尽管它没有提到表格列表具体来说):
Package tocbasic Warning: number width of table toc entries should be increased
!
(tocbasic) Currently used number width = 25.2507pt,
(tocbasic) Wanted number separation = 4.37993pt,
(tocbasic) Reserved number width = 25.18501pt on input line 16.
这是一个非常人为的例子,其中表格的编号被标题覆盖
\documentclass{scrbook}
\begin{document}
\tableofcontents
\listoftables
\chapter{Twiddle}
\section{Dee}
\appendix
\setcounter{chapter}{22}
\chapter{Tweedle}
\section{Dum}
\begin{table}[htb]
\caption{The is time is 5:21}
\caption{The is time is 5:22}
\caption{The is time is 5:23}
\caption{The is time is 5:24}
\caption{The is time is 5:25}
\caption{The is time is 5:26}
\caption{The is time is 5:27}
\caption{The is time is 5:28}
\caption{The is time is 5:29}
\caption{The is time is 5:30}
\caption{The is time is 5:31}
\caption{The is time is 5:32}
\caption{The is time is 5:33}
\caption{The is time is 5:34}
\caption{The is time is 5:35}
\caption{The is time is 5:36}
\caption{The is time is 5:37}
\caption{The is time is 5:38}
\end{table}
\end{document}enter code here
\RedeclareSectionCommand[
tocnumwidth=30pt
]{section}
\RedeclareSectionCommand[
tocnumwidth=36pt
]{subsection}
我应该使用什么名称(而不是章节或小节)来调整托克纳姆宽度为一个表格列表和/或图片列表;或者有没有完全不同的方法可以做到这一点?
另外,有人能建议我如何通过查看源代码或更好的是,在 KOMAscript 手册中发现这一点吗?
答案1
\RedeclareSectionCommand
不能用于配置table
表列表的条目。但是阅读以下文档\RedeclareSectionCommand
:
不同的目录条目样式还具有不同的附加属性。如果在它们前面加上 ,则可以直接设置它们。例如,您可以使用
toc
设置 […] 数字宽度 。有关更多目录条目样式属性,请参阅第 15.3 节 […]numwidth
tocnumwidth
导致进入第 15.3 节和属性numwidth
。在本节中,我们可以找到\DeclareTOCStyleEntry
设置命令numwidth
。该命令有一个可选参数和两个必需参数。第一个可选参数是选项或属性的列表。这是numwidth=…
我们想要设置的。第二个必需参数是样式。对于表格或图形条目,我们可以使用(default
这是 KOMA-Script 类使用的默认样式)或提供专用样式numwidth
,例如tocline
。最后一个也是必需的参数是条目级别,即table
。因此,我们将有例如序言行:
\DeclareTOCStyleEntry[numwidth=35pt]{default}{table}
将使用样式(带有)的条目numwidth
的数字宽度属性设置为 35pt。table
default
tocline
scrbook
将其添加到您的示例中:
\documentclass{scrbook}
\DeclareTOCStyleEntry[numwidth=35pt]{default}{table}
\begin{document}
\tableofcontents
\listoftables
\chapter{Twiddle}
\section{Dee}
\appendix
\setcounter{chapter}{22}
\chapter{Tweedle}
\section{Dum}
\begin{table}[htb]
\caption{The is time is 5:21}
\caption{The is time is 5:22}
\caption{The is time is 5:23}
\caption{The is time is 5:24}
\caption{The is time is 5:25}
\caption{The is time is 5:26}
\caption{The is time is 5:27}
\caption{The is time is 5:28}
\caption{The is time is 5:29}
\caption{The is time is 5:30}
\caption{The is time is 5:31}
\caption{The is time is 5:32}
\caption{The is time is 5:33}
\caption{The is time is 5:34}
\caption{The is time is 5:35}
\caption{The is time is 5:36}
\caption{The is time is 5:37}
\caption{The is time is 5:38}
\end{table}
\end{document}
结果是:
顺便说一句:除了使用显式的,numwidth
您还可以使用属性dynnumwidth
:
\documentclass{scrbook}
\DeclareTOCStyleEntry[dynnumwidth]{default}{table}
\begin{document}
\tableofcontents
\listoftables
\chapter{Twiddle}
\section{Dee}
\appendix
\setcounter{chapter}{22}
\chapter{Tweedle}
\section{Dum}
\begin{table}[htb]
\caption{The is time is 5:21}
\caption{The is time is 5:22}
\caption{The is time is 5:23}
\caption{The is time is 5:24}
\caption{The is time is 5:25}
\caption{The is time is 5:26}
\caption{The is time is 5:27}
\caption{The is time is 5:28}
\caption{The is time is 5:29}
\caption{The is time is 5:30}
\caption{The is time is 5:31}
\caption{The is time is 5:32}
\caption{The is time is 5:33}
\caption{The is time is 5:34}
\caption{The is time is 5:35}
\caption{The is time is 5:36}
\caption{The is time is 5:37}
\caption{The is time is 5:38}
\end{table}
\end{document}
至少三LaTeX 运行后结果为:
有关文档,dynnumwidth
请参阅 KOMA-Script 手册中的表 15.1。
内幕消息:如果您想知道使用的numwidth
值dynnumwidth
,请参阅行
\global\@namedef{scr@dte@table@lastmaxnumwidth}{32.66748pt}
在*.aux
文件中。