1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
|
%% test5.tex
%%
%% This is file `test5.tex', one of a set of five test/example files
%% in the `subfig' package.
%%
%% Copyright 2003 Steven Douglas Cochran.
%%
%% The subfig package may be distributed and/or modified 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/12/01 or later.
%%
%% This package consists of the files README, Makefile, subfig.dtx,
%% and subfig.ins as well as the test/example files test.tex,
%% test2.tex, test3.tex, test4.tex test5.tex and test6.tex.
%%
%% The subfig package is distributed in the hope that it will be
%% useful, but `as is', WITHOUT WARRANTY OF ANY KIND, either expressed
%% or implied, including, but not limited to, the implied warranties of
%% MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE. See the LaTeX
%% Project Public License for more details.
\documentclass{article}
%\usepackage{captcont}
%\usepackage{caption}
%\usepackage{ccaption}
\usepackage{subfig}
%\usepackage{captcont}
%\usepackage{caption}
%\usepackage{ccaption}
\makeatletter
\renewcommand\abstract[1]{%
\def\@abstract{%
\centerline{{\large\bf Abstract}}
\noindent
#1}}
\renewcommand\@maketitle{%
\newpage
\null\vfil
\vskip 60\p@
\begin{center}%
{\LARGE \@title \par}%
\vskip 3em%
{\large
\lineskip .75em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1.5em%
{\large \@date \par}%
\end{center}%
\vskip 2.5em%
\@abstract
\vfil\null}%
\makeatother
\newcommand{\figbox}[2][.8in]{%
\fbox{%
\vbox to .6in{%
\vfil
\hbox to #1{%
\hfil
#2%
\hfil}%
\vfil}}}
\begin{document}
\title{Subfig Package Test Program Five}
\author{Steven Douglas Cochran\\
Digital Mapping Laboratory\\
School of Computer Science\\
Carnegie-Mellon University\\
5000 Forbes Avenue\\
Pittsburgh, PA 15213-3890\\
USA}
\date{21 December 2003}
\abstract{%
This test checks two things:
\begin{enumerate}
\item the use of the references within a subfloat; and,
\item continued floats and subfloats.
\end{enumerate}}
\maketitle
\clearpage
\setcounter{lofdepth}{2}
\listoffigures
\clearpage
\setcounter{lotdepth}{2}
\listoftables
\clearpage
In this test, we verify the ability of the subfigure package to
handle requests for continued figures and tables (with full support
of the List-of pages and subfigures in continued figures and
subtables in continued tables).
In addition, by varying the various included packages at the top of
the source, one can check the interaction of the subfigure package
along with other common packages, such as the \texttt{captcont},
\texttt{caption}, and \texttt{ccaption} packages.
First we test the regular figures. The first figure is
Figure~\ref{fig:First} on page \pageref{fig:First}. The second is
Figure~\ref{fig:SecondA} and appears on pages~\pageref{fig:SecondA},
\pageref{fig:SecondB}, \pageref{fig:SecondC}, and \pageref{fig:SecondD}.
\begin{figure}%
\begin{center}%
\figbox[4in]{Regular figure \ref{fig:First}}%
\end{center}%
\caption{Regular figure 1}%
\label{fig:First}%
\end{figure}
\begin{figure}%
\begin{center}%
\figbox[4in]{Continued figure \ref{fig:SecondA}A}%
\end{center}%
\caption{Continued figure \ref{fig:SecondA}}%
\label{fig:SecondA}%
\end{figure}
\begin{figure}%
\ContinuedFloat
\begin{center}%
\figbox[4in]{Continued figure \ref{fig:SecondB}B}%
\end{center}%
\caption[]{Continued figure \ref{fig:SecondB}}%
\label{fig:SecondB}%
\end{figure}
\begin{figure}%
\ContinuedFloat
\begin{center}%
\figbox[4in]{Continued figure \ref{fig:SecondC}C}%
\end{center}%
\caption[]{Continued figure \ref{fig:SecondC}}%
\label{fig:SecondC}%
\end{figure}
\begin{figure}%
\ContinuedFloat
\begin{center}%
\figbox[4in]{Continued figure \ref{fig:SecondD}D}
\end{center}%
\caption[]{Continued figure \ref{fig:SecondD}}
\label{fig:SecondD}%
\end{figure}
Then we test the regular tables. The first table is
Table~\ref{tab:First} on page \pageref{tab:First}. The second is
Table~\ref{tab:SecondA} and appears on pages~\pageref{tab:SecondA},
\pageref{tab:SecondB}, \pageref{tab:SecondC}, and \pageref{tab:SecondD}.
\begin{table}%
\caption{Regular table 1}%
\label{tab:First}%
\begin{center}%
\figbox[4in]{Regular table 1}%
\end{center}%
\end{table}
\begin{table}%
\caption{Continued table \ref{tab:SecondA}}%
\label{tab:SecondA}%
\begin{center}%
\figbox[4in]{Continued table \ref{tab:SecondA}A}%
\end{center}%
\end{table}
\begin{table}%
\ContinuedFloat
\caption[]{Continued table \ref{tab:SecondB}}%
\label{tab:SecondB}%
\begin{center}%
\figbox[4in]{Continued table \ref{tab:SecondB}B}%
\end{center}%
\end{table}
\begin{table}%
\ContinuedFloat
\caption[]{Continued table \ref{tab:SecondC}}%
\label{tab:SecondC}%
\begin{center}%
\figbox[4in]{Continued table \ref{tab:SecondC}C}%
\end{center}%
\end{table}
\begin{table}%
\ContinuedFloat
\caption[]{Continued table \ref{tab:SecondD}}
\label{tab:SecondD}%
\begin{center}%
\figbox[4in]{Continued table \ref{tab:SecondD}D}
\end{center}%
\end{table}
Next we look at the subfloats in a simple figure. They are
Figures~\ref{fig:sub1A}, \ref{fig:sub1B}, \ref{fig:sub1C}, and
\ref{fig:sub1D}, which are part of Figure~\ref{fig:sub1} on
page~\pageref{fig:sub1}.
The continued subfloats are contained in three parts. The first is
Figure~\ref{fig:sub21} on page~\pageref{fig:sub21} which contains the
Subfigures~\ref{fig:sub2A}, \ref{fig:sub2B}, \ref{fig:sub2C}, and
\ref{fig:sub2D}.
The second is
Figure~\ref{fig:sub22} on page~\pageref{fig:sub22} which contains the
Subfigures~\ref{fig:sub2E}, \ref{fig:sub2F}, \ref{fig:sub2G}, and
\ref{fig:sub2H}.
The third is
Figure~\ref{fig:sub23} on page~\pageref{fig:sub23} which contains the
Subfigures~\ref{fig:sub2I}, \ref{fig:sub2J}, \ref{fig:sub2K}, and
\ref{fig:sub2L}.
\begin{figure}%
\begin{center}%
\subfloat[\label{fig:sub1A}]{\figbox{Subfigure \ref{fig:sub1A}}}%
\hspace{10pt}%
\subfloat[\label{fig:sub1B}]{\figbox{Subfigure \ref{fig:sub1B}}}\\
\subfloat[\label{fig:sub1C}]{\figbox{Subfigure \ref{fig:sub1C}}}%
\hspace{10pt}%
\subfloat[\label{fig:sub1D}]{\figbox{Subfigure \ref{fig:sub1D}}}%
\end{center}%
\vspace{-10pt}%
\caption{This is a simple figure.}%
\label{fig:sub1}%
\end{figure}
\begin{figure}%
\begin{center}%
\subfloat[\label{fig:sub2A}]{\figbox{Subfigure \ref{fig:sub2A}}}%
\hspace{10pt}%
\subfloat[\label{fig:sub2B}]{\figbox{Subfigure \ref{fig:sub2B}}}\\
\subfloat[\label{fig:sub2C}]{\figbox{Subfigure \ref{fig:sub2C}}}%
\hspace{10pt}%
\subfloat[\label{fig:sub2D}]{\figbox{Subfigure \ref{fig:sub2D}}}%
\end{center}%
\vspace{-10pt}%
\caption{This is a continued figure.}%
\label{fig:sub21}%
\end{figure}
\begin{figure}%
\ContinuedFloat
\begin{center}%
\subfloat[\label{fig:sub2E}]{\figbox{Subfigure \ref{fig:sub2E}}}%
\hspace{10pt}%
\subfloat[\label{fig:sub2F}]{\figbox{Subfigure \ref{fig:sub2F}}}\\
\subfloat[\label{fig:sub2G}]{\figbox{Subfigure \ref{fig:sub2G}}}%
\hspace{10pt}%
\subfloat[\label{fig:sub2H}]{\figbox{Subfigure \ref{fig:sub2H}}}%
\end{center}%
\vspace{-10pt}%
\caption[]{This is a continued figure (cont.)}%
\label{fig:sub22}%
\end{figure}
\begin{figure}%
\ContinuedFloat
\begin{center}%
\subfloat[\label{fig:sub2I}]{\figbox{Subfigure \ref{fig:sub2I}}}%
\hspace{10pt}%
\subfloat[\label{fig:sub2J}]{\figbox{Subfigure \ref{fig:sub2J}}}\\
\subfloat[\label{fig:sub2K}]{\figbox{Subfigure \ref{fig:sub2K}}}%
\hspace{10pt}%
\subfloat[\label{fig:sub2L}]{\figbox{Subfigure \ref{fig:sub2L}}}%
\end{center}%
\vspace{-10pt}%
\caption[]{This is a continued figure (cont.)}%
\label{fig:sub23}%
\end{figure}
Next we look at the subfloats in a simple table environment. They are
Tables~\ref{tab:sub1A}, \ref{tab:sub1B}, \ref{tab:sub1C}, and
\ref{tab:sub1D}, which are part of Table~\ref{tab:sub1} on
page~\pageref{tab:sub1}.
The continued subfloats are contained in three parts. The first is
Table~\ref{tab:sub21} on page~\pageref{tab:sub21} which contains the
Subtables~\ref{tab:sub2A}, \ref{tab:sub2B}, \ref{tab:sub2C}, and
\ref{tab:sub2D}.
The second is
Table~\ref{tab:sub22} on page~\pageref{tab:sub22} which contains the
Subtables~\ref{tab:sub2E}, \ref{tab:sub2F}, \ref{tab:sub2G}, and
\ref{tab:sub2H}.
The third is
Table~\ref{tab:sub23} on page~\pageref{tab:sub23} which contains the
Subtables~\ref{tab:sub2I}, \ref{tab:sub2J}, \ref{tab:sub2K}, and
\ref{tab:sub2L}.
\begin{table}%
\caption{This is a simple table.}%
\label{tab:sub1}%
\begin{center}%
\subfloat[\label{tab:sub1A}]{\figbox{Subtable \ref{tab:sub1A}}}%
\hspace{10pt}%
\subfloat[\label{tab:sub1B}]{\figbox{Subtable \ref{tab:sub1B}}}\\
\subfloat[\label{tab:sub1C}]{\figbox{Subtable \ref{tab:sub1C}}}%
\hspace{10pt}%
\subfloat[\label{tab:sub1D}]{\figbox{Subtable \ref{tab:sub1D}}}%
\end{center}%
\end{table}
\begin{table}%
\caption{This is a continued table.}%
\label{tab:sub21}%
\begin{center}%
\subfloat[\label{tab:sub2A}]{\figbox{Subtable \ref{tab:sub2A}}}%
\hspace{10pt}%
\subfloat[\label{tab:sub2B}]{\figbox{Subtable \ref{tab:sub2B}}}\\
\subfloat[\label{tab:sub2C}]{\figbox{Subtable \ref{tab:sub2C}}}%
\hspace{10pt}%
\subfloat[\label{tab:sub2D}]{\figbox{Subtable \ref{tab:sub2D}}}%
\end{center}
\end{table}
\begin{table}%
\ContinuedFloat
\caption[]{This is a continued table (cont.)}%
\label{tab:sub22}%
\begin{center}%
\subfloat[\label{tab:sub2E}]{\figbox{Subtable \ref{tab:sub2E}}}%
\hspace{10pt}%
\subfloat[\label{tab:sub2F}]{\figbox{Subtable \ref{tab:sub2F}}}\\
\subfloat[\label{tab:sub2G}]{\figbox{Subtable \ref{tab:sub2G}}}%
\hspace{10pt}%
\subfloat[\label{tab:sub2H}]{\figbox{Subtable \ref{tab:sub2H}}}%
\end{center}%
\end{table}
\begin{table}%
\ContinuedFloat
\caption[]{This is a continued table (cont.)}%
\label{tab:sub23}%
\begin{center}%
\subfloat[\label{tab:sub2I}]{\figbox{Subtable \ref{tab:sub2I}}}%
\hspace{10pt}%
\subfloat[\label{tab:sub2J}]{\figbox{Subtable \ref{tab:sub2J}}}\\
\subfloat[\label{tab:sub2K}]{\figbox{Subtable \ref{tab:sub2K}}}%
\hspace{10pt}%
\subfloat[\label{tab:sub2L}]{\figbox{Subtable \ref{tab:sub2L}}}%
\end{center}%
\end{table}
\end{document}
|