3

This question builds upon the question asked and answered at Adding words figure and page to list of figures

The expression i'm using is

         \listoffigures
         %ensures every page has "Figure         Page" at the top of it
         \makeatletter
         \addtocontents{lof}{%
         \protect\afterpage{\protect\hbox to \linewidth%
             {\noindent{Figure}~\hfill{Page}}\par%
             \protect\vspace{12\p@}}}
         \makeatother

And this does what I want, perfectly, but only on the second page of the list of figures. My figure list spans 9 total pages, and I cannot figure how how to make the above statement apply to all 9 pages. What is the best way to implement this to ensure that the command is reapplied for every page?

Jwely
  • 131

1 Answers1

4

Dif you want it on the first page as well? Note: without \endLOFtrue this will continue on every page of the document.

\documentclass{article}
\usepackage{caption}
\usepackage{afterpage}

\newif\ifendLOF

\newcommand*{\lofheader}{
\ifendLOF\else\hbox to \linewidth%
  {\noindent{Figure}~\hfill{Page}}\par%
  \vspace{12pt}%
  \afterpage{\lofheader}
\fi}%

\begin{document}
\listoffigures
\addtocontents{lof}{\protect\lofheader}
\endLOFtrue

\newpage
\loop\captionof{figure}{test \thefigure}
\ifnum\value{figure}<100 \repeat
\end{document}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120