[Tex/LaTex] How to make half-title pages containing captions with conditional headers

captionsheader-footer

I am required to typeset some (long) figure captions in the "half-title page(s)" as they do not fit in one page with the figure, for a similar example see this link (except that on the first page I would put the caption instead of "Appendix".

https://etd.helpdesk.ufl.edu/present/halftitle.html

In other words, I need to typeset captions as if they are texts (except that the caption title needs to appear in the \listoffigures, which is taken care of by \captionof from the caption package.) However my situation is a bit different:

  1. The caption is very long and it does not fall in one page, so I need
    more than one "half-title page(s)" and cannot use \captionof command. How can I manually typeset a caption as if it it text and have the entry appear int the LOF?
  2. Every page after the first half-title page needs to have a header showing "Figure X: continued", including the page with the figure on it. How can I enable headers only for these several "half-title pages", but not for the rest of the document? Even a more "manual" implementation would suffice.

I've searched and attempted a bit but nothing really satisfies the requirement. Thanks for any suggestions! Here is a MNWE for your convenience:

\documentclass{report}
\usepackage{setspace}
\usepackage{lipsum}

\begin{document}

\listoffigures

\doublespacing
\clearpage

Figure 1: \lipsum* 
% however for the 2nd page of caption, a header "Figure 1: continued" 
%on top of each page is required
\clearpage

\centering{Figure 1: continued} 
% how to get this Figure X showing the  right number as "Figure 1",
% if I cannot do this with a header (but only in this part of document)? 
\begin{figure}
\end{figure}

\end{document}

Best Answer

I'm not entirely sure I have understood the question, but here is a first attempt using fancyhdr

 \documentclass{report}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{fancyhdr}

\begin{document}

\listoffigures

\doublespacing
\clearpage

\chead{Figure \ref{fig:testfigure} continued}
\pagestyle{fancy}
\thispagestyle{plain}
Figure \ref{fig:testfigure}: \lipsum* 
% however for the 2nd page of caption, a header "Figure 1: continued" 
%on top of each page is required
\clearpage


% how to get this Figure X showing the  right number as "Figure 1",
% if I cannot do this with a header (but only in this part of document)? 
\begin{figure}
 \centering
 \rule{20pt}{30pt}
 \caption{My figure}
 \label{fig:testfigure}
\end{figure}

\end{document}

Note that

  • \pagestyle{fancy} turns on the header
  • \thispagestyle{plain} says that this page should be plain (without a header)

This approach is quite manual and will need some care... Perhaps others have a more robust solution.


Here is more of an environment-based approach (not a great solution, as the 'caption' counter isn't actually linked to the Figure counter)- use carefully! Personally I would use the first part of my solution.

\documentclass{report}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{fancyhdr} % headers
\usepackage{placeins} % provides \FloatBarrier
\usepackage{flafter}  % ensures figures don't appear before
                      % they appear in the text

\newcounter{pseudocaptioncount}
\setcounter{pseudocaptioncount}{0}
\newenvironment{pseudocaption}%
{%
\FloatBarrier
\clearpage
\refstepcounter{pseudocaptioncount}%
\thispagestyle{plain}%
\chead{Figure \thepseudocaptioncount\,  continued}
Figure \thepseudocaptioncount:% 
}%
{}


\begin{document}

\listoffigures

% set the pagestyle as fancy
\pagestyle{fancy}

\doublespacing

\begin{pseudocaption}
\lipsum* 
\end{pseudocaption}
\begin{figure}
 \centering
 \rule{20pt}{30pt}
 \caption[Short caption]{}
\end{figure}


\begin{pseudocaption}
\lipsum* 
\end{pseudocaption}
\begin{figure}
 \centering
 \rule{20pt}{30pt}
 \caption[Another short caption]{}
\end{figure}



\end{document}
Related Question