tocloft parece agregar automáticamente espacio adicional entre las entradas de la tabla de diferentes capítulos. Quiero un espacio único entre todas las entradas de la lista de tablas. En este momento tengo un espacio entre las entradas del mismo capítulo y dos espacios entre las de diferentes capítulos. Aquí hay un MWE de lo que tengo.
\documentclass[11pt, letterpaper]{thesis}
\usepackage[lmargin=1.5in, rmargin=1.0in, tmargin=2.0in, bmargin=1.0in]{geometry}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
\usepackage{tocloft}
\addtocontents{lot}{Table \hfill\ {Page} \par}
\usepackage{titlesec}
\usepackage{caption}
\usepackage{ctable}
\usepackage{tabularx}
\begin{document}
% List of Tables
\renewcommand{\cftlottitlefont}{\normalfont}
\renewcommand\listtablename{\centerline{TABLES}}
\renewcommand{\cfttabaftersnum}{.}
\setlength{\cfttabindent}{0pt}
\setlength\cftbeforechapskip{0pt}
\setlength\cftbeforetabskip{11pt}
\listoftables
% End List of Tables
\chapter{Chapter One}
\begin{table}[htbp]
\centering
\begin{tabular}{lll}
\toprule
& Col 1 & Col 2 \\
\midrule
Row 1 & 11 & 12 \\
Row 2 & 21 & 22 \\
\bottomrule
\end{tabular}
\caption{This is table 1.1.}
\end{table}
\begin{table}[htbp]
\centering
\begin{tabular}{lll}
\toprule
& Col 1 & Col 2 \\
\midrule
Row 1 & 11 & 12 \\
Row 2 & 21 & 22 \\
\bottomrule
\end{tabular}
\caption{This is table 1.2.}
\end{table}
\chapter{Chapter Two}
\begin{table}[htbp]
\centering
\begin{tabular}{lll}
\toprule
& Col 1 & Col 2 \\
\midrule
Row 1 & 11 & 12 \\
Row 2 & 21 & 22 \\
\bottomrule
\end{tabular}
\caption{This is table 2.1.}
\end{table}
\begin{table}[htbp]
\centering
\begin{tabular}{lll}
\toprule
& Col 1 & Col 2 \\
\midrule
Row 1 & 11 & 12 \\
Row 2 & 21 & 22 \\
\bottomrule
\end{tabular}
\caption{This is table 2.2.}
\end{table}
\end{document}
Yo uso \setlength\cftbeforechapskip{0pt}
, pero esto parece no tener ningún efecto. Encontré esto:¿Cómo cambiar el interlineado en mi lista de figuras?Probé algunas de las sugerencias pero ninguna pareció funcionar para mí. ¿Algunas ideas?
Respuesta1
Ese espacio no lo produce tocloft
sino la clase utilizada, generalmente en la definición de \@chapter
(al menos en las clases estándar); una posible solución sería redefinir este comando para suprimir el espaciado adicional; El siguiente código muestra esta redefinición para la clase estándar book
(las líneas que agregan espacio a LoF y LoT fueron comentadas y marcadas con %NEW
):
\documentclass[11pt, letterpaper]{book}
\usepackage[lmargin=1.5in, rmargin=1.0in, tmargin=2.0in, bmargin=1.0in]{geometry}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
\usepackage{tocloft}
\addtocontents{lot}{Table \hfill\ {Page} \par}
\usepackage{titlesec}
\usepackage{caption}
\usepackage{ctable}
\usepackage{tabularx}
\makeatletter
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
% \addtocontents{lof}{\protect\addvspace{10\p@}}% NEW
% \addtocontents{lot}{\protect\addvspace{10\p@}}% NEW
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\makeatother
\begin{document}
% List of Tables
\renewcommand{\cftlottitlefont}{\normalfont}
\renewcommand\listtablename{\centerline{TABLES}}
\renewcommand{\cfttabaftersnum}{.}
\setlength{\cfttabindent}{0pt}
\setlength\cftbeforechapskip{0pt}
\setlength\cftbeforetabskip{11pt}
\listoftables
% End List of Tables
\chapter{Chapter One}
\begin{table}[htbp]
\centering
\begin{tabular}{lll}
\toprule
& Col 1 & Col 2 \\
\midrule
Row 1 & 11 & 12 \\
Row 2 & 21 & 22 \\
\bottomrule
\end{tabular}
\caption{This is table 1.1.}
\end{table}
\begin{table}[htbp]
\centering
\begin{tabular}{lll}
\toprule
& Col 1 & Col 2 \\
\midrule
Row 1 & 11 & 12 \\
Row 2 & 21 & 22 \\
\bottomrule
\end{tabular}
\caption{This is table 1.2.}
\end{table}
\chapter{Chapter Two}
\begin{table}[htbp]
\centering
\begin{tabular}{lll}
\toprule
& Col 1 & Col 2 \\
\midrule
Row 1 & 11 & 12 \\
Row 2 & 21 & 22 \\
\bottomrule
\end{tabular}
\caption{This is table 2.1.}
\end{table}
\begin{table}[htbp]
\centering
\begin{tabular}{lll}
\toprule
& Col 1 & Col 2 \\
\midrule
Row 1 & 11 & 12 \\
Row 2 & 21 & 22 \\
\bottomrule
\end{tabular}
\caption{This is table 2.2.}
\end{table}
\end{document}
Dado que está utilizando una clase no estándar, es posible que la solución anterior no sea adecuada para usted; en ese caso, necesitaremos ver cómo su clase agrega este espacio.