Graphics, Figures & TablesSubfig issue

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ritturaj
Posts: 2
Joined: Tue Jun 23, 2009 8:23 pm

Subfig issue

Post by ritturaj »

Dear All

I am facing problem of stacking many figures

The problem is the stack figure is overriding the page dimension and placing all the figure in one page and not changing the page as the limitation of page is reached.

How can page be changed while stacking all the figures.


\usepackage{subfig}
\usepackage{float}
\begin{figure}[hp]
\centering
\subfloat[Fig1]{\label{fig:1}\includegraphics[width=0.48\textwidth]{fig1}}
\subfloat[Fig2]{\label{fig:2}\includegraphics[width=0.48\textwidth]{fig2}}
\subfloat[Fig3]{\label{fig:3}\includegraphics[width=0.48\textwidth]{fig3}}
\subfloat[Fig4]{\label{fig:4}\includegraphics[width=0.48\textwidth]{fig4}}
\subfloat[Fig5]{\label{fig:5}\includegraphics[width=0.48\textwidth]{fig5}}
\subfloat[Fig6]{\label{fig:6}\includegraphics[width=0.48\textwidth]{fig6}}
\caption{........}
\label{..........}
\end{figure}


I shall be very thankfull for your kind help.

Regards

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

spiegboy
Posts: 120
Joined: Thu Dec 06, 2007 9:58 am

Subfig issue

Post by spiegboy »

use subfigure rather than subfig and float

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[demo]{graphicx}
\usepackage{subfigure}
\begin{document}
\begin{figure}[hp]
\centering
\subfigure[Fig1]{\label{fig:1}\includegraphics[width=0.48\textwidth]{fig1}}
\subfigure[Fig2]{\label{fig:2}\includegraphics[width=0.48\textwidth]{fig2}}
\subfigure[Fig3]{\label{fig:3}\includegraphics[width=0.48\textwidth]{fig3}}
\subfigure[Fig4]{\label{fig:4}\includegraphics[width=0.48\textwidth]{fig4}}
\subfigure[Fig5]{\label{fig:5}\includegraphics[width=0.48\textwidth]{fig5}}
\subfigure[Fig6]{\label{fig:6}\includegraphics[width=0.48\textwidth]{fig6}}
\caption{........}
\label{..........}
\end{figure}
\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Subfig issue

Post by localghost »

spiegboy wrote:use subfigure rather than subfig and float [...]
The subfigure package is outdated.
ritturaj wrote:[...] The problem is the stack figure is overriding the page dimension and placing all the figure in one page and not changing the page as the limitation of page is reached. [...]
The figure environment groups the sub-figures and neglects page breaks. If you want two split them over two pages, use two figure environments and the \ContinuedFloat command from the caption package. This would also give you the opportunity to use the subcaption package that comes with caption.


Best regards
Thorsten
Post Reply