<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse % captcont.dtx
% Retain figure/table number across multiple pages and provide correct
% output to List-of-Figures or List-of-Tables files.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (C) 1997-2002 Steven Douglas Cochran
% 
% The captcont package is free software; it may be distributed under the
% conditions of the LaTeX Project Public License, either version 1.2 of
% this license or (at your option) any later version. The latest version
% of this license is in:
%      http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of LaTeX version
% 1999/09/03 or later.
%
% The captcont package is distributed in the hope that it will be
% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
% LaTeX Project Public License for more details.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% @LaTeX-style-file{
%%    author     = "Steven Douglas Cochran",
%%    version    = "2.0",
%%    date       = "2002/02/14",
%%    time       = "11:59:17",
%%    filename   = "captcont.sty",
%%    address    = "Digital Mapping Laboratory, School of Computer Science
%%                  Carnegie-Mellon University, 5000 Forbes Avenue
%%                  Pittsburgh, PA 15213-3890, USA",
%%    telephone  = "+1 412.268.5654",
%%    fax        = "+1 412.268.5576",
%%    email      = "sdc+@CS.CMU.EDU (Internet)",
%%    codetable  = "ISO/ASCII",
%%    keywords   = "LaTeX, caption, float, figure, table, subfigure",
%%    supported  = "yes",
%%    abstract   = "LaTeX package for providing support for retaining
%%                  a figure or table number across several float
%%                  environments---usually over several pages.  It
%%                  also allows control over the contents of the
%%                  List-of-Figures and the List-of-Tables pages."
%% }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%&lt;*driver&gt;
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesFile{subfigure.dtx}
\documentclass{ltxdoc}
\usepackage{captcont}[2002/01/23]
\usepackage[TABTOPCAP,tight]{subfigure}[2002/01/23]
\setlength\hfuzz{100pt}
\setlength\vfuzz{100pt}
\clubpenalty=10000
\widowpenalty=10000
\displaywidowpenalty=5000
\brokenpenalty=5000
\begin{document}
  \DocInput{captcont.dtx}
\end{document}
%&lt;/driver&gt;
%
%&lt;*ltxdoc&gt;
\AtBeginDocument{
%  \OnlyDescription % comment out for implementation details
  \EnableCrossrefs
  \RecordChanges
  \CodelineIndex}
\AtEndDocument{
  \PrintChanges
  \PrintIndex}
