我已尽力将代码简化为 MWE。我有一份包含单独文件的论文文档。为了展示问题,我删除了所有文本,只在 MWE 中包含 1 章。主文件如下:
\documentclass[12pt]{report}
\renewcommand{\familydefault}{\rmdefault}
\usepackage{harvard}
\usepackage{amssymb}
\usepackage{amsmath}
% TAMU Thesis Packages
\usepackage[latin9]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=1.25in,bmargin=1.25in,lmargin=1.4in,rmargin=1.15in}
\pagestyle{plain}
\usepackage[doublespacing]{setspace}
\usepackage{tocloft}
\usepackage[rm, tiny,center, compact]{titlesec}
\usepackage{indentfirst}
\usepackage{epstopdf}
\usepackage{graphicx,float,wrapfig}
\usepackage{etoolbox}
\usepackage{tocvsec2}
\usepackage[titletoc]{appendix}
\usepackage{appendix}
\usepackage{tamuconfig}
\usepackage[font=singlespacing]{caption}
\include{defs}
\begin{document}
\renewcommand{\tamumanuscripttitle}{An analysis of bubble plumes in unstratified stagnant water}
\renewcommand{\tamupapertype}{Dissertation}
\renewcommand{\tamufullname}{Chung Kei Chris LAI}
\renewcommand{\tamudegree}{Doctor of Philosophy}
\renewcommand{\tamuchairone}{Scott A. Socolofsky}
\renewcommand{\tamumemberone}{Kuang-An Chang}
\newcommand{\tamumembertwo}{Hamn-Ching Chen}
\newcommand{\tamumemberthree}{Mohsen Pourahmadi}
\renewcommand{\tamudepthead}{Robin Autenrieth}
\renewcommand{\tamugradmonth}{December}
\renewcommand{\tamugradyear}{2015}
\renewcommand{\tamudepartment}{Civil Engineering}
\input{../lists}
\pagestyle{plain}
\pagenumbering{arabic}
\setcounter{page}{1}
\input{../ch_01}
\end{document}
列表文件如下:
\phantomsection
\addcontentsline{toc}{chapter}{TABLE OF CONTENTS}
\begin{singlespace}
\renewcommand\contentsname{\normalfont} {\centerline{TABLE OF CONTENTS}}
\setlength{\cftaftertoctitleskip}{1em}
\renewcommand{\cftaftertoctitle}{%
\hfill{\normalfont {Page}\par}}
\setlength{\cftbeforechapskip}{0.2cm}
\setlength{\cftbeforesecskip}{-0.4cm}
\setlength{\cftbeforesubsecskip}{-0.45cm}
\tableofcontents
\end{singlespace}
\pagebreak{}
\phantomsection
\addcontentsline{toc}{chapter}{LIST OF FIGURES}
\renewcommand{\cftloftitlefont}{\center\normalfont\MakeUppercase}
\setlength{\cftbeforeloftitleskip}{-12pt}
\renewcommand{\cftafterloftitleskip}{12pt}
\renewcommand{\cftafterloftitle}{%
\\[4em]\mbox{}\hspace{4pt}FIGURE\hfill{\normalfont Page}\vskip\baselineskip}
\begingroup
\begin{center}
\begin{singlespace}
\setlength{\cftbeforefigskip}{0.6cm}
\setlength{\cftbeforetabskip}{0.4cm}
\listoffigures
\end{singlespace}
\end{center}
\pagebreak{}
\phantomsection
\addcontentsline{toc}{chapter}{LIST OF TABLES}
\renewcommand{\cftlottitlefont}{\center\normalfont\MakeUppercase}
\setlength{\cftbeforelottitleskip}{-12pt}
\renewcommand{\cftafterlottitleskip}{12pt}
\renewcommand{\cftafterlottitle}{%
\\[4em]\mbox{}\hspace{4pt}TABLE\hfill{\normalfont Page}\vskip\baselineskip}
\begin{center}
\begin{singlespace}
\setlength{\cftbeforetabskip}{0.7cm}
\listoftables
\end{singlespace}
\end{center}
\endgroup
\pagebreak{}
第 1 章如下-
\chapter{\uppercase{Budget of turbulent kinetic energy in bubble plumes by acoustic Doppler velocimetry (ADV)}}
\label{ch_TKE}
\begin{flushright}
{\it ``Everything is theoretically impossible, until it is done.''} - Robert A. Heinlein
\end{flushright}
\section{Introduction}\label{sec:intro}
\section{Laboratory experiments}\label{sec:expt1}
\subsection{Set-up}
\subsection{Velocities measured by an ADV}
\subsection{Some experiences working with the profiling ADV - Vectrino II} \label{sec:2_3}
\section{Post-processing of raw ADV data}\label{sec:expt2}
\subsection{Doppler noise estimation and noise-reduced estimates of the stress tensor}
\subsection{Decomposition of streamwise velocity w} \label{sec:5_2}
\subsection{Wavelet analysis on streamwise velocity $\tilde{w}$}
\section{Summary and discussions}\label{sec:conclusion}
\pagebreak{}
tamuconfig 文件如下:
\ProvidesPackage{tamuconfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Titlepage Commands
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\tamumanuscripttitle}{Default Title}
\newcommand{\tamupapertype}{DissertationOrThesis}
\newcommand{\tamufullname}{Full Name}
\newcommand{\tamudegree}{Doctor of Philosophy}
\newcommand{\tamuchairone}{Chair Name}
\newcommand{\tamumemberone}{Committee Member1}
\newcommand{\tamudepthead}{Department Head}
\newcommand{\tamugradmonth}{MonthofGraduation}
\newcommand{\tamugradyear}{YearofGraduation}
\newcommand{\tamudepartment}{Department Name}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Titlesec Customations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\chapter}{\centering\normalsize}{\thechapter.}{1em}{}
\titleformat{\section}{\centering\normalsize}{\thesection}{1em}{}
\titleformat{\subsection}{\centering\normalsize\it}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\centering\normalsize\it}{\thesubsubsection}{1em}{}
\setcounter{secnumdepth}{3}
\addtocontents{toc}{\protect\renewcommand{\protect\cftchapleader}
{\protect\cftdotfill{\cftsecdotsep}}} % puts leader dots on chapters.
%%%%%%%% Remove the extra vertical space before chapter titles when using report class %%%%%%%%%%%
\makeatletter
\def\ttl@mkchap@i#1#2#3#4#5#6#7{%
\ttl@assign\@tempskipa#3\relax\beforetitleunit
\vspace{\@tempskipa}%<<<<<< REMOVE THE * AFTER \vspace
\global\@afterindenttrue
\ifcase#5 \global\@afterindentfalse\fi
\ttl@assign\@tempskipb#4\relax\aftertitleunit
\ttl@topmode{\@tempskipb}{%
\ttl@select{#6}{#1}{#2}{#7}}%
\ttl@finmarks % Outside the box!
\@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%% TOC Customations %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Aesthetic spacing redefines that look nicer to me than the defaults.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Makes the font in the TOC normal.
\renewcommand\cftsecfont{\normalfont}
\renewcommand\cftsecpagefont{\normalfont}
\renewcommand\cftpartfont{\normalfont}
\renewcommand\cftpartpagefont{\normalfont}
\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} % adds leader dots for parts
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}} % adds leader dots for chapters
\renewcommand{\cftchapaftersnum}{.} % adds a period after chapter numbers in the toc.
\renewcommand\cftsecafterpnum{\vskip\baselineskip} % These lines allow for long toc titles to be displayed single-spaced within.
\renewcommand\cftsubsecafterpnum{\vskip\baselineskip}
\renewcommand\cftsubsubsecafterpnum{\vskip\baselineskip}
\renewcommand\cftchapafterpnum{\vskip\baselineskip}
\renewcommand\cftpartafterpnum{\vskip\baselineskip}
%%%%%%%%%%% Makes the appear TOC doublespaced and almost singlespaced for sections.
\setlength\cftparskip{-2pt}
\setlength\cftbeforechapskip{0pt}
\setlength\cftbeforepartskip{0pt}
\setlength\cftbeforesubsecskip{-6pt}
\setlength\cftbeforesubsecskip{-6pt}
\setlength\cftbeforesecskip{-6pt}
%%%%%%%%%%%%%%%%%%%%%
%%%%% These change spacing in the toc.. Leave for now for tweaking.
%\cftsetindents{chapter}{0in}{.3in}
%\cftsetindents{section}{0.5in}{0in} %% adjusts Indents and Numwidths for tocloft. http://tex.stackexchange.com/questions/50471/question-about-indent- lengths-in-toc
%\cftsetindents{subsection}{1in}{0in}
%\cftsetindents{subsubsection}{1.5in}{0in}
%\cftsetindents{paragraph}{0.5in}{0.5in}
\preto\figure{% Removes the extra space added before new chapters
\ifnum\value{figure}=0\addtocontents{lof}{\vskip-10pt}\fi
}
\preto\table{% Removes the extra space added before new chapters
\ifnum\value{table}=0\addtocontents{lot}{\vskip-10pt}\fi
}
\renewcommand{\cftloftitlefont}{\hfill\normalsize\rm\uppercase}
\renewcommand{\cftchappagefont}{\normalsize\rm} % Makes the chapter page numbers the default size and font.
\renewcommand{\cftchapfont}{\normalsize\rm}
\renewcommand{\cftchapleader}{\normalsize\rm}
\let\chaptermarkOLD\chaptermark
\renewcommand*\chaptermark[1]{\chaptermarkOLD{#1}\addtocontents{thefigure} {\protect\addvspace{30pt}}}
我希望主标题上方和下方的间距一致。由于表格列表和第 1 章标题之间有双倍行距,因此我也希望章节主标题和副标题 1.1 之间的间距相同。副标题 1.1 和 1.2 之间的间距很好,不需要任何更改。
请帮帮我。
答案1
该tocloft
包允许设置许多空间和维度。在这种情况下,你似乎希望节(也许是子节)行上方的空间更大。发布的文件有一行
\setlength{\cftbeforesecskip}{-0.4cm}
如果将尺寸-0.4cm
改为正数,则会导致目录部分线上方的空间变大。我建议您参阅软件包的文档tocloft
以了解其他可能的自定义。