| 1 |
% \iffalse % captcont.dtx |
| 2 |
% Retain figure/table number across multiple pages and provide correct |
| 3 |
% output to List-of-Figures or List-of-Tables files. |
| 4 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 5 |
% Copyright (C) 1997-2002 Steven Douglas Cochran |
| 6 |
% |
| 7 |
% The captcont package is free software; it may be distributed under the |
| 8 |
% conditions of the LaTeX Project Public License, either version 1.2 of |
| 9 |
% this license or (at your option) any later version. The latest version |
| 10 |
% of this license is in: |
| 11 |
% http://www.latex-project.org/lppl.txt |
| 12 |
% and version 1.2 or later is part of all distributions of LaTeX version |
| 13 |
% 1999/09/03 or later. |
| 14 |
% |
| 15 |
% The captcont package is distributed in the hope that it will be |
| 16 |
% useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
| 17 |
% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 |
% LaTeX Project Public License for more details. |
| 19 |
% |
| 20 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 21 |
%% @LaTeX-style-file{ |
| 22 |
%% author = "Steven Douglas Cochran", |
| 23 |
%% version = "2.0", |
| 24 |
%% date = "2002/02/14", |
| 25 |
%% time = "11:59:17", |
| 26 |
%% filename = "captcont.sty", |
| 27 |
%% address = "Digital Mapping Laboratory, School of Computer Science |
| 28 |
%% Carnegie-Mellon University, 5000 Forbes Avenue |
| 29 |
%% Pittsburgh, PA 15213-3890, USA", |
| 30 |
%% telephone = "+1 412.268.5654", |
| 31 |
%% fax = "+1 412.268.5576", |
| 32 |
%% email = "[email protected] (Internet)", |
| 33 |
%% codetable = "ISO/ASCII", |
| 34 |
%% keywords = "LaTeX, caption, float, figure, table, subfigure", |
| 35 |
%% supported = "yes", |
| 36 |
%% abstract = "LaTeX package for providing support for retaining |
| 37 |
%% a figure or table number across several float |
| 38 |
%% environments---usually over several pages. It |
| 39 |
%% also allows control over the contents of the |
| 40 |
%% List-of-Figures and the List-of-Tables pages." |
| 41 |
%% } |
| 42 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 43 |
% |
| 44 |
%<*driver> |
| 45 |
\NeedsTeXFormat{LaTeX2e}[1994/12/01] |
| 46 |
\ProvidesFile{subfigure.dtx} |
| 47 |
\documentclass{ltxdoc} |
| 48 |
\usepackage{captcont}[2002/01/23] |
| 49 |
\usepackage[TABTOPCAP,tight]{subfigure}[2002/01/23] |
| 50 |
\setlength\hfuzz{100pt} |
| 51 |
\setlength\vfuzz{100pt} |
| 52 |
\clubpenalty=10000 |
| 53 |
\widowpenalty=10000 |
| 54 |
\displaywidowpenalty=5000 |
| 55 |
\brokenpenalty=5000 |
| 56 |
\begin{document} |
| 57 |
\DocInput{captcont.dtx} |
| 58 |
\end{document} |
| 59 |
%</driver> |
| 60 |
% |
| 61 |
%<*ltxdoc> |
| 62 |
\AtBeginDocument{ |
| 63 |
% \OnlyDescription % comment out for implementation details |
| 64 |
\EnableCrossrefs |
| 65 |
\RecordChanges |
| 66 |
\CodelineIndex} |
| 67 |
\AtEndDocument{ |
| 68 |
\PrintChanges |
| 69 |
\PrintIndex} |
| 70 |
%</ltxdoc> |
| 71 |
% |
| 72 |
% \fi |
| 73 |
% |
| 74 |
% \catcode`\^=14 ^^A We will use a ^ for a comment rather than ^^A. |
| 75 |
% \newcommand*{\Lopt}[1]{\textsf{#1}} ^ Package options |
| 76 |
% \newcommand*{\Lfile}[1]{\texttt{#1}} ^ File names |
| 77 |
% \newcommand*{\Lpack}[1]{\textsf{#1}} ^ Package names |
| 78 |
% \newcommand*{\Lenv}[1]{\texttt{#1}} ^ Environment names |
| 79 |
% \newcommand*{\Lcount}[1]{\textsl{\small#1}} ^ Counter names |
| 80 |
% \newcommand*{\Lif}[1]{\textsc{\bf#1}} ^ \if names |
| 81 |
% ^ NOTE: Hacks added to make the final format are marked ``^finalhack''. |
| 82 |
% |
| 83 |
% \changes{v1.0}{11 Oct 1996}{Initial revision.} |
| 84 |
% |
| 85 |
% \DoNotIndex{\@ehd,\@firstofone,\@for,\@gobble,\@ifundefined,\@latex@error} |
| 86 |
% \DoNotIndex{\@ne,\@undefined,\addcontentsline,\addtolength,\advance,\alph} |
| 87 |
% \DoNotIndex{\begingroup,\bfseries,\bgroup,\box,\csname,\DeclareOption} |
| 88 |
% \DoNotIndex{\def,\do,\egroup,\else,\endcsname,\endgroup,\ExecuteOption} |
| 89 |
% \DoNotIndex{\ExecuteOptions,\expandafter,\fi,\footnotesize,\gdef,\hbox} |
| 90 |
% \DoNotIndex{\global,\hfil,\ifdim,\ifnum,\ifx,\ignorespaces,\itshape} |
| 91 |
% \DoNotIndex{\Large,\large,\leavevmode,\let,\long,\mdseries,\multiply} |
| 92 |
% \DoNotIndex{\NeedsTeXFormat,\newcommand,\newcounter,\newif,\noexpand} |
| 93 |
% \DoNotIndex{\normalsize,\par,\parbox,\ProcessOptions,\protect} |
| 94 |
% \DoNotIndex{\ProvidesPackage,\relax,\renewcommand,\rmfamily,\sbox} |
| 95 |
% \DoNotIndex{\scriptsize,\scshape,\setbox,\setcounter,\setlength,\sffamily} |
| 96 |
% \DoNotIndex{\slshape,\small,\space,\string,\strut,\ttfamily,\tw@,\typeout} |
| 97 |
% \DoNotIndex{\undefined,\upshape,\usebox,\vbox,\vskip,\vtop,\wd,\xdef} |
| 98 |
% \DoNotIndex{\z@skip,\@dblarg,\@ifstar,\@nameuse,\@parboxrestore} |
| 99 |
% \DoNotIndex{\@setminipage,\edef,\if@minipage,\m@ne,\numberline} |
| 100 |
% \DoNotIndex{\providecommand,\refstepcounter,\@makecaption,\@captype} |
| 101 |
% \DoNotIndex{\@currentlabel} |
| 102 |
% |
| 103 |
% \CheckSum{156} |
| 104 |
% |
| 105 |
% ^ This command creates a rectangular box to represent |
| 106 |
% ^ a figure in the examples given in this paper. |
| 107 |
% \newcommand{\figbox}[1]{% |
| 108 |
% \fbox{^ |
| 109 |
% \vbox to 15mm{^ |
| 110 |
% \vfil |
| 111 |
% \hbox{^ |
| 112 |
% \space |
| 113 |
% #1^ |
| 114 |
% \space}^ |
| 115 |
% \vfil}}} |
| 116 |
% |
| 117 |
% ^ Allow a little more freedom in typesetting floats. |
| 118 |
% \setcounter{topnumber}{8} |
| 119 |
% \def\topfraction{.8} |
| 120 |
% \setcounter{bottomnumber}{8} |
| 121 |
% \def\bottomfraction{.8} |
| 122 |
% \setcounter{totalnumber}{8} |
| 123 |
% \def\textfraction{.2} |
| 124 |
% \def\floatpagefraction{.8} |
| 125 |
% \setcounter{dbltopnumber}{8} |
| 126 |
% \def\dbltopfraction{.8} |
| 127 |
% \def\dblfloatpagefraction{.8} |
| 128 |
% |
| 129 |
% ^ Add some space above any footnotes. |
| 130 |
% \skip\footins=1.5\baselineskip |
| 131 |
% |
| 132 |
% ^ Make the \fbox stay just inside the box it "surrounds". |
| 133 |
% \fboxsep=-\fboxrule |
| 134 |
% |
| 135 |
% ^ Make the subcaption label be centered. |
| 136 |
% \subfiglabelskip=0pt |
| 137 |
% |
| 138 |
% \makeatletter |
| 139 |
% |
| 140 |
% ^ Create an EXAMPLE float environment. |
| 141 |
% ^ NOTE: This is not complete --- just enough for this paper. |
| 142 |
% \newcounter{example} |
| 143 |
% \renewcommand\theexample{\@arabic\c@example} |
| 144 |
% \def\fps@example{tbp} |
| 145 |
% \def\ftype@example{3} |
| 146 |
% \def\ext@example{loe} |
| 147 |
% \def\fnum@example{\examplename~\theexample} |
| 148 |
% \newenvironment{example} |
| 149 |
% {\@float{example}} |
| 150 |
% {\end@float} |
| 151 |
% \newcommand\examplename{Example} |
| 152 |
% |
| 153 |
% ^ This command switches the caption type. |
| 154 |
% \newcommand{\setcaptype}[1]{\renewcommand{\@captype}{#1}} |
| 155 |
% |
| 156 |
% \makeatother |
| 157 |
% |
| 158 |
% \def\docdate{2002/02/14} |
| 159 |
% \def\fileversion{v2.0} |
| 160 |
% \def\filedate{2002/01/23} |
| 161 |
% \def\filename{captcont.dtx} |
| 162 |
% |
| 163 |
% \title{The \Lpack{captcont} Package\footnote{This paper documents |
| 164 |
% the \Lpack{captcont} package v\fileversion, last revised \filedate.}} |
| 165 |
% \author{Steven Douglas Cochran\\[5pt] |
| 166 |
% Digital Mapping Laboratory, School of Computer Science \\ |
| 167 |
% Carnegie-Mellon University, 5000 Forbes Avenue \\ |
| 168 |
% Pittsburgh, PA 15213--3890, USA\\[5pt] |
| 169 |
% \texttt{[email protected]}} |
| 170 |
% \date{\docdate} |
| 171 |
% |
| 172 |
% \maketitle |
| 173 |
% |
| 174 |
% \begin{abstract} |
| 175 |
% \noindent |
| 176 |
% This article documents the \LaTeX\ package `\Lpack{captcont}', which |
| 177 |
% provides support for retaining a figure or caption number across |
| 178 |
% several float environments---usually over several pages. It allows |
| 179 |
% control over the contents of the List-of-Figures and the |
| 180 |
% List-of-Tables pages. It should be compatible with all other packages |
| 181 |
% that modify or extend the float environment and with the |
| 182 |
% \Lpack{subfigure} package \cite{Coch02} in particular. |
| 183 |
%\end{abstract} |
| 184 |
% |
| 185 |
% \tableofcontents |
| 186 |
% |
| 187 |
% \newpage |
| 188 |
% \section{Introduction} |
| 189 |
% \enlargethispage{12pt} ^finalhack |
| 190 |
% |
| 191 |
% The \Lpack{captcont} package provides support for figures and tables |
| 192 |
% that continue or span two or more pages, but cannot be easily handled |
| 193 |
% by another mechanism such as the \Lpack{longtable} package \cite{Carl00} |
| 194 |
% or the \Lpack{supertabular} environment \cite{Braa-Jurr99}. The reason |
| 195 |
% for this is usually that the figure or table is made up of multiple |
| 196 |
% small parts. Therefore this package is typically used in conjunction |
| 197 |
% the \Lpack{subfigure} package\cite{Coch02}. |
| 198 |
% |
| 199 |
% This \LaTeXe\ package replaces the older \LaTeX2.09 style fragment |
| 200 |
% written by Anonymous. This is a complete re-implementation of the |
| 201 |
% older style so that the List-of-Figures, List-of-Tables and the |
| 202 |
% |\pageref| command have the correct page numbers. |
| 203 |
% |
| 204 |
% \section{The User Interface} |
| 205 |
% |
| 206 |
% To use this package place |
| 207 |
% \begin{quote} |
| 208 |
% |\usepackage|\oarg{options}\{captcont\} |
| 209 |
% \end{quote} |
| 210 |
% |
| 211 |
% \noindent |
| 212 |
% in the preamble of your document. The supported options are shown in |
| 213 |
% table~\ref{tab:options}.\footnote{If the \Lpack{subfigure} package is |
| 214 |
% also loaded, then the \Lpack{subfigure} package options override |
| 215 |
% these.} This package redefines the |\caption| command and defines |
| 216 |
% three new commands to work with it. The new commands act very similar |
| 217 |
% to the caption, but control when the \Lcount{figure} or \Lcount{table} |
| 218 |
% counter is incremented and whether or not the caption text shows up in |
| 219 |
% the List-of-Figures or List-of-Tables pages. The commands are: |
| 220 |
% |
| 221 |
% \begin{tabbing} |
| 222 |
% \qquad \=|\captcont|* \=\oarg{lst\_entry} \=\marg{caption}\kill |
| 223 |
% \>|\caption| \>\oarg{lst\_entry} \>\marg{caption}\\ |
| 224 |
% \>|\caption|* \>\oarg{lst\_entry} \>\marg{caption}\\ |
| 225 |
% \>|\captcont| \>\oarg{lst\_entry} \>\marg{caption}\\ |
| 226 |
% \>|\captcont|* \>\oarg{lst\_entry} \>\marg{caption} |
| 227 |
% \end{tabbing} |
| 228 |
% \noindent |
| 229 |
% The |\captcont| and |\captcont|* commands do not increment the |
| 230 |
% \Lcount{figure} or \Lcount{table} counters and the |\captcont|* and |
| 231 |
% |\caption|* commands do not print to the List-of-Figures or |
| 232 |
% List-of-Tables. |
| 233 |
% |
| 234 |
% If the caption proceeds the figure ({\it i.e.\/}, \Lopt{figtopcap} or |
| 235 |
% \Lopt{tabtopcap}), then for a series of \Lenv{float} environments that |
| 236 |
% are to be considered as one \Lenv{figure} or \Lenv{table}, you begin |
| 237 |
% the first with a |\caption| or |\caption*| and use |\captcont| or |
| 238 |
% |\captcont*| in each of the the following ones. If the caption |
| 239 |
% follows the figure ({\it i.e.\/}, \Lopt{figbotcap} or |
| 240 |
% \Lopt{tabbotcap}), then you do just the opposite and use |\captcont| |
| 241 |
% or |\captcont*| on each of the series of \Lenv{float} environments |
| 242 |
% that are to be considered as one \Lenv{figure} or \Lenv{table}, the |
| 243 |
% use a |\caption| or |\caption*| on the very last one. |
| 244 |
% |
| 245 |
% \begin{table} |
| 246 |
% \caption{\Lpack{captcont} package options.} |
| 247 |
% \label{tab:options} |
| 248 |
% \DeleteShortVerb{\|} |
| 249 |
% \centering |
| 250 |
% \begin{tabular}{l|l} |
| 251 |
% \hline |
| 252 |
% \multicolumn{1}{c|}{\bf Option} |
| 253 |
% & \multicolumn{1}{c}{\bf Description} \\ |
| 254 |
% \hline |
| 255 |
% \Lopt{figbotcap} & The figure caption follows the figure (default).\\ |
| 256 |
% \Lopt{figtopcap} & The figure caption precedes the figure.\\ \hline |
| 257 |
% \Lopt{tabbotcap} & The table caption follows the figure.\\ |
| 258 |
% \Lopt{tabtopcap} & The table caption precedes the figure (default).\\ |
| 259 |
% \hline |
| 260 |
% \end{tabular} |
| 261 |
% \MakeShortVerb{\|} |
| 262 |
% \end{table} |
| 263 |
% |
| 264 |
% \section{Examples} |
| 265 |
% |
| 266 |
% Four examples are given below of the use of the \Lpack{captcont} |
| 267 |
% package. The ``figures'' in each are drawn using the following command |
| 268 |
% which creates a small box representing a figure in the example output |
| 269 |
% and centers provided text in the box. The height of the box is fixed |
| 270 |
% at 15mm and the width varies with the provided text. |
| 271 |
% \newpage ^finalhack |
| 272 |
% |
| 273 |
% \begin{verbatim} |
| 274 |
% \newcommand{\figbox}[1]{% |
| 275 |
% \fbox{% Frame the box to make the ``figure'' |
| 276 |
% \vbox to 15mm{% Make it 15mm tall |
| 277 |
% \vfil Vertically center this next \hbox |
| 278 |
% \hbox{% |
| 279 |
% \space |
| 280 |
% #1% Add the supplied text with spaces |
| 281 |
% \space}% |
| 282 |
% \vfil}}} |
| 283 |
% \end{verbatim} |
| 284 |
% |
| 285 |
% \subsection{Two Continued Figures} |
| 286 |
% |
| 287 |
% Example~\ref{ex:one} shows the case of a set of three pages containing |
| 288 |
% parts of one figure. In this case the author desires that the caption |
| 289 |
% of each page shows up in the List-of-Figures page. The |\caption| |
| 290 |
% follows the figure body, so we use the |\captcont| command on the |
| 291 |
% inital pages and the |\caption| on the last. |
| 292 |
% |
| 293 |
% \begin{verbatim} |
| 294 |
% \listoffigures |
| 295 |
% ... |
| 296 |
% \begin{figure}[p] |
| 297 |
% \figbox{Figure~\ref{fig:ex1-1}, part 1, page \pageref{fig:ex1-1}} |
| 298 |
% \captcont{Figure one.} |
| 299 |
% \label{fig:ex1-1} |
| 300 |
% \end{figure} |
| 301 |
% \begin{figure}[p] |
| 302 |
% \figbox{Figure~\ref{fig:ex1-1}, part 2, page \pageref{fig:ex1-2}} |
| 303 |
% \captcont{Figure one. (cont)} |
| 304 |
% \label{fig:ex1-2} |
| 305 |
% \end{figure} |
| 306 |
% \begin{figure}[p] |
| 307 |
% \figbox{Figure~\ref{fig:ex1-1}, part 3, page \pageref{fig:ex1-3}} |
| 308 |
% \caption{Figure one. (cont)} |
| 309 |
% \label{fig:ex1-3} |
| 310 |
% \end{figure} |
| 311 |
% \end{verbatim} |
| 312 |
% |
| 313 |
% \begin{example} |
| 314 |
% \setcaptype{figure}^ |
| 315 |
% \centering |
| 316 |
% \fbox{^ |
| 317 |
% \begin{minipage}{2.3in}^ |
| 318 |
% \begin{minipage}{2.1in}^ |
| 319 |
% \vspace{.1in}^ |
| 320 |
% \section*{ List of Figures} |
| 321 |
% \contentsline{figure}{\numberline{1}^ |
| 322 |
% {\ignorespaces Figure one.}}{2}^ |
| 323 |
% \contentsline{figure}{\numberline{1}^ |
| 324 |
% {\ignorespaces Figure one. (cont)}}{3}^ |
| 325 |
% \contentsline{figure}{\numberline{1}^ |
| 326 |
% {\ignorespaces Figure one. (cont)}}{4}^ |
| 327 |
% \hspace{40pt}\dots |
| 328 |
% \vspace{21pt}^ |
| 329 |
% \end{minipage}^ |
| 330 |
% \end{minipage}}^ |
| 331 |
% \quad |
| 332 |
% \fbox{^ |
| 333 |
% \begin{minipage}{2.3in}^ |
| 334 |
% \centering |
| 335 |
% \vspace{.1in}^ |
| 336 |
% \figbox{Figure~\ref{fig:ex1-1}, part 1, page 2.}^ |
| 337 |
% \vspace{-5pt}^ |
| 338 |
% \captcont{Figure one.}^ |
| 339 |
% \label{fig:ex1-1}^ |
| 340 |
% \vspace{10pt}^ |
| 341 |
% -2- |
| 342 |
% \vspace{.1in}^ |
| 343 |
% \end{minipage}}\\[.1in] |
| 344 |
% \fbox{^ |
| 345 |
% \begin{minipage}{2.3in}^ |
| 346 |
% \centering |
| 347 |
% \vspace{.1in}^ |
| 348 |
% \figbox{Figure~\ref{fig:ex1-2}, part 2, page 3.}^ |
| 349 |
% \vspace{-5pt}^ |
| 350 |
% \captcont{Figure one. (cont)}^ |
| 351 |
% \label{fig:ex1-2}^ |
| 352 |
% \vspace{10pt}^ |
| 353 |
% -3- |
| 354 |
% \vspace{.1in}^ |
| 355 |
% \end{minipage}}^ |
| 356 |
% \quad |
| 357 |
% \fbox{^ |
| 358 |
% \begin{minipage}{2.3in}^ |
| 359 |
% \centering |
| 360 |
% \vspace{.1in}^ |
| 361 |
% \figbox{Figure~\ref{fig:ex1-3}, part 3, page 4.}^ |
| 362 |
% \vspace{-5pt}^ |
| 363 |
% \caption{Figure one. (cont)}^ |
| 364 |
% \label{fig:ex1-3}^ |
| 365 |
% \vspace{10pt}^ |
| 366 |
% -4- |
| 367 |
% \vspace{.1in}^ |
| 368 |
% \end{minipage}}^ |
| 369 |
% \setcaptype{example}^ |
| 370 |
% \caption{Four pages showing a continued figure with |
| 371 |
% List-of-Figures entries for each.} |
| 372 |
% \label{ex:one} |
| 373 |
% \end{example} |
| 374 |
% |
| 375 |
% \newpage ^finalhack |
| 376 |
% Often, however, you do not want the continued captions to appear in |
| 377 |
% the List-of-Figures. Therefore the starred forms of the commands are |
| 378 |
% available to suppress the addition of the caption text to the |
| 379 |
% List-of-Figures, as shown in example~\ref{ex:two} where only the |
| 380 |
% first caption appears. |
| 381 |
% |
| 382 |
% \begin{verbatim} |
| 383 |
% \listoffigures |
| 384 |
% ... |
| 385 |
% \begin{figure}[p] |
| 386 |
% \figbox{Figure~\ref{fig:ex2-1}, part 1, page \pageref{fig:ex2-1}} |
| 387 |
% \captcont{Figure two.} |
| 388 |
% \label{fig:ex2-1} |
| 389 |
% \end{figure} |
| 390 |
% \begin{figure}[p] |
| 391 |
% \figbox{Figure~\ref{fig:ex2-1}, part 2, page \pageref{fig:ex2-2}} |
| 392 |
% \captcont*{Figure one. (cont)} |
| 393 |
% \label{fig:ex2-2} |
| 394 |
% \end{figure} |
| 395 |
% \begin{figure}[p] |
| 396 |
% \figbox{Figure~\ref{fig:ex2-1}, part 3, page \pageref{fig:ex2-3}} |
| 397 |
% \caption*{Figure one. (cont)} |
| 398 |
% \label{fig:ex2-3} |
| 399 |
% \end{figure} |
| 400 |
% \end{verbatim} |
| 401 |
% |
| 402 |
% \begin{example}^ |
| 403 |
% \setcaptype{figure}^ |
| 404 |
% \centering |
| 405 |
% \fbox{^ |
| 406 |
% \begin{minipage}{2.3in}^ |
| 407 |
% \begin{minipage}{2.1in}^ |
| 408 |
% \vspace{.1in}^ |
| 409 |
% \section*{ List of Figures} |
| 410 |
% \hspace{40pt}\dots |
| 411 |
% \vspace{3pt}^ |
| 412 |
% \contentsline{figure}{\numberline{2}^ |
| 413 |
% {\ignorespaces Figure two.}}{5}^ |
| 414 |
% \hspace{40pt}\dots |
| 415 |
% \vspace{30pt}^ |
| 416 |
% \end{minipage}^ |
| 417 |
% \end{minipage}}^ |
| 418 |
% \quad |
| 419 |
% \fbox{^ |
| 420 |
% \begin{minipage}{2.3in}^ |
| 421 |
% \centering |
| 422 |
% \vspace{.1in}^ |
| 423 |
% \figbox{Figure~\ref{fig:ex2-1}, part 1, page 5.}^ |
| 424 |
% \vspace{-5pt}^ |
| 425 |
% \captcont{Figure two.}^ |
| 426 |
% \label{fig:ex2-1}^ |
| 427 |
% \vspace{10pt}^ |
| 428 |
% -5- |
| 429 |
% \vspace{.1in}^ |
| 430 |
% \end{minipage}}\\[.1in] |
| 431 |
% \fbox{^ |
| 432 |
% \begin{minipage}{2.3in}^ |
| 433 |
% \centering |
| 434 |
% \vspace{.1in}^ |
| 435 |
% \figbox{Figure~\ref{fig:ex2-2}, part 2, page 6.}^ |
| 436 |
% \vspace{-5pt}^ |
| 437 |
% \captcont*{Figure two. (cont)}^ |
| 438 |
% \label{fig:ex2-2}^ |
| 439 |
% \vspace{10pt}^ |
| 440 |
% -6- |
| 441 |
% \vspace{.1in}^ |
| 442 |
% \end{minipage}}^ |
| 443 |
% \quad |
| 444 |
% \fbox{^ |
| 445 |
% \begin{minipage}{2.3in}^ |
| 446 |
% \centering |
| 447 |
% \vspace{.1in}^ |
| 448 |
% \figbox{Figure~\ref{fig:ex2-3}, part 3, page 7.}^ |
| 449 |
% \vspace{-5pt}^ |
| 450 |
% \caption*{Figure two. (cont)}^ |
| 451 |
% \label{fig:ex2-3}^ |
| 452 |
% \vspace{10pt}^ |
| 453 |
% -7- |
| 454 |
% \vspace{.1in}^ |
| 455 |
% \end{minipage}}^ |
| 456 |
% \setcaptype{example}^ |
| 457 |
% \caption{Four pages showing a continued figure with |
| 458 |
% List-of-Figures entries for the first page only.} |
| 459 |
% \label{ex:two} |
| 460 |
% \end{example} |
| 461 |
% |
| 462 |
% \subsection{A Continued Series of Subfigures} |
| 463 |
% |
| 464 |
% Example~\ref{ex:three} shows the interaction of the \Lpack{contcapt} and |
| 465 |
% the \Lpack{subfigure} packages. When the \Lpack{subfigure} package is |
| 466 |
% also loaded, it overrides any options given with this package (it |
| 467 |
% doesn't matter if it is loaded before or after the \Lpack{captcont} |
| 468 |
% package). For this and the following example, we assume that the |
| 469 |
% \Lpack{subfigure} package was loaded with the options |
| 470 |
% [\Lopt{FIGBOTCAP},\Lopt{TABTOPCAP}]; therefore, for continued figures |
| 471 |
% and tables, we {\bf end} the series of continued figures and we {\bf |
| 472 |
% begin} the series of continued tables with with a |\caption| or |
| 473 |
% |\caption*| command. The rest of the figure or tables parts use |
| 474 |
% either the |\captcont| or the |\captcont*| command. |
| 475 |
% |
| 476 |
% \begin{example}^ |
| 477 |
% \setcaptype{figure}^ |
| 478 |
% \centering |
| 479 |
% \leavevmode |
| 480 |
% \small |
| 481 |
% \fbox{^ |
| 482 |
% \begin{minipage}{2.3in}^ |
| 483 |
% \centering |
| 484 |
% \vspace{.1in}^ |
| 485 |
% \subfigure[]{\figbox{Subfigure 1A}}^ |
| 486 |
% \quad |
| 487 |
% \subfigure[]{\figbox{Subfigure 1B}}\\ |
| 488 |
% \subfigure[]{\figbox{Subfigure 1C}}^ |
| 489 |
% \quad |
| 490 |
% \subfigure[]{\figbox{Subfigure 1D}}\\ |
| 491 |
% \vspace{-5pt}^ |
| 492 |
% \caption{This is a simple figure.}^ |
| 493 |
% \label{fig:ex3-1}^ |
| 494 |
% \vspace{10pt}^ |
| 495 |
% -8- |
| 496 |
% \vspace{.1in}^ |
| 497 |
% \end{minipage}}^ |
| 498 |
% \quad |
| 499 |
% \fbox{^ |
| 500 |
% \begin{minipage}{2.3in}^ |
| 501 |
% \centering |
| 502 |
% \vspace{.1in}^ |
| 503 |
% \subfigure[]{\figbox{Subfigure 2A}}^ |
| 504 |
% \quad |
| 505 |
% \subfigure[]{\figbox{Subfigure 2B}}\\ |
| 506 |
% \subfigure[]{\figbox{Subfigure 2C}}^ |
| 507 |
% \quad |
| 508 |
% \subfigure[]{\figbox{Subfigure 2D}}\\ |
| 509 |
% \vspace{-5pt}^ |
| 510 |
% \captcont{This is a continued figure.} |
| 511 |
% \label{fig:ex3-2a}^ |
| 512 |
% \vspace{10pt}^ |
| 513 |
% -9- |
| 514 |
% \vspace{.1in}^ |
| 515 |
% \end{minipage}}\\[.1in] |
| 516 |
% \fbox{^ |
| 517 |
% \begin{minipage}{2.3in}^ |
| 518 |
% \centering |
| 519 |
% \vspace{.1in}^ |
| 520 |
% \subfigure[]{\figbox{Subfigure 2E}}^ |
| 521 |
% \quad |
| 522 |
% \subfigure[]{\figbox{Subfigure 2F}}\\ |
| 523 |
% \subfigure[]{\figbox{Subfigure 2G}}^ |
| 524 |
% \quad |
| 525 |
% \subfigure[]{\figbox{Subfigure 2H}}^ |
| 526 |
% \vspace{-5pt}^ |
| 527 |
% \hfil\parbox{2.1in}{^ |
| 528 |
% \captcont*{This is a continued figure (cont.)} |
| 529 |
% }\\ |
| 530 |
% \label{fig:ex3-2b}^ |
| 531 |
% \vspace{10pt}^ |
| 532 |
% -10- |
| 533 |
% \vspace{.1in}^ |
| 534 |
% \end{minipage}}^ |
| 535 |
% \quad |
| 536 |
% \fbox{^ |
| 537 |
% \begin{minipage}{2.3in}^ |
| 538 |
% \centering |
| 539 |
% \vspace{.1in}^ |
| 540 |
% \subfigure[]{\figbox{Subfigure 2I}}^ |
| 541 |
% \quad |
| 542 |
% \subfigure[]{\figbox{Subfigure 2J}}\\ |
| 543 |
% \subfigure[]{\figbox{Subfigure 2K}}^ |
| 544 |
% \quad |
| 545 |
% \subfigure[]{\figbox{Subfigure 2L}} |
| 546 |
% \vspace{-5pt}^ |
| 547 |
% \hfil\parbox{2.1in}{^ |
| 548 |
% \caption*{This is a continued figure (cont.)} |
| 549 |
% }\\ |
| 550 |
% \label{fig:ex3-2c} |
| 551 |
% \vspace{10pt}^ |
| 552 |
% -11- |
| 553 |
% \vspace{.1in}^ |
| 554 |
% \end{minipage}}^ |
| 555 |
% \setcaptype{example}^ |
| 556 |
% \caption{Four pages showing a regular figure with four subfigures |
| 557 |
% and a continued figure composed of twelve subfigures.} |
| 558 |
% \label{ex:three} |
| 559 |
% \end{example} |
| 560 |
% |
| 561 |
% \begin{verbatim} |
| 562 |
% \begin{figure}[p]% |
| 563 |
% \begin{center}% |
| 564 |
% \subfigure[]{\figbox{Subfigure 1A}}% |
| 565 |
% \quad |
| 566 |
% \subfigure[]{\figbox{Subfigure 1B}}\\ |
| 567 |
% \subfigure[]{\figbox{Subfigure 1C}}% |
| 568 |
% \quad |
| 569 |
% \subfigure[]{\figbox{Subfigure 1D}}% |
| 570 |
% \end{center}% |
| 571 |
% \caption{This is a simple figure.} |
| 572 |
% \label{fig:ex3-1} |
| 573 |
% \end{figure} |
| 574 |
% \end{verbatim} |
| 575 |
% |
| 576 |
% \newpage ^finalhack |
| 577 |
% \enlargethispage{12pt} ^finalhack |
| 578 |
% |
| 579 |
% \begin{verbatim} |
| 580 |
% \begin{figure}[p]% |
| 581 |
% \begin{center}% |
| 582 |
% \subfigure[]{\figbox{Subfigure 2A}}% |
| 583 |
% \quad |
| 584 |
% \subfigure[]{\figbox{Subfigure 2B}}\\ |
| 585 |
% \subfigure[]{\figbox{Subfigure 2C}}% |
| 586 |
% \quad |
| 587 |
% \subfigure[]{\figbox{Subfigure 2D}}% |
| 588 |
% \end{center}% |
| 589 |
% \captcont{This is a continued figure.} |
| 590 |
% \label{fig:ex3-2a} |
| 591 |
% \end{figure} |
| 592 |
% \end{verbatim} |
| 593 |
% |
| 594 |
% \begin{verbatim} |
| 595 |
% \begin{figure}[p]% |
| 596 |
% \begin{center}% |
| 597 |
% \subfigure[]{\figbox{Subfigure 2E}}% |
| 598 |
% \quad |
| 599 |
% \subfigure[]{\figbox{Subfigure 2F}}\\ |
| 600 |
% \subfigure[]{\figbox{Subfigure 2G}}% |
| 601 |
% \quad |
| 602 |
% \subfigure[]{\figbox{Subfigure 2H}}% |
| 603 |
% \end{center}% |
| 604 |
% \captcont*{This is a continued figure (cont.)} |
| 605 |
% \label{fig:ex3-2b} |
| 606 |
% \end{figure} |
| 607 |
% |
| 608 |
% \begin{figure}[p]% |
| 609 |
% \begin{center}% |
| 610 |
% \subfigure[]{\figbox{Subfigure 2I}}% |
| 611 |
% \quad |
| 612 |
% \subfigure[]{\figbox{Subfigure 2J}}\\ |
| 613 |
% \subfigure[]{\figbox{Subfigure 2K}}% |
| 614 |
% \quad |
| 615 |
% \subfigure[]{\figbox{Subfigure 2L}}% |
| 616 |
% \end{center}% |
| 617 |
% \caption*{This is a continued figure (cont.)} |
| 618 |
% \label{fig:ex3-2c} |
| 619 |
% \end{figure} |
| 620 |
% \end{verbatim} |
| 621 |
% |
| 622 |
% Here only the first two captions (for figures~\ref{fig:ex3-1} and |
| 623 |
% \ref{fig:ex3-2a}) appear in the List-of-Tables. The correct figure |
| 624 |
% and page numbers are generated by any |\label| commands for later use |
| 625 |
% with |\ref| or |\pageref|. When the \Lpack{subfigure} package is |
| 626 |
% loaded this goes for the \cmd{\subref} command also. |
| 627 |
% |
| 628 |
% \subsection{A Continued Series of Subtables} |
| 629 |
% |
| 630 |
% Example~\ref{ex:four} also shows the interaction of the \Lpack{contcapt} |
| 631 |
% and \Lpack{subfigure} packages. Here the \Lpack{table} environment is |
| 632 |
% used along with the \Lopt{TABTOPCAP} option which insures that the |
| 633 |
% numbering for the subtables is correct when the |\caption| preceeds |
| 634 |
% them rather than following them. As mentioned above, we use the |
| 635 |
% |\caption| or |\caption*| command for the first \Lenv{float} environment |
| 636 |
% and the |\captcont| or |\captcont*| command for the continued |
| 637 |
% \Lenv{float}'s. |
| 638 |
% |
| 639 |
% \begin{example}^ |
| 640 |
% \setcaptype{table}^ |
| 641 |
% \centering |
| 642 |
% \leavevmode |
| 643 |
% \small |
| 644 |
% \fbox{^ |
| 645 |
% \begin{minipage}{2.3in}^ |
| 646 |
% \centering |
| 647 |
% \caption{This is a simple table.}^ |
| 648 |
% \label{tab:One}^ |
| 649 |
% \vspace{4pt}^ |
| 650 |
% \subtable[\label{tab:OneA}]{\figbox{Subtable 1A}}^ |
| 651 |
% \quad |
| 652 |
% \subtable[\label{tab:OneB}]{\figbox{Subtable 1B}}\\ |
| 653 |
% \subtable[\label{tab:OneC}]{\figbox{Subtable 1C}}^ |
| 654 |
% \quad |
| 655 |
% \subtable[\label{tab:OneD}]{\figbox{Subtable 1D}}\par |
| 656 |
% \vspace{10pt}^ |
| 657 |
% -12- |
| 658 |
% \vspace{.1in}^ |
| 659 |
% \end{minipage}}^ |
| 660 |
% \quad |
| 661 |
% \fbox{^ |
| 662 |
% \begin{minipage}{2.3in}^ |
| 663 |
% \centering |
| 664 |
% \caption{This is a continued table.}^ |
| 665 |
% \vspace{4pt}^ |
| 666 |
% \subtable[]{\figbox{Subtable 2A}}^ |
| 667 |
% \quad |
| 668 |
% \subtable[]{\figbox{Subtable 2B}}\\ |
| 669 |
% \subtable[]{\figbox{Subtable 2C}}^ |
| 670 |
% \quad |
| 671 |
% \subtable[]{\figbox{Subtable 2D}}\par |
| 672 |
% \vspace{10pt}^ |
| 673 |
% -13- |
| 674 |
% \vspace{.1in}^ |
| 675 |
% \end{minipage}}\\[.1in] |
| 676 |
% \fbox{^ |
| 677 |
% \begin{minipage}{2.3in}^ |
| 678 |
% \centering |
| 679 |
% \hfil\parbox{2.1in}{^ |
| 680 |
% \captcont*{This is a continued table (cont.)}^ |
| 681 |
% }\\ |
| 682 |
% \vspace{4pt}^ |
| 683 |
% \subtable[]{\figbox{Subtable 2E}}^ |
| 684 |
% \quad |
| 685 |
% \subtable[]{\figbox{Subtable 2F}}\\ |
| 686 |
% \subtable[]{\figbox{Subtable 2G}}^ |
| 687 |
% \quad |
| 688 |
% \subtable[]{\figbox{Subtable 2H}}\par |
| 689 |
% \vspace{10pt}^ |
| 690 |
% -14- |
| 691 |
% \vspace{.1in}^ |
| 692 |
% \end{minipage}}^ |
| 693 |
% \quad |
| 694 |
% \fbox{^ |
| 695 |
% \begin{minipage}{2.3in}^ |
| 696 |
% \centering |
| 697 |
% \hfil\parbox{2.1in}{^ |
| 698 |
% \captcont*{This is a continued table (cont.)}^ |
| 699 |
% }\\ |
| 700 |
% \vspace{4pt}^ |
| 701 |
% \subtable[]{\figbox{Subtable 2I}}^ |
| 702 |
% \quad |
| 703 |
% \subtable[]{\figbox{Subtable 2J}}\\ |
| 704 |
% \subtable[]{\figbox{Subtable 2K}}^ |
| 705 |
% \quad |
| 706 |
% \subtable[]{\figbox{Subtable 2L}}\par |
| 707 |
% \vspace{10pt}^ |
| 708 |
% -15- |
| 709 |
% \vspace{.1in}^ |
| 710 |
% \end{minipage}}^ |
| 711 |
% \setcaptype{example}^ |
| 712 |
% \caption{Four pages showing a regular table with four subtables |
| 713 |
% and a continued table composed of twelve subtables.} |
| 714 |
% \label{ex:four} |
| 715 |
% \end{example} |
| 716 |
% |
| 717 |
% \newpage ^finalhack |
| 718 |
% \enlargethispage{12pt} ^finalhack |
| 719 |
% |
| 720 |
% \begin{verbatim} |
| 721 |
% \begin{table}[p]% |
| 722 |
% \caption{This is a simple table.}% |
| 723 |
% \label{tab:One}% |
| 724 |
% \begin{center}% |
| 725 |
% \subtable[\label{tab:OneA}]{\figbox{Subtable 1A}}% |
| 726 |
% \quad |
| 727 |
% \subtable[\label{tab:OneB}]{\figbox{Subtable 1B}}\\ |
| 728 |
% \subtable[\label{tab:OneC}]{\figbox{Subtable 1C}}% |
| 729 |
% \quad |
| 730 |
% \subtable[\label{tab:OneD}]{\figbox{Subtable 1D}}% |
| 731 |
% \end{center}% |
| 732 |
% \end{table} |
| 733 |
% |
| 734 |
% \begin{table}[p]% |
| 735 |
% \caption{This is a continued table.}% |
| 736 |
% \label{tab:Two}% |
| 737 |
% \begin{center}% |
| 738 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2A}}% |
| 739 |
% \quad |
| 740 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2B}}\\ |
| 741 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2C}}% |
| 742 |
% \quad |
| 743 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2D}}% |
| 744 |
% \end{center}% |
| 745 |
% \end{table} |
| 746 |
% |
| 747 |
% \begin{table}[p]% |
| 748 |
% \captcont*{This is a continued table (cont.)}% |
| 749 |
% \begin{center}% |
| 750 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2E}}% |
| 751 |
% \quad |
| 752 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2F}}\\ |
| 753 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2G}}% |
| 754 |
% \quad |
| 755 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2H}}% |
| 756 |
% \end{center}% |
| 757 |
% \end{table} |
| 758 |
% |
| 759 |
% \begin{table}[p]% |
| 760 |
% \captcont*{This is a continued table (cont.)}% |
| 761 |
% \begin{center}% |
| 762 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2I}}% |
| 763 |
% \quad |
| 764 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2J}}\\ |
| 765 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2K}}% |
| 766 |
% \quad |
| 767 |
% \subtable[\label{tab:Two}]{\figbox{Subtable 2L}}% |
| 768 |
% \end{center}% |
| 769 |
% \end{table} |
| 770 |
% \end{verbatim} |
| 771 |
% |
| 772 |
% \clearpage ^finalhack |
| 773 |
% |
| 774 |
% \StopEventually{^ |
| 775 |
% \newpage ^finalhack |
| 776 |
% \section*{Acknowledgement} |
| 777 |
% I wish to thank William 'bil' L. Kleb ([email protected]) for |
| 778 |
% his willingness to proofread this document and his many valuable |
| 779 |
% suggestions as to its improvement. |
| 780 |
% |
| 781 |
% \begin{thebibliography}{6}^ |
| 782 |
% \bibitem{Coch02}^ |
| 783 |
% Steven Douglas Cochran, |
| 784 |
% \emph{The \Lpack{subfigure} Package}, |
| 785 |
% 2002/02/14/. |
| 786 |
% (Available from CTAN as file \texttt{subfigure.dtx}) |
| 787 |
% \bibitem{Carl00}^ |
| 788 |
% David Carlisle, |
| 789 |
% \emph{The \Lpack{longtable} package}, |
| 790 |
% 2000/10/22. |
| 791 |
% (Available from CTAN as file \texttt{longtable.dtx}) |
| 792 |
% \bibitem{Braa-Jurr99}^ |
| 793 |
% Johannes Braams and Theo Jurriens, |
| 794 |
% \emph{The \Lpack{supertabular} environment}, |
| 795 |
% 1999/08/07. |
| 796 |
% (Available from CTAN as file \texttt{supertabular.dtx}) |
| 797 |
% \end{thebibliography}} |
| 798 |
% |
| 799 |
% \section{The Code} |
| 800 |
% \iffalse |
| 801 |
%<*package> |
| 802 |
% \fi |
| 803 |
% \subsection{Identification} |
| 804 |
% |
| 805 |
% We start off by checking that we are loading into \LaTeXe\ and |
| 806 |
% announcing the name and version of this package. |
| 807 |
% |
| 808 |
% \begin{macrocode} |
| 809 |
\NeedsTeXFormat{LaTeX2e}[1994/12/01] |
| 810 |
\ProvidesPackage{captcont}[2002/02/14 v2.0 captcont package] |
| 811 |
% \end{macrocode} |
| 812 |
% |
| 813 |
% \subsection{Declaration and Execution of the Options} |
| 814 |
% |
| 815 |
% \begin{macro}{\iffiguretopcap} |
| 816 |
% \begin{macro}{\iftabletopcap} |
| 817 |
% |
| 818 |
% First we check if the flags \Lif{figuretopcap} and \Lif{tabletopcap} |
| 819 |
% exist; if they are not present, than they are created. These are used |
| 820 |
% to remember the options and are also the same internal |\if|'s used by |
| 821 |
% the \Lpack{subfigure} package for this purpose and so we check if the |
| 822 |
% \Lpack{subfigure} package has already been loaded (by the existance of |
| 823 |
% the |\@subfloat| command and if so, then we entirely skip loading the |
| 824 |
% options. |
| 825 |
% |
| 826 |
% However if the \Lpack{subfigure} package has not been loaded, we check |
| 827 |
% for the options below and set the two |\if|'s accordingly. By default |
| 828 |
% \Lif{figuretopcap} is set false and \Lif{tabletopcap} is set true. If |
| 829 |
% the \Lpack{subfigure} package is loaded later, then it will override |
| 830 |
% any settings made here! |
| 831 |
% |
| 832 |
% \begin{macrocode} |
| 833 |
\@ifundefined{figuretopcaptrue}{\newif\iffiguretopcap}{} |
| 834 |
\@ifundefined{tabletopcaptrue}{\newif\iftabletopcap}{} |
| 835 |
\@ifundefined{@subfloat}{% |
| 836 |
\DeclareOption{figbotcap}{\figuretopcapfalse} |
| 837 |
\DeclareOption{figtopcap}{\figuretopcaptrue} |
| 838 |
\DeclareOption{tabbotcap}{\tabletopcapfalse} |
| 839 |
\DeclareOption{tabtopcap}{\tabletopcaptrue} |
| 840 |
\ExecuteOptions{figbotcap,tabtopcap} |
| 841 |
\ProcessOptions}{} |
| 842 |
% \end{macrocode} |
| 843 |
% \end{macro} |
| 844 |
% \end{macro} |
| 845 |
% |
| 846 |
% \subsection{The Updated \cmd{\caption} Commands} |
| 847 |
% |
| 848 |
% \begin{macro}{\caption} |
| 849 |
% \begin{macro}{\caption*} |
| 850 |
% \begin{macro}{\cc@caption} |
| 851 |
% |
| 852 |
% First, we save the current |\caption| command as |\cc@caption|. Then |
| 853 |
% we redefine |\caption| to check for a trailing `*' so that we can |
| 854 |
% choose the regular caption (|\cc@caption|) for a special caption |
| 855 |
% (|\cc@scaption|) that does not add a line to the ``List-of'' pages. |
| 856 |
% |
| 857 |
% \begin{macrocode} |
| 858 |
\let\cc@caption=\caption |
| 859 |
% \end{macrocode} |
| 860 |
% |
| 861 |
% \begin{macrocode} |
| 862 |
\renewcommand{\caption}{% |
| 863 |
\@ifstar\cc@scaption\cc@caption} |
| 864 |
% \end{macrocode} |
| 865 |
% |
| 866 |
% \end{macro} |
| 867 |
% |
| 868 |
% \begin{macro}{\cc@scaption} |
| 869 |
% \begin{macro}{\cc@@scaption} |
| 870 |
% |
| 871 |
% Next, we define the |\cc@scaption| and |\cc@@scaption| commands to do |
| 872 |
% everything that the regular |\caption| command would have done, except |
| 873 |
% for adding a line to the ``List-of'' pages. |
| 874 |
% |
| 875 |
% If |\@captype| is undefined, then write out an error and `eat' ({\it |
| 876 |
% i.e.\/}, throw away) the argument(s). Otherwise, add one to the |
| 877 |
% \Lcount{figure} or \Lcount{table} counter and define the |
| 878 |
% |\@currentreference|, then call |\cc@@scaption| with the expanded |
| 879 |
% arguments. |
| 880 |
% |
| 881 |
% Note that we allow an optional argument for the |\cc@@scaption| even |
| 882 |
% though this will never be used. The reason for this is to allow the |
| 883 |
% shift from |\caption| to |\caption*| or back, when deciding if |
| 884 |
% something should or should not be shown in the ``List-of'' |
| 885 |
% pages, to be done with just the addition or removal of the `*'. |
| 886 |
% |
| 887 |
% \begin{macrocode} |
| 888 |
\newcommand{\cc@scaption}{% |
| 889 |
\ifx\@captype\@undefined |
| 890 |
\@latex@error{\noexpand\caption* outside float}\@ehd |
| 891 |
\expandafter\@gobble |
| 892 |
\else |
| 893 |
\refstepcounter\@captype |
| 894 |
\expandafter\@firstofone |
| 895 |
\fi |
| 896 |
{\@dblarg{\cc@@scaption\@captype}}} |
| 897 |
% \end{macrocode} |
| 898 |
% |
| 899 |
% We add a |\par| to end the current horizontal list, then we normalize |
| 900 |
% the paragraph setting parameters, however we call |\@setminipage| if |
| 901 |
% the |\if@minipage| is still true to enable |\everypar| to make it |
| 902 |
% false later. (This is the case if the |\caption| is not the first |
| 903 |
% entry in the \Lenv{float}) environment. |
| 904 |
% |
| 905 |
% \begin{macrocode} |
| 906 |
\long\def\cc@@scaption#1[#2]#3{% |
| 907 |
\par |
| 908 |
\begingroup |
| 909 |
\@parboxrestore |
| 910 |
\if@minipage |
| 911 |
\@setminipage |
| 912 |
\fi |
| 913 |
% \end{macrocode} |
| 914 |
% |
| 915 |
% Next |\normalsize| is restored (we just assume something else was set) |
| 916 |
% and we typeset the caption followed by another |\par|. Unlike the |
| 917 |
% regular |\caption| command, we skipped adding a line to the |
| 918 |
% List-of-Figures or List-of-Tables. |
| 919 |
% |
| 920 |
% \begin{macrocode} |
| 921 |
\normalsize |
| 922 |
\@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\par |
| 923 |
\endgroup} |
| 924 |
% \end{macrocode} |
| 925 |
% |
| 926 |
% \end{macro} |
| 927 |
% \end{macro} |
| 928 |
% \end{macro} |
| 929 |
% \end{macro} |
| 930 |
% |
| 931 |
% \subsection{Work with the \cmd{\label}/\cmd{\ref} Mechanism} |
| 932 |
% \begin{macro}{\ccset@currentlabel} |
| 933 |
% |
| 934 |
% We define this command to conditionally increment the \Lcount{figure} or |
| 935 |
% \Lcount{table} counter according to the respective flag telling us if |
| 936 |
% the |\caption| is normally placed before or after the figure or table. |
| 937 |
% Then globally reset the \@currentlabel for use with the |\label| |
| 938 |
% command. |
| 939 |
% |
| 940 |
% Note that this leaves the counter with a possibly incorrect setting, |
| 941 |
% so this should be used within a group to limit it's scope. |
| 942 |
% |
| 943 |
% \begin{macrocode} |
| 944 |
\newcommand{\ccset@currentlabel}[1]{% |
| 945 |
\@nameuse{if\@captype topcap}\else |
| 946 |
\advance\@nameuse{c@\@captype}\@ne |
| 947 |
\fi |
| 948 |
\global\edef\@currentlabel{% |
| 949 |
\@nameuse{p@#1}\@nameuse{the#1}}} |
| 950 |
% \end{macrocode} |
| 951 |
% \end{macro} |
| 952 |
% |
| 953 |
% \subsection{The New Caption Continuation Commands} |
| 954 |
% \enlargethispage{-12pt} ^ finalhack |
| 955 |
% |
| 956 |
% \begin{macro}{\captcont} |
| 957 |
% \begin{macro}{\captcont*} |
| 958 |
% |
| 959 |
% The |\captcont| and |\captcont*| commands are just like the |
| 960 |
% corresponding |\caption| and |\caption*| command, except that they do |
| 961 |
% not cause the \Lcount{figure} or \Lcount{table} counters to be |
| 962 |
% incremented. |
| 963 |
% |
| 964 |
% The first step is to check for a following `*' to decide if an entry |
| 965 |
% on the ``List-of'' page is to be made. The `*' version does |
| 966 |
% not add an entry. |
| 967 |
% |
| 968 |
% \begin{macrocode} |
| 969 |
\newcommand{\captcont}{% |
| 970 |
\@ifstar\cc@scaptcont\cc@captcont} |
| 971 |
% \end{macrocode} |
| 972 |
% |
| 973 |
% \begin{macro}{\cc@captcont} |
| 974 |
% \begin{macro}{\cc@scaptcont} |
| 975 |
% |
| 976 |
% Next, we define the |\cc@captcont| and |\cc@scaptcont| commands to check |
| 977 |
% to insure that we are inside a \Lenv{float} environemnt. If not, then |
| 978 |
% we report an error and exit. Otherwise we call the respective |
| 979 |
% |\cc@@captcont| or |\cc@@scaptcont| command to finish the processing, |
| 980 |
% without changing the current coutner value or updating the |
| 981 |
% |\@currentreference| value. Those will be done locally, as necessary, |
| 982 |
% in the following commands. |
| 983 |
% |
| 984 |
% Note that we have an optional argument for the |\cc@@scaptcont| even |
| 985 |
% though this will never be used. The reason for this, as above, is to |
| 986 |
% allow the shift from |\captcont| to |\captcont*| or back to be done |
| 987 |
% with just the addition or removal of the `*' when deciding if |
| 988 |
% something should or should not be shown in the ``List-of'' |
| 989 |
% pages. |
| 990 |
% |
| 991 |
% \begin{macrocode} |
| 992 |
\newcommand{\cc@captcont}{% |
| 993 |
\ifx\@captype\@undefined |
| 994 |
\@latex@error{\noexpand\captcont outside float}\@ehd |
| 995 |
\expandafter\@gobble |
| 996 |
\else |
| 997 |
\expandafter\@firstofone |
| 998 |
\fi |
| 999 |
{\@dblarg{\cc@@captcont\@captype}}} |
| 1000 |
% \end{macrocode} |
| 1001 |
% |
| 1002 |
% \end{macro} |
| 1003 |
% |
| 1004 |
% \begin{macrocode} |
| 1005 |
\newcommand{\cc@scaptcont}{% |
| 1006 |
\ifx\@captype\@undefined |
| 1007 |
\@latex@error{\noexpand\captcont* outside float}\@ehd |
| 1008 |
\expandafter\@gobble |
| 1009 |
\else |
| 1010 |
\expandafter\@firstofone |
| 1011 |
\fi |
| 1012 |
{\@dblarg{\cc@@scaptcont\@captype}}} |
| 1013 |
% \end{macrocode} |
| 1014 |
% |
| 1015 |
% \end{macro} |
| 1016 |
% |
| 1017 |
% \begin{macro}{\cc@@captcont} |
| 1018 |
% \begin{macro}{\cc@@scaptcont} |
| 1019 |
% |
| 1020 |
% These two commands do the real work and finish up the ``captcont'' |
| 1021 |
% processing. They both insert a |\par| to finish off the prior |
| 1022 |
% horizontal list (if any) and then {\bf locally} update the |
| 1023 |
% \Lcount{figure} or \Lcount{table} counter (if necessary) and {\bf |
| 1024 |
% globally} set the |\@currentlabel| value using |\ccset@currentlabel|, |
| 1025 |
% defined above. |
| 1026 |
% |
| 1027 |
% The difference between them is that |\cc@@captcont| then writes to the |
| 1028 |
% ``List-of'' page, while |\cc@@scaptcont| does not. They both |
| 1029 |
% then finish just like the |\cc@@scaption| command, by resetting the |
| 1030 |
% paragraph and font parameters and then calling |\@makecaption| to |
| 1031 |
% typeset the caption followed by a |\par|. |
| 1032 |
% |
| 1033 |
% \begin{macrocode} |
| 1034 |
\long\def\cc@@captcont#1[#2]#3{% |
| 1035 |
\par |
| 1036 |
\begingroup |
| 1037 |
\ccset@currentlabel{#1}% |
| 1038 |
\addcontentsline{\@nameuse{ext@#1}}{#1}% |
| 1039 |
{\protect\numberline{\@nameuse{the#1}}{\ignorespaces #2}}% |
| 1040 |
\@parboxrestore |
| 1041 |
\if@minipage |
| 1042 |
\@setminipage |
| 1043 |
\fi |
| 1044 |
\normalsize |
| 1045 |
\@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\par |
| 1046 |
\endgroup} |
| 1047 |
% \end{macrocode} |
| 1048 |
% |
| 1049 |
% \end{macro} |
| 1050 |
% |
| 1051 |
% \begin{macrocode} |
| 1052 |
\long\def\cc@@scaptcont#1[#2]#3{% |
| 1053 |
\par |
| 1054 |
\begingroup |
| 1055 |
\ccset@currentlabel{#1}% |
| 1056 |
\@parboxrestore |
| 1057 |
\if@minipage |
| 1058 |
\@setminipage |
| 1059 |
\fi |
| 1060 |
\normalsize |
| 1061 |
\@makecaption{\@nameuse{fnum@#1}}{\ignorespaces #3}\par |
| 1062 |
\endgroup} |
| 1063 |
% \end{macrocode} |
| 1064 |
% \end{macro} |
| 1065 |
% \end{macro} |
| 1066 |
% \end{macro} |
| 1067 |
% |
| 1068 |
% \iffalse |
| 1069 |
%</package> |
| 1070 |
% \fi |
| 1071 |
% |
| 1072 |
% \Finale |
| 1073 |
% |