调整 LoF 和 LoT 中条目之间的间距

调整 LoF 和 LoT 中条目之间的间距

我正在尝试调整 LoF 和 LoT 中条目之间的间距。我的代码是

\documentclass[11pt,a4paper]{book}
\usepackage[english,greek]{babel}
\setcounter{secnumdepth}{3}
\usepackage[iso-8859-7]{inputenc}
\usepackage{kerkis}
\usepackage[pdftex]{graphicx}
\usepackage[margin=2.8cm]{geometry}
\usepackage[Glenn]{fncychap}
\usepackage{fancyhdr}
%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\usepackage{tocloft}
\setlength\cftparskip{-15pt}%For ToC works great
\setlength\cftbeforesecskip{-8pt}%For ToC works great
\setlength\cftbeforesubsecskip{-5pt}%For ToC works great
\setlength\cftbeforechapskip{-1pt}%For ToC works great
\setlength\cftaftertoctitleskip{-50pt}%For ToC works great

% I also tried \renewcommand instead of \setlength
\setlength\cftbeforeloftitleskip{-2cm}%It has no effect in LoF
\setlength\cftbeforelottitleskip{-5cm}%It has no effect inLoT

\makeatletter
\newcommand*{\tocwithouttitle}{\@starttoc{toc}}
\makeatother
%--------------------------------------------------------------------------------
\makeatletter
\newcommand*{\lofwithouttitle}{\@starttoc{lof}}
\makeatother
%--------------------------------------------------------------------------------
\makeatletter
\newcommand*{\lotwithouttitle}{\@starttoc{lot}}
\makeatother
%--------------------------------------------------------------------------------
%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

\begin{document}

%~~~~~~~~~~~~~~~~~~~~~~~Front-Page~~~~~~~~~~~~~~~~~~~~~~~~~~
\begin{titlepage}
Εξώφυλλο
\end{titlepage}

\chapter*{\contentsname}
\markboth{\MakeUppercase{\contentsname}}{\MakeUppercase{\contentsname}}
\tocwithouttitle
\addcontentsline{toc}{chapter}{Πειρεχόμενα}

%LoF
\chapter*{Κατάλογος σχημάτων}%List of Figures
\markboth{\MakeUppercase{Κατάλογος Σχημάτων}}{\MakeUppercase{Κατάλογος Σχημάτων}}
%\renewcommand\cftbeforeloftitleskip{5pt}
%\renewcommand\cftbeforelottitleskip{5pt}
\lofwithouttitle
%\setlength\cftbeforefigskip{0pt}
\addcontentsline{toc}{chapter}{Κατάλογος Σχημάτων}

%LoT
\newpage

\chapter*{Κατάλογος Πινάκων}
\markboth{\MakeUppercase{Κατάλογος Πινάκων}}{\MakeUppercase{Κατάλογος Πινάκων}}
\lotwithouttitle
%\renewcommand\cftbeforeloftitleskip{5pt}
%\renewcommand\cftbeforelottitleskip{5pt}
\addcontentsline{toc}{chapter}{Κατάλογος Πινάκων}

\newpage
\end{document}

虽然有些代码可以在 ToC 上运行(参见序言中的注释),但我无法调整 LoF/LoT 中的间距。如何实现?

答案1

我找到答案了!

\setlength\cftbeforeloftitleskip{-2cm}
\setlength\cftbeforelottitleskip{-5cm}

应替换为

\setlength\cftbeforefigskip{-2cm}
\setlength\cftbeforetabskip{-5cm}

一些很好的价值观,仅供参考

\setlength\cftbeforefigskip{-5pt}
\setlength\cftbeforetabskip{-5pt}

相关内容