그림 목록에는 새 부품으로 수직 공간이 추가됩니다.

그림 목록에는 새 부품으로 수직 공간이 추가됩니다.

새 부품이 있을 때 그림 목록에 추가된 세로 공간을 제거하려고 합니다.

새 챕터를 추가할 때 수직 공간을 제거하는 방법은 다음과 같습니다.

\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}

다음은 제작 중인 제품의 사진입니다. "2.2 제1부 2장 그림"과 "3.1 제2부 3장 그림" 사이에 공백이 없었으면 좋겠습니다.

여기에 이미지 설명을 입력하세요

이 추가 수직 공간을 어디에서 제거할 수 있는지 제안해 주세요.

도움을 주셔서 미리 감사드립니다.

답변1

lof 파일만 보면 됩니다. 공간은 명령에 의해 생성되며 \ttl@tocsep예를 들어 다음과 같이 간단히 재정의할 수 있습니다 \listoffigures.

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

관련 정보