[Tex/LaTex] List of Figures – Continued

table of contents

I want to include "List of Figures – Continued" on the second page of the list of figures (LOF). Following this page, How to add some text to every page of the TOC?, I am using the \afterpage command. This works well except when there is only one figure on the second page. Then, the "List of Figures – Continued" is placed on the page after the second LOF page. Below is a minimal code that reproduces the error. When the number of figures is 46, everything works well. When the number of figures is 45, the "List of Figures – Continued" text is put on page 3 instead of page 2.



% Command to add "List of figures - Continued"
  \afterpage{{\normalfont\centering\uppercase{#2~-~Continued}\\[1em]#3\hfill Page\\[1.5em]}}


% Create list of figures
\addtocontents{lof}{\contheadingadv[2]{List of figures}{Figure}}

% Loop to create figures
\loopcount 46   % Works with 46, doesn't work with 45 !!!!!!!!!!


Best Answer

Such long list of figures are generally encountered in theses. The code snippet below is used by many universities around the globe in their .cls files. I hope this helps.

   \typeout{LIST OF FIGURES.}
        \hbox to \textwidth{\large\bfseries\hfil LIST OF FIGURES
           (Continued) \hfil}
        \hbox to \textwidth{\normalsize\bfseries