very long (233 words) caption - page break within caption possible?

2,387 views
Skip to first unread message

AK

unread,
Nov 1, 2009, 3:19:06 AM11/1/09
to LaTeX Users Group
I have a quite complex (showing graphs, schematics) figure which takes
almost up an entire page to be readable.

The caption of this figure is quite long (233 words.)

What happens is that the first few lines of the caption are rendered,
but the rest goes over the bottom of the page and is lost.

Can I make it so that latex inserts a page break in the caption?

I would like to have the caption start below the figure with a few
lines, then have the rest of the lines on the next page.

I can not split up the figure into several figures (I have put much
work into the figure to get the layout just right and really do not
want to change it), so I am looking specifically for a way to let the
caption continue on the next page.

I am using pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4) under Cygwin with
"pdflatex", the goal is PDF output.

Thanks!

ramirez

unread,
Nov 2, 2009, 10:37:47 AM11/2/09
to LaTeX Users Group

You should check in file were your class is defined, sometimes
there is a section for caption definitions, it starts with the
command \newlength\abovecaptionskip. Those definitions affect
caption for table and figure.

--
Giovanni Ramirez Garcia

Kumaresh PS

unread,
Nov 3, 2009, 2:18:33 AM11/3/09
to LaTeX Users Group
Dear AK,

This is the problem because of Figures are treated as a float. For
that floating output, the entire environment was placed inside the
box. So, we can not use command "\pagebreak" inside the "\caption".

Please find my below methodology to get your expected output:

\documentclass{book}

\usepackage{graphicx}

\makeatletter

%Figure environment without an float format
\newenvironment{Figure}{%
\par\addvspace{12pt plus2pt}%
\def\@captype{figure}%
}{%
\par\addvspace{12pt plus2pt}%
}%

%taken from article.cls
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{#1: #2}%
\ifdim \wd\@tempboxa >\hsize
#1: #2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}

%% If you are having all the figures with huge caption then use the
below commands:
%% Otherwise, just comment the below two lines and
%% use "\begin{Figure}...\end{Figure}" instead of "\begin{figure}...
\end{figure}"
\let\figure\Figure% replacing by default
\let\endfigure\endFigure%
%%

\makeatother

\begin{document}

\begin{figure}%
\includegraphics{figurename.eps}
\caption{Your 233 words bla bla ... }
\end{figure}

\end{document}

Good Luck!

--
Best Regards,
Kumaresh PS
Reply all
Reply to author
Forward
0 new messages