図表リストは新しいパートで垂直スペースを追加します

図表リストは新しいパートで垂直スペースを追加します

新しいパーツがあるときに、図のリストに追加された垂直スペースを削除しようとしています。

新しい章を追加するときに垂直方向のスペースを削除する方法は次のとおりです。

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{}
\makeatother

同じ方法を使用してパーツの垂直方向のスペースを削除できると思っていましたが、report.cls を見ると、\addtocontents{lof}{\protect\addvspace{10\p@}}「パーツ」セクションのどこにも見つかりません。そのため、このスペースをどこから削除すればよいのかわかりません。

ここに私の MWE と、残りの文書の前文を示します。

\documentclass[12pt]{report}
\usepackage[left=1.0in, right=1.0in, top=1.0in, bottom=1.0in]{geometry}

% including package for figures
\usepackage{float}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[capitalise,noabbrev]{cleveref}
\usepackage{wrapfig}

% indent first paragraph
\usepackage{indentfirst}

% change table of contents and list of figures spacing
\usepackage{titletoc}
\setcounter{tocdepth}{2}
\titlecontents{part}[0em]{\addvspace{1pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{chapter}[4em]{\addvspace{.7pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{section}[6em]{\addvspace{.4pc}\bfseries}{\contentslabel{2em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{subsection}[9em]{\addvspace{.1pc}\bfseries}{\contentslabel{3em}}{} {\titlerule*[1pc]{.}\contentspage}
\titlecontents{figure}[2.5em]{\addvspace{.1pc}\bfseries}{\contentslabel{2.5em}}{} {\titlerule*[1pc]{.}\contentspage}

% change spacing of part, chapter, section, and subsection headings
\usepackage{xcolor}
\usepackage{titlesec}
\titleclass{\part}{top}
\titleformat{\part}[hang]{\normalfont\huge\bfseries\color{red}}{Chapter\ \thepart:}{5pt}{}   
\titlespacing*{\part}{0pt}{0pt}{0pt}

\titleformat{\chapter}[hang]{\centering\normalfont\LARGE\bfseries\color{blue}}{Section\ \thechapter:}{5pt}{}   
\titlespacing*{\chapter}{0pt}{12pt}{0pt}

\titleformat{\section}[hang]{\normalfont\Large\bfseries\color{black}}{\thesection}{5pt}{}   
\titlespacing*{\section}{0em}{12pt}{0pt}

\titleformat{\subsection}[hang]{\centering\normalfont\large\bfseries\color{black}}{}{5pt}{}   
\titlespacing*{\subsection}{0em}{12pt}{0pt}

% remove new page as start of new chapter
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{}
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%       End Of Preamble and start of document           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

    \tableofcontents
    \listoffigures

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \part{Part Title}
        Some text in part \thepart.

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \chapter{Chapter Title}
            Some text in part \thepart chapter \thechapter.
            \begin{figure}[H]
                \centering\includegraphics[width=0.15\textwidth]{Untitled.png}
                \caption{Figure in part \thepart\space chapter \thechapter}
            \end{figure}
            \begin{figure}[H]
                \centering\includegraphics[width=0.15\textwidth]{Untitled.png}
                \caption{Figure in part \thepart\space chapter \thechapter}
            \end{figure}

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \chapter{Chapter Title}
            Some text in part \thepart chapter \thechapter.
            \begin{figure}[H]
                \centering\includegraphics[width=0.15\textwidth]{Untitled.png}
                \caption{Figure in part \thepart\space chapter \thechapter}
            \end{figure}
            \begin{figure}[H]
                \centering\includegraphics[width=0.15\textwidth]{Untitled.png}
                \caption{Figure in part \thepart\space chapter \thechapter}
            \end{figure}

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \part{Part Title}
        Some text in part \thepart.

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \chapter{Chapter Title}
            Some text in part \thepart chapter \thechapter.
            \begin{figure}[H]
                \centering\includegraphics[width=0.15\textwidth]{Untitled.png}
                \caption{Figure in part \thepart\space chapter \thechapter}
            \end{figure}
            \begin{figure}[H]
                \centering\includegraphics[width=0.15\textwidth]{Untitled.png}
                \caption{Figure in part \thepart\space chapter \thechapter}
            \end{figure}

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%
        \chapter{Chapter Title}
            Some text in part \thepart chapter \thechapter.
            \begin{figure}[H]
                \centering\includegraphics[width=0.15\textwidth]{Untitled.png}
                \caption{Figure in part \thepart\space chapter \thechapter}
            \end{figure}
            \begin{figure}[H]
                \centering\includegraphics[width=0.15\textwidth]{Untitled.png}
                \caption{Figure in part \thepart\space chapter \thechapter}
            \end{figure}


\end{document}

作成中の画像です。「パート I 第 2 章の 2.2 図」と「パート II 第 3 章の 3.1 図」の間に隙間がないようにしたいと思います。

ここに画像の説明を入力してください

この余分な垂直スペースをどこから削除できるかについて、何かアドバイスがあれば教えてください。

ご協力いただければ幸いです。

答え1

lof ファイルを確認するだけで済みます。スペースはコマンドによって作成され\ttl@tocsep、たとえば の前に再定義するだけで済みます\listoffigures

 \makeatletter\def\ttl@tocsep{}\makeatother

関連情報