
図表一覧ページの図表一覧の前のスペースを削除するにはどうすればよいでしょうか。レポート クラスを使用しています。
ありがとう
答え1
LoF のタイトルの配置を担当するマクロは で\@makeschapterhead
、これは星印の付いた章 ( ) を印刷するときに使用されるマクロと同じです\chapter*
。
したがって、目的を達成する 1 つの方法は、\@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}
出力: