Hi,
I have a big figure with a very long caption. Together they require more than one page.
Then, Latex only shows part of the caption, and the figure + caption together are pushed to the end of the chapter.
Is it possible to break the caption into multiple pages? If not, is it at least possible to have the figure and caption at adjacent pages?
Anyone has an idea?
Thanks,
Tamar.
LaTeX forum ⇒ Graphics, Figures & Tables ⇒ How to allow caption break into two pages
- localghost
- Site Moderator
- Posts: 9201
- Joined: Fri Feb 02, 2007 12:06 pm
How to allow caption break into two pages
Perhaps the fltpage package can offer an acceptable solution.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
How to allow caption break into two pages
Thanks for the idea - but it didn't work in my case.
I have 3 subfigures inside the figure environment (see code below).
Before, they were typeset one above the other.
Now with the fltpage they are typeset side by side, so the first one appears fully, the second one is truncated and the third does not appear at all.
I've searched the forum and found a related old post, suggesting the usage of \afterpage - which didn't work either (see http://www.latex-community.org/forum/vi ... page#p8076).
Then I received the error message "if\@captype
topcap
1.258 \begin{align}
?"
Here is a sample of my original code:
Is there a way to use subfigures and still force the caption to continue on the next page?
Thanks a lot,
Tamar.
I have 3 subfigures inside the figure environment (see code below).
Before, they were typeset one above the other.
Now with the fltpage they are typeset side by side, so the first one appears fully, the second one is truncated and the third does not appear at all.
I've searched the forum and found a related old post, suggesting the usage of \afterpage - which didn't work either (see http://www.latex-community.org/forum/vi ... page#p8076).
Then I received the error message "if\@captype
topcap
1.258 \begin{align}
?"
Here is a sample of my original code:
\begin{figure}[t!] \centering \subfigure[]{ \includegraphics[width=10cm]{subfig1.eps} \label{fig:subfig1} } \subfigure[]{ \includegraphics[width=10cm]{subfig2.eps} \label{fig:subfig2} } \subfigure[]{ \includegraphics[width=10cm]{subfig3.eps} \label{fig:subfig3} } \caption [blah] { \label{fig:fullfig} blah blah blah \subref{fig:subfig1} blah blah \subref{fig:subfig2} blah blah } \end{figure}
Is there a way to use subfigures and still force the caption to continue on the next page?
Thanks a lot,
Tamar.
How to allow caption break into two pages
Hi Tamar,
in the example code below I show one possibility. The idea is to use some of the features provided by the subfig and caption packages (by the way, I noticed from your code that you are using the obsolete subfigure package; you should use subfig instead).
Now, to the code: the idea is to use a "continued float": the first part of the float will contain the three subfigures and the second part, the caption.
The three subfigures are placed inside a standard figure environment whose label format is declared empty to suppress the label produced by the corresponding \caption command; then a second figure environment is used to continue the previous one and to typeset the caption. A new type of caption label was defined also, in order to emulate the style produced by the fltpage package.
Remarks: 1) I used the demo option for the graphicx package to make the code compilable for everyone (figures will be replaced by black rectangles). Please delete that option in your actual code.
2) Feel free to adapt my example according to your needs.
3) Please make sure that you have installed a recent version of the caption package.
in the example code below I show one possibility. The idea is to use some of the features provided by the subfig and caption packages (by the way, I noticed from your code that you are using the obsolete subfigure package; you should use subfig instead).
Now, to the code: the idea is to use a "continued float": the first part of the float will contain the three subfigures and the second part, the caption.
The three subfigures are placed inside a standard figure environment whose label format is declared empty to suppress the label produced by the corresponding \caption command; then a second figure environment is used to continue the previous one and to typeset the caption. A new type of caption label was defined also, in order to emulate the style produced by the fltpage package.
Remarks: 1) I used the demo option for the graphicx package to make the code compilable for everyone (figures will be replaced by black rectangles). Please delete that option in your actual code.
2) Feel free to adapt my example according to your needs.
3) Please make sure that you have installed a recent version of the caption package.
\documentclass{article} \usepackage[demo]{graphicx} \usepackage{caption} % the following format will be used to emulate the captions produced by fltpage \DeclareCaptionLabelFormat{adja-page}{\hrulefill\\#1 #2 \emph{(previous page)}} \usepackage{subfig} \begin{document} \begin{figure} \captionsetup{labelformat=empty} \centering \subfloat[][]{\includegraphics[width=10cm]{subfig1.eps}}\\ \subfloat[][]{\includegraphics[width=10cm]{subfig1.eps}}\\ \subfloat[][]{\includegraphics[width=10cm]{subfig1.eps}} \caption{} \end{figure} \clearpage \begin{figure} \captionsetup{labelformat=adja-page} \ContinuedFloat \caption{three subfigures text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text} \label{fig:test} \end{figure} \clearpage \end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
How to allow caption break into two pages
It works - Thanks!
Just one more thing: I'd like to refer to the subfigures in this caption, but if I use \subref it produces the error message
"! Argument of \@caption has an extra }"
I can use \ref, but then the label I get is "1a", rather than "a".
Here is the code I used (adapted from yours):
Tamar.
Just one more thing: I'd like to refer to the subfigures in this caption, but if I use \subref it produces the error message
"! Argument of \@caption has an extra }"
I can use \ref, but then the label I get is "1a", rather than "a".
Here is the code I used (adapted from yours):
\documentclass{article} \usepackage{graphicx} \usepackage{caption} % the following format will be used to emulate the captions produced by fltpage \DeclareCaptionLabelFormat{adja-page}{\hrulefill\\#1 #2 \emph{(previous page)}} \usepackage{subfig} \begin{document} \begin{figure} \captionsetup{labelformat=empty} \centering \subfloat[][]{\includegraphics[width=10cm]{subfig1.eps}\label{fig:sub1}}\qquad \subfloat[][]{\includegraphics[width=10cm]{subfig2.eps}\label{fig:sub2}}\qquad \subfloat[][]{\includegraphics[width=10cm]{subfig3.eps}\label{fig:sub3}} \caption{} \end{figure} \clearpage \begin{figure} \captionsetup{labelformat=adja-page} \ContinuedFloat \caption{three subfigures \subref{fig:sub1} text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text} \label{fig:test} \end{figure} \clearpage \end{document}
Tamar.
How to allow caption break into two pages
There is a bug in the latest version of the subfig package which causes that \subref is fragile. So either use \protect\subref instead of \subref or add the following code to your document after loading the subfig package:
A third option would be updating your caption package. Since version 3.0k it contains a workaround for this bug so the above patch isn't necessary anymore.
\makeatletter \DeclareRobustCommand*\subref{\@ifstar\sf@@subref\sf@subref} \makeatother
A third option would be updating your caption package. Since version 3.0k it contains a workaround for this bug so the above patch isn't necessary anymore.
Re: How to allow caption break into two pages
It's working - thanks everyone for the help!
Return to “Graphics, Figures & Tables”
Who is online
Users browsing this forum: No registered users and 5 guests