그림 목록 앞의 공백을 제거하는 방법

그림 목록 앞의 공백을 제거하는 방법

그림 목록 페이지의 그림 목록 앞에 있는 공백을 제거하려면 어떻게 해야 합니까? 나는 보고서 클래스를 사용하고 있습니다.

감사합니다

답변1

LoF 제목 배치를 담당하는 매크로는 \@makeschapterhead별표가 있는 장( )을 인쇄할 때와 동일한 매크로 입니다 \chapter*.

따라서 원하는 것을 달성하는 한 가지 방법은 \@makeschapterhead이전에 \listoffigures공백을 제거하고 다시 패치하여 나중에 원래 동작을 복원하는 것입니다.

이를 수행하는 코드는 다음과 같습니다( 필요 etoolbox).

\let\oldlistoffigures\listoffigures
\makeatletter
\renewcommand{\listoffigures}{%
  \patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{\relax}{}{}%
  \oldlistoffigures%
  \patchcmd{\@makeschapterhead}{\relax}{\vspace*{50\p@}}{}{}%
}  
\makeatother

MWE 완료:

\documentclass{report}

\usepackage{showframe} % just for the example

\usepackage{etoolbox}

\let\oldlistoffigures\listoffigures
\makeatletter
\renewcommand{\listoffigures}{%
  \patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{\relax}{}{}%
  \oldlistoffigures%
  \patchcmd{\@makeschapterhead}{\relax}{\vspace*{50\p@}}{}{}%
}  
\makeatother

\begin{document}

\listoffigures

\chapter*{Test}

\end{document} 

산출:

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

관련 정보