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.

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}
share|improve this question

1 Answer 1

up vote 4 down vote accepted

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}
share|improve this answer
    
+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

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.