TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My list of tables and list of figures are showing correctly for my main document, but after the main list I get a header for the appendix that looks like:

4.1 Last Figure...................................whatever page



I do not have any figures in any of my appendices, but the header still shows. If I add a fake figure to an appendix it appears after the header.

I have tried using \addtocontents{lof}{\protect\setcounter{tocdepth}{0}} to turn off the list of figures in appendices, and it works in that no more figures are shown after the header, but the header is still there.

I'm using a thesis .cls that I didn't write, so I'm not sure what everything does. The section that covers the list of tables/figures/contents looks like this:

\def\tableofcontents{\@tableof{TABLE OF CONTENTS}{}{tocpage}{toc}{}}

  \@tableof{LIST OF FIGURES}{Figure}{lofpage}{lof}
  {\protect\addcontentsline{toc}{chapter}{LIST OF FIGURES}}}

  \@tableof{LIST OF TABLES}{Table}{lotpage}{lot}
  {\protect\addcontentsline{toc}{chapter}{LIST OF TABLES}}}

{ % limit scope of following declarations!!
  \addtolength{\textheight}{-40pt}       % -24-16
  %\addtolength{\majorheadskip}{-40pt}    % -24-16
  \addtolength{\headheight}{52pt}        %  36+16
  \addtolength{\headsep}{-12pt}          % -12
  \hbox to \hsize{#2 \hfil Page}
  \setcounter{listofheading}{1}  % change from 0 to 1
  \def\@oddhead{\vbox to \headheight{\vspace{4pt}
    \hbox to \hsize{\hfil\rm\thepage} \vfil
        \hbox to \hsize{Appendix\hfil} \vspace{4pt} \fi
        \stepcounter{listofheading} \fi
      \hbox to \hsize{#2 \hfil Page}
  \def\@evenhead{\vbox to \headheight{\vspace{4pt}
    \hbox to \hsize{\rm\thepage\hfil} \vfil
        \hbox to \hsize{Appendix\hfil} \vspace{4pt} \fi
        \stepcounter{listofheading} \fi
      \hbox to \hsize{#2 \hfil Page}
  \@starttoc{#4}  \if@restonecol\twocolumn\fi
  % \newpage

I have tried removing everything in the @tableof definition except the @starttoc line and the header still appears. How do I get the lists to not show headers for sections that are empty?

share|improve this question
up vote 1 down vote accepted

Without a compilable example or at least a link to your class file, it's hard to say what's going on. The \@tableof macro isn't the culprit -- it temporarily switches to \onecolumn, changes the page margins and sets up the headers for even and odd LoF/LoT pages. I suggest to have a look at the definition of \appendix in your class file -- if this macro includes a line like


copy the \appendix definition into the preamble of your document (to be sure, enclose it within \makeatletter/\makeatother) and comment out the above-mentioned line.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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