I have an extra large figure + long figure caption - they both don't fit on a single page. Is it possible to force the caption to stop within the bottom margin of the first page and continue (with the same caption format) on the following page? At this point, the caption continues down, overwrites the page number and off of the page.
Thanks!
General ⇒ Force caption to continue on next page?
NEW: TikZ book now 40% off at Amazon.com for a short time.

Force caption to continue on next page?
Look at the following example:
The \lipsum command serves to generate (latin) dummy text. Likewise, the \rule command generates a black rectangle that represents your figure. To make it float to the "next" page, I use the \afterpage command, defined in the afterpage package. The \figcaption command is defined in the nonfloat package. In this example, the caption is formed by two paragraphs, genererated by \lipsum[2-3].
I've tried to use the caption package and \captionof instead of nonfloat and \figcaption, But it doesn't work, since, for some reason I ignore, \captionof produces a page break between the figure and the caption.
Code: Select all
\documentclass{article}
\usepackage{afterpage}
\usepackage{nonfloat}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\afterpage{
\centering
\rule{0.85\textwidth}{0.85\textheight}
\figcaption[Short caption text for the list of figures]{\lipsum[2-3]}
\label{fig:f1}
\vspace{\intextsep}
}
\lipsum[4-8]
\end{document}
I've tried to use the caption package and \captionof instead of nonfloat and \figcaption, But it doesn't work, since, for some reason I ignore, \captionof produces a page break between the figure and the caption.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Force caption to continue on next page?
The caption package puts the caption inside a \parbox so no page break can occur inside. One can change this, but would need redefinition of internal caption commands.Juanjo wrote: I've tried to use the caption package and \captionof instead of nonfloat and \figcaption, But it doesn't work, since, for some reason I ignore, \captionof produces a page break between the figure and the caption.
But since the nonfloat package change some LaTeX internals regarding floating environments (\textfraction, \topfraction, \bottomfraction, \floatpagefraction, \@fptop, \@fpsep, and \@fpbot), I would recommend the usage of the capt-of package and \captionof{figure} instead.
Regarding the original question: The fltpage package can split figure and caption in quite an elegant way, maybe this is an alternative to splitting the caption in parts.
Force caption to continue on next page?
So, for a long caption, since no pagebreak can occur inside the caption and there is no room in the same page of the picture to typeset the caption, there is a pagebreak between picture and caption, which finally appear in separate pages. All clear now, thanks.sommerfee wrote:The caption package puts the caption inside a \parbox so no page break can occur inside. One can change this, but would need redefinition of internal caption commands.Juanjo wrote: I've tried to use the caption package and \captionof instead of nonfloat and \figcaption, But it doesn't work, since, for some reason I ignore, \captionof produces a page break between the figure and the caption.
I agree.sommerfee wrote: But since the nonfloat package change some LaTeX internals regarding floating environments (\textfraction, \topfraction, \bottomfraction, \floatpagefraction, \@fptop, \@fpsep, and \@fpbot), I would recommend the usage of the capt-of package and \captionof{figure} instead.
If I've understood its documentation, this package always writes the picture in one page and the caption in a different one (just before or just after, depending on package options). The caption is not splitted and so this package seems unable to solve the issue in the O.P.sommerfee wrote: Regarding the original question: The fltpage package can split figure and caption in quite an elegant way, maybe this is an alternative to splitting the caption in parts.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.