Graphics, Figures & TablesSubfigure over 3 pages

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
LaTex lover
Posts: 13
Joined: Wed Aug 10, 2011 11:15 am

Subfigure over 3 pages

Post by LaTex lover »

Hi all,

I am facing a problem. I have got a figure with 3 subfigures, and want them to appear each in a separate page. These are my codes.

Code: Select all

\documentclass[12pt,a4paper,oneside]{report}
\usepackage{graphicx}
\usepackage{subfig}

\begin{figure}[H]
\centering
\subfloat[a]{\includegraphics[angle=90,width=0.7\textwidth]{A}}
\subfloat[b]{\includegraphics[angle=90,width=0.7\textwidth]{B}}
\subfloat[c]{\includegraphics[angle=90,width=0.7\textwidth]{C}}
\caption[caption] {caption for (a) A, (b) B (c) C.}
\end{figure}

Now, the problem is that they just appear in one page and then over flow the page. I have tried blank line, \\, \quad, \qquad, none of them works. Would you please help me? Thank you.
Last edited by cgnieder on Thu Aug 15, 2013 2:15 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Subfigure over 3 pages

Post by sommerfee »

Since page breaks inside floating environments (like figure or table) are not possible you need to use more than one floating environment here. Use \ContinuedFloat to tell the subfig package that the contents of the floating environment will continue, e.g.:

Code: Select all

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[demo]{graphicx}
\usepackage{float,subfig}

\begin{document}

\begin{figure}[H]
\centering
\subfloat[a]{\includegraphics[angle=90,width=0.7\textwidth]{A}}
\caption[caption] {caption for (a) A, (b) B (c) C. (first part)}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\subfloat[b]{\includegraphics[angle=90,width=0.7\textwidth]{B}}
\caption[caption] {caption for (a) A, (b) B (c) C. (cont.)}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\subfloat[c]{\includegraphics[angle=90,width=0.7\textwidth]{C}}
\caption[caption] {caption for (a) A, (b) B (c) C. (last part)}
\end{figure}

\end{document}
(See subfig package documentation for details.)
LaTex lover
Posts: 13
Joined: Wed Aug 10, 2011 11:15 am

Subfigure over 3 pages

Post by LaTex lover »

sommerfee wrote:Since page breaks inside floating environments (like figure or table) are not possible you need to use more than one floating environment here. Use \ContinuedFloat to tell the subfig package that the contents of the floating environment will continue, e.g.:

Code: Select all

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[demo]{graphicx}
\usepackage{float,subfig}

\begin{document}

\begin{figure}[H]
\centering
\subfloat[a]{\includegraphics[angle=90,width=0.7\textwidth]{A}}
\caption[caption] {caption for (a) A, (b) B (c) C. (first part)}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\subfloat[b]{\includegraphics[angle=90,width=0.7\textwidth]{B}}
\caption[caption] {caption for (a) A, (b) B (c) C. (cont.)}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\subfloat[c]{\includegraphics[angle=90,width=0.7\textwidth]{C}}
\caption[caption] {caption for (a) A, (b) B (c) C. (last part)}
\end{figure}

\end{document}
(See subfig package documentation for details.)
Thanks for your reply.I still have a problem. I do not want subfigures have caption.when I delete the caption for each subfigure, it mess up the numbering in the text and LIF. It is now driving me crazy.
Anyway, thanks for your help.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Subfigure over 3 pages

Post by Johannes_B »

If you don't want caption, just leave out the subfloats-command. But in your first post you gave the caption as \caption[caption] {caption for (a) A, (b) B (c) C.}. This implies, that you do want captions. Whats the sense of a caption with (a) and (b) when there is no (a)-picture present?

Best regards
Johannes

Code: Select all

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[demo]{graphicx}
\usepackage{float,subfig}

\begin{document}

\begin{figure}[H]
\centering
\includegraphics[angle=90,width=0.7\textwidth]{A}
\caption[caption] {caption for (a) A, (b) B (c) C. (first part)}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\includegraphics[angle=90,width=0.7\textwidth]{B}
\caption[caption] {caption for (a) A, (b) B (c) C. (cont.)}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\includegraphics[angle=90,width=0.7\textwidth]{C}
\caption[caption] {caption for (a) A, (b) B (c) C. (last part)}
\end{figure}

\end{document}
If this is not what you want, please prepare a minimal working example to show the problem. This is much more explanatory than a thousand words.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
LaTex lover
Posts: 13
Joined: Wed Aug 10, 2011 11:15 am

Subfigure over 3 pages

Post by LaTex lover »

