0

I have a List of figures section in my tex document and I'm using \listoffigures

\newpage
\thispagestyle{empty}
\tableofcontents
\thispagestyle{empty}
\listoffigures
\thispagestyle{empty}
\listoftables
\thispagestyle{empty}
\newpage    
\pagenumbering{arabic}

enter image description here

This is what I want but then, there's one more image and it goes onto the next page and shows something like this

enter image description here

There's a page number at the bottom of the page and the formatting seems to have changed with the top. How can I avoid this?

Madara
  • 225
  • 1
  • 4
  • 2
    It looks like you are using fancyhdr to make a fancy header. By default there is no header for pages which are the start of chapters. The list of figures is a new chapter. You can get rid of this in your front matter by doing a \pagestyle{empty} and then when you want to go back to the fancy stuff to \pagestyle{fancy}. – oliversm May 07 '20 at 11:42

1 Answers1

1

Do something along the lines of

\clearpage
\pagestyle{empty}
\tableofcontents
\listoffigures
\listoftables
\cleardoublepage 
\pagestyle{fancy}
\pagenumbering{arabic}

For a full example (using a solution from how to remove page numbers from first page of chapters to ensure no page nujmbering on chapters or part pages) I would use:

\documentclass[a4paper,20pt]{book}
\usepackage{fancyhdr}
\usepackage{lipsum}
% Taken from https://tex.stackexchange.com/a/103610/106804
\usepackage{etoolbox}
\patchcmd{\chapter}{plain}{empty}{}{}
\patchcmd{\part}{plain}{empty}{}{}

\begin{document}
\begin{titlepage}
\lipsum[1]
\end{titlepage}
\pagestyle{empty}   
\listoffigures
\cleardoublepage
\pagenumbering{arabic}
\pagestyle{fancy}
\chapter{Some figures}
\section{Some section}
\begin{figure}[htb]Something\caption{\lipsum[1]}\end{figure} 
\begin{figure}[htb]Something\caption{\lipsum[1]}\end{figure} 
\begin{figure}[htb]Something\caption{\lipsum[1]}\end{figure} 
\begin{figure}[htb]Something\caption{\lipsum[1]}\end{figure} 
\lipsum
\end{document}

This gives no headers or footers for the list of figures, but returns to normal style for the main body (except new chapter or part pages).

oliversm
  • 2,717