如何才能使一本书中的 TOC、LOF 和 LOT 中的引导点大小相同?

如何才能使一本书中的 TOC、LOF 和 LOT 中的引导点大小相同?

因此,我在 TOC、LOF 和 LOT 中获得了不同大小的引导点。以下是 LuaLatex 中的 MWE;在 Lyx 中生成:

% Preview source code

%% LyX 2.3.6.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[oneside,english]{extbook}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{graphicx}

% Used for setting up the TOC, LOF & LOT.
\usepackage{tocloft}

\renewcommand{\cftchapfont}{\rmfamily\fontsize{11pt}{11}}
\renewcommand{\cfttabfont} {\rmfamily\fontsize{11pt}{11}}
\renewcommand{\cftfigfont} {\rmfamily\fontsize{11pt}{11}}

\renewcommand\cftchappagefont{\rmfamily\fontsize{11pt}{11}}
\renewcommand\cfttabpagefont {\rmfamily\fontsize{11pt}{11}}
\renewcommand\cftfigpagefont {\rmfamily\fontsize{11pt}{11}}

%Sets the spacing between dots
\renewcommand\cftchapdotsep{\cftdotsep}
\renewcommand\cftfigdotsep{\cftdotsep}
\renewcommand\cfttabdotsep{\cftdotsep}

%Sets the size of the TOC dots.  Comment this out to see normal size dots; but note 
%that the same problem persists.
\newcommand\mydot[1]{\scalebox{#1}{.}}
\renewcommand\cftdot{\mydot{2}}

\makeatother

\usepackage{babel}
\begin{document}
\tableofcontents{}

\listoffigures

\listoftables

\newpage{}

\chapter{Some Chapter}

xyzzy

\begin{figure}
\caption{Some Figure}

\end{figure}

\medskip{}

\begin{table}
\caption{Some Table}

\end{table}

\end{document}

它看起来是这样的:

点点傻傻

请注意,我在序言中添加了两行代码以使圆点变大。但是,注释掉这两行代码后,问题仍然存在。我对三个列表中的每个项目都使用了相同的字体大小。如果我注释掉更改圆点大小的代码并注释掉该行,问题仍然存在\usepackage{graphicx}。请注意,tocloft允许指定自定义符号作为圆点;但它不会将其分解为 TOC、LOF 和 LOT 设置。

答案1

这里的问题是,领导者chap被设定在大胆的( ),而ures 和les\bfseries的字体则设置为常规字体。更新为不使用figtab\cftchapleader大胆的将以下内容添加到您的序言中:

\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}

在此处输入图片描述

\documentclass[oneside,english]{extbook}

\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\usepackage{graphicx}

% Used for setting up the TOC, LOF & LOT.
\usepackage{tocloft}

\renewcommand{\cftchapfont}{\rmfamily\fontsize{11pt}{11}}
\renewcommand{\cfttabfont} {\rmfamily\fontsize{11pt}{11}}
\renewcommand{\cftfigfont} {\rmfamily\fontsize{11pt}{11}}

\renewcommand\cftchappagefont{\rmfamily\fontsize{11pt}{11}}
\renewcommand\cfttabpagefont {\rmfamily\fontsize{11pt}{11}}
\renewcommand\cftfigpagefont {\rmfamily\fontsize{11pt}{11}}

%Sets the spacing between dots
\renewcommand\cftchapdotsep{\cftdotsep}
\renewcommand\cftfigdotsep{\cftdotsep}
\renewcommand\cfttabdotsep{\cftdotsep}

% Remove \bfseries from chapter leader
\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}}

%Sets the size of the TOC dots.  Comment this out to see normal size dots; but note 
%that the same problem persists.
\newcommand\mydot[1]{\scalebox{#1}{.}}
\renewcommand\cftdot{\mydot{2}}

\begin{document}

\tableofcontents

\listoffigures

\listoftables

\newpage

\chapter{Some Chapter}

xyzzy

\begin{figure}
  \caption{Some Figure}
\end{figure}

\begin{table}
  \caption{Some Table}
\end{table}

\end{document}

相关内容