Johannes_B wrote:If you don't want caption, just leave out the subfloats-command. But in your first post you gave the caption as \caption[caption] {caption for (a) A, (b) B (c) C.}. This implies, that you do want captions. Whats the sense of a caption with (a) and (b) when there is no (a)-picture present?

Best regards
Johannes

Code: Select all

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[demo]{graphicx}
\usepackage{float,subfig}

\begin{document}

\begin{figure}[H]
\centering
\includegraphics[angle=90,width=0.7\textwidth]{A}
\caption[caption] {caption for (a) A, (b) B (c) C. (first part)}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\includegraphics[angle=90,width=0.7\textwidth]{B}
\caption[caption] {caption for (a) A, (b) B (c) C. (cont.)}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\includegraphics[angle=90,width=0.7\textwidth]{C}
\caption[caption] {caption for (a) A, (b) B (c) C. (last part)}
\end{figure}

\end{document}
If this is not what you want, please prepare a minimal working example to show the problem. This is much more explanatory than a thousand words.
Hi Johannes,

Thanks for your reply.
I need subfloat to add (a),(b)and(c) at the end of each, without any other information(separate caption). Then at the end a main caption for all of them to tell what (a),(b),(c) are.
If I put subfloat, it gives me (a),(b)and(c), but if I leave out the command \caption, it ruins the numbering in the main text and also in the list of figure.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Subfigure over 3 pages

Post by Johannes_B »

If I understand you correctly, you just want to leave out the optional argument from subfloat.

Code: Select all

\subfloat[]{\includegraphics[angle=90,width=0.7\textwidth]{A}}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
LaTex lover
Posts: 13
Joined: Wed Aug 10, 2011 11:15 am

Subfigure over 3 pages

Post by LaTex lover »

Johannes_B wrote:If I understand you correctly, you just want to leave out the optional argument from subfloat.

Code: Select all

\subfloat[]{\includegraphics[angle=90,width=0.7\textwidth]{A}}
Thanks for your suggestion. Even If I leave out the argument, it still gives me a caption after each figure. My boss does not like that. As I said before if I delete the command \caption,it ruins the numbering!!! As it is bothering me a lot, I decide to add caption after each figure and a main for all of them, which is going to be too much captions!!! At least, it numbering is O.K. I am not happy with What I am going to do because I believe there is a way to do it, but I can not figure it out. Pity!

These are my original codes.

Code: Select all

\begin{figure}[H]
\centering
\subfloat[]{\includegraphics[angle=90,width=0.7\textwidth]{TW}}
\caption[Electric field distribution at 735 MHz, Tap water]{Electric field distribution at 735 MHz, Tap water}
\end{figure}
\begin{figure}[H]
\ContinuedFloat
\centering
\subfloat[]{\includegraphics[angle=90,width=0.7\textwidth]{salt1}}
\caption[Electric field distribution at 735 MHz, Salt1 solution, Cont.]{Electric field distribution at 735 MHz, Salt1 solution}
\end{figure}
\begin{figure}[H]
\ContinuedFloat
\centering
\subfloat[]{\includegraphics[angle=90,width=0.7\textwidth]{salt2}}
\caption[Electric field distribution at 735 MHz, Salt2 solution, Cont.] {Electric field distribution at 735 MHz for (a) Tap water, (b) Salt1 (c) Salt2, at 5 levels.}
\end{figure}
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Subfigure over 3 pages

Post by Johannes_B »

You did not provide a minimal example. Nevertheless, i think I know what you want.

First page. a picture with (a) underneath, nothing more.
Second page, a picture with (b) underneath, nothing more.
Third and last page, a picture with (c) underneath, and the caption for (a), (b) and (c).

Think about what you are doing. Just by looking at a single page, the reader does not know what is going on. There is a single picture without any information on what this is, why it belongs there, or what it is doing there.

I strongly advice you to follow Sommerfee's suggestion.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
LaTex lover
Posts: 13
Joined: Wed Aug 10, 2011 11:15 am

Subfigure over 3 pages

Post by LaTex lover »

Johannes_B wrote:You did not provide a minimal example. Nevertheless, i think I know what you want.

First page. a picture with (a) underneath, nothing more.
Second page, a picture with (b) underneath, nothing more.
Third and last page, a picture with (c) underneath, and the caption for (a), (b) and (c).

Think about what you are doing. Just by looking at a single page, the reader does not know what is going on. There is a single picture without any information on what this is, why it belongs there, or what it is doing there.

I strongly advice you to follow Sommerfee's suggestion.
Thanks for your advice, you are right, with some information it looks much much better.

BW,
LL
Post Reply