首先,请看下图:
正如你所知,1.2.1 小节,2.2.1 小节,2.2.3 小节太紧了。我想稍微增加一下 vspace,这样空间就几乎与子部分项之间的间隔相同了。由于我正在\begin{spacing}
减少原始间隔,如果可能的话,我不希望这个新变化影响其他空间。请帮助我。提前谢谢,祝你有美好的一天!
这是我的 MWE:
\documentclass[a4paper,12pt,oneside,openany]{book}
\usepackage[a4paper, inner=4cm, outer=3cm, top=4cm, bottom=3cm]{geometry}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{setspace}
\usepackage[titles]{tocloft}
\usepackage{tocbibind}
\usepackage{indentfirst}
\usepackage{etoolbox}
\usepackage[none]{hyphenat}
\sloppy
\usepackage{times}
\usepackage{enumitem}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{array}
\usepackage[column=O]{cellspace}
\usepackage{caption}
\usepackage{afterpage}
\usepackage{mathtools}
\usepackage{longtable}
\usepackage{lipsum}
\usepackage{lscape}
%\usepackage{makecell}
\usepackage{booktabs}
\usepackage{ragged2e}
\usepackage{natbib}
\setcitestyle{notesep={:},round,aysep={, },citesep={;}}
\usepackage[depth=2]{bookmark}
\usepackage{hyperref}
\usepackage{multirow}
\hypersetup{hidelinks}
\usepackage{tabularx}
\usepackage{textcomp}
\showboxbreadth=100
\showboxdepth=100
%%%%%%%%%%%%%%%%%%%%5 BAD BOXES %%%%%%%%%%%%%%%%%%%%%%%%%
\hfuzz=60pt
\hbadness=10000
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newlist{ColEnum}{enumerate}{1}
\setlist[ColEnum,1]{label = \arabic*), left = 0pt, nosep,
before= {\begin{minipage}[t]{\hsize}\RaggedRight},
after = {\end{minipage}}}
\newcolumntype{P}[1]{>{\endgraf\vspace*{-\baselineskip}}p{#1}}
\newlist{tabitem}{itemize}{1}
\setlist[tabitem]{label=\textbullet, noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt, nosep, before=\begin{minipage}[t]{\hsize}, after=\end{minipage}}
\DeclareMathOperator{\Res}{Res}
\numberwithin{equation}{section}
\setlength{\cellspacetoplimit}{5pt}
\setlength{\cellspacebottomlimit}{4pt}
\setlength\bibhang{25pt}
\setlength{\headheight}{14.5pt}
\patchcmd{\section}{\bfseries}{\bfseries\boldmath}{}{}
\setlength{\cftbeforesecskip}{10pt}
\setlength{\cftbeforesubsecskip}{10pt}
\fancyhf{}
\cfoot{\thepage}
\linespread{1.5}
\pagestyle{plain}
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftdotsep}{1}
\renewcommand\cftchapdotsep{\cftdotsep}
\renewcommand{\cftchapfont}{\bfseries}
\renewcommand{\cftsecfont}{\bfseries}
\renewcommand{\cftchappagefont}{}
\titleformat{\chapter}[block]
{\normalfont\bfseries\centering}
{}{0pt}{}
\titleformat{\section}
{\normalfont\bfseries}
{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\bfseries}
{\thesubsection}{1em}{}
\titlespacing*{\chapter}{0pt}{0pt}{20pt}
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\newcommand\dd{\mathop{}\!\mathrm{d}}
\setlength\parindent{1.25cm}
\addtocontents{toc}{~\hfill{Page}\par}
\addtocontents{lot}{~\hfill{Page}\par}
\addtocontents{lof}{~\hfill{Page}\par}
\addtocontents{app}{~\hfill{Page}\par}
\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
\newcommand{\listappendixname}{Appendix List}
\newlistof{appendix}{app}{\listappendixname}
\setcounter{appdepth}{2}
\renewcommand{\theappendix}{Lampiran\space\arabic{appendix}}
\renewcommand{\cftappendixpresnum}{}
\setlength{\cftbeforeappendixskip}{0pt}
\setlength{\cftappendixnumwidth}{.9in}
\newlistentry[appendix]{subappendix}{app}{1}
\renewcommand{\thesubappendix}{\theappendix.\arabic{subappendix}}
\renewcommand{\cftsubappendixpresnum}{Appendix\space}
\setlength{\cftsubappendixnumwidth}{1in}
\setlength{\cftsubappendixindent}{0em}
\renewcommand{\listofappendix}{\begingroup
\tocfile{\listappendixname}{app}
\endgroup}
%\addcontentsline{toc}{app}
\newcommand{\myappendix}[1]{%
\refstepcounter{appendix}%
\section*{\theappendix\space #1}%
\addcontentsline{app}{appendix}{\protect\numberline{\theappendix}#1}%
\par
}
\newcommand{\subappendix}[1]{%
\refstepcounter{subappendix}%
\subsection*{\thesubappendix\space #1}%
\addcontentsline{app}{subappendix}{\protect\numberline{\thesubappendix}#1}%
}
\begin{document}
\clearpage
\thispagestyle{empty}
\frontmatter %
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\begin{spacing}{0.1}
\tableofcontents
\end{spacing}
\begin{spacing}{1.5}
\listoffigures
\listoftables
\listofappendix
\end{spacing}
\mainmatter
\pagestyle{fancyplain}
\fancyhf{}
\fancyhead[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\chapter{Suzukake Nanchara} \section{Suzukake No Ki No Michi De Kimi} \section{Suzukake No Ki No Michi De Kimi}
\subsection{Suzukake No Ki No Michi De Kimi No Hohoemi O Yume Ni Miru To}
\subsection{Suzukake No Ki No Michi De Kimi No Hohoemi O}
\subsection{Suzukake No Ki No Michi De Kimi}
\section{Suzukake No Ki No Michi De Kimi}
\chapter{Suzukake Nanchara}
\section{Section Section Section} \section{Section Section Section}
\subsection{Suzukake No Ki No Michi De Kimi No Hohoemi O Yume Ni Miru To}
\subsection{Suzukake No Ki No Michi De Kimi No Hohoemi O}
\subsection{Suzukake No Ki No Michi De Kimi No Hohoemi O Yume Ni Miru To Itteshimattara}
\subsection{Suzukake no ki no michi de kimi no hohoemi o yume ni miru to}
\chapter{Suzukake Nanchara}
\section{Suzukake No Ki No Michi De Kimi}
\backmatter
\bibliography{dafpus}
\bibliographystyle{unejstyle}
\nocite{*}
\end{document}
答案1
尝试改变spacing
周围的\tableofcontents
。也许是这样的:
\begin{spacing}{0.9}
\tableofcontents
\end{spacing}