Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This is my first time using \subfig because I have a figure (Figure 8) that contains two parts, and it was better to put them each on separate pages but one after the other, since they are related (hence, part a and part b) and each figure is as large as the page.

The captions for each part of the figure appear correctly under the figure, but the title "Figure 8" appears centered under the caption. Something like this


(a) Here is the caption of the

first part of the figure.

 Figure 8

I would like the caption to beggin as: Figure 8(a): Here is the caption.... [or Figure 8.a: ]

How can I make the title of the figure to appear together with the caption?

Thank you very much in advance!

Here is the code I used:

\usepackage[caption=true]{caption,subfig}

....

\begin{figure}

\centering

\subfloat[Here is the caption of the first part of the figure (a)]{\includegraphics[scale=0.6]{Figures/Profile_a.jpg}}

\caption{}

\label{fig:Prof_a}

\end{figure}

\begin{figure}

\ContinuedFloat

\centering

\subfloat[Here is the caption of the second part of the figure (b)]{\includegraphics[scale=0.6]{Figures/Profile_b.jpg}}

\caption{}

\label{fig:Prof_b}

\end{figure}
share|improve this question
    
It seems to me that using the subfloat package would fit your needs better. –  Axel Sommerfeldt Jun 18 '11 at 7:38
add comment

1 Answer 1

I would suggest you to use the subcaption package instead of subfig: see subcaption vs. subfig. In the following example I (locally) redefined the \thefigure command to include the subfigure counter, and modified the format for the label of the subfigure caption so that the numbering and the captions will be produced by figure and not by subfigure:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\begin{document}

\begingroup
\renewcommand\thefigure{\arabic{figure}(\alph{subfigure})}
\captionsetup[subfigure]{labelformat=empty,aboveskip=-1em}
\begin{figure}
  \begin{subfigure}{\textwidth}
    \centering
    \includegraphics[scale=0.6]{Figures/Profile_a.jpg}
    \caption{}
  \end{subfigure}
  \caption{Here is the caption of the first part of the figure (a)}
  \label{fig:Prof_a}
\end{figure}
\begin{figure}
  \ContinuedFloat
  \begin{subfigure}{\textwidth}
    \centering
    \includegraphics[scale=0.6]{Figures/Profile_b.jpg}
    \caption{}
  \end{subfigure}
  \caption{Here is the caption of the second part of the figure (b)}
  \label{fig:Prof_b}
\end{figure}
\endgroup

\end{document}

I used the demo option for graphicx to make my example compilable for everyone; do not include the option in your actual code.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.