我在课程文档中使用该tocloft
包book
主要是为了解决 ToC、LoT 和 LoF 中不必要的换行和格式问题。LoF 中的最后一项单独放在新页面上,因此我使用了以下命令(按照手册的建议tocloft
):
\addtocontents{lof}{\protect\enlargethispage{2\baselineskip}}
来解决这个问题。这解决了问题,但是它会在文档中创建一个不需要的新空白页。有什么方法可以摆脱它吗?
我的文档非常庞大,但希望这个 MWE 就足够了。我包括了我使用的所有软件包,以防万一出现我没有想到的冲突(尽管我怀疑其中大多数与此示例无关。):
\documentclass[11pt,twoside, openany]{book}
\usepackage[hidelinks]{hyperref}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage[table]{xcolor}
\usepackage[%
font={small},
labelfont={bf}]{caption}
%footnotes on tables
\usepackage{threeparttable}
\usepackage{hyphsubst}
\HyphSubstLet{english}{usenglishmax}
\usepackage[greek,english]{babel}
\usepackage{amsmath}
\usepackage{longtable,booktabs}
\usepackage{siunitx}
\usepackage[comma,super,sectionbib,sort&compress]{natbib}
\usepackage{chapterbib}
\renewcommand{\bibnumfmt}[1]{(#1)}
\usepackage{titlesec} % For "Chapter" formatting
% Table of Contents
\usepackage[titles]{tocloft}
%
%headers and footers
%
\usepackage{fancyhdr} % formatting not included here.
\begin{document}
\frenchspacing \raggedbottom
\pagestyle{plain}
\frontmatter
\tableofcontents
\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
\clearpage % this is neccessary, otherwise page style is wrong.
%% ---> This is where the undesired empty page is created.
\mainmatter
\pagestyle{fancy}
\addtocontents{toc}{\protect\enlargethispage{2\baselineskip}}
%Chapter 1
\include{chap1}
%Chapter 2
\include{chap2}
%Chapter 3
\include{chap3}
%Chapter 4
\include{chap4}
%Chapter 5
\include{chap5}
%Chapter 6
\include{chap6}
% Inside this chapter, I have the command \addtocontents{lof}{\protect\enlargethispage{2\baselineskip}}
% In order to adjust the final LoF entry so it's not a widow on a single page (or is it an orphan?!?)....
任何帮助都非常感谢。谢谢!