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.

I am using the subfig package for including subfigures into my thesis. That alone has been going without problem. However, as soon as I use the \ContinuedFloat command in order to split a figure over a single page, the following figure, which also uses the \ContinuedFloat command, just carries on with the subfigure numbering (e.g. Figure 2c, 2d instaed of 2a, 2b). If a figure WITHOUT the \ContinuedFloat command is inserted it also continues the numbering (e.g. 3f) and only the next figure without this command starts with the normal labelling (e.g. 4a).

This is a minimal working example. Any ideas?

\documentclass[12pt,twoside,a4paper]{report}

\usepackage{setspace} 
\usepackage[inner=3cm, outer=3cm, top=1.0in, bottom=1.0in]{geometry} %
\geometry{bindingoffset=0.5cm}

\usepackage{graphicx}
\usepackage[]{subfig}
\usepackage{float} 
\usepackage[font=small,labelfont=bf]{caption}


\begin{document}

\begin{figure}[H]
\centering
\subfloat[]{\includegraphics[width=14cm]{...figue code...}}
\caption[]{figure1}\label{figure1}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\subfloat[]{\includegraphics[width=12cm]{...figue code...}}
\caption[figure1]{figure1}
\end{figure}



\begin{figure}[H]
\centering
\subfloat[]{\includegraphics[width=14cm]{...figue code...}}\\
\subfloat[]{\includegraphics[width=10cm]{...figue code...}}\\
\caption{[]figure2}\label{figure2}
\end{figure}

\begin{figure}[H]
\ContinuedFloat
\centering
\subfloat[]{\includegraphics[width=10cm]{...figue code...}}
\caption[figure3]{figure3} \label{figure3}
\end{figure}

\begin{figure}[H]
\centering
\subfloat[]{\includegraphics[width=10cm]{...figue code...}}
\caption[figure3]{figure3}
\end{figure}

\begin{figure}[H]
\centering
\subfloat[]{\includegraphics[width=10cm]{...figue code...}}
\caption[figure4]{figure4}\label{figure4}
\end{figure}

\end{document}
share|improve this question
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  egreg Apr 9 '12 at 14:06
2  
Thank you! I'm obviously new to this, so I had no idea. Every day is a school day... –  Eva Apr 9 '12 at 14:17
add comment

2 Answers

up vote 1 down vote accepted

This question has been cross-posted to LaTeX-Community.org and there's a possible solution.

The effect is caused by using the float package and the H option. Removing H and using !htbp instead (or less) fixed it for me.

share|improve this answer
add comment

The problem seems to go away if you don't use the [H] position specifier (you should also load caption before subfig). If you really must use [H], you can put this in your preamble and use \resetsubfigs after \begin{figure} to reset the subfigure labels.

\makeatletter
\newcommand\resetsubfigs{\setcounter{sub\@captype}{0}}
\makeatother

A fully automated solution may require a lot of hacking.

share|improve this answer
    
Thanks for this! You were right! –  Eva Apr 9 '12 at 15:13
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.