%&lt;/ltxdoc&gt;
%
% \fi
%
% \catcode`\^=14 ^^A We will use a ^ for a comment rather than ^^A.
% \newcommand*{\Lopt}[1]{\textsf{#1}}         ^ Package options
% \newcommand*{\Lfile}[1]{\texttt{#1}}        ^ File names
% \newcommand*{\Lpack}[1]{\textsf{#1}}        ^ Package names
% \newcommand*{\Lenv}[1]{\texttt{#1}}         ^ Environment names
% \newcommand*{\Lcount}[1]{\textsl{\small#1}} ^ Counter names
% \newcommand*{\Lif}[1]{\textsc{\bf#1}}       ^ \if names
% ^ NOTE: Hacks added to make the final format are marked ``^finalhack''.
%
% \changes{v1.0}{11 Oct 1996}{Initial revision.}
%
% \DoNotIndex{\@ehd,\@firstofone,\@for,\@gobble,\@ifundefined,\@latex@error}
% \DoNotIndex{\@ne,\@undefined,\addcontentsline,\addtolength,\advance,\alph}
% \DoNotIndex{\begingroup,\bfseries,\bgroup,\box,\csname,\DeclareOption}
% \DoNotIndex{\def,\do,\egroup,\else,\endcsname,\endgroup,\ExecuteOption}
% \DoNotIndex{\ExecuteOptions,\expandafter,\fi,\footnotesize,\gdef,\hbox}
% \DoNotIndex{\global,\hfil,\ifdim,\ifnum,\ifx,\ignorespaces,\itshape}
% \DoNotIndex{\Large,\large,\leavevmode,\let,\long,\mdseries,\multiply}
% \DoNotIndex{\NeedsTeXFormat,\newcommand,\newcounter,\newif,\noexpand}
% \DoNotIndex{\normalsize,\par,\parbox,\ProcessOptions,\protect}
% \DoNotIndex{\ProvidesPackage,\relax,\renewcommand,\rmfamily,\sbox}
% \DoNotIndex{\scriptsize,\scshape,\setbox,\setcounter,\setlength,\sffamily}
% \DoNotIndex{\slshape,\small,\space,\string,\strut,\ttfamily,\tw@,\typeout}
% \DoNotIndex{\undefined,\upshape,\usebox,\vbox,\vskip,\vtop,\wd,\xdef}
% \DoNotIndex{\z@skip,\@dblarg,\@ifstar,\@nameuse,\@parboxrestore}
% \DoNotIndex{\@setminipage,\edef,\if@minipage,\m@ne,\numberline}
% \DoNotIndex{\providecommand,\refstepcounter,\@makecaption,\@captype}
% \DoNotIndex{\@currentlabel}
%
% \CheckSum{156}
%
% ^ This command creates a rectangular box to represent
% ^ a figure in the examples given in this paper.
% \newcommand{\figbox}[1]{%
%   \fbox{^
%     \vbox to 15mm{^
%     \vfil
%     \hbox{^
%       \space
%       #1^
%       \space}^
%     \vfil}}}
% 
% ^ Allow a little more freedom in typesetting floats.
% \setcounter{topnumber}{8}
% \def\topfraction{.8}
% \setcounter{bottomnumber}{8}
% \def\bottomfraction{.8}
% \setcounter{totalnumber}{8}
% \def\textfraction{.2}
% \def\floatpagefraction{.8}
% \setcounter{dbltopnumber}{8}
% \def\dbltopfraction{.8}
% \def\dblfloatpagefraction{.8}
%
% ^ Add some space above any footnotes.
% \skip\footins=1.5\baselineskip
%
% ^ Make the \fbox stay just inside the box it "surrounds".
% \fboxsep=-\fboxrule
%
% ^ Make the subcaption label be centered.
% \subfiglabelskip=0pt
%
% \makeatletter
%
% ^ Create an EXAMPLE float environment.
% ^ NOTE: This is not complete --- just enough for this paper.
% \newcounter{example}
% \renewcommand\theexample{\@arabic\c@example}
% \def\fps@example{tbp}
% \def\ftype@example{3}
% \def\ext@example{loe}
% \def\fnum@example{\examplename~\theexample}
% \newenvironment{example}
%                {\@float{example}}
%                {\end@float}
% \newcommand\examplename{Example}
%
% ^ This command switches the caption type.
% \newcommand{\setcaptype}[1]{\renewcommand{\@captype}{#1}}
% 
% \makeatother
%
% \def\docdate{2002/02/14}
% \def\fileversion{v2.0}
% \def\filedate{2002/01/23}
% \def\filename{captcont.dtx}
%
% \title{The \Lpack{captcont} Package\footnote{This paper documents
%        the \Lpack{captcont} package v\fileversion, last revised \filedate.}}
% \author{Steven Douglas Cochran\\[5pt]
%         Digital Mapping Laboratory, School of Computer Science \\
%         Carnegie-Mellon University, 5000 Forbes Avenue \\
%         Pittsburgh, PA 15213--3890, USA\\[5pt]
%         \texttt{sdc+@cs.cmu.edu}}
% \date{\docdate}
%
% \maketitle
%
% \begin{abstract}
% \noindent
% This article documents the \LaTeX\ package `\Lpack{captcont}', which
% provides support for retaining a figure or caption number across
% several float environments---usually over several pages.  It allows
% control over the contents of the List-of-Figures and the
% List-of-Tables pages.  It should be compatible with all other packages
% that modify or extend the float environment and with the
% \Lpack{subfigure} package \cite{Coch02} in particular.
%\end{abstract}
% 
% \tableofcontents
%
% \newpage
% \section{Introduction}
% \enlargethispage{12pt} ^finalhack
% 
% The \Lpack{captcont} package provides support for figures and tables
% that continue or span two or more pages, but cannot be easily handled
% by another mechanism such as the \Lpack{longtable} package \cite{Carl00}
% or the \Lpack{supertabular} environment \cite{Braa-Jurr99}.  The reason
% for this is usually that the figure or table is made up of multiple
% small parts.  Therefore this package is typically used in conjunction
% the \Lpack{subfigure} package\cite{Coch02}.
% 
% This \LaTeXe\ package replaces the older \LaTeX2.09 style fragment
% written by Anonymous.  This is a complete re-implementation of the
% older style so that the List-of-Figures, List-of-Tables and the
% |\pageref| command have the correct page numbers.
% 
% \section{The User Interface}
% 
% To use this package place
% \begin{quote}
%   |\usepackage|\oarg{options}\{captcont\}
% \end{quote}
% 
% \noindent
% in the preamble of your document.  The supported options are shown in
% table~\ref{tab:options}.\footnote{If the \Lpack{subfigure} package is
% also loaded, then the \Lpack{subfigure} package options override
% these.}  This package redefines the |\caption| command and defines
% three new commands to work with it.  The new commands act very similar
% to the caption, but control when the \Lcount{figure} or \Lcount{table}
% counter is incremented and whether or not the caption text shows up in
% the List-of-Figures or List-of-Tables pages.  The commands are:
% 
% \begin{tabbing}
%   \qquad \=|\captcont|* \=\oarg{lst\_entry} \=\marg{caption}\kill
%          \&gt;|\caption|   \&gt;\oarg{lst\_entry} \&gt;\marg{caption}\\
%          \&gt;|\caption|*  \&gt;\oarg{lst\_entry} \&gt;\marg{caption}\\
%          \&gt;|\captcont|  \&gt;\oarg{lst\_entry} \&gt;\marg{caption}\\
%          \&gt;|\captcont|* \&gt;\oarg{lst\_entry} \&gt;\marg{caption}
% \end{tabbing}
% \noindent
% The |\captcont| and |\captcont|* commands do not increment the
% \Lcount{figure} or \Lcount{table} counters and the |\captcont|* and
% |\caption|* commands do not print to the List-of-Figures or
% List-of-Tables.
% 
% If the caption proceeds the figure ({\it i.e.\/}, \Lopt{figtopcap} or
% \Lopt{tabtopcap}), then for a series of \Lenv{float} environments that
% are to be considered as one \Lenv{figure} or \Lenv{table}, you begin
% the first with a |\caption| or |\caption*| and use |\captcont| or
% |\captcont*| in each of the the following ones.  If the caption
% follows the figure ({\it i.e.\/}, \Lopt{figbotcap} or
% \Lopt{tabbotcap}), then you do just the opposite and use |\captcont|
% or |\captcont*| on each of the series of \Lenv{float} environments
% that are to be considered as one \Lenv{figure} or \Lenv{table}, the
% use a |\caption| or |\caption*| on the very last one.
% 
% \begin{table}
%   \caption{\Lpack{captcont} package options.}
%   \label{tab:options}
%   \DeleteShortVerb{\|}
%   \centering
%   \begin{tabular}{l|l}
%     \hline
%     \multicolumn{1}{c|}{\bf Option}
%                      &amp; \multicolumn{1}{c}{\bf Description} \\
%     \hline
%     \Lopt{figbotcap} &amp; The figure caption follows the figure (default).\\
%     \Lopt{figtopcap} &amp; The figure caption precedes the figure.\\ \hline
%     \Lopt{tabbotcap} &amp; The table caption follows the figure.\\
%     \Lopt{tabtopcap} &amp; The table caption precedes the figure (default).\\
%     \hline
%   \end{tabular}
%   \MakeShortVerb{\|}
% \end{table}
% 
% \section{Examples}
%
% Four examples are given below of the use of the \Lpack{captcont}
% package. The ``figures'' in each are drawn using the following command
% which creates a small box representing a figure in the example output
% and centers provided text in the box.  The height of the box is fixed
% at 15mm and the width varies with the provided text.
% \newpage ^finalhack
% 
% \begin{verbatim}
% \newcommand{\figbox}[1]{%
%   \fbox{%                    Frame the box to make the ``figure''
%     \vbox to 15mm{%          Make it 15mm tall
%     \vfil                    Vertically center this next \hbox
%     \hbox{%                   
%       \space
%       #1%                    Add the supplied text with spaces
%       \space}%
%     \vfil}}}
% \end{verbatim}
% 
% \subsection{Two Continued Figures}
% 
% Example~\ref{ex:one} shows the case of a set of three pages containing
% parts of one figure.  In this case the author desires that the caption
% of each page shows up in the List-of-Figures page.  The |\caption| 
% follows the figure body, so we use the |\captcont| command on the
% inital pages and the |\caption| on the last.
% 
% \begin{verbatim}
%   \listoffigures
%   ...
%   \begin{figure}[p]
%     \figbox{Figure~\ref{fig:ex1-1}, part 1, page \pageref{fig:ex1-1}}
%     \captcont{Figure one.}
%     \label{fig:ex1-1}
%   \end{figure}
%   \begin{figure}[p]
%     \figbox{Figure~\ref{fig:ex1-1}, part 2, page \pageref{fig:ex1-2}}
%     \captcont{Figure one. (cont)}
%     \label{fig:ex1-2}
%   \end{figure}
%   \begin{figure}[p]
%     \figbox{Figure~\ref{fig:ex1-1}, part 3, page \pageref{fig:ex1-3}}
%     \caption{Figure one. (cont)}
%     \label{fig:ex1-3}
%   \end{figure}
% \end{verbatim}
% 
% \begin{example}
%   \setcaptype{figure}^
%   \centering
%   \fbox{^
%     \begin{minipage}{2.3in}^
%       \begin{minipage}{2.1in}^
%         \vspace{.1in}^
%         \section*{ List of Figures}
%         \contentsline{figure}{\numberline{1}^
%                      {\ignorespaces Figure one.}}{2}^
%         \contentsline{figure}{\numberline{1}^
%                      {\ignorespaces Figure one. (cont)}}{3}^
%         \contentsline{figure}{\numberline{1}^
%                      {\ignorespaces Figure one. (cont)}}{4}^
%         \hspace{40pt}\dots
%         \vspace{21pt}^
%       \end{minipage}^
%     \end{minipage}}^
%   \quad
%   \fbox{^
%     \begin{minipage}{2.3in}^
%       \centering
%       \vspace{.1in}^
%       \figbox{Figure~\ref{fig:ex1-1}, part 1, page 2.}^
%       \vspace{-5pt}^
%       \captcont{Figure one.}^
%       \label{fig:ex1-1}^
%       \vspace{10pt}^
%       -2-
%       \vspace{.1in}^
%     \end{minipage}}\\[.1in]
%   \fbox{^
%     \begin{minipage}{2.3in}^
%       \centering
%       \vspace{.1in}^
%       \figbox{Figure~\ref{fig:ex1-2}, part 2, page 3.}^
%       \vspace{-5pt}^
%       \captcont{Figure one. (cont)}^
%       \label{fig:ex1-2}^
%       \vspace{10pt}^
%       -3-
%       \vspace{.1in}^
%     \end{minipage}}^
%   \quad
%   \fbox{^
%     \begin{minipage}{2.3in}^
%       \centering
%       \vspace{.1in}^
%       \figbox{Figure~\ref{fig:ex1-3}, part 3, page 4.}^
%       \vspace{-5pt}^
%       \caption{Figure one. (cont)}^
%       \label{fig:ex1-3}^
%       \vspace{10pt}^
%       -4-
%       \vspace{.1in}^
%     \end{minipage}}^
%   \setcaptype{example}^
%   \caption{Four pages showing a continued figure with
%            List-of-Figures entries for each.}
%   \label{ex:one}
% \end{example}
%
% \newpage ^finalhack
% Often, however, you do not want the continued captions to appear in
% the List-of-Figures.  Therefore the starred forms of the commands are
% available to suppress the addition of the caption text to the
% List-of-Figures, as shown in example~\ref{ex:two} where only the
% first caption appears.
%
% \begin{verbatim}
%   \listoffigures
%   ...
%   \begin{figure}[p]
%     \figbox{Figure~\ref{fig:ex2-1}, part 1, page \pageref{fig:ex2-1}}
%     \captcont{Figure two.}
%     \label{fig:ex2-1}
%   \end{figure}
%   \begin{figure}[p]
%     \figbox{Figure~\ref{fig:ex2-1}, part 2, page \pageref{fig:ex2-2}}
%     \captcont*{Figure one. (cont)}
%     \label{fig:ex2-2}
%   \end{figure}
%   \begin{figure}[p]
%     \figbox{Figure~\ref{fig:ex2-1}, part 3, page \pageref{fig:ex2-3}}
%     \caption*{Figure one. (cont)}
%     \label{fig:ex2-3}
%   \end{figure}
% \end{verbatim}
%
% \begin{example}^
%   \setcaptype{figure}^
%   \centering
%   \fbox{^
%     \begin{minipage}{2.3in}^
%       \begin{minipage}{2.1in}^
%         \vspace{.1in}^
%         \section*{ List of Figures}
%         \hspace{40pt}\dots
%         \vspace{3pt}^
%         \contentsline{figure}{\numberline{2}^
%                      {\ignorespaces Figure two.}}{5}^
%         \hspace{40pt}\dots
%         \vspace{30pt}^
%       \end{minipage}^
%     \end{minipage}}^
%   \quad
%   \fbox{^
%     \begin{minipage}{2.3in}^
%       \centering
%       \vspace{.1in}^
%       \figbox{Figure~\ref{fig:ex2-1}, part 1, page 5.}^
%       \vspace{-5pt}^
%       \captcont{Figure two.}^
%       \label{fig:ex2-1}^
%       \vspace{10pt}^
%       -5-
%       \vspace{.1in}^
%     \end{minipage}}\\[.1in]
%   \fbox{^
%     \begin{minipage}{2.3in}^
%      \centering
%      \vspace{.1in}^
%       \figbox{Figure~\ref{fig:ex2-2}, part 2, page 6.}^
%       \vspace{-5pt}^
%       \captcont*{Figure two. (cont)}^
%       \label{fig:ex2-2}^
%       \vspace{10pt}^
%       -6-
%       \vspace{.1in}^
%     \end{minipage}}^
%   \quad
%   \fbox{^
%     \begin{minipage}{2.3in}^
%       \centering
%       \vspace{.1in}^
%       \figbox{Figure~\ref{fig:ex2-3}, part 3, page 7.}^
%       \vspace{-5pt}^
%       \caption*{Figure two. (cont)}^
%       \label{fig:ex2-3}^
%       \vspace{10pt}^
%       -7-
%       \vspace{.1in}^
%   \end{minipage}}^
%   \setcaptype{example}^
%   \caption{Four pages showing a continued figure with
%            List-of-Figures entries for the first page only.}
%   \label{ex:two}
% \end{example}
%
% \subsection{A Continued Series of Subfigures}
%
% Example~\ref{ex:three} shows the interaction of the \Lpack{contcapt} and
% the \Lpack{subfigure} packages.  When the \Lpack{subfigure} package is
% also loaded, it overrides any options given with this package (it
% doesn't matter if it is loaded before or after the \Lpack{captcont}
% package).  For this and the following example, we assume that the
% \Lpack{subfigure} package was loaded with the options
% [\Lopt{FIGBOTCAP},\Lopt{TABTOPCAP}]; therefore, for continued figures
% and tables, we {\bf end} the series of continued figures and we {\bf
% begin} the series of continued tables with with a |\caption| or
% |\caption*| command.  The rest of the figure or tables parts use
% either the |\captcont| or the |\captcont*| command.
%
% \begin{example}^
%   \setcaptype{figure}^
%   \centering
%   \leavevmode
%   \small
%   \fbox{^
%   \begin{minipage}{2.3in}^
%     \centering
%     \vspace{.1in}^
%     \subfigure[]{\figbox{Subfigure 1A}}^
%     \quad
%     \subfigure[]{\figbox{Subfigure 1B}}\\
%     \subfigure[]{\figbox{Subfigure 1C}}^
%     \quad
%     \subfigure[]{\figbox{Subfigure 1D}}\\
%     \vspace{-5pt}^
%     \caption{This is a simple figure.}^
%     \label{fig:ex3-1}^
%     \vspace{10pt}^
%     -8-
%     \vspace{.1in}^
%   \end{minipage}}^
%   \quad
%   \fbox{^
%   \begin{minipage}{2.3in}^
%     \centering
%     \vspace{.1in}^
%     \subfigure[]{\figbox{Subfigure 2A}}^
%     \quad
%     \subfigure[]{\figbox{Subfigure 2B}}\\
%     \subfigure[]{\figbox{Subfigure 2C}}^
%     \quad
%     \subfigure[]{\figbox{Subfigure 2D}}\\
%     \vspace{-5pt}^
%     \captcont{This is a continued figure.}
%     \label{fig:ex3-2a}^
%     \vspace{10pt}^
%     -9-
%     \vspace{.1in}^
%   \end{minipage}}\\[.1in]
%   \fbox{^
%   \begin{minipage}{2.3in}^
%     \centering
%     \vspace{.1in}^
%     \subfigure[]{\figbox{Subfigure 2E}}^
%     \quad
%     \subfigure[]{\figbox{Subfigure 2F}}\\
%     \subfigure[]{\figbox{Subfigure 2G}}^
%     \quad
%     \subfigure[]{\figbox{Subfigure 2H}}^
%     \vspace{-5pt}^
%     \hfil\parbox{2.1in}{^
%       \captcont*{This is a continued figure (cont.)}
%     }\\
%     \label{fig:ex3-2b}^
%     \vspace{10pt}^
%     -10-
%     \vspace{.1in}^
%   \end{minipage}}^
%   \quad
%   \fbox{^
%   \begin{minipage}{2.3in}^
%     \centering
%     \vspace{.1in}^
%     \subfigure[]{\figbox{Subfigure 2I}}^
%     \quad
%     \subfigure[]{\figbox{Subfigure 2J}}\\
%     \subfigure[]{\figbox{Subfigure 2K}}^
%     \quad
%     \subfigure[]{\figbox{Subfigure 2L}}
%     \vspace{-5pt}^
%     \hfil\parbox{2.1in}{^
%       \caption*{This is a continued figure (cont.)}
%     }\\
%     \label{fig:ex3-2c}
%     \vspace{10pt}^
%     -11-
%     \vspace{.1in}^
%   \end{minipage}}^
%   \setcaptype{example}^
%   \caption{Four pages showing a regular figure with four subfigures
%            and a continued figure composed of twelve subfigures.}
%   \label{ex:three}
% \end{example}
% 
% \begin{verbatim}
%   \begin{figure}[p]%
%     \begin{center}%
%       \subfigure[]{\figbox{Subfigure 1A}}%
%       \quad
%       \subfigure[]{\figbox{Subfigure 1B}}\\
%       \subfigure[]{\figbox{Subfigure 1C}}%
%       \quad
%       \subfigure[]{\figbox{Subfigure 1D}}%
%     \end{center}%
%     \caption{This is a simple figure.}
%     \label{fig:ex3-1}
%   \end{figure}
% \end{verbatim}
%
% \newpage ^finalhack
% \enlargethispage{12pt} ^finalhack
%
% \begin{verbatim}
%   \begin{figure}[p]%
%     \begin{center}%
%       \subfigure[]{\figbox{Subfigure 2A}}%
%       \quad
%       \subfigure[]{\figbox{Subfigure 2B}}\\
%       \subfigure[]{\figbox{Subfigure 2C}}%
%       \quad
%       \subfigure[]{\figbox{Subfigure 2D}}%
%     \end{center}%
%     \captcont{This is a continued figure.}
%     \label{fig:ex3-2a}
%   \end{figure}
% \end{verbatim}
%   
% \begin{verbatim}
%   \begin{figure}[p]%
%     \begin{center}%
%       \subfigure[]{\figbox{Subfigure 2E}}%
%       \quad
%       \subfigure[]{\figbox{Subfigure 2F}}\\
%       \subfigure[]{\figbox{Subfigure 2G}}%
%       \quad
%       \subfigure[]{\figbox{Subfigure 2H}}%
%     \end{center}%
%     \captcont*{This is a continued figure (cont.)}
%     \label{fig:ex3-2b}
%   \end{figure}
%   
%   \begin{figure}[p]%
%     \begin{center}%
%       \subfigure[]{\figbox{Subfigure 2I}}%
%       \quad
%       \subfigure[]{\figbox{Subfigure 2J}}\\
%       \subfigure[]{\figbox{Subfigure 2K}}%
%       \quad
%       \subfigure[]{\figbox{Subfigure 2L}}%
%     \end{center}%
%     \caption*{This is a continued figure (cont.)}
%     \label{fig:ex3-2c}
%   \end{figure}
% \end{verbatim}
% 
% Here only the first two captions (for figures~\ref{fig:ex3-1} and
% \ref{fig:ex3-2a}) appear in the List-of-Tables. The correct figure
% and page numbers are generated by any |\label| commands for later use
% with |\ref| or |\pageref|.  When the \Lpack{subfigure} package is
% loaded this goes for the \cmd{\subref} command also.
%
% \subsection{A Continued Series of Subtables}
%
% Example~\ref{ex:four} also shows the interaction of the \Lpack{contcapt}
% and \Lpack{subfigure} packages.  Here the \Lpack{table} environment is
% used along with the \Lopt{TABTOPCAP} option which insures that the
% numbering for the subtables is correct when the |\caption| preceeds 
% them rather than following them.  As mentioned above, we use the
% |\caption| or |\caption*| command for the first \Lenv{float} environment
% and the |\captcont| or |\captcont*| command for the continued
% \Lenv{float}'s.
% 
% \begin{example}^
%   \setcaptype{table}^
%   \centering
%   \leavevmode
%   \small
%   \fbox{^
%   \begin{minipage}{2.3in}^
%     \centering
%     \caption{This is a simple table.}^
%     \label{tab:One}^
%     \vspace{4pt}^
%     \subtable[\label{tab:OneA}]{\figbox{Subtable 1A}}^
%     \quad
%     \subtable[\label{tab:OneB}]{\figbox{Subtable 1B}}\\
%     \subtable[\label{tab:OneC}]{\figbox{Subtable 1C}}^
%     \quad
%     \subtable[\label{tab:OneD}]{\figbox{Subtable 1D}}\par
%     \vspace{10pt}^
%     -12-
%     \vspace{.1in}^
%   \end{minipage}}^
%   \quad
%   \fbox{^
%   \begin{minipage}{2.3in}^
%     \centering
%     \caption{This is a continued table.}^
%     \vspace{4pt}^
%     \subtable[]{\figbox{Subtable 2A}}^
%     \quad
%     \subtable[]{\figbox{Subtable 2B}}\\
%     \subtable[]{\figbox{Subtable 2C}}^
%     \quad
%     \subtable[]{\figbox{Subtable 2D}}\par
%     \vspace{10pt}^
%     -13-
%     \vspace{.1in}^
%   \end{minipage}}\\[.1in]
%   \fbox{^
%   \begin{minipage}{2.3in}^
%     \centering
%     \hfil\parbox{2.1in}{^
%       \captcont*{This is a continued table (cont.)}^
%     }\\
%     \vspace{4pt}^
%     \subtable[]{\figbox{Subtable 2E}}^
%     \quad
%     \subtable[]{\figbox{Subtable 2F}}\\
%     \subtable[]{\figbox{Subtable 2G}}^
%     \quad
%     \subtable[]{\figbox{Subtable 2H}}\par
%     \vspace{10pt}^
%     -14-
%     \vspace{.1in}^
%   \end{minipage}}^
%   \quad
%   \fbox{^
%   \begin{minipage}{2.3in}^
%     \centering
%     \hfil\parbox{2.1in}{^
%       \captcont*{This is a continued table (cont.)}^
%     }\\
%     \vspace{4pt}^
%     \subtable[]{\figbox{Subtable 2I}}^
%     \quad
%     \subtable[]{\figbox{Subtable 2J}}\\
%     \subtable[]{\figbox{Subtable 2K}}^
%     \quad
%     \subtable[]{\figbox{Subtable 2L}}\par
%     \vspace{10pt}^
%     -15-
%     \vspace{.1in}^
%   \end{minipage}}^
%   \setcaptype{example}^
%   \caption{Four pages showing a regular table with four subtables
%            and a continued table composed of twelve subtables.}
%   \label{ex:four}
% \end{example}
% 
% \newpage ^finalhack
% \enlargethispage{12pt} ^finalhack
%
% \begin{verbatim}
%   \begin{table}[p]%
%     \caption{This is a simple table.}%
%     \label{tab:One}%
%     \begin{center}%
%       \subtable[\label{tab:OneA}]{\figbox{Subtable 1A}}%
%       \quad
%       \subtable[\label{tab:OneB}]{\figbox{Subtable 1B}}\\
%       \subtable[\label{tab:OneC}]{\figbox{Subtable 1C}}%
%       \quad
%       \subtable[\label{tab:OneD}]{\figbox{Subtable 1D}}%
%     \end{center}%
%   \end{table}
% 
%   \begin{table}[p]%
%     \caption{This is a continued table.}%
%     \label{tab:Two}%
%     \begin{center}%
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2A}}%
%       \quad
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2B}}\\
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2C}}%
%       \quad
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2D}}%
%     \end{center}%
%   \end{table}
%
%   \begin{table}[p]%
%     \captcont*{This is a continued table (cont.)}%
%     \begin{center}%
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2E}}%
%       \quad
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2F}}\\
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2G}}%
%       \quad
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2H}}%
%     \end{center}%
%   \end{table}
%
%   \begin{table}[p]%
%     \captcont*{This is a continued table (cont.)}%
%     \begin{center}%
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2I}}%
%       \quad
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2J}}\\
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2K}}%
%       \quad
%       \subtable[\label{tab:Two}]{\figbox{Subtable 2L}}%
%     \end{center}%
%   \end{table}
% \end{verbatim}
%
% \clearpage ^finalhack
%
% \StopEventually{^
% \newpage ^finalhack
% \section*{Acknowledgement}
% I wish to thank William 'bil' L. Kleb (w.l.kleb@larc.nasa.gov) for 
% his willingness to proofread this document and his many valuable
% suggestions as to its improvement.
% 
% \begin{thebibliography}{6}^
% \bibitem{Coch02}^
%   Steven Douglas Cochran,
%   \emph{The \Lpack{subfigure} Package},
%   2002/02/14/.
%   (Available from CTAN as file \texttt{subfigure.dtx})
% \bibitem{Carl00}^
%   David Carlisle,
%   \emph{The \Lpack{longtable} package},
%   2000/10/22.
%   (Available from CTAN as file \texttt{longtable.dtx})
% \bibitem{Braa-Jurr99}^
%   Johannes Braams and Theo Jurriens,
%   \emph{The \Lpack{supertabular} environment},
%   1999/08/07.
%   (Available from CTAN as file \texttt{supertabular.dtx})
% \end{thebibliography}}
%
% \section{The Code}
% \iffalse
%&lt;*package&gt;
% \fi
% \subsection{Identification}
% 
% We start off by checking that we are loading into \LaTeXe\ and
% announcing the name and version of this package.
%
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{captcont}[2002/02/14 v2.0 captcont package]
%    \end{macrocode}
%
% \subsection{Declaration and Execution of the Options}
% 
% \begin{macro}{\iffiguretopcap}
% \begin{macro}{\iftabletopcap}
% 
% First we check if the flags \Lif{figuretopcap} and \Lif{tabletopcap}
% exist; if they are not present, than they are created.  These are used
% to remember the options and are also the same internal |\if|'s used by
% the \Lpack{subfigure} package for this purpose and so we check if the
% \Lpack{subfigure} package has already been loaded (by the existance of
% the |\@subfloat| command and if so, then we entirely skip loading the
% options.
% 
% However if the \Lpack{subfigure} package has not been loaded, we check
% for the options below and set the two |\if|'s accordingly.  By default
% \Lif{figuretopcap} is set false and \Lif{tabletopcap} is set true.  If
% the \Lpack{subfigure} package is loaded later, then it will override
% any settings made here!
% 
%    \begin{macrocode}
\@ifundefined{figuretopcaptrue}{\newif\iffiguretopcap}{}
\@ifundefined{tabletopcaptrue}{\newif\iftabletopcap}{}
\@ifundefined{@subfloat}{%
  \DeclareOption{figbotcap}{\figuretopcapfalse}
  \DeclareOption{figtopcap}{\figuretopcaptrue}
  \DeclareOption{tabbotcap}{\tabletopcapfalse}
  \DeclareOption{tabtopcap}{\tabletopcaptrue}
  \ExecuteOptions{figbotcap,tabtopcap}
  \ProcessOptions}{}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \subsection{The Updated \cmd{\caption} Commands}
%
% \begin{macro}{\caption}
% \begin{macro}{\caption*}
% \begin{macro}{\cc@caption}
% 
% First, we save the current |\caption| command as |\cc@caption|.  Then
% we redefine |\caption| to check for a trailing `*' so that we can
% choose the regular caption (|\cc@caption|) for a special caption
% (|\cc@scaption|) that does not add a line to the ``List-of'' pages.
% 
%    \begin{macrocode}
\let\cc@caption=\caption
%    \end{macrocode}
%
%    \begin{macrocode}
\renewcommand{\caption}{%
  \@ifstar\cc@scaption\cc@caption}
%    \end{macrocode}
%
% \end{macro}
%
% \begin{macro}{\cc@scaption}
% \begin{macro}{\cc@@scaption}
% 
% Next, we define the |\cc@scaption| and |\cc@@scaption| commands to do
% everything that the regular |\caption| command would have done, except
% for adding a line to the ``List-of'' pages.
% 
% If |\@captype| is undefined, then write out an error and `eat' ({\it
% i.e.\/}, throw away) the argument(s).  Otherwise, add one to the
% \Lcount{figure} or \Lcount{table} counter and define the
% |\@currentreference|, then call |\cc@@scaption| with the expanded
% arguments.
% 
% Note that we allow an optional argument for the |\cc@@scaption| even
% though this will never be used.  The reason for this is to allow the
% shift from |\caption| to |\caption*| or back, when deciding if
% something should or should not be shown in the ``List-of''
% pages, to be done with just the addition or removal of the `*'.
% 
%    \begin{macrocode}
\newcommand{\cc@scaption}{%
  \ifx\@captype\@undefined
    \@latex@error{\noexpand\caption* outside float}\@ehd
    \expandafter\@gobble
  \else
    \refstepcounter\@captype
    \expandafter\@firstofone
  \fi
  {\@dblarg{\cc@@scaption\@captype}}} 
%    \end{macrocode}
% 
% We add a |\par| to end the current horizontal list, then we normalize
% the paragraph setting parameters, however we call |\@setminipage| if
% the |\if@minipage| is still true to enable |\everypar| to make it
% false later.  (This is the case if the |\caption| is not the first
% entry in the \Lenv{float}) environment.
%
%    \begin{macrocode}
\long\def\cc@@scaption#1[#2]#3{%
  \par
  \begingroup
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
%    \end{macrocode}
% 
% Next |\normalsize| is restored (we just assume something else was set)
% and we typeset the caption followed by another |\par|.  Unlike the
% regular |\caption| command, we skipped adding a line to the
% List-of-Figures or List-of-Tables.
% 
%    \begin{macrocode}
    \normalsize
    \@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\par
  \endgroup}
%    \end{macrocode}
%
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \subsection{Work with the \cmd{\label}/\cmd{\ref} Mechanism}
% \begin{macro}{\ccset@currentlabel}
% 
% We define this command to conditionally increment the \Lcount{figure} or
% \Lcount{table} counter according to the respective flag telling us if
% the |\caption| is normally placed before or after the figure or table.
% Then globally reset the \@currentlabel for use with the |\label|
% command.
% 
% Note that this leaves the counter with a possibly incorrect setting,
% so this should be used within a group to limit it's scope.
%
%    \begin{macrocode}
\newcommand{\ccset@currentlabel}[1]{%
  \@nameuse{if\@captype topcap}\else
    \advance\@nameuse{c@\@captype}\@ne
  \fi
  \global\edef\@currentlabel{%
    \@nameuse{p@#1}\@nameuse{the#1}}}
%    \end{macrocode}
% \end{macro}
%
% \subsection{The New Caption Continuation Commands}
% \enlargethispage{-12pt} ^ finalhack
%
% \begin{macro}{\captcont}
% \begin{macro}{\captcont*}
% 
% The |\captcont| and |\captcont*| commands are just like the
% corresponding |\caption| and |\caption*| command, except that they do
% not cause the \Lcount{figure} or \Lcount{table} counters to be
% incremented.
% 
% The first step is to check for a following `*' to decide if an entry
% on the ``List-of'' page is to be made.  The `*' version does
% not add an entry.
% 
%    \begin{macrocode}
\newcommand{\captcont}{%
  \@ifstar\cc@scaptcont\cc@captcont}
%    \end{macrocode}
%
% \begin{macro}{\cc@captcont}
% \begin{macro}{\cc@scaptcont}
% 
% Next, we define the |\cc@captcont| and |\cc@scaptcont| commands to check
% to insure that we are inside a \Lenv{float} environemnt.  If not, then
% we report an error and exit.  Otherwise we call the respective
% |\cc@@captcont| or |\cc@@scaptcont| command to finish the processing,
% without changing the current coutner value or updating the
% |\@currentreference| value.  Those will be done locally, as necessary,
% in the following commands.
% 
% Note that we have an optional argument for the |\cc@@scaptcont| even
% though this will never be used.  The reason for this, as above, is to
% allow the shift from |\captcont| to |\captcont*| or back to be done
% with just the addition or removal of the `*' when deciding if
% something should or should not be shown in the ``List-of''
% pages.
%
%    \begin{macrocode}
\newcommand{\cc@captcont}{%
  \ifx\@captype\@undefined
    \@latex@error{\noexpand\captcont outside float}\@ehd
    \expandafter\@gobble
  \else
    \expandafter\@firstofone
  \fi
  {\@dblarg{\cc@@captcont\@captype}}} 
