# Using contcapt in the sidewaysfigure environment

In a two sidewaysfigure environments across two pages contcapt in the second page has an incremented caption number. Oddly, the subfigure letter on the second page is correct ex. (it will start with b) rather than a)). Since the second page is still part of the first figure I don't want to increment the caption counter.

Does anyone else get such an error?
Does anyone know why such an error would be cause?
Does anyone know how to fix this error?
Can the solution work in Lyx?

%% LyX 1.6.7 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{graphicx}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% A simple dot to overcome graphicx limitations
\newcommand{\lyxdot}{.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{float}
%figures
\usepackage{captcont}
\usepackage{subfigure}
%\usepackage{subfig}
\usepackage{rotating}

\makeatother

\usepackage{babel}

\begin{document}
\begin{sidewaysfigure}

\caption{Gene Ontology analysis of marked overexpressed genes in
cancer and matched-control cell lines}

\subfigure[Gene Ontology analysis of control cancer marked overexpressed
genes]{

\label{fig:go_cntrlUniqMrkdCncrOvrExp}

\includegraphics[width=1\textheight]{\lyxdot \lyxdot /\lyxdot \lyxdot /fig/go_gprof/go_cntrlUniqMrkdCncrOvrExp}

}

\end{sidewaysfigure}

\begin{sidewaysfigure}

\captcont*{Gene Ontology analysis of marked overexpressed genes
in cancer and matched-control cell lines}

\subfigure[Gene Ontology analysis of cancer marked control overexpressed
genes]{

\label{fig:cncrUniqMrkdCntrlOvrExp}

\includegraphics[width=1\textheight]{\lyxdot \lyxdot /\lyxdot \lyxdot /fig/go_gprof/go_cncrUniqMrkdCntrlOvrExp}

}

\subfigure[Gene Ontology analysis of cancer marked cancer overexpressed
genes]{

\label{fig:go_cncrUniqMrkdCncrOvrExp}

\includegraphics[width=1\textheight]{\lyxdot \lyxdot /\lyxdot \lyxdot /fig/go_gprof/go_cncrUniqMrkdCncrOvrExp}

}

\subfigure[Gene Ontology analysis of control marked control overexpressed
genes]{

\label{fig:go_cntrlUniqMrkdCntrlOvrExp}

\includegraphics[width=1\textheight]{\lyxdot \lyxdot /\lyxdot \lyxdot /fig/go_gprof/go_cntrlUniqMrkdCntrlOvrExp}

}

\end{sidewaysfigure}
\end{document}

-

The subfig(ure) package is in the need of knowing where the main caption is placed. Otherwise it will assume that the main figure caption will be placed below the figure. This is not the case in your example code, so you have to use the subfigure package option "figtopcap", i.e. \usepackage[figtopcap]{subfigure}, to get a correct numbering.

But the subfigure-captcont package tandem is obsolete, better use the successor of the subfigure package which is the subfig package:


\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{graphicx}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% A simple dot to overcome graphicx limitations
\newcommand{\lyxdot}{.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{float}
%figures
\usepackage[position=b]{subfig}
\usepackage{rotating}

\makeatother

\usepackage{babel}

\begin{document}
\begin{sidewaysfigure}

\caption{Gene Ontology analysis of marked overexpressed genes in
cancer and matched-control cell lines}

\subfloat[Gene Ontology analysis of control cancer marked overexpressed
genes]{

\label{fig:go_cntrlUniqMrkdCncrOvrExp}

\includegraphics[width=1\textheight]{\lyxdot \lyxdot /\lyxdot \lyxdot /fig/go_gprof/go_cntrlUniqMrkdCncrOvrExp}

}

\end{sidewaysfigure}

\begin{sidewaysfigure}
\ContinuedFloat

\caption{Gene Ontology analysis of marked overexpressed genes
in cancer and matched-control cell lines}

\subfloat[Gene Ontology analysis of cancer marked control overexpressed
genes]{

\label{fig:cncrUniqMrkdCntrlOvrExp}

\includegraphics[width=1\textheight]{\lyxdot \lyxdot /\lyxdot \lyxdot /fig/go_gprof/go_cncrUniqMrkdCntrlOvrExp}

}

\subfloat[Gene Ontology analysis of cancer marked cancer overexpressed
genes]{

\label{fig:go_cncrUniqMrkdCncrOvrExp}

\includegraphics[width=1\textheight]{\lyxdot \lyxdot /\lyxdot \lyxdot /fig/go_gprof/go_cncrUniqMrkdCncrOvrExp}

}

\subfloat[Gene Ontology analysis of control marked control overexpressed
genes]{

\label{fig:go_cntrlUniqMrkdCntrlOvrExp}

\includegraphics[width=1\textheight]{\lyxdot \lyxdot /\lyxdot \lyxdot /fig/go_gprof/go_cntrlUniqMrkdCntrlOvrExp}

}

\end{sidewaysfigure}
\end{document}

-
+1 thank you for the answer. There seems to be problems when importing this tex solution into Lyx. Were you able to get it to work in Lyx? –  denilw Dec 28 '10 at 19:59
Unfortunately I'm not familiar with Lyx at all. But even when using Lyx it should be at least possible to add the option figtopcap to the subfigure package options? –  Axel Sommerfeldt Dec 28 '10 at 20:03