如何增加目录中两个标签之间的垂直空间?

如何增加目录中两个标签之间的垂直空间?

我需要增加两个标签之间的垂直空间,特别是任何标签(节或小节)和下一部分之间的垂直空间。

我用于目录的代码如下:

\documentclass[11pt,fleqn,x11names,table]{book} 

\usepackage{xcolor, tcolorbox, multicol} 
\usepackage{tikz,tkz-tab}
\usepackage{kpfonts}
\usepackage{titletoc}

\titlecontents{part}
[8em]{\centering\Large\sc\bfseries\contentslabel{3em}}{}{}
{}{}

\titlecontents{chapter}[0pc]
{\addvspace{30pt}
    \begin{tikzpicture}[remember picture, overlay]
    \draw[fill=orange,draw=orange] (-4,-.1) rectangle (0.0,0.5);
    \pgftext[left,x=-1.5 cm,y=0.2cm]{\color{white}\Huge\sc\bfseries \ \thecontentslabel};%
    \end{tikzpicture}\color{orange}\large\sc\bfseries}
{}{}
{\;\titlerule\;\large\sc\bfseries Página \thecontentspage
    \begin{tikzpicture}[remember picture, overlay]
    \draw[fill=orange,draw=orange] (2pt,0) rectangle (6,0.1pt);
    \end{tikzpicture}}

\titlecontents{section}[2.4pc]
{\addvspace{1pt}}
{\contentslabel[\color{blue}\thecontentslabel]{2.4pc}}
{}
{\hfill\small \color{blue}\thecontentspage}
[]

\titlecontents*{subsection}[4pc]
{\addvspace{-1pt}\small}
{}
{}
{\hfill\small \color{blue}\thecontentspage}
[\\][]
\makeatletter

\renewcommand{\tableofcontents}{

    \chapter*{
        \vspace*{-20\p@}%
        \begin{tikzpicture}[remember picture, overlay]%
        \pgftext[right,x=15cm,y=0.2cm]{\color{black}\Huge\sc\bfseries \contentsname};%
        \draw[fill=orange,draw=orange] (13,-.75) rectangle (20,1);%
        \clip (13,-.75) rectangle (20,1);
        \pgftext[right,x=15cm,y=0.2cm]{\color{black}\Huge\sc\bfseries \contentsname};%
        \end{tikzpicture}}
    \@starttoc{toc}}
\makeatother

\begin{document}
\tableofcontents
\thispagestyle{empty}
    \part{Part I}
      \chapter{Chapter 1}
       \section{section 1}
         \subsection{subsection 1}
          \subsection{subsection 2}

\part{Part 2}
        \chapter{Chapter 2}
         \section{section 1}
           \subsection{subsection 1}
            \subsection{subsection 2}

\part{Part 3}
         \chapter{Chapter 3}
         \section{section 1}
         \subsection{subsection 1}
         \subsection{subsection 2}

\end{document}

最后生成下表:

在此处输入图片描述

但是,我真正需要生成的是以下内容:

在此处输入图片描述

有什么办法可以让它工作吗?谢谢!

答案1

只需添加以下代码行:

\titlecontents{part} [8em]{\addvspace{some length}\centering\Large\sc\bfseries\contentslabel{3em}}{}{}{‌​}

相关内容