%    \end{macrocode}
%
% \end{macro}
%
%    \begin{macrocode}
\newcommand{\cc@scaptcont}{%
  \ifx\@captype\@undefined
    \@latex@error{\noexpand\captcont* outside float}\@ehd
    \expandafter\@gobble
  \else
    \expandafter\@firstofone
  \fi
  {\@dblarg{\cc@@scaptcont\@captype}}} 
%    \end{macrocode}
%
% \end{macro}
%
% \begin{macro}{\cc@@captcont}
% \begin{macro}{\cc@@scaptcont}
% 
% These two commands do the real work and finish up the ``captcont''
% processing.  They both insert a |\par| to finish off the prior
% horizontal list (if any) and then {\bf locally} update the
% \Lcount{figure} or \Lcount{table} counter (if necessary) and {\bf
% globally} set the |\@currentlabel| value using |\ccset@currentlabel|,
% defined above.
% 
% The difference between them is that |\cc@@captcont| then writes to the
% ``List-of'' page, while |\cc@@scaptcont| does not.  They both
% then finish just like the |\cc@@scaption| command, by resetting the
% paragraph and font parameters and then calling |\@makecaption| to
% typeset the caption followed by a |\par|.
%
%    \begin{macrocode}
\long\def\cc@@captcont#1[#2]#3{%
  \par
  \begingroup
    \ccset@currentlabel{#1}%
    \addcontentsline{\@nameuse{ext@#1}}{#1}%
      {\protect\numberline{\@nameuse{the#1}}{\ignorespaces #2}}%
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
    \normalsize
    \@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\par
  \endgroup}
%    \end{macrocode}
%
% \end{macro}
%
%    \begin{macrocode}
\long\def\cc@@scaptcont#1[#2]#3{%
  \par
  \begingroup
    \ccset@currentlabel{#1}%
    \@parboxrestore
    \if@minipage
      \@setminipage
    \fi
    \normalsize
    \@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\par
  \endgroup}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \iffalse
%&lt;/package&gt;
% \fi
%
% \Finale
%
</pre></body></html>