5

How can I remove the space before the List Of Figures in List of Figures page. I am using report class.

Thank you

  • Welcome to TeX.SX! Do you mean the space before the title, right? – OSjerick Dec 30 '13 at 4:12
  • Please add a MWE (minimal working example) for know what class are you using, the packages and a sample of code. I think you're using the book class or another similar which by default open each chapter or similar division in the right page. If you avoid this in the documentclass options then perhaps you can solve yuour issue. – Aradnix Dec 30 '13 at 4:55
6

The macro responsible for the placement of the LoF's title is \@makeschapterhead, which is the same involved when printing starred chapters (\chapter*).

So, one way to achieve what you want is to patch \@makeschapterhead before \listoffigures so to remove the spacing and patch it back to restore the original behavior later.

The code to do this, is the following (requires etoolbox):

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

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

Output:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.