| 1 |
% \iffalse % hhsubfigure.dtx |
| 2 |
% Subfigure/subtable macros for use with the LaTeX figure/table environments. |
| 3 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 4 |
% Copyright (C) 2003 Harald Harders. |
| 5 |
% |
| 6 |
% This is a slightly modified version of the `subfigure' package by |
| 7 |
% Steven Douglas Cochran. The origianl package can be downloaded from |
| 8 |
% <ftp://ftp.dante.de/tex-archive/macros/latex/contrib/subfigure/>. |
| 9 |
% |
| 10 |
% The hhsubfigure package is free software; it may be distributed under |
| 11 |
% the conditions of the LaTeX Project Public License, either version 1.1 |
| 12 |
% of this license or (at your option) any later version. The latest |
| 13 |
% version of this license is in: |
| 14 |
% http://www.latex-project.org/lppl.txt |
| 15 |
% and version 1.1 or later is part of all distributions of LaTeX version |
| 16 |
% 1999/06/01 or later. |
| 17 |
% |
| 18 |
% The captcont package is distributed in the hope that it will be |
| 19 |
% useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
| 20 |
% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 |
% LaTeX Project Public License for more details. |
| 22 |
% |
| 23 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 24 |
%% @LaTeX-style-file{ |
| 25 |
%% author = "Steven Douglas Cochran (modified by Harald Harders)", |
| 26 |
%% version = "2.1.4", |
| 27 |
%% date = "2003/09/14", |
| 28 |
%% time = "09:34:13", |
| 29 |
%% filename = "hhsubfigure.sty", |
| 30 |
%% email = "[email protected]", |
| 31 |
%% codetable = "ISO/ASCII", |
| 32 |
%% keywords = "LaTeX, float, figure, table, captcont", |
| 33 |
%% supported = "yes", |
| 34 |
%% abstract = "LaTeX package for providing support for the |
| 35 |
%% inclusion of small, `sub', figures and tables. It |
| 36 |
%% simplifies the positioning, captioning and |
| 37 |
%% labeling of them within a single figure or table |
| 38 |
%% environment. In addition, this package allows |
| 39 |
%% such subcaptions to be written to the List of |
| 40 |
%% Figures or List of tables if desired." |
| 41 |
%% } |
| 42 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 43 |
% |
| 44 |
%<*driver> |
| 45 |
\NeedsTeXFormat{LaTeX2e}[1994/12/01] |
| 46 |
\ProvidesFile{hhsubfigure.dtx} |
| 47 |
\documentclass{ltxdoc} |
| 48 |
\usepackage[tight,TABTOPCAP]{hhsubfigure}[2002/03/15] |
| 49 |
\setlength\hfuzz{100pt} |
| 50 |
\setlength\vfuzz{100pt} |
| 51 |
\clubpenalty=10000 |
| 52 |
\widowpenalty=10000 |
| 53 |
\displaywidowpenalty=5000 |
| 54 |
\brokenpenalty=5000 |
| 55 |
\begin{document} |
| 56 |
\DocInput{hhsubfigure.dtx} |
| 57 |
\end{document} |
| 58 |
%</driver> |
| 59 |
% |
| 60 |
%<*ltxdoc> |
| 61 |
\AtBeginDocument{ |
| 62 |
% \OnlyDescription % comment out for implementation details |
| 63 |
\EnableCrossrefs |
| 64 |
\RecordChanges |
| 65 |
\CodelineIndex} |
| 66 |
\AtEndDocument{ |
| 67 |
\PrintChanges |
| 68 |
\PrintIndex} |
| 69 |
%</ltxdoc> |
| 70 |
% |
| 71 |
% \fi |
| 72 |
% \catcode`\^=14 ^^A We will use a ^ for a comment rather than ^^A. |
| 73 |
% \newcommand*{\Lopt}[1]{\textsf{#1}} ^ Package options |
| 74 |
% \newcommand*{\Lfile}[1]{\texttt{#1}} ^ File names |
| 75 |
% \newcommand*{\Lpack}[1]{\textsf{#1}} ^ Package names |
| 76 |
% \newcommand*{\Lenv}[1]{\texttt{#1}} ^ Environment names |
| 77 |
% \newcommand*{\Lcount}[1]{\textsl{\small#1}} ^ Counter names |
| 78 |
% \newcommand*{\Lif}[1]{\textsc{\bf#1}} ^ \if names |
| 79 |
% ^ NOTE: Hacks added to make the final format are marked ``^finalhack''. |
| 80 |
% |
| 81 |
% \changes{v1.0}{05 Mar 1986}{Created.} |
| 82 |
% |
| 83 |
% \changes{v1.1}{02 Nov 1988}{Initial revision.} |
| 84 |
% |
| 85 |
% \changes{v1.2}{30 Aug 1989}{Added a separate bottom margin and |
| 86 |
% expanded the comments.} |
| 87 |
% |
| 88 |
% \changes{v1.3}{22 Oct 1990}{Changed test for empty subcaption inside |
| 89 |
% of \cmd{\@subfigure} to compare tokens and not the subcaption vs.\ |
| 90 |
% \cmd{\@empty}. The former (incorrect) test caused an error when the |
| 91 |
% first two letters of the subcaption were the same.} |
| 92 |
% |
| 93 |
% \changes{v1.4}{27 Jun 1992}{Added a hack to allow the \cmd{\label} |
| 94 |
% command to be used within the body of the subfigure giving a |
| 95 |
% reference label in the form \cmd{\arabic{thefigure}\thesubfigure}. |
| 96 |
% Added standard file header for style.} |
| 97 |
% |
| 98 |
% \changes{v1.5}{11 Aug 1992}{Fixed a bug which caused a problem with |
| 99 |
% subcaptions that contained expressions like \cmd{\sqrt}; This was |
| 100 |
% pointed out by Tom Scavo (scavo\@cie.uoregon.edu). A separate bug |
| 101 |
% was fixed which caused different sized subcaptions to be misaligned; |
| 102 |
% This problem was pointed out by Simon Marshall |
| 103 |
% (S.Marshal\@Hull.ac.uk). Also cleaned up the code a mite and |
| 104 |
% {\bf changed} the figure spacing so that if no optional section is |
| 105 |
% given, then the figure is only followed by \cmd{\subfigbottomskip} |
| 106 |
% and not that plus $(\cmd{\subfigcapskip}+\cmd{\strut}\hbox{height})$. |
| 107 |
% This should make it easier to adjust spacing as desired.} |
| 108 |
% |
| 109 |
% \changes{v1.6}{13 May 1993}{Changed to use the \cmd{\thefigure} |
| 110 |
% command in building the referenced label. The old form caused a |
| 111 |
% problem when used with the report.sty as pointed out by Andrew |
| 112 |
% Anselmo (anselmo\@cumesb.mech.columbia.edu). Also modified to |
| 113 |
% restrict the scope of the subfigure \cmd{\label} to the body of the |
| 114 |
% subfigure. Added \cmd{\@thesubfigure} to allow a separate labeling |
| 115 |
% of the subfigure in the figure and in the text. By default it is |
| 116 |
% the same as \cmd{\thesubfigure} with space appended. Added some |
| 117 |
% code to print the subfigure captions to the List-of-Figures file |
| 118 |
% if desired. Finally, added the corresponding support for subtables |
| 119 |
% as well as subfigures. NOTE: the optional subcaption is now a moving |
| 120 |
% argument and any fragile commands that appear in the subcaption must |
| 121 |
% be preceded by a \cmd{\protect} (just like that of the \cmd{\caption} |
| 122 |
% command).} |
| 123 |
% |
| 124 |
% \changes{v2.0}{06 Mar 1995}{This version of \cmd{\subfigure} is the |
| 125 |
% first to be ported to \LaTeXe\ (with backward compatibility to |
| 126 |
% \LaTeX2.09). \cmd{\subfigure} and \cmd{\subtable} are now identical |
| 127 |
% and the environment controls internal differences between them. Now, |
| 128 |
% the subcaption setting portion of \cmd{\@subfloat} is broken into the |
| 129 |
% separate commands \cmd{\@makesubfigurecaption} and |
| 130 |
% \cmd{\@makesubtablecaption} to allow a separate hook for the |
| 131 |
% modification of how the subcaption is constructed and to allow the |
| 132 |
% subtable and subfigure captions to be different. In addition, support |
| 133 |
% of the \Lopt{normal}, \Lopt{hang}, \Lopt{center}, \Lopt{centerlast}, |
| 134 |
% \Lopt{nooneline}; \Lopt{scriptsize}, \ldots, \Lopt{Large}; \Lopt{up}, |
| 135 |
% \Lopt{it}, \Lopt{sl}, \Lopt{sc}, \Lopt{md}, \Lopt{bf}, \Lopt{rm}, |
| 136 |
% \Lopt{sf}, and \Lopt{tt} package options were added for compatibility |
| 137 |
% with the caption.sty by H.A. Sommerfeldt.} |
| 138 |
% |
| 139 |
% \changes{v2.1}{23 Jan 2002}{Upgraded to fix a \cmd{\protect} bug that |
| 140 |
% crept in due to changes in \LaTeXe\ and to enhance the interaction |
| 141 |
% with the ``List-of'' files. Backward compatibility with \LaTeX2.09 is |
| 142 |
% \textbf{not} supported. This version allows optional subcaption |
| 143 |
% strings for the ``List-of'' files and the companion captcont.sty |
| 144 |
% allows further extensions. Added check for \Lfile{subfigure.cfg} file |
| 145 |
% for automatic configuration. Added more options for adjustment of the |
| 146 |
% look-and-feel of the subcaption. Added the ability to independently |
| 147 |
% move the float caption and subcaption before or after the figure. |
| 148 |
% Removed extra space from the top of a figure at the top of a page and |
| 149 |
% some accidental whitespace. Reduced the default space around the |
| 150 |
% figure and made it actual skips. Updated the documentation to |
| 151 |
% describe the new changes and to make some points more clear.} |
| 152 |
% |
| 153 |
% \DoNotIndex{\@@@,\@auxout,\@bsphack,\@dottedtocline,\@empty,\@esphack} |
| 154 |
% \DoNotIndex{\@flushglue,\@for,\@gobble,\@ifnextchar,\@ifpackageloaded} |
| 155 |
% \DoNotIndex{\@ifstar,\@ifundefined,\@minipagefalse,\@nameuse,\@ne} |
| 156 |
% \DoNotIndex{\@rightskip,\@tempboxa,\@tempcnta,\@tempdima} |
| 157 |
% \DoNotIndex{\@tempdimb,\@tempskipb,\@xaddvskip,\addcontentsline} |
| 158 |
% \DoNotIndex{\addtolength,\advance,\alph,\arabic,\AtBeginDocument} |
| 159 |
% \DoNotIndex{\AtEndOfPackage,\begingroup,\bfseries,\bgroup,\box} |
| 160 |
% \DoNotIndex{\DeclareOption,\def,\do,\edef,\egroup,\else,\endgroup} |
| 161 |
% \DoNotIndex{\ExecuteOption,\ExecuteOptions,\ext@figure,\ext@table} |
| 162 |
% \DoNotIndex{\familydefault,\fi,\footnotesize,\fontfamily,\fontseries} |
| 163 |
% \DoNotIndex{\fontshape,\gdef,\global,\hbox,\hfil,\hskip,\hss,\if@minipage} |
| 164 |
% \DoNotIndex{\ifcase,\ifdim,\ifnum,\ifx,\ignorespaces,\InputIfFileExists} |
| 165 |
% \DoNotIndex{\itshape,\label,\lastskip,\leftskip,\Large,\large,\leavevmode} |
| 166 |
% \DoNotIndex{\let,\long,\m@ne,\mdseries,\multiply,\NeedsTeXFormat} |
| 167 |
% \DoNotIndex{\newcommand,\newcounter,\newdimen,\newif,\newlabel,\newskip} |
| 168 |
% \DoNotIndex{\noexpand,\normalsize,\numberline,\or,\p@,\par,\parbox} |
| 169 |
% \DoNotIndex{\parfillskip,\parindent,\ProcessOptions,\protect} |
| 170 |
% \DoNotIndex{\protected@write,\protected@edef,\providecommand} |
| 171 |
% \DoNotIndex{\ProvidesPackage,\ref,\refstepcounter,\relax,\renewcommand} |
| 172 |
% \DoNotIndex{\RequirePackage,\rightskip,\rmfamily,\sbox,\scriptsize} |
| 173 |
% \DoNotIndex{\scshape,\selectfont,\seriesdefault,\setbox,\setcounter} |
| 174 |
% \DoNotIndex{\setlength,\sffamily,\shapedefault,\slshape,\small,\space} |
| 175 |
% \DoNotIndex{\string,\strut,\thefigure,\thepage,\thetable,\ttfamily,\tw@} |
| 176 |
% \DoNotIndex{\typeout,\undefined,\upshape,\usebox,\vbox,\vskip,\vspace} |
| 177 |
% \DoNotIndex{\vtop,\wd,\xdef,\z@,\z@skip} |
| 178 |
% |
| 179 |
% \CheckSum{770}% |
| 180 |
% ^ Allow a little more freedom in typesetting floats. |
| 181 |
% \setcounter{topnumber}{8} |
| 182 |
% \def\topfraction{.8} |
| 183 |
% \setcounter{bottomnumber}{8} |
| 184 |
% \def\bottomfraction{.8} |
| 185 |
% \setcounter{totalnumber}{8} |
| 186 |
% \def\textfraction{.2} |
| 187 |
% \def\floatpagefraction{.8} |
| 188 |
% \setcounter{dbltopnumber}{8} |
| 189 |
% \def\dbltopfraction{.8} |
| 190 |
% \def\dblfloatpagefraction{.8} |
| 191 |
% |
| 192 |
% ^ Add some space above any footnotes. |
| 193 |
% \skip\footins=1.5\baselineskip |
| 194 |
% |
| 195 |
% \makeatletter |
| 196 |
% |
| 197 |
% ^ Remove some space above minipage footnotes. |
| 198 |
% \skip\@mpfootins=2.6\p@ |
| 199 |
% |
| 200 |
% ^ Define a raggedright for use in tabular's. |
| 201 |
% \newcommand{\rr}{^ |
| 202 |
% \@rightskip\@flushglue |
| 203 |
% \rightskip\@rightskip |
| 204 |
% \leftskip\z@ |
| 205 |
% \parindent\z@} |
| 206 |
% |
| 207 |
% ^ Turn off any list entries by ``eating'' any \addcontentsline stuff. |
| 208 |
% \newcommand*{\eatthree}[3]{}^ |
| 209 |
% \newcommand*{\turnofflistentry}{\let\addcontentsline=\eatthree} |
| 210 |
% |
| 211 |
% ^ Print text (#2) only if reference (r@#1) is defined. |
| 212 |
% \newcommand{\PrintIfDefined}[3]{^ |
| 213 |
% \@bsphack |
| 214 |
% \@ifundefined{r@#1}{#3}{#2}^ |
| 215 |
% \@esphack} |
| 216 |
% |
| 217 |
% \makeatother |
| 218 |
% |
| 219 |
% \def\docdate{2002/07/02} |
| 220 |
% \def\fileversion{v2.1.4a} |
| 221 |
% \def\filedate{2003/09/14} |
| 222 |
% \def\filename{hhsubfigure.dtx} |
| 223 |
% |
| 224 |
% \title{The \Lpack{hhsubfigure} Package\footnote{This paper documents |
| 225 |
% the \Lpack{hhsubfigure} package \fileversion, last revised \filedate.}} |
| 226 |
% \author{Steven Douglas Cochran\\[5pt] |
| 227 |
% Digital Mapping Laboratory, School of Computer Science \\ |
| 228 |
% Carnegie-Mellon University, 5000 Forbes Avenue \\ |
| 229 |
% Pittsburgh, PA 15213--3890, USA\\[5pt] |
| 230 |
% \texttt{[email protected]}} |
| 231 |
% \date{\docdate} |
| 232 |
% |
| 233 |
% \maketitle |
| 234 |
% |
| 235 |
% \begin{abstract} |
| 236 |
% \noindent |
| 237 |
% This article documents the \LaTeX\ package `\Lpack{hhsubfigure}', which |
| 238 |
% provides support for the inclusion of small, `sub', figures and |
| 239 |
% tables. It simplifies the positioning, captioning and labeling of |
| 240 |
% such objects within a single \Lenv{figure} or \Lenv{table} |
| 241 |
% environment. In addition, this package allows such subcaptions to be |
| 242 |
% written to a List-of-Figures or List-of-Tables if desired. The |
| 243 |
% `\Lpack{hhsubfigure}' package also cooperates with the `\Lpack{caption}' |
| 244 |
% and `\Lpack{caption2}' packages by H.A. Sommerfeldt |
| 245 |
% \cite{Somm95a,Somm95b}, the `\Lpack{ccaption}' and `\Lpack{tocloft}' |
| 246 |
% packages \cite{Wils01,Wils01B} by Peter Wilson, the `\Lpack{hyperref}' |
| 247 |
% package by Sebastian Rahtz \cite{Raht02}, the `\Lpack{captcont}' package |
| 248 |
% \cite{Coch02}, and should be compatible with all other packages that |
| 249 |
% modify or extend the \Lenv{float} environment or the \cmd{\caption} or |
| 250 |
% \cmd{\label} commands. |
| 251 |
% |
| 252 |
% \end{abstract} |
| 253 |
% |
| 254 |
% \newpage |
| 255 |
% \tableofcontents |
| 256 |
% |
| 257 |
% \newpage |
| 258 |
% \setcounter{lotdepth}{2}^ |
| 259 |
% \listoftables |
| 260 |
% \setcounter{lofdepth}{2}^ |
| 261 |
% \listoffigures |
| 262 |
% |
| 263 |
% \newpage |
| 264 |
% \section{Introduction} |
| 265 |
% \enlargethispage{24pt}^finalhack |
| 266 |
% |
| 267 |
% This package provides support for the manipulation and reference of |
| 268 |
% small or `sub' figures and tables within a single \Lenv{figure} or |
| 269 |
% \Lenv{table} environment\@.\footnote{Section~\ref{sec:customfloat} |
| 270 |
% describes how to add support for additional \Lenv{float} |
| 271 |
% environments.} It is convenient to use this package when your |
| 272 |
% subfigures are to be separately captioned, referenced, or when such |
| 273 |
% subcaptions are to be included in the List-of-Figures. |
| 274 |
% |
| 275 |
% Before using the \Lpack{hhsubfigure} package, consider the following to |
| 276 |
% see if you really need it. If you simply want to center your figure, |
| 277 |
% then you can use |\centerline|, |\centering| or the \Lenv{center} |
| 278 |
% environment to do so. If your figure has a short width or if you wrap |
| 279 |
% your figure in a |\parbox| or a \Lenv{minipage} of a short width, then |
| 280 |
% you can place multiple figures or tables side-by-side. For example, |
| 281 |
% the following will put two images side-by-side in a single figure as |
| 282 |
% shown in figure~\ref{fig:1figs}:\footnote{You might have to use the |
| 283 |
% optional position arguments `[b]' or `[t]' if the figures are of |
| 284 |
% different heights.} |
| 285 |
% |
| 286 |
% \begin{verbatim} |
| 287 |
% \begin{figure}% |
| 288 |
% \centering |
| 289 |
% \parbox{1.2in}{...figure code...}% |
| 290 |
% \qquad |
| 291 |
% \begin{minipage}{1.2in}% |
| 292 |
% ...figure code... |
| 293 |
% \end{minipage}% |
| 294 |
% \caption{Here are two figures side-by-side.}% |
| 295 |
% \label{fig:1figs}% |
| 296 |
% \end{figure} |
| 297 |
% \end{verbatim} |
| 298 |
% \vspace{-1\baselineskip} |
| 299 |
% \begin{figure}^ |
| 300 |
% \abovecaptionskip=6pt^ |
| 301 |
% \centering |
| 302 |
% \parbox{1.2in}{^ |
| 303 |
% \fboxsep=-\fboxrule |
| 304 |
% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}^ |
| 305 |
% \qquad |
| 306 |
% \begin{minipage}{1.2in}^ |
| 307 |
% \fboxsep=-\fboxrule |
| 308 |
% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}^ |
| 309 |
% \end{minipage}^ |
| 310 |
% \caption{Here are two figures side-by-side.}^ |
| 311 |
% \label{fig:1figs}^ |
| 312 |
% \vspace{-10pt} |
| 313 |
% \end{figure} |
| 314 |
% |
| 315 |
% \noindent |
| 316 |
% Further, if you place the caption inside the |\parbox| or |
| 317 |
% \Lenv{minipage}, then the width of the caption will be limited to the |
| 318 |
% width of the parbox or minipage as shown in figures~\ref{fig:2figsA} |
| 319 |
% and \ref{fig:2figsB}: |
| 320 |
% |
| 321 |
% \begin{verbatim} |
| 322 |
% \begin{figure}% |
| 323 |
% \centering |
| 324 |
% \parbox{1.2in}{% |
| 325 |
% ...figure code... |
| 326 |
% \caption{First.}% |
| 327 |
% \label{fig:2figsA}}% |
| 328 |
% \qquad |
| 329 |
% \begin{minipage}{1.2in}% |
| 330 |
% ...figure code... |
| 331 |
% \caption{Second.}% |
| 332 |
% \label{fig:2figsB}% |
| 333 |
% \end{minipage}% |
| 334 |
% \end{figure}% |
| 335 |
% \end{verbatim} |
| 336 |
% \vspace{-\baselineskip} |
| 337 |
% \begin{figure}^ |
| 338 |
% \abovecaptionskip=2pt^ |
| 339 |
% \centering |
| 340 |
% \parbox{1.2in}{^ |
| 341 |
% \fboxsep=-\fboxrule |
| 342 |
% \fbox{\hbox to 1.2in{\vbox to 15mm{\vfil\null}\hfil}}^ |
| 343 |
% \caption{First.}^ |
| 344 |
% \label{fig:2figsA}}^ |
| 345 |
% \qquad |
| 346 |
% \begin{minipage}{1.2in}^ |
| 347 |
% \fboxsep=-\fboxrule |
| 348 |
% \fbox{\hbox to 1.2in{\vbox to 15mm{\vfil\null}\hfil}}^ |
| 349 |
% \caption{Second.}^ |
| 350 |
% \label{fig:2figsB}^ |
| 351 |
% \end{minipage}^ |
| 352 |
% \vspace{-10pt} |
| 353 |
% \end{figure} |
| 354 |
% |
| 355 |
% For more information on typesetting figures and tables, see the |
| 356 |
% document ``Using Imported Graphics in \LaTeXe'' by Keith Reckdahl |
| 357 |
% \cite{Reck97}. |
| 358 |
% |
| 359 |
% \section{The User Interface} |
| 360 |
% \vspace{-5pt}^finalhack |
| 361 |
% \enlargethispage{12pt}^finalhack |
| 362 |
% |
| 363 |
% To use this package place |
| 364 |
% \begin{quote} |
| 365 |
% |\usepackage|\oarg{options}\marg{hhsubfigure} |
| 366 |
% \end{quote} |
| 367 |
% in the preamble of your document. The supported options are shown in |
| 368 |
% table~\ref{tab:options}. |
| 369 |
% \DescribeMacro{\subfigure} |
| 370 |
% \DescribeMacro{\subtable} |
| 371 |
% Within a \Lenv{figure} or \Lenv{table} |
| 372 |
% environment, you can use the following commands to create a subfigure |
| 373 |
% or subtable ``box'' with an optional subcaption underneath. |
| 374 |
% \vspace{-2pt} |
| 375 |
% \begin{quote} |
| 376 |
% |\subfigure|\oarg{list\_entry}\oarg{subcaption}\marg{figure}\\ |
| 377 |
% |\subtable|\oarg{list\_entry}\oarg{subcaption}\marg{figure} |
| 378 |
% \end{quote} |
| 379 |
% \vspace{-2pt} |
| 380 |
% |
| 381 |
% \noindent |
| 382 |
% If a subcaption argument is given (including the null subcaption |
| 383 |
% `{\ttfamily [$\;$]}') then the subfigure is labeled with a counter |
| 384 |
% formatted by the command `|\thesubfigure|' which returns, by default, |
| 385 |
% `(a)', `(b)', etc. The counter used for labeling the subfigures is |
| 386 |
% \Lcount{hhsubfigure} and is incremented for each subfigure regardless of |
| 387 |
% whether a subcaption was printed. The internals of the |\subtable| |
| 388 |
% command are symmetric to those of the |\subfigure| command. Further, |
| 389 |
% if a List-of-Figures (or List-of-Tables) is generated, then the |
| 390 |
% \meta{list\_entry} argument controls how the caption text is used |
| 391 |
% there. Table~\ref{tab:calling} shows the possibilities. |
| 392 |
% |
| 393 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the label and caption defaults |
| 394 |
% from \cmd{\rmfamily}\cmd{\mdseries}\cmd{\upshape} to |
| 395 |
% \cmd{\familydefault}\cmd{\seriesdefault} \cmd{\shapedefault}.} |
| 396 |
% \DeleteShortVerb{\|} |
| 397 |
% \begin{table} |
| 398 |
% \def\M#1{\vspace*{#1}} |
| 399 |
% \centering |
| 400 |
% \caption{\Lpack{hhsubfigure} package options.} |
| 401 |
% \label{tab:options} |
| 402 |
% \vspace{8pt} |
| 403 |
% \fbox{\begin{tabular}{|p{0.36\textwidth}|p{0.63\textwidth}|} \hline |
| 404 |
% \multicolumn{1}{|c|}{{\large\bf\strut Option}} |
| 405 |
% & \multicolumn{1}{c|}{{\large\bf Description}} |
| 406 |
% \\ \hline\hline |
| 407 |
% \Lopt{normal} & \rr Provides `normal' subcaptions, this is the |
| 408 |
% default. \\ \hline |
| 409 |
% \raisebox{-1.4ex}{\Lopt{hang}, \Lopt{isu}} |
| 410 |
% & \rr Causes the label to be a hanging |
| 411 |
% indentation to the subcaption paragraph. |
| 412 |
% (\Lopt{isu} is a synonym for \Lopt{hang}.) |
| 413 |
% \\ \hline |
| 414 |
% \raisebox{-1.4ex}{\Lopt{center}} |
| 415 |
% & \rr Causes each line of the paragraph to be |
| 416 |
% separately centered. Overrides |
| 417 |
% \Lopt{centerlast}.\\ \hline |
| 418 |
% \raisebox{-1.4ex}{\Lopt{centerlast}, \Lopt{anne}} |
| 419 |
% & \rr Causes the last line only to be centered. |
| 420 |
% Overrides \Lopt{nooneline}. (\Lopt{anne} is |
| 421 |
% a synonym for \Lopt{centerlast}.) \\ \hline |
| 422 |
% \raisebox{-2.6ex}{\Lopt{nooneline}} |
| 423 |
% & \rr If a subcaption fits on one line it will, by |
| 424 |
% default, be centered. This option |
| 425 |
% treats a single line like a mid-line of a |
| 426 |
% multi-line caption.\\ \hline |
| 427 |
% \raisebox{-1.4ex}{\Lopt{raggedright}} |
| 428 |
% & \rr Causes the subcaption text to be raggedright. |
| 429 |
% Overrides \Lopt{center} and \Lopt{centerlast}. |
| 430 |
% \\ \hline |
| 431 |
% \raisebox{-1.4ex}{\Lopt{RaggedRight}} |
| 432 |
% & \rr Causes the subcaption text to be |
| 433 |
% raggedright with hyphenation (using the |
| 434 |
% ragged2e package). |
| 435 |
% Overrides \Lopt{center} and \Lopt{centerlast}. |
| 436 |
% \\ \hline\hline |
| 437 |
% \Lopt{scriptsize{\rm,} footnotesize{\rm,} small{\rm,}\hfil\null\linebreak |
| 438 |
% normalsize{\rm,} large{\rm,} Large} |
| 439 |
% & \rr Sets the font size of the subcaptions (both |
| 440 |
% the label and the text), \Lopt{footnotesize} |
| 441 |
% is default. \\ \hline |
| 442 |
% \M{1.8ex} |
| 443 |
% \Lopt{rm{\rm,} sf{\rm,} tt{\rm,} md{\rm,} bf{\rm,}\efill |
| 444 |
% up{\rm,} it{\rm,} sl{\rm,} sc{\rm,}}\hfil\null\linebreak |
| 445 |
% \Lopt{RM{\rm,} SF{\rm,} TT{\rm,} MD{\rm,} BF{\rm,}\efill |
| 446 |
% UP{\rm,} IT{\rm,} SL{\rm,} SC} |
| 447 |
% & \rr The lowercase commands set the font attributes |
| 448 |
% of the subcaption label. The capitalized version |
| 449 |
% sets the font attributes of the text. Family, |
| 450 |
% shape and style attributes may be mixed. |
| 451 |
% The default is to set the document defaults for |
| 452 |
% the family, series and shape.\\ \hline\hline |
| 453 |
% \M{4ex} |
| 454 |
% \Lopt{figbotcap}{\rm,} \Lopt{tabbotcap}{\rm,}\hfil\null\linebreak |
| 455 |
% \Lopt{FIGBOTCAP}{\rm,} \Lopt{TABBOTCAP} |
| 456 |
% & \rr Sets the figure or table numbering based on |
| 457 |
% the assumption that the figure or table caption |
| 458 |
% comes after the subfigures or subtables. The |
| 459 |
% capitalized version also places the subcaption |
| 460 |
% after the figure (``\Lopt{FIGBOTCAP}'' and |
| 461 |
% ``\Lopt{TABBOTCAP}'' are the default settings). |
| 462 |
% \\ \hline |
| 463 |
% \M{3.9ex} |
| 464 |
% \Lopt{figtopcap}{\rm,} \Lopt{tabtopcap}{\rm,}\hfil\null\linebreak |
| 465 |
% \Lopt{FIGTOPCAP}{\rm,} \Lopt{TABTOPCAP} |
| 466 |
% & \rr Sets the figure or table numbering based on |
| 467 |
% the assumption that the figure or table caption |
| 468 |
% precedes the subfigures or subtables. The |
| 469 |
% capitalized version also places the subcaption |
| 470 |
% before the figure (``\Lopt{TABTOPCAP}'' is the |
| 471 |
% preferred table setting, see |
| 472 |
% section~\ref{sec:position} for details). |
| 473 |
% \\ \hline\hline |
| 474 |
% \M{2.6ex} |
| 475 |
% \Lopt{loose}{\rm,} \Lopt{tight} |
| 476 |
% & \rr The (default) \Lopt{loose} option sets the |
| 477 |
% historically normal whitespace around the subfloat. |
| 478 |
% The \Lopt{tight} option sets less space around the |
| 479 |
% subfigure (this is the preferred setting). |
| 480 |
% \\ \hline |
| 481 |
% \end{tabular}}% |
| 482 |
% \end{table} |
| 483 |
% \MakeShortVerb{\|} |
| 484 |
% |
| 485 |
% \begin{table} |
| 486 |
% \centering |
| 487 |
% \caption{\cmd{\subfigure} calling arguments.} |
| 488 |
% \label{tab:calling} |
| 489 |
% \begingroup\small |
| 490 |
% \begin{tabular}{llc} \\ \hline |
| 491 |
% {\normalsize Subfigure Command} |
| 492 |
% & {\normalsize LoF/LoT} |
| 493 |
% & \multicolumn{1}{r}{\hbox to .25in{% |
| 494 |
% \hss\normalsize |
| 495 |
% Subfigure Caption}} |
| 496 |
% \\ \hline |
| 497 |
% \cmd{\subfigure}\{\dots fig\dots\} |
| 498 |
% & & \\ |
| 499 |
% \cmd{\subfigure}[~]\{\dots fig\dots\} |
| 500 |
% & (b)\ \ . . . . . . . . . . |
| 501 |
% & (b) \\ |
| 502 |
% \cmd{\subfigure}[Subcaption.]\{\dots fig\dots\} |
| 503 |
% & (c) Subcaption. . . . |
| 504 |
% & (c) Subcaption. \\ |
| 505 |
% \cmd{\subfigure}[\space][Subcaption.]\{\dots fig\dots\} |
| 506 |
% & & (d) Subcaption. \\ |
| 507 |
% \cmd{\subfigure}[\space][\space]\{\dots fig\dots\} |
| 508 |
% & & (e) \\ |
| 509 |
% \cmd{\subfigure}[List\_entry.][Subcaption.]\{\dots fig\dots\} |
| 510 |
% & (f) List\_entry. . . . |
| 511 |
% & (f) Subcaption. \\ |
| 512 |
% \cmd{\subfigure}[List\_entry.][~]\{\dots fig\dots\} |
| 513 |
% & (g) List\_entry. . . . |
| 514 |
% & (g) \\ \hline |
| 515 |
% \end{tabular} |
| 516 |
% \endgroup |
| 517 |
% \vspace{-8pt} |
| 518 |
% \end{table} |
| 519 |
% |
| 520 |
% If you wish to reference a specific subfigure or subtable, you can |
| 521 |
% include a |\label| inside the body of either the \meta{subcaption} or |
| 522 |
% \meta{figure} argument to the command (but not the \meta{list\_entry} |
| 523 |
% argument). If supplied by itself, the \meta{subcaption} is a ``moving |
| 524 |
% argument''\footnote{See \cite[\textsection~4.7 and |
| 525 |
% \textsection~C.1.3]{Lamp94} for a more detailed description of |
| 526 |
% ``moving arguments'' and ``fragile'' commands.} and, therefore, any |
| 527 |
% ``fragile'' commands contained within it must be |\protect|'ed. If |
| 528 |
% the \meta{list\_entry} argument is supplied, then the |
| 529 |
% \meta{subcaption} is not a ``moving argument''; however, the |
| 530 |
% \meta{list\_entry} is. |
| 531 |
% |
| 532 |
% {\bf Note:} since the |\subfigure| and |\subtable| commands have optional |
| 533 |
% arguments, delimited with square brackets, before their required argument, |
| 534 |
% you cannot use the `]' character at the top level of either the |
| 535 |
% \meta{subcaption} or \meta{list\_entry} argument. To overcome this |
| 536 |
% problem, you must wrap the portion of the text containing the `]' |
| 537 |
% character (or the entire argument), in a pair of curly brackets (see |
| 538 |
% \cite[\textsection~C.1.1]{Lamp94} for more detail). For example: |
| 539 |
% |
| 540 |
% \begin{verbatim} |
| 541 |
% \subfigure[This does not $sqrt[3]{8}$ work.]{... figure text ...} |
| 542 |
% \subfigure[This works {$sqrt[3]{8}$} fine.]{... figure text ...} |
| 543 |
% \subfigure[{This also works $sqrt[3]{8}$ fine.}]{... figure text ...} |
| 544 |
% \end{verbatim} |
| 545 |
% |
| 546 |
% One final note, the |\subfigure| and |\subtable| commands are |
| 547 |
% actually identical and it is the surrounding environment that defines |
| 548 |
% actually identical and it is the surrounding environment that defines |
| 549 |
% whether a subtable or subfigure will be generated and not which command |
| 550 |
% is used. At the user level, the choice of names is purely cosmetic |
| 551 |
% (and historical). Therefore you can use |\subfigure| for any float |
| 552 |
% ({\it e.g.\/}, \Lenv{figure}, \Lenv{table}, or other) environment. |
| 553 |
% |
| 554 |
% \subsection{Format Options} |
| 555 |
% \label{sec:format} |
| 556 |
% |
| 557 |
% There are six options for formatting the layout of the caption label |
| 558 |
% and text. The first is \Lopt{normal}, which produces the style shown |
| 559 |
% in figure~\ref{fig:format-01}. The other options may be used in |
| 560 |
% various combinations to produce the layouts shown in |
| 561 |
% figures~\ref{fig:format-02} thru \ref{fig:format-14}. Note that some |
| 562 |
% combinations, like \Lopt{center} and \Lopt{centerlast} do not make |
| 563 |
% sense since \Lopt{center} overrides \Lopt{centerlast}. Also, |
| 564 |
% \Lopt{nooneline}, when combined with either \Lopt{center} or |
| 565 |
% \Lopt{centerlast} has no effect (unless the \Lopt{hang} option is |
| 566 |
% also set); and, \Lopt{raggedright} overrides both \Lopt{center} and |
| 567 |
% \Lopt{centerlast}. |
| 568 |
% |
| 569 |
% \begingroup |
| 570 |
% \def\sc{Short.} |
| 571 |
% \def\lc{This is a long caption of gibberish: Aafas d taed |
| 572 |
% gaihgghn adf irin sadf aets etsd na.} |
| 573 |
% \def\b{\fboxsep=-\fboxrule |
| 574 |
% \fbox{\hbox to 2.0in{\vbox to 2mm{\vfil\null}\hfil}}} |
| 575 |
% \def\g{\hspace{.5in}} |
| 576 |
% \subfigtopskip=20pt |
| 577 |
% \subfigcapskip=-3pt |
| 578 |
% \subfigbottomskip=0pt |
| 579 |
% \abovecaptionskip=5pt |
| 580 |
% \begin{figure}^ |
| 581 |
% \centering |
| 582 |
% \turnofflistentry |
| 583 |
% \subcaphangfalse |
| 584 |
% \subcapcenterfalse |
| 585 |
% \subcapcenterlastfalse |
| 586 |
% \subcapnoonelinefalse |
| 587 |
% \subcapraggedrightfalse |
| 588 |
% \subfigure[\sc]{\b}\g\subfigure[\lc]{\b}\\ |
| 589 |
% \caption{Format option [\Lopt{normal}].}^ |
| 590 |
% \label{fig:format-01}^ |
| 591 |
% \subcapnoonelinetrue |
| 592 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 593 |
% \caption{Format option [\Lopt{nooneline}].}^ |
| 594 |
% \label{fig:format-02}^ |
| 595 |
% \subcapcenterlasttrue |
| 596 |
% \subcapnoonelinefalse |
| 597 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 598 |
% \caption{Format option [\Lopt{centerlast}]; \Lopt{centerlast} overrides |
| 599 |
% \Lopt{nooneline}.\footnotemark} |
| 600 |
% \label{fig:format-03}^ |
| 601 |
% \subcapcentertrue |
| 602 |
% \subcapcenterlastfalse |
| 603 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 604 |
% \caption{Format option [\Lopt{center}]; \Lopt{center} overrides |
| 605 |
% \Lopt{nooneline} and \Lopt{centerlast}.}^ |
| 606 |
% \label{fig:format-04}^ |
| 607 |
% \subcaphangtrue |
| 608 |
% \subcapcenterfalse |
| 609 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 610 |
% \caption{Format option [\Lopt{hang}].} |
| 611 |
% \label{fig:format-05} |
| 612 |
% \subcapnoonelinetrue |
| 613 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 614 |
% \caption{Format options [\Lopt{hang},\Lopt{nooneline}].} |
| 615 |
% \label{fig:format-06} |
| 616 |
% \subcapcenterlasttrue |
| 617 |
% \subcapnoonelinefalse |
| 618 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 619 |
% \caption{\Lpack{Hhsubfigure}\ format options [\Lopt{hang},^ |
| 620 |
% \Lopt{centerlast}].} |
| 621 |
% \label{fig:format-07} |
| 622 |
% \vspace{2\baselineskip} |
| 623 |
% \begin{minipage}{\linewidth} |
| 624 |
% \footnotetext{\raise1ex\hbox to 0pt{\hss\tiny\thefootnote}^ |
| 625 |
% So this is the same as [\Lopt{centerlast},\Lopt{nooneline}]. Only |
| 626 |
% the shortest number of options to achieve an effect is shown. |
| 627 |
% Adding any combination of overridden options has no effect.} |
| 628 |
% \end{minipage} |
| 629 |
% \end{figure} |
| 630 |
% |
| 631 |
% \begin{figure} |
| 632 |
% \turnofflistentry |
| 633 |
% \centering |
| 634 |
% \subcaphangtrue |
| 635 |
% \subcapcenterfalse |
| 636 |
% \subcapcenterlasttrue |
| 637 |
% \subcapnoonelinetrue |
| 638 |
% \subcapraggedrightfalse |
| 639 |
% \subfigure[][\sc]{\label{fig:format-08A}\b}\g\subfigure[][\lc]{\b}\\ |
| 640 |
% \caption{Format options [\Lopt{hang},\Lopt{centerlast},\Lopt{nooneline}].} |
| 641 |
% \label{fig:format-08} |
| 642 |
% \subcapcentertrue |
| 643 |
% \subcapcenterlastfalse |
| 644 |
% \subcapnoonelinefalse |
| 645 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 646 |
% \caption{Format options [\Lopt{hang},\Lopt{center}]; |
| 647 |
% \Lopt{center} overrides \Lopt{centerlast}.} |
| 648 |
% \label{fig:format-09} |
| 649 |
% \subcapnoonelinetrue |
| 650 |
% \subfigure[][\sc]{\label{fig:format-10A}\b}\g\subfigure[][\lc]{\b}\\ |
| 651 |
% \caption{Format options [\Lopt{hang},\Lopt{center},\Lopt{nooneline}]; |
| 652 |
% \Lopt{center} overrides \Lopt{centerlast}.} |
| 653 |
% \label{fig:format-10} |
| 654 |
% \subcaphangfalse |
| 655 |
% \subcapcenterfalse |
| 656 |
% \subcapnoonelinefalse |
| 657 |
% \subcapraggedrighttrue |
| 658 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 659 |
% \caption{Format option [\Lopt{raggedright}]; |
| 660 |
% \Lopt{raggedright} overrides \Lopt{center} and \Lopt{centerlast}.} |
| 661 |
% \label{fig:format-11} |
| 662 |
% \subcapnoonelinetrue |
| 663 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 664 |
% \caption{Format options [\Lopt{raggedright},\Lopt{noonelirne}]; |
| 665 |
% \Lopt{raggedright} overrides \Lopt{center} and \Lopt{centerlast}.} |
| 666 |
% \label{fig:format-12} |
| 667 |
% \subcaphangtrue |
| 668 |
% \subcapnoonelinefalse |
| 669 |
% \subfigure[][\sc]{\b}\g\subfigure[][\lc]{\b}\\ |
| 670 |
% \caption{Format options [\Lopt{hang},\Lopt{raggedright}]; |
| 671 |
% \Lopt{raggedright} overrides \Lopt{center} and \Lopt{centerlast}.} |
| 672 |
% \label{fig:format-13} |
| 673 |
% \subcapnoonelinetrue |
| 674 |
% \subfigure[][\sc]{\label{fig:format-14A}\b}\g\subfigure[][\lc]{\b}\\ |
| 675 |
% \caption{\Lpack{hhsubfigure}\ format options [\Lopt{hang},\Lopt{raggedright}, |
| 676 |
% \Lopt{nooneline}]; \Lopt{raggedright} overrides \Lopt{center} |
| 677 |
% and \Lopt{centerlast}.} |
| 678 |
% \label{fig:format-14} |
| 679 |
% \end{figure} |
| 680 |
% \endgroup |
| 681 |
% |
| 682 |
% \addtocontents{lof}{^ |
| 683 |
% \string\contentsline |
| 684 |
% {figure} |
| 685 |
% {\numberline{\ref{fig:format-01}--\ref{fig:format-14}}^ |
| 686 |
% {\ignorespaces \Lpack{Hhsubfigure}\ format options.}}^ |
| 687 |
% {\pageref{fig:format-01}--\pageref{fig:format-14}}} |
| 688 |
% |
| 689 |
% \subsection{Font Size and Style Options} |
| 690 |
% \label{sec:font} |
| 691 |
% |
| 692 |
% There are twenty-four options for setting the font of the subcaption. |
| 693 |
% The first six set the size of both the subcaption label and text. |
| 694 |
% They are: \Lopt{scriptsize}, \Lopt{footnotesize} (default), |
| 695 |
% \Lopt{small}, \Lopt{normalsize}, \Lopt{large}, and \Lopt{Large}. |
| 696 |
% Their effect is shown in figure~\ref{fig:font1}. |
| 697 |
% |
| 698 |
% The next nine, \Lopt{rm}: \Lopt{sf}, \Lopt{tt}, \Lopt{md}, \Lopt{bf}, |
| 699 |
% \Lopt{up}, \Lopt{it}, \Lopt{sl}, and \Lopt{sc}, set the family, series |
| 700 |
% or shape of the subcaption label, as shown in |
| 701 |
% figures~\ref{fig:font2A}--~\ref{fig:font2I}. The last nine: |
| 702 |
% \Lopt{RM}, \Lopt{SF}, \Lopt{TT}, \Lopt{MD}, \Lopt{BF}, \Lopt{UP}, |
| 703 |
% \Lopt{IT}, \Lopt{SL}, and \Lopt{SC}, do the same for the text of the |
| 704 |
% subcaption, as shown in figure~\ref{fig:font2J}--\ref{fig:font2R}. |
| 705 |
% These size and style options may be combined in 3456 ways to set the |
| 706 |
% label and text of the subcaption (as long as the selected font |
| 707 |
% combination exists\@!) The font family for the text and label may be |
| 708 |
% set as roman (\Lopt{rm}/\Lopt{RM}), sans serif (\Lopt{sf}/\Lopt{SF}), |
| 709 |
% and typewriter (\Lopt{tt}/\Lopt{TT}). These may be combined with |
| 710 |
% those for the font series, medium (\Lopt{md}/\Lopt{MD}) and bold |
| 711 |
% (\Lopt{bf}/\Lopt{BF}); and the font shape, upright |
| 712 |
% (\Lopt{up}/\Lopt{UP}), italic (\Lopt{it}/\Lopt{IT}), slanted |
| 713 |
% (\Lopt{sl}/\Lopt{SL}), and small caps (\Lopt{sc}/\Lopt{SC}). |
| 714 |
% |
| 715 |
% \begin{figure}^ |
| 716 |
% \def\b{\fboxsep=-\fboxrule |
| 717 |
% \fbox{\hbox to 2.0in{\vbox to 2mm{\vfil\null}\hfil}}}^ |
| 718 |
% \subfigtopskip=8pt^ |
| 719 |
% \subfigcapskip=0pt^ |
| 720 |
% \subfigbottomskip=4pt^ |
| 721 |
% \centering |
| 722 |
% {\renewcommand{\subcapsize}{\scriptsize}^ |
| 723 |
% \subfigure[][Font option {[scriptsize]}.]{\b}}\qquad |
| 724 |
% {\renewcommand{\subcapsize}{\footnotesize}^ |
| 725 |
% \subfigure[][Font option {[footnotesize]}.]{\b}}\\ |
| 726 |
% {\renewcommand{\subcapsize}{\small}^ |
| 727 |
% \subfigure[][Font option {[small]}.]{\b}}\qquad |
| 728 |
% {\renewcommand{\subcapsize}{\normalsize}^ |
| 729 |
% \subfigure[][Font option {[normalsize]}.]{\b}}\\ |
| 730 |
% {\renewcommand{\subcapsize}{\large}^ |
| 731 |
% \subfigure[][Font option {[large]}.]{\b}}\qquad |
| 732 |
% {\renewcommand{\subcapsize}{\Large}^ |
| 733 |
% \subfigure[][Font option {[Large]}.]{\b}}% |
| 734 |
% \caption[\Lpack{Hhsubfigure} font size options.]{% |
| 735 |
% \Lpack{Hhsubfigure} font size options. (Default: |
| 736 |
% \Lopt{footnotesize}).}^ |
| 737 |
% \label{fig:font1}^ |
| 738 |
% \end{figure} |
| 739 |
% |
| 740 |
% \begin{figure}^ |
| 741 |
% \def\b{\fboxsep=-\fboxrule |
| 742 |
% \fbox{\hbox to 2.0in{\vbox to 2mm{\vfil\null}\hfil}}}^ |
| 743 |
% \subfigtopskip=8pt^ |
| 744 |
% \subfigcapskip=0pt^ |
| 745 |
% \subfigbottomskip=4pt^ |
| 746 |
% \centering |
| 747 |
% \begin{minipage}{2.0in}^ |
| 748 |
% {\renewcommand{\subcaplabelfont}{\rmfamily}^ |
| 749 |
% \subfigure[][Subcaption label font option {[\Lopt{rm}]}.]{\b^ |
| 750 |
% \label{fig:font2A}}}\\ |
| 751 |
% {\renewcommand{\subcaplabelfont}{\sffamily}^ |
| 752 |
% \subfigure[][Subcaption label font option {[\Lopt{sf}]}.]{\b}}\\ |
| 753 |
% {\renewcommand{\subcaplabelfont}{\ttfamily}^ |
| 754 |
% \subfigure[][Subcaption label font option {[\Lopt{tt}]}.]{\b}}\\ |
| 755 |
% {\renewcommand{\subcaplabelfont}{\mdseries}^ |
| 756 |
% \subfigure[][Subcaption label font option {[\Lopt{md}]}.]{\b}}\\ |
| 757 |
% {\renewcommand{\subcaplabelfont}{\bfseries}^ |
| 758 |
% \subfigure[][Subcaption label font option {[\Lopt{bf}]}.]{\b}}\\ |
| 759 |
% {\renewcommand{\subcaplabelfont}{\upshape}^ |
| 760 |
% \subfigure[][Subcaption label font option {[\Lopt{up}]}.]{\b}}\\ |
| 761 |
% {\renewcommand{\subcaplabelfont}{\itshape}^ |
| 762 |
% \subfigure[][Subcaption label font option {[\Lopt{it}]}.]{\b}}\\ |
| 763 |
% {\renewcommand{\subcaplabelfont}{\slshape}^ |
| 764 |
% \subfigure[][Subcaption label font option {[\Lopt{sl}]}.]{\b}}\\ |
| 765 |
% {\renewcommand{\subcaplabelfont}{\scshape}^ |
| 766 |
% \subfigure[][Subcaption label font option {[\Lopt{sc}]}.]{^ |
| 767 |
% \label{fig:font2I}\b}}\\ |
| 768 |
% \end{minipage}^ |
| 769 |
% \qquad |
| 770 |
% \begin{minipage}{2.0in}^ |
| 771 |
% {\renewcommand{\subcapfont}{\rmfamily}^ |
| 772 |
% \subfigure[][Subcaption font option {[\Lopt{RM}]}.]{^ |
| 773 |
% \label{fig:font2J}\b}}\\ |
| 774 |
% {\renewcommand{\subcapfont}{\sffamily}^ |
| 775 |
% \subfigure[][Subcaption font option {[\Lopt{SF}]}.]{\b}}\\ |
| 776 |
% {\renewcommand{\subcapfont}{\ttfamily}^ |
| 777 |
% \subfigure[][Subcaption font option {[\Lopt{TT}]}.]{\b}}\\ |
| 778 |
% {\renewcommand{\subcapfont}{\mdseries}^ |
| 779 |
% \subfigure[][Subcaption font option {[\Lopt{MD}]}.]{\b}}\\ |
| 780 |
% {\renewcommand{\subcapfont}{\bfseries}^ |
| 781 |
% \subfigure[][Subcaption font option {[\Lopt{BF}]}.]{\b}}\\ |
| 782 |
% {\renewcommand{\subcapfont}{\upshape}^ |
| 783 |
% \subfigure[][Subcaption font option {[\Lopt{UP}]}.]{\b}}\\ |
| 784 |
% {\renewcommand{\subcapfont}{\itshape}^ |
| 785 |
% \subfigure[][Subcaption font option {[\Lopt{IT}]}.]{\b}}\\ |
| 786 |
% {\renewcommand{\subcapfont}{\slshape}^ |
| 787 |
% \subfigure[][Subcaption font option {[\Lopt{SL}]}.]{\b}}\\ |
| 788 |
% {\renewcommand{\subcapfont}{\scshape}^ |
| 789 |
% \subfigure[][Subcaption font option {[\Lopt{SC}]}.]{^ |
| 790 |
% \label{fig:font2R}\b}}^ |
| 791 |
% \end{minipage}^ |
| 792 |
% \caption[\Lpack{Hhsubfigure} font style options.]{% |
| 793 |
% \Lpack{Hhsubfigure} font style options. (Default: |
| 794 |
% \Lopt{rm,md,up,RM,MD,UP}). Note: The above single options |
| 795 |
% are loaded after the default settings and multiple options are |
| 796 |
% allowed, see the text, section~\ref{sec:font}.}^ |
| 797 |
% \label{fig:font2}^ |
| 798 |
% \end{figure} |
| 799 |
% |
| 800 |
% \subsection{Caption Position Options} |
| 801 |
% \enlargethispage{12pt}^finalhack |
| 802 |
% \label{sec:position} |
| 803 |
% |
| 804 |
% There are eight options that control the {\em position\/} of the |
| 805 |
% subcaption and how the subcaption {\em numbering\/} is related to the |
| 806 |
% ``containing'' figure or table's caption. The following shows only |
| 807 |
% the subfigure-related options, but the subtable options are symmetric. |
| 808 |
% |
| 809 |
% The first option, \Lopt{figbotcap} tells the subfigure command that |
| 810 |
% the ``containing'' figure's |\caption| occurs {\bf after} the |
| 811 |
% subfigures. This information is needed to decide if the current |
| 812 |
% figure counter shows the number for the last figure (\Lopt{figbotcap}) |
| 813 |
% or for the current one (\Lopt{figtopcap}, see below). |
| 814 |
% |
| 815 |
% The second option, \Lopt{figtopcap} tells the subfigure command that |
| 816 |
% the ``containing'' figure's |\caption| occurs {\bf before} the |
| 817 |
% subfigures. The subcaption is automatically placed below the figure |
| 818 |
% for each of these options. |
| 819 |
% |
| 820 |
% The third option, \Lopt{FIGBOTCAP}, is similar to \Lopt{figbotcap}, |
| 821 |
% except that it also forces the subcaption to be placed under the |
| 822 |
% figure. This is the default setting for figures (and \Lopt{TABBOTCAP} |
| 823 |
% for tables) and is shown in figure~\ref{fig:position1}. |
| 824 |
% |
| 825 |
% The fourth option, \Lopt{FIGTOPCAP}, is similar to \Lopt{figtopcap}, |
| 826 |
% except that it forces the subcaption to be placed above the figure |
| 827 |
% box. (While not the default, it is the preferred format for tables, |
| 828 |
% which uses the option \Lopt{TABTOPCAP}\@.) An example of this option |
| 829 |
% is shown in figure~\ref{fig:position2}. Note that the baseline of the |
| 830 |
% subfigure is along the top of the two subfigures. See |
| 831 |
% section~\ref{sec:custom-position} for another way of positioning the |
| 832 |
% caption when captions are placed above the figure or table. |
| 833 |
% |
| 834 |
% \begin{figure}^ |
| 835 |
% \subfigtopskip=8pt^ |
| 836 |
% \subfigcapskip=0pt^ |
| 837 |
% \subfigbottomskip=4pt^ |
| 838 |
% \abovecaptionskip=5pt^ |
| 839 |
% \centering |
| 840 |
% \subfigure[First caption.]{^ |
| 841 |
% \fbox{\hbox to 1.5in{\vbox to 15mm{\vfil\null}\hfil}}}^ |
| 842 |
% \hspace{0.2in}^ |
| 843 |
% \subfigure[Second long, long, long, long, long, long, caption.]{^ |
| 844 |
% \fbox{\hbox to 1.5in{\vbox to 10mm{\vfil\null}\hfil}}}^ |
| 845 |
% \caption{Subcaption position option [\Lopt{FIGBOTCAP}].} |
| 846 |
% \label{fig:position1}^ |
| 847 |
% \end{figure} |
| 848 |
% |
| 849 |
% \begin{figure}^ |
| 850 |
% \subfigtopskip=8pt^ |
| 851 |
% \subfigcapskip=0pt^ |
| 852 |
% \subfigbottomskip=0pt^ |
| 853 |
% \belowcaptionskip=5pt^ |
| 854 |
% \caption{Subcaption position option: [\Lopt{FIGTOPCAP}].}^ |
| 855 |
% \label{fig:position2}^ |
| 856 |
% \centering |
| 857 |
% \figuretopcaptrue |
| 858 |
% \subfiguretopcaptrue |
| 859 |
% \subfigure[First caption.]{^ |
| 860 |
% \fbox{\hbox to 1.5in{\vbox to 15mm{\vfil\null}\hfil}}}^ |
| 861 |
% \hspace{0.2in}^ |
| 862 |
% \subfigure[Second long, long, long, long, long, long caption.]{^ |
| 863 |
% \fbox{\hbox to 1.5in{\vbox to 10mm{\vfil\null}\hfil}}}^ |
| 864 |
% \setcounter{subfigure}{0}^ |
| 865 |
% \vspace{-18pt} |
| 866 |
% \end{figure} |
| 867 |
% |
| 868 |
% \subsection{Recent Changes and Backward Compatibility} |
| 869 |
% \enlargethispage{24pt}^finalhack |
| 870 |
% \label{sec:back-compat} |
| 871 |
% |
| 872 |
% There are some significant changes in this version of the |
| 873 |
% \Lpack{hhsubfigure} package. One of them was to pack the subfigure |
| 874 |
% tighter together by removing the space at the top of the subfigure at |
| 875 |
% the beginning of a page, or minipage, and to reduce the spacing around |
| 876 |
% the subfigure, see table~\ref{tab:spacing}. If you have been using an |
| 877 |
% older version of the \Lpack{hhsubfigure} package ({\it i.e.\/}, version |
| 878 |
% 2.0 or eariler) than the default (\Lopt{loose}) setting will not cause |
| 879 |
% any change in your existing documents.\footnote{If you have been using |
| 880 |
% a beta release version of \Lpack{subfigure} 2.1, than you will need to |
| 881 |
% use the \Lopt{tight} option in order to maintain the ``look-and-feel'' |
| 882 |
% that you are used to.} |
| 883 |
% |
| 884 |
% If you want to use the new and preferred, \Lopt{tight} option, your |
| 885 |
% subfigures will take up less space and should provide a more balanced |
| 886 |
% visual appearance for your paper. |
| 887 |
% |
| 888 |
% The second significant change is the ability to make the text on the |
| 889 |
% List-of-Figures page different than that in the subcaption. The use |
| 890 |
% of a second optional argument to the |\subfigure| command is shown in |
| 891 |
% table~\ref{tab:calling}. This should not cause any compatibility |
| 892 |
% problems. |
| 893 |
% |
| 894 |
% The third significant change is the it is now possible to have the |
| 895 |
% captions and subcaptions come before or after the corresponding |
| 896 |
% figure/table portion. While the default settings support the old view |
| 897 |
% of the subcaptions following the figure/table and, in turn, followed |
| 898 |
% by the main caption. The preferred format is for figures to retain |
| 899 |
% that layout and for tables to have both their subcaption and main |
| 900 |
% captions come before the table portion. This preferred setting may be |
| 901 |
% specified by adding the option \Lopt{TABTOPCAP} when loading the |
| 902 |
% \Lpack{hhsubfigure} package. |
| 903 |
% |
| 904 |
% The fourth update is that the font style options have been generalized |
| 905 |
% so that an option from each of the family, series and shape, may be |
| 906 |
% combined, as long as that combination exists; and you can set the font |
| 907 |
% of the label and text separately. In addition, the the |\space| that |
| 908 |
% separated the label from the text in the subcaption has been replaced |
| 909 |
% with a horizontal skip of |\subfiglabelskip| which has the default |
| 910 |
% value of |0.33em plus 0.07em minus 0.03em|. This extension should not |
| 911 |
% cause any compatibility problems. |
| 912 |
% |
| 913 |
% The last major change is that there is now a |\subref| command that |
| 914 |
% allows a reference to the subfigure without the figure number. An |
| 915 |
% example of the use of this command is shown later in |
| 916 |
% section~\ref{sec:ex3}. Associated with this change is that the |
| 917 |
% |\label| command will accept an optional argument, for use with the |
| 918 |
% \Lpack{hyperref} package, when used within the scope of the |
| 919 |
% |\subfigure| or |\subtable|, see section~\ref{sec:hyperref} for details. |
| 920 |
% |
| 921 |
% \DeleteShortVerb{\|} |
| 922 |
% \MakeShortVerb{\/} |
| 923 |
% \begin{table}^ |
| 924 |
% \def\pz{\phantom{0}}^ |
| 925 |
% \centering |
| 926 |
% \caption{\Lpack{hhsubfigure} spacing changes.}^ |
| 927 |
% \label{tab:spacing}^ |
| 928 |
% \vspace{4pt}^ |
| 929 |
% \begin{tabular}{|l|c|c|c|} \hline |
| 930 |
% \multicolumn{1}{|c|}{\bf{\Lpack{hhsubfigure}}} |
| 931 |
% & \multicolumn{1}{c|}{{\bf Old (v2.0)}} |
| 932 |
% & \multicolumn{1}{c|}{\bf\Lopt{loose}} |
| 933 |
% & \multicolumn{1}{c|}{\bf\Lopt{tight}} \\ |
| 934 |
% \multicolumn{1}{|c|}{{\bf Constant}} |
| 935 |
% & \multicolumn{1}{c|}{{\bf Value}} |
| 936 |
% & \multicolumn{1}{c|}{{\bf Option}} |
| 937 |
% & \multicolumn{1}{c|}{{\bf Option}} |
| 938 |
% \\ \hline |
| 939 |
% /\subfigtopskip/ & 10 pt & 10 pt & 5 pt \\ |
| 940 |
% /\subfigcapskip/ & 10 pt & 10 pt & 0 pt \\ |
| 941 |
% /\subfigcaptopadj/ & | &\pz0 pt & 3 pt \\ |
| 942 |
% /\subfigbottomskip/ & 10 pt & 10 pt & 5 pt \\ |
| 943 |
% /\subfigcapmargin/ & 10 pt & 10 pt & 0 pt \\ |
| 944 |
% /\subfiglabelskip/ & | & 0.33 em & |
| 945 |
% \vtop{\hbox to 1.2in{0.33 em plus 0.07 em} |
| 946 |
% \hbox to 1.2in{\hfill minus 0.03 em}} |
| 947 |
% \\[8pt] \hline |
| 948 |
% \end{tabular}^ |
| 949 |
% \end{table} |
| 950 |
% \DeleteShortVerb{\/} |
| 951 |
% \MakeShortVerb{\|} |
| 952 |
% |
| 953 |
% The \Lpack{hhsubfigure} package checks for and loads a configuration |
| 954 |
% file called \Lfile{subfigure.cfg} which is placed anywhere that \LaTeX\ |
| 955 |
% will look for classes or packages (see |
| 956 |
% section~\ref{sec:customization}). By default, the \Lfile{subfigure.sty} |
| 957 |
% file tries to look unchanged from older versions. In order to |
| 958 |
% have it automatically use the preferred settings, you can add a |
| 959 |
% configuration file containing the options \Lopt{tight} to reduce the |
| 960 |
% extra whitespace around the subfigures and \Lopt{TABTOPCAP} to show |
| 961 |
% that table captions will come before the table and the the subcaptions |
| 962 |
% for tables should be set above the subtable. The following line is all |
| 963 |
% you need in your configuration file: |
| 964 |
% |
| 965 |
% \iffalse |
| 966 |
%<*newconf> |
| 967 |
% \fi |
| 968 |
% \begin{macrocode} |
| 969 |
\ExecuteOptions{tight,TABTOPCAP} |
| 970 |
% \end{macrocode} |
| 971 |
% \iffalse |
| 972 |
%</newconf> |
| 973 |
% \fi |
| 974 |
% |
| 975 |
% You could also load the subfigure package with the options with the |
| 976 |
% following in your \LaTeX\ preamble: |
| 977 |
% \begin{quote} |
| 978 |
% |\usepackage[tight,TABTOPCAP]{hhsubfigure}| |
| 979 |
% \end{quote} |
| 980 |
% |
| 981 |
% \subsection{Frequently Asked Questions} |
| 982 |
% \label{sec:faq} |
| 983 |
% |
| 984 |
% The four most frequently asked questions about the \Lpack{hhsubfigure} |
| 985 |
% package are: |
| 986 |
% |
| 987 |
% \begin{enumerate} |
| 988 |
% \item ``My subfigures are not aligned along their bottoms. Why?'' |
| 989 |
% |
| 990 |
% Remember! The \Lpack{hhsubfigure} package aligns subfigure along |
| 991 |
% their baselines with the subcaption (if any) sticking out above or |
| 992 |
% below. The above problem is usually due to using a \Lenv{minipage}, |
| 993 |
% \Lenv{tabular} or \Lenv{array} environment that, by default, |
| 994 |
% places the baseline at the center of the box that it generates. |
| 995 |
% If the two subfigures are different sizes, or if one subfigure is |
| 996 |
% generated in some other way with its baseline not at the expected |
| 997 |
% place (perhaps an |\includegraphics|), then the subfigures will be |
| 998 |
% misaligned. One solution is to use the environment options `[t]' |
| 999 |
% or `[b]' to move the baseline to the top or bottom rather than the |
| 1000 |
% center. |
| 1001 |
% |
| 1002 |
% \item ``How can I get my figures/subfigures to line up the way I want?'' |
| 1003 |
% |
| 1004 |
% A similar question, but this one is caused by extra whitespace in |
| 1005 |
% the source text generating spaces next to the figures, and |\par|'s |
| 1006 |
% generated by blanklines. The main thing is {\it be aware\/} that |
| 1007 |
% extra whitespace can move figures and subfigures around, sometimes |
| 1008 |
% a lot and sometimes just a little so that they look ``wrong''. |
| 1009 |
% Placing too many `\%'s at the end of the lines is better than too |
| 1010 |
% few in the figure and table environments. (See the discussion of |
| 1011 |
% ``white space'' in section~\ref{sec:examples}.) |
| 1012 |
% |
| 1013 |
% \item ``I have too many subfigures for one page, How can I spread |
| 1014 |
% them over two or more pages and continue the numbering?'' |
| 1015 |
% \begin{description} |
| 1016 |
% \item[Option 1:] Adjust the \Lcount{figure} and \Lcount{subfigure} |
| 1017 |
% counters (or the \Lcount{table} and |
| 1018 |
% \Lcount{subtable} counters) as needed before and |
| 1019 |
% after each figure (or table) See, for example |
| 1020 |
% \emph{Using Imported Graphics in \LaTeXe} |
| 1021 |
% \cite[\textsection~30]{Reck97}. |
| 1022 |
% \item[Option 2:] Use the \Lpack{ccaption} package by Peter Wilson |
| 1023 |
% \cite{Wils01}. |
| 1024 |
% \item[Option 3:] Use the simpler \Lpack{captcont} package by |
| 1025 |
% Steven Cochran \cite{Coch02}. |
| 1026 |
% \end{description} |
| 1027 |
% All of these options work well. Of the packages, the |
| 1028 |
% \Lpack{ccaption} package is bigger and offers more control over |
| 1029 |
% what is done (and things to do) at the expense of being a little |
| 1030 |
% harder to use. The \Lpack{captcont} package is easier to use, |
| 1031 |
% but only provides for continued floats. |
| 1032 |
% \newpage^finalhack |
| 1033 |
% \item ``Why do I get a garbled caption or an error when I use |
| 1034 |
% square brackets?'' |
| 1035 |
% \vspace{-2pt} |
| 1036 |
% \begin{verbatim} |
| 1037 |
% \subfigure[SHIFT: ``register[3] $<<=$ 3;'']{... figure text ...} |
| 1038 |
% \end{verbatim} |
| 1039 |
% \vspace{-12pt} |
| 1040 |
% Since the |\subfigure| and |\subtable| commands have optional |
| 1041 |
% arguments, delimited with square brackets, before their required |
| 1042 |
% argument, you cannot use the `]' character at the top level of |
| 1043 |
% either the \meta{subcaption} or \meta{list\_entry} argument. To |
| 1044 |
% overcome this problem, you must wrap all or the portion of the text |
| 1045 |
% containing the `]' character, in a pair of curly brackets |
| 1046 |
% (see \cite[\textsection~C.1.1]{Lamp94} for more detail). For example: |
| 1047 |
% \begin{verbatim} |
| 1048 |
% \subfigure[SHIFT: ``register{[3]} $<<=$ 3;'']{... figure text ...} |
| 1049 |
% \end{verbatim} |
| 1050 |
% \vspace{-16pt} |
| 1051 |
% \noindent |
| 1052 |
% or |
| 1053 |
% \vspace{-4pt} |
| 1054 |
% \begin{verbatim} |
| 1055 |
% \subfigure[{SHIFT: ``register[3] $<<=$ 3;''}]{... figure text ...}. |
| 1056 |
% \end{verbatim} |
| 1057 |
% \vspace{-12pt} |
| 1058 |
% \end{enumerate} |
| 1059 |
% |
| 1060 |
% \section{Three Examples} |
| 1061 |
% \label{sec:examples} |
| 1062 |
% |
| 1063 |
% The easiest way to show the use of this package is to give a few |
| 1064 |
% examples. The two most important things to remember when working |
| 1065 |
% with the \Lpack{hhsubfigure} package are that (1) the subfigures are |
| 1066 |
% aligned along their baselines (see figure~\ref{fig:layout} and |
| 1067 |
% section~\ref{sec:customlayout}) and (2) that whitespace in the |
| 1068 |
% \Lenv{figure} environment are significant and affect the layout. |
| 1069 |
% |
| 1070 |
% The baseline of the subfigure is usually at the bottom of the |
| 1071 |
% subfigure or (when the subcaption appears at the top) at the bottom of |
| 1072 |
% the subcaption {\em and\/} the |\subfigcapskip| space---which is usually |
| 1073 |
% the same as the top of the subfigure. However sometimes, especially |
| 1074 |
% when using the \Lenv{tabular}, \Lenv{array}, or \Lenv{minipage} |
| 1075 |
% environments to build the figure, the baseline appears elsewhere. The |
| 1076 |
% above environments are all aligned at their center by default but that |
| 1077 |
% may be changed with the optional `{\bf [t]}' or `{\bf [b]}' arguments. |
| 1078 |
% As a last resort you can wrap all of your figures in a |\vtop| box with |
| 1079 |
% a |\vbox to 0pt{\null}| at the top followed by the figure. |
| 1080 |
% |
| 1081 |
% If your figure is not quite centered or where you want it to be, the |
| 1082 |
% problem is often a space character being placed to one side or the |
| 1083 |
% other of the figure. Some general rules of thumb are:\footnote{See |
| 1084 |
% chapters 7 and 8 of ``The \TeX book'' \cite{Knut86} for details.} |
| 1085 |
% \begin{itemize}\itemsep0pt |
| 1086 |
% \item Two end-of-lines following each other (ignoring any |
| 1087 |
% whitespace) are turned into a |\par| or paragraph break. |
| 1088 |
% \item Multiple whitespace (including the end-of-line) are |
| 1089 |
% compressed into a single space. |
| 1090 |
% \item The spaces after a macro command name ({\it e.g.\/}, |\foo|) |
| 1091 |
% are ignored. |
| 1092 |
% \item A `\%' character at the end of the line suppresses the |
| 1093 |
% end-of-line and all of the spaces (if any) at the |
| 1094 |
% beginning of the next line. |
| 1095 |
% \end{itemize} |
| 1096 |
% |
| 1097 |
% To suppress significant extra whitespace, you can add some `\%' |
| 1098 |
% characters at the end of each line that doesn't end with a command name. |
| 1099 |
% This is more than is required, but extra `\%' usually don't cause a |
| 1100 |
% problem. |
| 1101 |
% |
| 1102 |
% The other case where things are not correctly centered is when the |
| 1103 |
% subfigure uses only the label for the subcaption. This is often the |
| 1104 |
% case when the description for each subfigure is given in the figure |
| 1105 |
% caption rather than in each subcaption. In this case, the default |
| 1106 |
% label has the form `(a)\ \ ' where the trailing space is defined by |
| 1107 |
% |\subfiglabelskip|. In this case the style should redefine this space |
| 1108 |
% as `0pt' so that the label is perfectly centered (see |
| 1109 |
% section~\ref{sec:ex3}, below for an example). |
| 1110 |
% |
| 1111 |
% \subsection{A Simple Example} |
| 1112 |
% \enlargethispage{12pt} |
| 1113 |
% |
| 1114 |
% The first example, shown in figure~\ref{3figs}, specifies |\centering| |
| 1115 |
% \DescribeMacro{\subfigure} |
| 1116 |
% to horizontally center the set of subfigures, and uses |\\| and |
| 1117 |
% some horizontal space (using |\qquad|) to control the placement of |
| 1118 |
% the subfigures. Note that the alignment of the top two subfigures |
| 1119 |
% is along the bottom of the figure portion of each. |
| 1120 |
% |
| 1121 |
% \begin{figure}^ |
| 1122 |
% \centering |
| 1123 |
% \fboxsep=-\fboxrule |
| 1124 |
% \fbox{^ |
| 1125 |
% \begin{minipage}{4.0in}^ |
| 1126 |
% \vspace{10pt}^ |
| 1127 |
% \centering |
| 1128 |
% \begin{minipage}{3.5in}^ |
| 1129 |
% \subfigtopskip=3pt^ |
| 1130 |
% \subfigcapskip=-2pt^ |
| 1131 |
% \subfigbottomskip=5pt^ |
| 1132 |
% \subfigcapmargin=3pt^ |
| 1133 |
% \abovecaptionskip=5pt^ |
| 1134 |
% \centering |
| 1135 |
% \subfigure[First.]{^ |
| 1136 |
% \fbox{\hbox to 20mm{\vbox to 15mm{\vfil\null}\hfil}}}\qquad |
| 1137 |
% \subfigure[Second figure.]{^ |
| 1138 |
% \fbox{\hbox to 20mm{\vbox to 10mm{\vfil\null}\hfil}}}\\[6pt] |
| 1139 |
% \subfigure[Third.]{\label{3figs-c}^ |
| 1140 |
% \fbox{\hbox to 20mm{\vbox to 10mm{\vfil\null}\hfil}}}\\ |
| 1141 |
% \caption{Three subfigures.}^ |
| 1142 |
% \label{3figs}^ |
| 1143 |
% \rr |
| 1144 |
% \vspace{15pt}^ |
| 1145 |
% Figure~\ref{3figs} contains two top `subfigures' and |
| 1146 |
% figure~\ref{3figs-c}.$\!$\footnotemark |
| 1147 |
% \end{minipage}^ |
| 1148 |
% \vspace{4pt}^ |
| 1149 |
% \end{minipage}} |
| 1150 |
% \vspace{-5pt}^ |
| 1151 |
% \end{figure} |
| 1152 |
% \footnotetext{In this and later boxed figures, the boxes are intended to |
| 1153 |
% represent a portion of the page in which the figure occurs. This is |
| 1154 |
% usually to show the figure along with some text or to show the effect |
| 1155 |
% of some option on multiple pages.} |
| 1156 |
% |
| 1157 |
% \begin{verbatim} |
| 1158 |
% \begin{figure}% |
| 1159 |
% \centering |
| 1160 |
% \subfigure[First.]{...}\qquad |
| 1161 |
% \subfigure[Second figure.]{...}\\ |
| 1162 |
% \subfigure[Third.]{\label{3figs-c}...}% |
| 1163 |
% \caption{Three subfigures.} |
| 1164 |
% \label{3figs} |
| 1165 |
% \end{figure} |
| 1166 |
% ... |
| 1167 |
% Figure~\ref{3figs} contains two top `subfigures' and |
| 1168 |
% figure~\ref{3figs-c}. |
| 1169 |
% \end{verbatim} |
| 1170 |
% |
| 1171 |
% \subsection{A More Advanced Example} |
| 1172 |
% |
| 1173 |
% A second example, shown in figure~\ref{fig:ex2}, demonstrates how to |
| 1174 |
% change the subfigure labels and have the subfigure captions printed in |
| 1175 |
% the List-of-Figures. |
| 1176 |
% |
| 1177 |
% The first |\renewcommand| changes the reference to |\thesubfigure| to |
| 1178 |
% return both the figure number and the subfigure number separated with |
| 1179 |
% a period. The next two |\renewcommand|'s turn off the |\p@subfigure| |
| 1180 |
% (since it is now included in |\thesubfigure| and adds the colon and |
| 1181 |
% space to the subfigure label. Later in the file, the |
| 1182 |
% \Lcount{lofdepth} is set to ``2'' so allow the subfigure captions to |
| 1183 |
% show and the |\listoffigures| is loaded. Finally, the \Lenv{figure} |
| 1184 |
% is defined and a little following text is given that refers to it. |
| 1185 |
% |
| 1186 |
% \begin{verbatim} |
| 1187 |
% \renewcommand{\thesubfigure}{\thefigure.\arabic{subfigure}} |
| 1188 |
% \makeatletter |
| 1189 |
% \renewcommand{\p@subfigure}{} |
| 1190 |
% \renewcommand{\@thesubfigure}{\thesubfigure:\hskip\subfiglabelskip} |
| 1191 |
% \makeatother |
| 1192 |
% ... |
| 1193 |
% \setcounter{lofdepth}{2} |
| 1194 |
% \listoffigures |
| 1195 |
% ... |
| 1196 |
% \begin{figure}% |
| 1197 |
% \centering |
| 1198 |
% \subfigure[First.]{% |
| 1199 |
% \label{fig:first}% |
| 1200 |
% ...}% |
| 1201 |
% \qquad |
| 1202 |
% \subfigure[Second.]{% |
| 1203 |
% \label{fig:second}% |
| 1204 |
% ...}% |
| 1205 |
% \caption{Two subfigures.} |
| 1206 |
% \end{figure} |
| 1207 |
% ... |
| 1208 |
% See figures~\ref{fig:first} and \ref{fig:second}. |
| 1209 |
% \end{verbatim}% |
| 1210 |
% |
| 1211 |
% \begin{figure}^ |
| 1212 |
% \centering |
| 1213 |
% \fboxsep=-\fboxrule |
| 1214 |
% \renewcommand{\thesubfigure}{\thefigure.\arabic{subfigure}}^ |
| 1215 |
% \makeatletter |
| 1216 |
% \renewcommand{\p@subfigure}{}^ |
| 1217 |
% \renewcommand{\@thesubfigure}{\thesubfigure:\hskip\subfiglabelskip}^ |
| 1218 |
% \makeatother |
| 1219 |
% \fbox{^ |
| 1220 |
% \begin{minipage}{4.0in}^ |
| 1221 |
% \centering |
| 1222 |
% \begin{minipage}{3.5in}^ |
| 1223 |
% \setcounter{lofdepth}{2}^ |
| 1224 |
% \vspace{.1in}^ |
| 1225 |
% \section*{ List of Figures}^ |
| 1226 |
% \vspace{-15pt}^ |
| 1227 |
% \hspace{40pt}\dots |
| 1228 |
% \vspace{3pt}^ |
| 1229 |
% \contentsline{figure}{\numberline{\ref{fig:ex2}}^ |
| 1230 |
% {\ignorespaces Two subfigures.}}{\pageref{fig:ex2}}^ |
| 1231 |
% \contentsline{subfigure}{\numberline{\ref{fig:first}}^ |
| 1232 |
% {\ignorespaces First.}}{\pageref{fig:first}}^ |
| 1233 |
% \contentsline{subfigure}{\numberline{\ref{fig:second}}^ |
| 1234 |
% {\ignorespaces Second.}}{\pageref{fig:second}}^ |
| 1235 |
% \hspace{40pt}\dots |
| 1236 |
% \vspace{8pt}^ |
| 1237 |
% \end{minipage}^ |
| 1238 |
% \end{minipage}}\\ |
| 1239 |
% \fbox{^ |
| 1240 |
% \begin{minipage}{4.0in}^ |
| 1241 |
% \centering |
| 1242 |
% \begin{minipage}{3.5in}^ |
| 1243 |
% \subfigtopskip=3pt^ |
| 1244 |
% \subfigcapskip=-2pt^ |
| 1245 |
% \abovecaptionskip=5pt^ |
| 1246 |
% \vspace{10pt}^ |
| 1247 |
% \centering |
| 1248 |
% \subfigure[First.]{^ |
| 1249 |
% \label{fig:first}^ |
| 1250 |
% \fbox{\hbox to 22mm{\vbox to 15mm{\vfil\null}\hfil}}}^ |
| 1251 |
% \hspace{14pt}^ |
| 1252 |
% \subfigure[Second.]{^ |
| 1253 |
% \label{fig:second}^ |
| 1254 |
% \fbox{\hbox to 22mm{\vbox to 15mm{\vfil\null}\hfil}}}\\ |
| 1255 |
% \caption{Two subfigures.}^ |
| 1256 |
% \label{fig:ex2}^ |
| 1257 |
% \rr |
| 1258 |
% \vspace{15pt}^ |
| 1259 |
% See figures~\ref{fig:first} and \ref{fig:second}. |
| 1260 |
% \vspace{4pt}^ |
| 1261 |
% \end{minipage}^ |
| 1262 |
% \end{minipage}}^ |
| 1263 |
% \vspace{-8pt} |
| 1264 |
% \end{figure} |
| 1265 |
% \vspace{-12pt}^finalhack |
| 1266 |
% |
| 1267 |
% \subsection{An Example Without Subcaption Text} |
| 1268 |
% \label{sec:ex3} |
| 1269 |
% |
| 1270 |
% The last example, shown in figure~\ref{fig:ex3}, demonstrates a |
| 1271 |
% \DescribeMacro{\subref} |
| 1272 |
% \DescribeMacro{\Subref} |
| 1273 |
% \enlargethispage{12pt} |
| 1274 |
% commonly required format where the subfigure are just labeled and the |
| 1275 |
% description occurs in the main caption. This is easy to do by using |
| 1276 |
% the ``empty'' optional caption arguments ``[\space ][\space ]''. This |
| 1277 |
% creates a label for the subfigure in the text, but it does not show on |
| 1278 |
% the List-of-Figures page. However, by default the caption may not be |
| 1279 |
% perfectly centered, so |\subfiglabelskip| is reduced to zero points to |
| 1280 |
% ensure that there is not any extra space hidden in the subcaption. To |
| 1281 |
% refer to the subfigure label within the text or the main caption, you |
| 1282 |
% can use the |\subref| command, which is similar to the |\ref| command, |
| 1283 |
% but does not carry the figure number. (The |\Subref| command is the |
| 1284 |
% same but sets it with |\subcaplabelfont|). |
| 1285 |
% |
| 1286 |
% \begin{figure}^ |
| 1287 |
% \centering |
| 1288 |
% \fboxsep=-\fboxrule |
| 1289 |
% \subfiglabelskip=0pt |
| 1290 |
% \fbox{^ |
| 1291 |
% \begin{minipage}{4.0in}^ |
| 1292 |
% \centering |
| 1293 |
% \begin{minipage}{3.5in}^ |
| 1294 |
% \setcounter{lofdepth}{2}^ |
| 1295 |
% \vspace{.1in}^ |
| 1296 |
% \section*{ List of Figures}^ |
| 1297 |
% \vspace{-15pt}^ |
| 1298 |
% \hspace{40pt}\dots |
| 1299 |
% \vspace{3pt}^ |
| 1300 |
% \contentsline{figure}{\numberline{\ref{fig:ex3}}^ |
| 1301 |
% {\ignorespaces A set of four subfigures.}}^ |
| 1302 |
% {\pageref{fig:ex3}}^ |
| 1303 |
% \hspace{40pt}\dots |
| 1304 |
% \vspace{8pt}^ |
| 1305 |
% \end{minipage}^ |
| 1306 |
% \end{minipage}}\\ |
| 1307 |
% \fbox{^ |
| 1308 |
% \begin{minipage}{4.0in}^ |
| 1309 |
% \centering |
| 1310 |
% \begin{minipage}{3.5in}^ |
| 1311 |
% \subfigtopskip=3pt^ |
| 1312 |
% \subfigcapskip=-2pt^ |
| 1313 |
% \subfigbottomskip=3pt^ |
| 1314 |
% \abovecaptionskip=5pt^ |
| 1315 |
% \vspace{7pt}^ |
| 1316 |
% \centering |
| 1317 |
% \makeatletter |
| 1318 |
% \subfigure[][]{^ |
| 1319 |
% \label{fig:ex3-a}^ |
| 1320 |
% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}% |
| 1321 |
% \hspace{8pt}% |
| 1322 |
% \subfigure[][]{^ |
| 1323 |
% \label{fig:ex3-b}^ |
| 1324 |
% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}\\ |
| 1325 |
% \subfigure[][]{^ |
| 1326 |
% \label{fig:ex3-c}^ |
| 1327 |
% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}% |
| 1328 |
% \hspace{8pt}% |
| 1329 |
% \subfigure[][]{^ |
| 1330 |
% \label{fig:ex3-d}^ |
| 1331 |
% \fbox{\hbox to 1.2in{\vbox to 15mm{\null\vfil}\hfil}}}% |
| 1332 |
% \caption[A set of four subfigures.]{A set of four subfigures: |
| 1333 |
% \subref{fig:ex3-a} describes the first subfigure; |
| 1334 |
% \subref{fig:ex3-b} describes the second subfigure; |
| 1335 |
% \subref{fig:ex3-c} describes the third subfigure; and, |
| 1336 |
% \subref{fig:ex3-d} describes the last subfigure.}^ |
| 1337 |
% \label{fig:ex3}^ |
| 1338 |
% \rr |
| 1339 |
% \vspace{15pt}^ |
| 1340 |
% The text references the main figure as figure~\ref{fig:ex3} |
| 1341 |
% or part of it as figures~\ref{fig:ex3-a}--\subref{fig:ex3-c}. |
| 1342 |
% \vspace{4pt}^ |
| 1343 |
% \end{minipage}^ |
| 1344 |
% \end{minipage}}^ |
| 1345 |
% \vspace{-12pt} |
| 1346 |
% \end{figure} |
| 1347 |
% |
| 1348 |
% \enlargethispage{12pt} |
| 1349 |
% \begin{verbatim} |
| 1350 |
% \subfiglabelskip=0pt |
| 1351 |
% ... |
| 1352 |
% \listoffigures |
| 1353 |
% ... |
| 1354 |
% \begin{figure}% |
| 1355 |
% \centering |
| 1356 |
% \subfigure[][]{% |
| 1357 |
% \label{fig:ex3-a}% |
| 1358 |
% ...figure code...}% |
| 1359 |
% \hspace{8pt}% |
| 1360 |
% \subfigure[][]{% |
| 1361 |
% \label{fig:ex3-b}% |
| 1362 |
% ...figure code...}\\ |
| 1363 |
% \subfigure[][]{% |
| 1364 |
% \label{fig:ex3-c}% |
| 1365 |
% ...figure code...}% |
| 1366 |
% \hspace{8pt}% |
| 1367 |
% \subfigure[][]{% |
| 1368 |
% \label{fig:ex3-d}% |
| 1369 |
% ...figure code...}% |
| 1370 |
% \caption[A set of four subfigures.]{A set of four subfigures: |
| 1371 |
% \subref{fig:ex3-a} describes the first subfigure; |
| 1372 |
% \subref{fig:ex3-b} describes the second subfigure; |
| 1373 |
% \subref{fig:ex3-c} describes the third subfigure; and, |
| 1374 |
% \subref{fig:ex3-d} describes the last subfigure.}% |
| 1375 |
% \label{fig:ex3}% |
| 1376 |
% \end{figure} |
| 1377 |
% ... |
| 1378 |
% The text references the main figure as figure~\ref{fig:ex3} or part |
| 1379 |
% of it as figures~\ref{fig:ex3-a}--\subref{fig:ex3-c}. |
| 1380 |
% \end{verbatim}% |
| 1381 |
% |
| 1382 |
% \section{Customization} |
| 1383 |
% \label{sec:customization} |
| 1384 |
% |
| 1385 |
% The following sections describe the internal parameters used by the |
| 1386 |
% \Lpack{hhsubfigure} package to define the layout of the subfigures |
| 1387 |
% or tables, as well as the labels and captions the accompany them. |
| 1388 |
% In addition, adjustments to the entries on a ``List-of'' page and |
| 1389 |
% the addition of new \Lenv{float} environments are described. |
| 1390 |
% |
| 1391 |
% Adjusting these values allows extensive customization of the |
| 1392 |
% \Lpack{hhsubfigure} package. If you want to customize the package, an |
| 1393 |
% alternative to actually changing the code is to create a a file called |
| 1394 |
% \Lfile{subfigure.cfg} and place it anywhere that \LaTeX\ will look for |
| 1395 |
% classes or packages. Any changes placed in the file will affect the |
| 1396 |
% predefined parameters and you can override the default settings. Any |
| 1397 |
% user options will be processed after this file is loaded. |
| 1398 |
% |
| 1399 |
% In order to change the major commands in the \Lpack{hhsubfigure} package |
| 1400 |
% with this configure file, you will need to use the |\AtEndOfPackage| |
| 1401 |
% command to defer that portion of your changes until the end of the |
| 1402 |
% package. |
| 1403 |
% |
| 1404 |
% \subsection{Changing the Layout} |
| 1405 |
% \enlargethispage{15pt}^finalhack |
| 1406 |
% \label{sec:customlayout} |
| 1407 |
% |
| 1408 |
% \noindent |
| 1409 |
% The layout of the |\subfigure| or |\subtable| is defined by several |
| 1410 |
% internal values which may be changed to customize appearance of the |
| 1411 |
% object. The following illustration shows the relationship of these |
| 1412 |
% values. Figure~\ref{fig:layout-A} shows the standard layout with the |
| 1413 |
% caption following the figure. The figure is vertically centered with |
| 1414 |
% |\subfigtopskip| of space added above, then |\subfigcapskip| of |
| 1415 |
% space is added below the figure followed by the subcaption and, |
| 1416 |
% finally, |\subfigbottomskip| of space added at the bottom. The baseline |
| 1417 |
% is located at the bottom of the figure. It is along this baseline that |
| 1418 |
% adjacent subfigure boxes are aligned. Figure~\ref{fig:layout-C} shows |
| 1419 |
% the case where the caption precedes the figure ({\it ie.\/}, |
| 1420 |
% |\subfiguretopcaptrue| or |\subtabletopcaptrue|). In this case the |
| 1421 |
% various boxes and glue are reversed,$\!$\footnote{The \cmd{\subfigtopskip} |
| 1422 |
% and \cmd{\subfigbottomskip} actually follow the \Lif{figuretopcap} |
| 1423 |
% and \Lif{tabletopcap} flags, so that the actual top spacing used is |
| 1424 |
% \cmd{\subfigtopskip} when the flags are {\bf false} and |
| 1425 |
% \cmd{\subfigbottomskip} when they are {\bf true}.} |
| 1426 |
% except that the |\subfigcapskip| is increased by |\subfigcaptopadj|. |
| 1427 |
% The other two cases, figures~\ref{fig:layout-B} and |
| 1428 |
% \subref{fig:layout-D}, show the cases where there is no caption. Note |
| 1429 |
% that the |\subfigcapskip| is left out when there is no caption. |
| 1430 |
% Note also, for all of these cases, that the space at the top of the |
| 1431 |
% subfigure is automatically removed for items that are the first box |
| 1432 |
% in a vertical list or other than the first box in a horizontal list. |
| 1433 |
% This allows tighter packing of the subfigures and the full use of |
| 1434 |
% the page or \Lenv{minipage}. |
| 1435 |
% |
| 1436 |
% Each of these values |\subfigtopskip|, |\subfigcapskip|, and |
| 1437 |
% |\subfigbottomskip|; as well as |\subfigcapmargin| and |
| 1438 |
% |\subfiglabelskip| (the latter not shown in figure~\ref{fig:layout}) |
| 1439 |
% may be changed from their defaults (see |
| 1440 |
% table~{\PrintIfDefined{tab:defaults}{\ref{tab:defaults}}{\ref{tab:spacing}}}) |
| 1441 |
% to adjust the subfigure for the current layout style. In addition, |
| 1442 |
% they may all assume negative values, which in some cases may solve |
| 1443 |
% problems with the layout. Even though these constants are ``skips'', |
| 1444 |
% only the last two (|\subfigcapmargin| and |\subfiglabelskip|) will |
| 1445 |
% shrink or expand since the others assume their natural size in the |
| 1446 |
% subfigure box and are fixed at that size. |
| 1447 |
% |
| 1448 |
% \begin{figure}[p] |
| 1449 |
% \subfigtopskip=10pt^ |
| 1450 |
% \subfigcapskip=4pt^ |
| 1451 |
% \subfigbottomskip=12pt^ |
| 1452 |
% \abovecaptionskip=3pt^ |
| 1453 |
% \centering |
| 1454 |
% \fboxsep=-\fboxrule |
| 1455 |
% \newbox{\tempbox} |
| 1456 |
% \newdimen{\tempdima} |
| 1457 |
% \newdimen{\tempdimb} |
| 1458 |
% \setbox\tempbox\hbox{ |
| 1459 |
% $\stackrel{\longleftrightarrow}{\cs{subfigcapmargin}}$} |
| 1460 |
% \setbox\tempbox\hbox{\cs{subfigcapmargin}} |
| 1461 |
% \tempdimb \wd\tempbox |
| 1462 |
% \setbox\tempbox\hbox to \tempdimb{^ |
| 1463 |
% \kern -.5mm\hbox{$\leftarrow$}\kern -.5mm^ |
| 1464 |
% \leaders\hrule width1pt height2.6pt depth-2.2pt\hfill |
| 1465 |
% \kern -.13mm$\rightarrow$} |
| 1466 |
% \tempdima \wd\tempbox |
| 1467 |
% \advance\tempdima 1mm |
| 1468 |
% \tempdimb \tempdima |
| 1469 |
% \multiply\tempdimb -2 |
| 1470 |
% \advance\tempdimb 4.5in |
| 1471 |
% \advance\tempdimb -4mm |
| 1472 |
% \subfigure[Standard layout {[FIGBOTCAP] or [TABBOTCAP]}.]{ |
| 1473 |
% \label{fig:layout-A} |
| 1474 |
% \fbox{\parbox{4.5in}{ |
| 1475 |
% \vspace{1pt} |
| 1476 |
% \hbox to 4.5in{ |
| 1477 |
% \hspace{1.5in} |
| 1478 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1479 |
% (\cs{subfigtopskip}) |
| 1480 |
% \hfil} |
| 1481 |
% \fbox{\vbox to 45pt{ |
| 1482 |
% \vskip1pt |
| 1483 |
% \vskip\baselineskip |
| 1484 |
% \vfil |
| 1485 |
% \hbox to 4.5in{ |
| 1486 |
% \hfil |
| 1487 |
% {\scshape subfigure} or {\scshape subtable} |
| 1488 |
% \hfil} |
| 1489 |
% \vfil |
| 1490 |
% \vbox to 0pt{% |
| 1491 |
% \vss |
| 1492 |
% \hbox to 4.5in{ |
| 1493 |
% \hspace{9pt} |
| 1494 |
% {\small Baseline} |
| 1495 |
% \hfil}} |
| 1496 |
% \vspace{1pt}}} |
| 1497 |
% \hbox to 4.5in{ |
| 1498 |
% \hspace{1.5in} |
| 1499 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1500 |
% \cs{subfigcapskip} |
| 1501 |
% \hfil} |
| 1502 |
% \hbox to 4.5in{ |
| 1503 |
% \hbox to\tempdima{ |
| 1504 |
% \vbox to 20pt{ |
| 1505 |
% \vfil |
| 1506 |
% \copy\tempbox |
| 1507 |
% \vfil |
| 1508 |
% \hbox{\kern .5mm\cs{subfigcapmargin}} |
| 1509 |
% \vfil}} |
| 1510 |
% \fbox{\vbox to 20pt{ |
| 1511 |
% \vfil |
| 1512 |
% \hbox to\tempdimb{ |
| 1513 |
% \hfil |
| 1514 |
% {\scshape subcaption} |
| 1515 |
% \hfil} |
| 1516 |
% \vfil}} |
| 1517 |
% \hbox to\tempdima{ |
| 1518 |
% \vbox to 20pt{ |
| 1519 |
% \vfil |
| 1520 |
% \copy\tempbox |
| 1521 |
% \vfil |
| 1522 |
% \hbox{\kern .5mm\cs{subfigcapmargin}} |
| 1523 |
% \vfil}} |
| 1524 |
% \hfill} |
| 1525 |
% \hbox to 4.5in{ |
| 1526 |
% \hspace{1.5in} |
| 1527 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1528 |
% \cs{subfigbottomskip} |
| 1529 |
% \hfil}}}} |
| 1530 |
% |
| 1531 |
% \subfigure[Standard layout {[FIGBOTCAP] or [TABBOTCAP]} with no |
| 1532 |
% caption present.]{ |
| 1533 |
% \label{fig:layout-B} |
| 1534 |
% \fbox{\parbox{4.5in}{ |
| 1535 |
% \vspace{1pt} |
| 1536 |
% \hbox to 4.5in{ |
| 1537 |
% \hspace{1.5in} |
| 1538 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1539 |
% (\cs{subfigtopskip}) |
| 1540 |
% \hfil} |
| 1541 |
% \fbox{\vbox to 45pt{ |
| 1542 |
% \vskip1pt |
| 1543 |
% \vskip\baselineskip |
| 1544 |
% \vfil |
| 1545 |
% \hbox to 4.5in{ |
| 1546 |
% \hfil |
| 1547 |
% {\scshape subfigure} or {\scshape subtable} |
| 1548 |
% \hfil} |
| 1549 |
% \vfil |
| 1550 |
% \hbox to 4.5in{ |
| 1551 |
% \hspace{9pt} |
| 1552 |
% {\small Baseline} |
| 1553 |
% \hfil} |
| 1554 |
% \vspace{1pt}}} |
| 1555 |
% \hbox to 4.5in{ |
| 1556 |
% \hspace{1.5in} |
| 1557 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1558 |
% \cs{subfigbottomskip} |
| 1559 |
% \hfil}}}} |
| 1560 |
% |
| 1561 |
% \subfigure[Reversed layout {[FIGTOPCAP] or [TABTOPCAP]}.]{ |
| 1562 |
% \label{fig:layout-C} |
| 1563 |
% \fbox{\parbox{4.5in}{ |
| 1564 |
% \vspace{1pt} |
| 1565 |
% \hbox to 4.5in{ |
| 1566 |
% \hspace{1.5in} |
| 1567 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1568 |
% (\cs{subfigbottomskip}) |
| 1569 |
% \hfil} |
| 1570 |
% \hbox to 4.5in{ |
| 1571 |
% \hbox to\tempdima{ |
| 1572 |
% \vbox to 20pt{ |
| 1573 |
% \vfil |
| 1574 |
% \copy\tempbox |
| 1575 |
% \vfil |
| 1576 |
% \hbox{\kern -.5mm\cs{subfigcapmargin}} |
| 1577 |
% \vfil}} |
| 1578 |
% \fbox{\vbox to 20pt{ |
| 1579 |
% \vfil |
| 1580 |
% \hbox to\tempdimb{ |
| 1581 |
% \hfil |
| 1582 |
% {\scshape subcaption} |
| 1583 |
% \hfil} |
| 1584 |
% \vfil}} |
| 1585 |
% \hbox to\tempdima{ |
| 1586 |
% \vbox to 20pt{ |
| 1587 |
% \vfil |
| 1588 |
% \box\tempbox |
| 1589 |
% \vfil |
| 1590 |
% \hbox{\kern -.5mm\cs{subfigcapmargin}} |
| 1591 |
% \vfil}} |
| 1592 |
% \hfill} |
| 1593 |
% \hbox to 4.5in{ |
| 1594 |
% \hbox to 0pt{ |
| 1595 |
% \hspace{9pt} |
| 1596 |
% \smash{\raisebox{-6.5pt}{\small Baseline}} |
| 1597 |
% \hss} |
| 1598 |
% \hspace{1.5in} |
| 1599 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1600 |
% \cs{subfigcapskip}$+$\cs{subfigcaptopadj} |
| 1601 |
% \hfil} |
| 1602 |
% \fbox{\vbox to 45pt{ |
| 1603 |
% \vfil |
| 1604 |
% \hbox to 4.5in{ |
| 1605 |
% \hfil |
| 1606 |
% {\scshape subfigure} or {\scshape subtable} |
| 1607 |
% \hfil} |
| 1608 |
% \vfil}} |
| 1609 |
% \hbox to 4.5in{ |
| 1610 |
% \hspace{1.5in} |
| 1611 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1612 |
% \cs{subfigtopskip} |
| 1613 |
% \hfil}}}} |
| 1614 |
% |
| 1615 |
% \subfigure[Reversed layout {[FIGTOPCAP] or [TABTOPCAP]} with no |
| 1616 |
% caption present.]{ |
| 1617 |
% \label{fig:layout-D} |
| 1618 |
% \fbox{\parbox{4.5in}{ |
| 1619 |
% \vspace{1pt} |
| 1620 |
% \hbox to 4.5in{ |
| 1621 |
% \hbox to 0pt{ |
| 1622 |
% \hspace{9pt} |
| 1623 |
% \smash{\raisebox{-6.5pt}{\small Baseline}} |
| 1624 |
% \hss} |
| 1625 |
% \hspace{1.5in} |
| 1626 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1627 |
% (\cs{subfigbottomskip}) |
| 1628 |
% \hfil} |
| 1629 |
% \fbox{\vbox to 45pt{ |
| 1630 |
% \vfil |
| 1631 |
% \hbox to 4.5in{ |
| 1632 |
% \hfil |
| 1633 |
% {\scshape subfigure} or {\scshape subtable} |
| 1634 |
% \hfil} |
| 1635 |
% \vfil}} |
| 1636 |
% \hbox to 4.5in{ |
| 1637 |
% \hspace{1.5in} |
| 1638 |
% $\left\updownarrow\vrule width0pt height11pt depth1pt\right.$ |
| 1639 |
% \cs{subfigtopskip} |
| 1640 |
% \hfil}}}} |
| 1641 |
% \caption{Subfigure and subtable layout.} |
| 1642 |
% \label{fig:layout} |
| 1643 |
% \end{figure} |
| 1644 |
% |
| 1645 |
% \subsection{Adjusting the Subcaption} |
| 1646 |
% \label{sec:customlabel} |
| 1647 |
% |
| 1648 |
% The subfigure label has three forms. The first is the one that |
| 1649 |
% \DescribeMacro{\subref} |
| 1650 |
% \DescribeMacro{\Subref} |
| 1651 |
% appears in the text when you use the |\ref| command; the second is the |
| 1652 |
% one that appears on the List-of-Figures page and may be used to |
| 1653 |
% reference individual subfigures within the figure and subfigure captions, |
| 1654 |
% using the |\subref| or |\Subref| commands; and the third is the fully |
| 1655 |
% formatted version used under the subfigure as the label part of the caption. |
| 1656 |
% |
| 1657 |
% The |\ref| command yields the string, saved by the |\label| command, |
| 1658 |
% composed by concatenating the value of |\p@subfigure| to |
| 1659 |
% |\thesubfigure|. By default these are defined by: ``|\thefigure|'' |
| 1660 |
% and ``|(\alph{subfigure})|'', respectively, which produces a reference |
| 1661 |
% of the figure number followed by the subfigure letter in parentheses. |
| 1662 |
% |
| 1663 |
% The label used on the List-of-Figures page may be retrieved with the |
| 1664 |
% |\subref| command (this value is saved by the |\label| command when |
| 1665 |
% the |\label| command is used within the scope of the subfigure. This is |
| 1666 |
% the string defined by |\@@thesubfigure|, which, by default, is the |
| 1667 |
% value ``|\thesubfigure|'' (or ``|(\alph{subfigure})|''). |
| 1668 |
% |
| 1669 |
% The label used with the subcaption text is defined by the internal |
| 1670 |
% value |\@thesubfigure|, which, by default, has the |
| 1671 |
% value\hfil\null\linebreak |
| 1672 |
% \centerline{``\cmd{\thesubfigure}\cmd{\hskip}\cmd{\subfiglabelskip}''.} |
| 1673 |
% It is prefixed by |\subcapsize\subcaplabelfont| and followed by the |
| 1674 |
% subcaption text which is set with |\subcapfont|. |
| 1675 |
% |
| 1676 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the label and caption defaults |
| 1677 |
% from \cmd{\rmfamily}\cmd{\mdseries}\cmd{\upshape} to |
| 1678 |
% \cmd{\familydefault}\cmd{\seriesdefault} \cmd{\shapedefault}.} |
| 1679 |
% Note that by default |\subcaplabelfont| has the default value |
| 1680 |
% ``|{\familydefault| |\seriesdefault\shapedefault}|''. The package |
| 1681 |
% options described in table~\ref{tab:options} allow you to set these |
| 1682 |
% values for your paper. If you update the |\@subfigure| command, you |
| 1683 |
% should include any separator character or spacing between the label |
| 1684 |
% and the start of the subcaption text. The default is |
| 1685 |
% |\hskip\subfiglabelskip| placed after the label. |
| 1686 |
% |
| 1687 |
% Finally, the text of the subcaption is prefixed by |\subcapfont| which |
| 1688 |
% may be changed using the set of nine lower-case font options described |
| 1689 |
% in table~\ref{tab:options}\@.$\!$\footnote{It is also prefixed by |
| 1690 |
% \cmd{\subcapsize} as part of the overall label and caption.} \ One other |
| 1691 |
% way of changing the layout of the lapel and caption is by replacing |
| 1692 |
% the |\@makesubfigurecaption| or |\@makesubtablecaption| command (which |
| 1693 |
% by default are identical). |
| 1694 |
% |
| 1695 |
% \subsection{Adjusting the Subfigure and Subtable Counters} |
| 1696 |
% \label{sec:counters} |
| 1697 |
% |
| 1698 |
% To create some special effects, such as continuing the subfigure |
| 1699 |
% \DescribeMacro{\c@figure} |
| 1700 |
% \DescribeMacro{\c@table} |
| 1701 |
% numbering across several pages as part of one long continued figure, |
| 1702 |
% you can back off the number change from a caption with the command: |
| 1703 |
% \begin{quote} |
| 1704 |
% |\addtocounter{|\Lcount{figure}|}{|-1|}| |
| 1705 |
% \end{quote} |
| 1706 |
% within the \Lenv{figure} environment. In addition, you can adjust for |
| 1707 |
% previous subfigures or subtables with one of the following (here |
| 1708 |
% we assume that two subfigures or subtables appeared in the previous |
| 1709 |
% pages: |
| 1710 |
% \begin{quote} |
| 1711 |
% |\addtocounter{|\Lcount{subfigure}|}{|2|}| |
| 1712 |
% \end{quote} |
| 1713 |
% \vspace{-5pt} |
| 1714 |
% \noindent |
| 1715 |
% or |
| 1716 |
% \vspace{-5pt} |
| 1717 |
% \begin{quote} |
| 1718 |
% |\addtocounter{|\Lcount{subtable}|}{|2|}|. |
| 1719 |
% \end{quote} |
| 1720 |
% |
| 1721 |
% Two other things that may be necessary, if you switch between figures |
| 1722 |
% and tables in the same \Lenv{figure} environment ({\it e.g.\/}, by |
| 1723 |
% changing |\@captype|, see section~\ref{sec:float_env}), is to add the |
| 1724 |
% command |\listsubcaptions| following the last subfigure when the |
| 1725 |
% subfigure is using the \Lopt{TOPCAP} or \Lopt{topcap} option. This is |
| 1726 |
% necessary to flush the list of subcaptions before the next |
| 1727 |
% \Lenv{subfigure} or \Lenv{subtable}. This also may be necessary if |
| 1728 |
% you switch between |\figuretopcaptrue| and |\figuretopcapfalse|. The |
| 1729 |
% other thing that may be required in some cases, is to reset the |
| 1730 |
% subfigure counter by entering: |
| 1731 |
% \begin{quote} |
| 1732 |
% |\setcounter{|\Lcount{subfigure}|}{|0|}| |
| 1733 |
% \end{quote} |
| 1734 |
% \noindent |
| 1735 |
% This should only be necessary if you are dynamically switching between |
| 1736 |
% different \Lpack{hhsubfigure} options, or changing the |\@captype|, |
| 1737 |
% within a float environment. |
| 1738 |
% |
| 1739 |
% \subsection{Modifying the List-of-Figures and List-of-Tables} |
| 1740 |
% \label{sec:listof} |
| 1741 |
% |
| 1742 |
% To generate a List-of-Figures, or List-of-Tables, page you need to |
| 1743 |
% \DescribeMacro{\l@subfigure} |
| 1744 |
% \DescribeMacro{\@dottedxxxline} |
| 1745 |
% add a |\listoffigures| or |\listoftables| command where |
| 1746 |
% you want the list to appear. These |
| 1747 |
% commands also cause the appropriate captions and subcaptions to be |
| 1748 |
% written to a file with the extensions \Lfile{lof} (\Lfile{lot}). If |
| 1749 |
% you want the subcaption text to appear in the List-of-Figures or |
| 1750 |
% List-of-Tables page, you need to change the value of the counter |
| 1751 |
% \Lcount{lofdepth} (\Lcount{lotdepth}) counter from its default of `1'. |
| 1752 |
% For example, to have the \Lpack{hhsubfigure} subcaptions to appear on |
| 1753 |
% the List-of-Figures, add the following to the preamble of your |
| 1754 |
% paper: |
| 1755 |
% \begin{quote} |
| 1756 |
% |\setcounter{|\Lcount{lofdepth}|}{2}| |
| 1757 |
% \end{quote} |
| 1758 |
% |
| 1759 |
% If you want to change how the subcaption appears on the ``List-of'' |
| 1760 |
% pages you can change its format by redefining the |\l@subfigure| |
| 1761 |
% or |\l@subtable| command. Usually you will want to use the |
| 1762 |
% |\@dottedxxxline| command |
| 1763 |
% \PrintIfDefined{sec:dl}{(section~\ref{sec:dl}, |
| 1764 |
% page~\pageref{sec:dl})\space}{} to help with the formatting. For |
| 1765 |
% instance the default value of |\l@subfigure| is: |
| 1766 |
% |
| 1767 |
% \begin{verbatim} |
| 1768 |
% \newcommand{\l@subfigure}{% |
| 1769 |
% \@dottedxxxline{\ext@subfigure}{2}{3.8em}{2.5em}} |
| 1770 |
% \end{verbatim} |
| 1771 |
% \vspace{-10pt} |
| 1772 |
% |
| 1773 |
% \noindent |
| 1774 |
% The arguments of the |\@dottedxxxline| command are: |
| 1775 |
% \begin{quote} |
| 1776 |
% \begin{enumerate} |
| 1777 |
% \itemsep -\parsep |
| 1778 |
% \item \underline{\smash{\textsf{Type}}}. The usual values are |
| 1779 |
% : \Lfile{lof} or \Lfile{lot}. The internal |
| 1780 |
% values |\ext@subfigure| and |\ext@subtable| stand for |
| 1781 |
% these extensions. |
| 1782 |
% \item \underline{\textsf{Level}}. By default this is `2' |
| 1783 |
% for the \Lcount{subfigure} and \Lcount{subtable}. If the level |
| 1784 |
% is greater than \Lcount{\meta{Type}depth} (where |
| 1785 |
% \underline{\smash{\meta{Type}}} is the first argument, above), |
| 1786 |
% then no line is produced. |
| 1787 |
% \item \underline{\textsf{Indent}}. Total indentation |
| 1788 |
% from the left margin. |
| 1789 |
% \item \underline{\textsf{Numwidth}}. Width of box for the |
| 1790 |
% label number if the \underline{\textsf{Title}} has a |
| 1791 |
% |\numberline| command. This is also the amount of extra |
| 1792 |
% indentation added to second and later lines of a multiple |
| 1793 |
% line entry. |
| 1794 |
% \item \underline{\textsf{Title}}. Contents of entry ({\it e.g.\/} the |
| 1795 |
% \meta{list\_entry} or \meta{subcaption}). |
| 1796 |
% \item \underline{\smash{\textsf{Page}}}. The page number of the |
| 1797 |
% figure or table. |
| 1798 |
% \end{enumerate} |
| 1799 |
% \end{quote} |
| 1800 |
% |
| 1801 |
% \noindent |
| 1802 |
% The final two arguments, \underline{\textsf{title}} and |
| 1803 |
% \underline{\smash{\textsf{page}}}, are automatically appended to the |
| 1804 |
% value of |\l@subfigure| (and symmetrically for |\l@subtable|). |
| 1805 |
% |
| 1806 |
% For example, to change the amount of space reserved for the label |
| 1807 |
% (if, for instance, you have a lot of figures and the and you need extra |
| 1808 |
% space for the figure number) you could widen the |
| 1809 |
% \texttt{2.5em} space for the label to \texttt{4.0em}: |
| 1810 |
% \begin{verbatim} |
| 1811 |
% \makeatletter |
| 1812 |
% \renewcommand{\l@subfigure}{% |
| 1813 |
% \@dottedxxxline{\ext@subfigure}{2}{3.8em}{4.0em}} |
| 1814 |
% \makeatother |
| 1815 |
% \end{verbatim} |
| 1816 |
% |
| 1817 |
% \subsection{Aligning Captions Above the Figure} |
| 1818 |
% \label{sec:custom-position} |
| 1819 |
% |
| 1820 |
% \begin{figure}^ |
| 1821 |
% \figuretopcaptrue |
| 1822 |
% \subfigtopskip=-5pt^ |
| 1823 |
% \subfigcapskip=-3pt^ |
| 1824 |
% \subfigbottomskip=2pt^ |
| 1825 |
% \centering |
| 1826 |
% \caption{Caption position option: [\Lopt{figtopcap}] with changing |
| 1827 |
% settings of \cmd{\subfiguretopcap}.}^ |
| 1828 |
% \label{fig:position3}^ |
| 1829 |
% \subfiguretopcapfalse |
| 1830 |
% \subfigure[First caption.]{\hbox to 1.5in{\hfil\null}}^ |
| 1831 |
% \hspace{0.2in}^ |
| 1832 |
% \subfigure[Second long, long, long, long, |
| 1833 |
% long, long, long, long caption.]{^ |
| 1834 |
% \hbox to 1.5in{\hfil\null}}\\[5pt] |
| 1835 |
% \subfiguretopcaptrue |
| 1836 |
% \subfigure{\fbox{\hbox to 1.5in{\vbox to 15mm{\vfil\null}\hfil}}}^ |
| 1837 |
% \hspace{0.2in}^ |
| 1838 |
% \subfigure{\fbox{\hbox to 1.5in{\vbox to 10mm{\vfil\null}\hfil}}}^ |
| 1839 |
% \setcounter{subfigure}{0} |
| 1840 |
% \end{figure} |
| 1841 |
% |
| 1842 |
% \noindent |
| 1843 |
% For unbalanced sets of captions placed, above the figures or tables, |
| 1844 |
% \DescribeMacro{\subfiguretopcaptrue} |
| 1845 |
% \DescribeMacro{\subfiguretopcapfalse} |
| 1846 |
% \DescribeMacro{\figuretopcaptrue} |
| 1847 |
% the caption portion looks unbalanced, such as the ones in |
| 1848 |
% figure~\ref{fig:position2}. If you prefer to have the caption portion |
| 1849 |
% aligned along the top rather than the bottom, as shown in |
| 1850 |
% figure~\ref{fig:position3}, you can use the |
| 1851 |
% \Lopt{figtopcap} option as in figure~\ref{fig:position2}, but use |
| 1852 |
% two ``empty'' subfigures to position the captions followed by |
| 1853 |
% two more containing the figures, but without captions. The code |
| 1854 |
% to produce this example is: |
| 1855 |
% |
| 1856 |
% \begin{verbatim} |
| 1857 |
% \begin{figure}% |
| 1858 |
% \centering |
| 1859 |
% \caption{Caption position option: [\Lopt{figtopcap}] with changing |
| 1860 |
% settings of \subfiguretopcap.}% |
| 1861 |
% \label{fig:position3}% |
| 1862 |
% \subfiguretopcapfalse |
| 1863 |
% \subfigure[First caption.]{\hbox to 1.5in{\hfil\null}}% |
| 1864 |
% \hspace{0.2in}% |
| 1865 |
% \subfigure[Second long, long, long, long, |
| 1866 |
% long, long, long, long caption.]{% |
| 1867 |
% \hbox to 1.5in{\hfil\null}}\\[5pt] |
| 1868 |
% \subfiguretopcaptrue |
| 1869 |
% \subfigure{\fbox{\hbox to 1.5in{\vbox to 15mm{\vfil\null}\hfil}}}% |
| 1870 |
% \hspace{0.2in}% |
| 1871 |
% \subfigure{\fbox{\hbox to 1.5in{\vbox to 10mm{\vfil\null}\hfil}}}% |
| 1872 |
% \end{figure} |
| 1873 |
% \end{verbatim} |
| 1874 |
% |
| 1875 |
% This example makes use of one of the four flags that control how the |
| 1876 |
% caption labels are numbered and where the subcaption appears. Two are |
| 1877 |
% for |\subfigure| and two for |\subtable|. The first of each set tell |
| 1878 |
% the |\subfigure| or |\subtable| command that the related main caption |
| 1879 |
% appears before or after the set of subfloats. |\figuretopcaptrue| and |
| 1880 |
% |\tabletopcaptrue| indicate that the caption appears before and |
| 1881 |
% |\figureotopcapfalse| and |\tabletopcapfalse| indicate that the it |
| 1882 |
% appears after. The other two flags force the subcaption to be placed |
| 1883 |
% before (|\subfiguretopcaptrue| and |\subtabletopcaptrue|) or after the |
| 1884 |
% actual subfigure or subtable (|\subfiguretopcapfalse| and |
| 1885 |
% |\subtabletopcapfalse|). |
| 1886 |
% |
| 1887 |
% There are two difficulties with this approach, first, you need to keep |
| 1888 |
% changing the setting of |\subfiguretopcap|, and second, if you have |
| 1889 |
% more than one row of subfigures or subtables, then you will need to |
| 1890 |
% fiddle with the counter (see section~\ref{sec:counters} to keep the |
| 1891 |
% numbers straight. The reason that this format is not supported by the |
| 1892 |
% \Lpack{hhsubfigure} package is that you need information about all of |
| 1893 |
% the subfigure or subtables on a row to box the figures correctly and |
| 1894 |
% this information is not available locally. |
| 1895 |
% |
| 1896 |
% \subsection{Adding Subfloats to New Environments} |
| 1897 |
% \enlargethispage{15pt}^finalhack |
| 1898 |
% \label{sec:customfloat} |
| 1899 |
% |
| 1900 |
% It is easy to add a \Lenv{subfloat} command to a new environment. For |
| 1901 |
% instance, let us assume we have a new \Lenv{float} |
| 1902 |
% environment\footnote{For information on creating new float |
| 1903 |
% environments, see any of the following: \cite{Lamp01}, \cite{Wils01} |
| 1904 |
% or \cite{Ling01}.} called ``\Lenv{map}'' in which various maps are |
| 1905 |
% displayed and for which a List-of-Maps is to be generated in the |
| 1906 |
% contents section. If we wanted to have \Lenv{submaps}, then we could |
| 1907 |
% define the following: |
| 1908 |
% |
| 1909 |
% \vspace{-4pt} |
| 1910 |
% \begin{verbatim} |
| 1911 |
% \makeatletter |
| 1912 |
% \newcounter{submap}[map] |
| 1913 |
% \newif\ifmaptopcap |
| 1914 |
% \newif\ifsubmaptopcap |
| 1915 |
% \newcommand{\p@submap}{\themap} |
| 1916 |
% \newcommand{\thesubmap}{(\alph{submap})} |
| 1917 |
% \newcommand{\@thesubmap}{\themap\hskip\subfiglabelskip} |
| 1918 |
% \newcommand{\@@thesubmap}{\themap} |
| 1919 |
% \newcommand{\ext@submap}{\ext@map} |
| 1920 |
% \newcommand{\l@submap}{\@dottedxxxline{\ext@submap}{2}{3.8em}{2.5em}} |
| 1921 |
% \newcounter{lomdepth} |
| 1922 |
% \setcounter{lomdepth}{1} |
| 1923 |
% \newcommand{\submap}{\subfigure} |
| 1924 |
% \newcommand{\@makesubmapcaption}{\@makesubfigurecaption} |
| 1925 |
% \ifhyperrefloaded |
| 1926 |
% \newcommand\theHsubmap{\themap.\arabic{submap}} |
| 1927 |
% \newcommand{\toclevel@submap}{1} |
| 1928 |
% \fi |
| 1929 |
% \makeatother |
| 1930 |
% \end{verbatim} |
| 1931 |
% \vspace{-14pt} |
| 1932 |
% |
| 1933 |
% The first and last lines make the character `@' act like a letter |
| 1934 |
% between them and therefore it may be part of a command name used there. |
| 1935 |
% First a new counter for the \Lpack{submap} is created along with two |
| 1936 |
% conditionals that define where the position ({\i.e.\/}, above or |
| 1937 |
% below) of the main caption and subcaption is with respect to the |
| 1938 |
% submap. Then the four commands that define the \Lpack{submap} label |
| 1939 |
% are created. The first two, |\p@submap| and |\thesubmap| define the |
| 1940 |
% standard label returned by |\ref|. The next, |\@thesubmap| gives the |
| 1941 |
% label as shown under or over the submap with the subcaption and the |
| 1942 |
% last, |\@@thesubmap| shows how the label is displayed on the List-of-Maps |
| 1943 |
% and/or referenced with the |\subref| command. |
| 1944 |
% |
| 1945 |
% The next four lines show where and how to print to the List-of-Maps |
| 1946 |
% page: |\ext@submap| gives the List-of-Maps file extension; |\l@submap| |
| 1947 |
% shows how to print the submap line on the List-of-Maps page; and the last |
| 1948 |
% two lines show how to create and set the counter \Lcount{lomdepth}, which |
| 1949 |
% controls how many caption levels are shown on the page when it is printed. |
| 1950 |
% |
| 1951 |
% The next two lines create the |\submap| and |\@makesubmapcaption| |
| 1952 |
% commands by making them the same as the |\subfigure| and |
| 1953 |
% |\@makesubfigurecaption| commands. |
| 1954 |
% |
| 1955 |
% The last four lines conditionally create the |\theHsubmap| and |
| 1956 |
% |\toclevel@submap| commands which are used by the \Lpack{hyperref} |
| 1957 |
% Package to name the item and to control the presence of the item |
| 1958 |
% bookmark. |
| 1959 |
% |
| 1960 |
% Of course, this is where the \Lpack{ccaption} package \cite{Wils01} |
| 1961 |
% comes in handy since it will do all of the above with one command: |
| 1962 |
% |
| 1963 |
% \vspace{-4pt} |
| 1964 |
% \begin{verbatim} |
| 1965 |
% \newsubfloat{map} |
| 1966 |
% \end{verbatim} |
| 1967 |
% \vspace{-10pt} |
| 1968 |
% |
| 1969 |
% |
| 1970 |
% \subsection{Interaction with Other Parts of \LaTeX} |
| 1971 |
% In the following sections, the interaction of the \Lpack{hhsubfigure} |
| 1972 |
% package with other parts of \LaTeX\ is documented. These ``other |
| 1973 |
% parts'' may be either part of the the \LaTeX\ base or contributed |
| 1974 |
% packages or classes. |
| 1975 |
% |
| 1976 |
% \subsubsection{\TeX 's ``Mouth''} |
| 1977 |
% The most important thing to remember when laying out your figures |
| 1978 |
% within a \Lenv{float} environment is that spaces take room. If you |
| 1979 |
% have an extra space between two figures, then they will be separated |
| 1980 |
% by a little bit. |
| 1981 |
% |
| 1982 |
% \TeX 's state varies as it reads a line of text from a file. It |
| 1983 |
% ignores some spaces and carriage-returns and converts others to |
| 1984 |
% |\space|'s or |\par|'s. You can use a `|%|' to insure that you only |
| 1985 |
% have real spaces where you want them. To understand which spaces |
| 1986 |
% are significant, you should read chapters~7 and 8 of the \TeX book |
| 1987 |
% \cite{Knut86}. However, the main source of unexpected |
| 1988 |
% extra spacing is carriage-returns which are turned in to |\space|'s. |
| 1989 |
% As a general rule: if in doubt, then add a `|%|' immediately after |
| 1990 |
% the last significant character of the line. |
| 1991 |
% |
| 1992 |
% \subsubsection{The Float Environment} |
| 1993 |
% \label{sec:float_env} |
| 1994 |
% |
| 1995 |
% Although the \Lpack{hhsubfigure} package was designed to work within a |
| 1996 |
% \Lenv{float} environment ({\it e.g.\/}, \Lenv{figure} or |
| 1997 |
% \Lenv{table}), it can be used outside with the following two caveats: |
| 1998 |
% \begin{enumerate}\itemsep=5pt |
| 1999 |
% \item You need to define |\@captype|. This is usually either |
| 2000 |
% \Lenv{figure} or \Lenv{table}. For example add the following |
| 2001 |
% to the preamble of your document: |
| 2002 |
% \begin{verbatim} |
| 2003 |
% \makeatletter |
| 2004 |
% \newcommand{\change_cap_type}[1]{% |
| 2005 |
% \renewcommand{\@captype}{#1}} |
| 2006 |
% \makeatother |
| 2007 |
% \end{verbatim}\vspace{-15pt} |
| 2008 |
% Then use the new command to switch in the middle of a given |
| 2009 |
% \Lenv{float} environment, say from ``figure'' to ``table'' with |
| 2010 |
% the command |\change_cap_type{table}|. |
| 2011 |
% \item If you want to define references using |\label|, then you also |
| 2012 |
% need to redefine the \LaTeX\ internal |\@currentlabel|. For |
| 2013 |
% example: |
| 2014 |
% \begin{verbatim} |
| 2015 |
% \makeatletter |
| 2016 |
% \edef\@currentlabel{\p@subfigure\thesubfigure} |
| 2017 |
% \makeatother |
| 2018 |
% \end{verbatim}\vspace{-15pt} |
| 2019 |
% before using the |\label| command. NOTE: Many other commands change |
| 2020 |
% |\@currentlabel|, including all of the ``section'' commands, |
| 2021 |
% |\caption|, \Lenv{equation}'s, and \Lenv{theorem}'s. |
| 2022 |
% \end{enumerate} |
| 2023 |
% |
| 2024 |
% \subsubsection{Interaction with Other Packages} |
| 2025 |
% |
| 2026 |
% \changes{v2.1}{22 Jan 2001}{Added \Lpack{ccaption} reference.} |
| 2027 |
% |
| 2028 |
% \changes{v2.1}{11 Oct 1996}{Revised subsubsection on use with |
| 2029 |
% the caption package and extended this section to talk about the |
| 2030 |
% \Lpack{captcont} package.} |
| 2031 |
% |
| 2032 |
% \noindent |
| 2033 |
% The only packages that directly interact with the \Lpack{hhsubfigure} |
| 2034 |
% package are the \Lpack{caption}/\Lpack{caption2} packages by |
| 2035 |
% H.A. Sommerfeldt \cite{Somm95a,Somm95b}, the \Lpack{ccaption} package |
| 2036 |
% and \Lpack{tocloft} packages by Peter Wilson \cite{Wils01,Wils01B}, |
| 2037 |
% and the \Lpack{captcont} package by S.D. Cochran \cite{Coch02}. |
| 2038 |
% |
| 2039 |
% \paragraph{\Lpack{caption}} |
| 2040 |
% |
| 2041 |
% If you load the \Lpack{hhsubfigure} package {\bf before} the |
| 2042 |
% \Lpack{caption} package, then the \Lpack{caption} package will detect |
| 2043 |
% that fact and will change the |\subcapsize| when the options |
| 2044 |
% \Lopt{scriptsize}, \ldots, \Lopt{Large} are specified (overriding such |
| 2045 |
% options used when loading the \Lpack{hhsubfigure} package). In |
| 2046 |
% addition, it redefines |\@thesubfigure| and |\@thesubtable| to use |
| 2047 |
% |\captionlabelfont|. It also uses an older layout of |
| 2048 |
% |\@thesubsubfigure| and |\@thesubtable|. |
| 2049 |
% |
| 2050 |
% The best plan is to load the \Lpack{caption} package {\bf before} the |
| 2051 |
% \Lpack{hhsubfigure} package. In addition, you should try to coordinate |
| 2052 |
% the ``look and feel'' of the two packages. This limits you a little |
| 2053 |
% since, although the two packages have similar options, the options in |
| 2054 |
% the \Lpack{caption} package do not combine the same way. You can pick |
| 2055 |
% one from each column:\par\null |
| 2056 |
% |
| 2057 |
% \DeleteShortVerb{\|} |
| 2058 |
% \noindent\hfil\begin{tabular}{*{4}{p{17mm}|}p{17mm}} |
| 2059 |
% \rr \Lopt{normal}, \Lopt{hang}, \Lopt{center}, \Lopt{centerlast} & |
| 2060 |
% \rr \Lopt{nooneline} & |
| 2061 |
% \rr \Lopt{scriptsize}, \Lopt{footnotesize}, \Lopt{small}, |
| 2062 |
% \Lopt{normalsize}, \Lopt{large}, \Lopt{Large} & |
| 2063 |
% \rr \Lopt{up}, \Lopt{it}, \Lopt{sl}, \Lopt{sc}, \Lopt{md}, |
| 2064 |
% \Lopt{bf}, \Lopt{rm}, \Lopt{sf}, \Lopt{tt} & |
| 2065 |
% \rr (Other options---see package.) |
| 2066 |
% \end{tabular} |
| 2067 |
% \MakeShortVerb{\|} |
| 2068 |
% \vskip14pt |
| 2069 |
% |
| 2070 |
% \paragraph{\Lpack{caption2}} |
| 2071 |
% |
| 2072 |
% This package acts similarly to the \Lpack{caption} package. If you |
| 2073 |
% specify the \Lopt{subfigure} it will try to support the subfigure |
| 2074 |
% package, if you specify \Lopt{nosubfigure} than it will not. If |
| 2075 |
% neither option is specified, than load order matters. If loaded |
| 2076 |
% {\bf before} the \Lpack{hhsubfigure} package, than it will not try to |
| 2077 |
% support the package and if loaded {\bf after} it will. |
| 2078 |
% |
| 2079 |
% Again, the best plan is to load the \Lpack{caption2} package |
| 2080 |
% {\bf before} the \Lpack{hhsubfigure} package, and specify the |
| 2081 |
% \Lopt{nosubfigure} option. In addition, you should try to coordinate |
| 2082 |
% the ``look and feel'' of the two packages. This limits you a little |
| 2083 |
% since, although the two packages have similar options, they are not |
| 2084 |
% exactly the same; however, most of the good looking combinations are |
| 2085 |
% easily available. You can pick one from each column:\par\null |
| 2086 |
% |
| 2087 |
% \DeleteShortVerb{\|} |
| 2088 |
% \noindent\hfil\begin{tabular}{*{5}{p{17mm}|}p{17mm}} |
| 2089 |
% \rr \Lopt{nosubfigure}, \Lopt{subfigure} & |
| 2090 |
% \rr \Lopt{normal}, \Lopt{hang}, \Lopt{center}, \Lopt{centerlast} |
| 2091 |
% \Lopt{flushleft}, \Lopt{indent} & |
| 2092 |
% \rr \Lopt{oneline}, \Lopt{nooneline} & |
| 2093 |
% \rr \Lopt{scriptsize}, \Lopt{footnotesize}, \Lopt{small}, |
| 2094 |
% \Lopt{normalsize}, \Lopt{large}, \Lopt{Large} & |
| 2095 |
% \rr \Lopt{up}, \Lopt{it}, \Lopt{sl}, \Lopt{sc}, \Lopt{md}, |
| 2096 |
% \Lopt{bf}, \Lopt{rm}, \Lopt{sf}, \Lopt{tt}^, |
| 2097 |
%^ \Lopt{UP}, \Lopt{IT}, \Lopt{SL}, \Lopt{SC}, \Lopt{MD}, |
| 2098 |
%^ \Lopt{BF}, \Lopt{RM}, \Lopt{SF}, \Lopt{TT} |
| 2099 |
% & |
| 2100 |
% \rr (Other options---see package.) |
| 2101 |
% \end{tabular} |
| 2102 |
% \MakeShortVerb{\|} |
| 2103 |
% |
| 2104 |
% \paragraph{\Lpack{ccaption}} |
| 2105 |
% |
| 2106 |
% The \Lpack{ccaption} package provides for all sorts of extensions and |
| 2107 |
% style options for \Lenv{float} |\captions|. It also provides for the |
| 2108 |
% use of the |\caption| command outside of a \Lenv{float} environment and |
| 2109 |
% a mechanism for creating new types of \Lenv{float} environments. |
| 2110 |
% |
| 2111 |
% In order to use it with the \Lpack{hhsubfigure} package, you need to |
| 2112 |
% pass the \Lopt{subfigure} option when loading it: |
| 2113 |
% |
| 2114 |
% \begin{quote} |
| 2115 |
% |\usepackage|[subfigure]\{ccaption\} |
| 2116 |
% \end{quote} |
| 2117 |
% |
| 2118 |
% \paragraph{\Lpack{tocloft}} |
| 2119 |
% |
| 2120 |
% The \Lpack{tocloft} package gives the user the ability to easily |
| 2121 |
% configure the ``List-of'' pages. It takes a \Lopt{subfigure} option |
| 2122 |
% so it doesn't matter which package is loaded first. |
| 2123 |
% |
| 2124 |
% \begin{quote} |
| 2125 |
% |\usepackage|[subfigure]\{tocloft\} |
| 2126 |
% \end{quote} |
| 2127 |
% |
| 2128 |
% \paragraph{\Lpack{hyperref}} |
| 2129 |
% \label{sec:hyperref} |
| 2130 |
% |
| 2131 |
% \changes{v2.1.2}{26 Mar 2002}{Improved coordination with the hyperref |
| 2132 |
% package.} |
| 2133 |
% |
| 2134 |
% \changes{v2.1.1}{15 Mar 2002}{Added coordination with the hyperref |
| 2135 |
% package. There is some interaction with the \cmd{label} command as |
| 2136 |
% pointed out by [email protected].} |
| 2137 |
% |
| 2138 |
% The \Lpack{hyperref} package extends the functionality of all of the |
| 2139 |
% \LaTeX\ cross-referencing commands to produce hypertext links. In |
| 2140 |
% addition, it provides new commands to allow the user to insert |
| 2141 |
% hypertext links. When used with the \Lpack{hhsubfigure} package, they |
| 2142 |
% may be loaded in any order; however, it might be better if the |
| 2143 |
% \Lpack{hhsubfigure} package is loaded {\bf first}. |
| 2144 |
% |
| 2145 |
% To more fully support the \Lpack{hyperref} package, the |\label| |
| 2146 |
% \DescribeMacro{\subfloat@label} |
| 2147 |
% command, when used within the scope of the |\subfigure| or |\subtable| |
| 2148 |
% commands takes an optional argument (note the parentheses rather than |
| 2149 |
% square brackets): |
| 2150 |
% \vspace{-2pt} |
| 2151 |
% \begin{quote} |
| 2152 |
% |\label|\parg{bookmark}\marg{key} |
| 2153 |
% \end{quote} |
| 2154 |
% \vspace{-2pt} |
| 2155 |
% |
| 2156 |
% \noindent |
| 2157 |
% We would like to use the subcaption as the bookmark text, but the |
| 2158 |
% |\label| command is often processed before the subcaption. Therefore, |
| 2159 |
% this optional argument may be used to supply this information if |
| 2160 |
% desired. By default a bookmark field of the form |
| 2161 |
% ``Subfigure\textvisiblespace 1(a)'' will be generated. |
| 2162 |
% \footnote{If the document class is \Lpack{report} or other class that |
| 2163 |
% defines \cmd{\thechapter}, than the default bookmark field will be of the |
| 2164 |
% form ``Subfigure\textvisiblespace 1 \textvisiblespace 1(a)''.} |
| 2165 |
% |
| 2166 |
% |
| 2167 |
% \paragraph{\Lpack{captcont}} |
| 2168 |
% |
| 2169 |
% This package may be used with or without the \Lpack{hhsubfigure} package |
| 2170 |
% \DescribeMacro{\caption} |
| 2171 |
% \DescribeMacro{\caption*} |
| 2172 |
% \DescribeMacro{\captcont} |
| 2173 |
% \DescribeMacro{\captcont*} |
| 2174 |
% to extend figure or table numbering across multiple pages. This |
| 2175 |
% package knows about how the \Lpack{hhsubfigure} package interacts with |
| 2176 |
% the List-of-Figures and List-of-Tables and does the right thing when |
| 2177 |
% used with \Lenv{subfigure}'s and \Lenv{subtable}'s. |
| 2178 |
% |
| 2179 |
% The \Lpack{captcont} package may be loaded either {\bf before} or |
| 2180 |
% {\bf after} the \Lpack{hhsubfigure} and it has four options: |
| 2181 |
% \Lopt{figbotcap} or \Lopt{figtopcap} and \Lopt{tabbotcap} or |
| 2182 |
% \Lopt{tabtopcap}. These are the same as the \Lpack{hhsubfigure} |
| 2183 |
% options. When the \Lpack{captcont} package is used with the |
| 2184 |
% \Lpack{hhsubfigure} package, only the \Lpack{hhsubfigure} options matter. |
| 2185 |
% Any given with the \Lpack{captcont} package are ignored. |
| 2186 |
% |
| 2187 |
% The thing to remember about the \Lpack{captcont} package is that if |
| 2188 |
% you normally place the |\caption| {\bf before} your subfigures or |
| 2189 |
% subtables ({\it i.e.\/}, \Lopt{figtopcap} or \Lopt{tabtopcap} |
| 2190 |
% respectively), then you start a series of continued \Lenv{figure}'s |
| 2191 |
% with the |\caption[*]| and use |\contcapt[*]| in each of the rest of |
| 2192 |
% the figures. If you {\bf follow} your subfigures or subtables with a |
| 2193 |
% caption ({\it i.e.\/}, \Lopt{figbotcap} or \Lopt{tabbotcap} |
| 2194 |
% respectively), then you start the series with the |\contcapt[*]| in |
| 2195 |
% the first \Lenv{figure} environment and all but the last where you use |
| 2196 |
% the |\caption[*]|. |
| 2197 |
% |
| 2198 |
% \subsubsection{Creating a \Lenv{subfigure} Environment} |
| 2199 |
% |
| 2200 |
% \changes{v2.1.4}{24 Apr 2002}{Added \cmd{\label} command handling |
| 2201 |
% example in the \Lenv{subfloat} environment, thanks to Lars Clausen.} |
| 2202 |
% |
| 2203 |
% Some people have wanted to use the \Lenv{verbatim} environment within |
| 2204 |
% \DescribeEnv{subfloat} |
| 2205 |
% the \cmd{\subfigure} command and run into the restriction that the |
| 2206 |
% \Lenv{verbatim} environment cannot be nested. To include verbatim text in |
| 2207 |
% a subfigure, you can define a new environment, in which verbatim |
| 2208 |
% text may be enclosed, and which calls the \cmd{\subfigure} command. |
| 2209 |
% \vspace{-2pt} |
| 2210 |
% \begin{verbatim} |
| 2211 |
% \newbox\subfigbox % Create a box to hold the subfigure. |
| 2212 |
% \makeatletter |
| 2213 |
% \newenvironment{subfloat}% % Create the new environment. |
| 2214 |
% {\def\caption##1{\gdef\subcapsave{\relax##1}}% |
| 2215 |
% \let\subcapsave=\@empty % Save the subcaption text. |
| 2216 |
% \let\sf@oldlabel=\label |
| 2217 |
% \def\label##1{\xdef\sublabsave{\noexpand\label{##1}}}% |
| 2218 |
% \let\sublabsave\relax % Save the label key. |
| 2219 |
% \setbox\subfigbox\hbox |
| 2220 |
% \bgroup}% % Open the box... |
| 2221 |
% {\egroup % ... close the box and call \subfigure. |
| 2222 |
% \let\label=\sf@oldlabel |
| 2223 |
% \subfigure[\subcapsave]{\box\subfigbox}}% |
| 2224 |
% \makeatother |
| 2225 |
% \end{verbatim} |
| 2226 |
% \enlargethispage{12pt}^finalhack |
| 2227 |
% \noindent |
| 2228 |
% The following is an example of this \Lenv{subfloat} environment begin |
| 2229 |
% used to produce figure~\ref{fig:verbatim}. Note that you need to |
| 2230 |
% supply the width of the \Lenv{verbatim}; here we use a section using a |
| 2231 |
% \Lenv{minipage}). |
| 2232 |
% \begingroup |
| 2233 |
% \newbox\subfigbox |
| 2234 |
% \makeatletter |
| 2235 |
% \newenvironment{subfloat}^ |
| 2236 |
% {\def\caption##1{\gdef\subcapsave{\relax##1}}^ |
| 2237 |
% \let\subcapsave=\@empty |
| 2238 |
% \let\sf@oldlabel=\label |
| 2239 |
% \def\label##1{\xdef\sublabsave{\noexpand\label{##1}}}^ |
| 2240 |
% \let\sublabsave\relax |
| 2241 |
% \setbox\subfigbox\hbox |
| 2242 |
% \bgroup}^ |
| 2243 |
% {\egroup |
| 2244 |
% \let\label=\sf@oldlabel |
| 2245 |
% \subfigure[\subcapsave]{\box\subfigbox\sublabsave}}^ |
| 2246 |
% \makeatother |
| 2247 |
% \begin{figure} |
| 2248 |
% \centering |
| 2249 |
% \subfigtopskip=0pt^ |
| 2250 |
% \subfigcapskip=0pt^ |
| 2251 |
% \subfigbottomskip=0pt^ |
| 2252 |
% \begin{subfloat}^ |
| 2253 |
% \begin{minipage}{2.1in} |
| 2254 |
% \begin{verbatim} |
| 2255 |
% This text should be |
| 2256 |
% verbatim. And not |
| 2257 |
% messed with in any way ! |
| 2258 |
% \end{verbatim} |
| 2259 |
% \end{minipage}^ |
| 2260 |
% \caption{First subcaption.}^ |
| 2261 |
% \label{fig:verbone} |
| 2262 |
% \end{subfloat}^ |
| 2263 |
% \hspace{10pt}^ |
| 2264 |
% \begin{subfloat}^ |
| 2265 |
% \begin{minipage}{2.1in} |
| 2266 |
% \begin{verbatim} |
| 2267 |
% This text (also)should be |
| 2268 |
% verbatim. And not |
| 2269 |
% messed with in any way ! |
| 2270 |
% \end{verbatim} |
| 2271 |
% \end{minipage}^ |
| 2272 |
% \caption{Second subcaption.}^ |
| 2273 |
% \label{fig:verbtwo} |
| 2274 |
% \end{subfloat} |
| 2275 |
% \caption{Subfigures~\subref{fig:verbone} and \subref{fig:verbtwo} |
| 2276 |
% show examples of using verbatim text in a subfigure.} |
| 2277 |
% \label{fig:verbatim} |
| 2278 |
% \end{figure} |
| 2279 |
% \endgroup |
| 2280 |
% \begin{quote}\ |
| 2281 |
% |\begin{figure}| \\ |
| 2282 |
% | \centering| |
| 2283 |
% | \begin{subfloat}%| \\ |
| 2284 |
% | \begin{minipage}{2.1in}| \\ |
| 2285 |
% | \begin{verbatim}| \\ |
| 2286 |
% | This text should be| \\ |
| 2287 |
% |verbatim. And not| \\ |
| 2288 |
% | messed with in any way !| \\ |
| 2289 |
% | \end{verbatim}| \\ |
| 2290 |
% | \end{minipage}%| \\ |
| 2291 |
% | \caption{First subcaption.}%| \\ |
| 2292 |
% | \label{fig:verbone}| \\ |
| 2293 |
% | \end{subfloat}%| \\ |
| 2294 |
% | \qquad| \\ |
| 2295 |
% | \begin{subfloat}%| \\ |
| 2296 |
% | \begin{minipage}{2.1in}| \\ |
| 2297 |
% | \begin{verbatim}| \\ |
| 2298 |
% | This text (also)should be| \\ |
| 2299 |
% |verbatim. And not| \\ |
| 2300 |
% | messed with in any way !| \\ |
| 2301 |
% | \end{verbatim}| \\ |
| 2302 |
% | \end{minipage}%| \\ |
| 2303 |
% | \caption{Second subcaption.}%| \\ |
| 2304 |
% | \label{fig:verbtwo}| \\ |
| 2305 |
% | \end{subfloat}| \\ |
| 2306 |
% | \caption{Subfigures~\subref{fig:verbone} and \subref{fig:verbtwo}| \\ |
| 2307 |
% | show examples of using verbatim text in a subfigure.}| \\ |
| 2308 |
% | \label{fig:verbatim}| \\ |
| 2309 |
% |\end{figure}| |
| 2310 |
% \end{quote} |
| 2311 |
% |
| 2312 |
% |
| 2313 |
% \StopEventually{^ |
| 2314 |
% \section{Acknowledgements} |
| 2315 |
% |
| 2316 |
% This package was originally written to automatically line up some |
| 2317 |
% figure boxes and place labels under them for a paper that I was |
| 2318 |
% writing. I thought it useful and uploaded it to the internet |
| 2319 |
% community and later to CTAN. Many people have asked questions or |
| 2320 |
% given comments which collectively have changed and improved the |
| 2321 |
% usefulness of this package. |
| 2322 |
% |
| 2323 |
% A few people have contributed more than most and I want to thank |
| 2324 |
% them publicly, but in no particular order: |
| 2325 |
% |
| 2326 |
% \begin{itemize}\itemsep=-2pt^finalhack |
| 2327 |
% \item{\bf Harald Axel Sommerfeldt} for the work that he did to adjust |
| 2328 |
% his \Lpack{caption} and \Lpack{caption2} packages as necessary to |
| 2329 |
% support the \Lpack{hhsubfigure} package when they are loaded together. |
| 2330 |
% \item {\bf Peter Wilson} for the work that he did to adjust his |
| 2331 |
% \Lpack{ccaption} package (and other packages) as necessary to support |
| 2332 |
% the \Lpack{hhsubfigure} package when they are loaded together. |
| 2333 |
% \item {\bf William `bil' L. Kleb} for his extensive list of errors and |
| 2334 |
% suggestions to this documentation. |
| 2335 |
% \item{\bf Axel Reichert} for his request for a `hang' caption style |
| 2336 |
% since the subcaptions tend to have a short width. And, for his |
| 2337 |
% request for some way of referencing the individual subfigures in |
| 2338 |
% the main caption without the figure number. |
| 2339 |
% \item{\bf Harald Harders} for his suggestion of the \cmd{\subref} |
| 2340 |
% command and modifying \cmd{\label} within the \Lpack{hhsubfigure} |
| 2341 |
% package to save local references to the subfigures that are often |
| 2342 |
% needed. |
| 2343 |
% \item{\bf Heiko Oberdiek} and {\bf James A. Bednar} for their help |
| 2344 |
% with coexisting with the \Lpack{hyperref} and \Lpack{html} packages. |
| 2345 |
% Also, {\bf Ingele Roelens} for pointing out some further compatibility |
| 2346 |
% problems when using the \Lpack{hyperref} package with PDF\LaTeX. |
| 2347 |
% \item{\bf Frederic Darboux} for searching out and finding several |
| 2348 |
% incompatibilities with other packages. |
| 2349 |
% |
| 2350 |
% \end{itemize} |
| 2351 |
% |
| 2352 |
% \newpage^finalhack |
| 2353 |
% |
| 2354 |
% \begin{thebibliography}{6}^\itemsep=-2pt^finalhack |
| 2355 |
% \itemsep=0.8pt |
| 2356 |
% \bibitem{Somm95a}^ |
| 2357 |
% Harald Axel Sommerfeldt, |
| 2358 |
% \emph{The \Lpack{caption} Package}, |
| 2359 |
% Version 1.4b, 1995/04/05. |
| 2360 |
% (Available from CTAN as file \texttt{caption.dtx}.) |
| 2361 |
% \bibitem{Somm95b}^ |
| 2362 |
% Harald Axel Sommerfeldt, |
| 2363 |
% \emph{The \Lpack{caption} Package}, |
| 2364 |
% Version 2.0(beta), 1995/10/09. |
| 2365 |
% (Available from CTAN as file \texttt{caption2.dtx}.) |
| 2366 |
% \bibitem{Wils01}^ |
| 2367 |
% Peter Wilson, |
| 2368 |
% \emph{The \Lpack{ccaption} Package}, |
| 2369 |
% Version 1.0a, 2001/08/15. |
| 2370 |
% (Available from CTAN as file \texttt{ccaption.dtx}.) |
| 2371 |
% \bibitem{Wils01B}^ |
| 2372 |
% Peter Wilson, |
| 2373 |
% \emph{The \Lpack{tocloft} Package}, |
| 2374 |
% Version 2.2, 2001/14/17. |
| 2375 |
% (Available from CTAN as file \texttt{ccaption.dtx}.) |
| 2376 |
% \bibitem{Raht02}^ |
| 2377 |
% Sebastian Rahtz, |
| 2378 |
% \emph{Hypertext marks in \LaTeX}, |
| 2379 |
% 2002/04/05/. |
| 2380 |
% (Available from CTAN as file \texttt{hyperref.dtx}.) |
| 2381 |
% \bibitem{Coch02}^ |
| 2382 |
% Steven Douglas Cochran, |
| 2383 |
% \emph{The \Lpack{captcont} Package}, |
| 2384 |
% 2002/02/14/. |
| 2385 |
% (Available from CTAN as file \texttt{captcont.dtx}.) |
| 2386 |
% \bibitem{Reck97}^ |
| 2387 |
% Keith Reckdahl, |
| 2388 |
% \emph{Using Imported Graphics in \LaTeXe}, |
| 2389 |
% 1997/12/15. |
| 2390 |
% (Available from CTAN as file \texttt{epslatex.pdf}) |
| 2391 |
% \bibitem{Lamp94}^ |
| 2392 |
% Leslie Lamport, |
| 2393 |
% \emph{LaTeX User's Guide and Reference Manual}, 2nd edition, |
| 2394 |
% Addison-Wesley, Reading, Massachusetts, |
| 2395 |
% 1994. |
| 2396 |
% \bibitem{Knut86}^ |
| 2397 |
% Donald Ervin Knuth, |
| 2398 |
% \emph{The \TeX book}, |
| 2399 |
% Addison-Wesley, Reading, Massachusetts, |
| 2400 |
% 1986. |
| 2401 |
% \bibitem{Lamp01}^ |
| 2402 |
% Leslie Lamport, Frank Mittelbach, and Johannes Braams, |
| 2403 |
% \emph{Standard Document Classes for \LaTeX\ version 2e} |
| 2404 |
% Version 1.4e, 2001/04/01. |
| 2405 |
% (Available from CTAN as file \texttt{classes.dtx}.) |
| 2406 |
% \bibitem{Ling01}^ |
| 2407 |
% Anselm Lingnau, |
| 2408 |
% \emph{An Improved Environment for Floats.} |
| 2409 |
% Version 1.3d, 2001/11/08. |
| 2410 |
% (Available from CTAN as file \texttt{float.dtx}.) |
| 2411 |
% \end{thebibliography}} |
| 2412 |
% |
| 2413 |
% \section{The Code} |
| 2414 |
% \iffalse |
| 2415 |
%<*package> |
| 2416 |
% \fi |
| 2417 |
% \subsection{Identification} |
| 2418 |
% |
| 2419 |
% \changes{v2.1}{23 Jan 2002}{Updated the release date.} |
| 2420 |
% |
| 2421 |
% \changes{v2.1}{11 Oct 1996}{Removed compatibility with \LaTeX2.09.} |
| 2422 |
% |
| 2423 |
% Announce the \Lpack{hhsubfigure} package. |
| 2424 |
% |
| 2425 |
% \begin{macrocode} |
| 2426 |
\NeedsTeXFormat{LaTeX2e}[1994/12/01] |
| 2427 |
\ProvidesPackage{hhsubfigure}[2003/09/14 v2.1.4a (hh)subfigure package] |
| 2428 |
% \end{macrocode} |
| 2429 |
% |
| 2430 |
% \subsection{Check for the \Lpack{hyperref} Package} |
| 2431 |
% |
| 2432 |
% \changes{v2.1.4}{02 Jul 2002}{Added the \cmd{\theHsubfigure} and |
| 2433 |
% \cmd{\theHsubtable} commands to avoid duplicate names in a PDF |
| 2434 |
% file when using the \Lpack{hyperref} Package.} |
| 2435 |
% |
| 2436 |
% \changes{v2.1.3}{17 Apr 2002}{Changed \cmd{\newcommand} to |
| 2437 |
% \cmd{\providecommand} to allow other packages to set the |
| 2438 |
% \cmd{\toclevel@subfigure} and \cmd{\toclevel@subtable}.} |
| 2439 |
% |
| 2440 |
% \changes{v2.1.2}{26 Mar 2002}{Changed to simplify the interaction |
| 2441 |
% with the hyperref package and avoid loading nameref.} |
| 2442 |
% |
| 2443 |
% \changes{v2.1.1}{15 Mar 2002}{Added coordination with the hyperref |
| 2444 |
% package.} |
| 2445 |
% |
| 2446 |
% \begin{macro}{\toclevel@subfigure} |
| 2447 |
% \begin{macro}{\toclevel@subtable} |
| 2448 |
% |
| 2449 |
% After every package is loaded, check to see if the \Lpack{hyperref} |
| 2450 |
% package was among them, if so, then make sure that the |\ifhyperrefloaded| |
| 2451 |
% switch is set so that the |\subfloat@label| command will write the correct |
| 2452 |
% form of the |\newlabel| to the \Lfile{aux} file. Also define the |
| 2453 |
% ``TOC level'' of the subfigure and subtable. We fix these at one since |
| 2454 |
% the default figure and table levels are zero. Finally, we add definitions |
| 2455 |
% for |\theHsubfigure| and |\theHsubtable| to avoid duplicate names in |
| 2456 |
% the PDF file when using the \Lpack{hyperref} Package. |
| 2457 |
% |
| 2458 |
% \begin{macrocode} |
| 2459 |
\newif\ifhyperrefloaded |
| 2460 |
\AtBeginDocument{% |
| 2461 |
\@ifpackageloaded{hyperref}{% |
| 2462 |
\hyperrefloadedtrue |
| 2463 |
\providecommand\theHsubfigure{\thefigure.\arabic{subfigure}}% |
| 2464 |
\providecommand\theHsubtable{\thetable.\arabic{subtable}}% |
| 2465 |
\providecommand{\toclevel@subfigure}{1}% |
| 2466 |
\providecommand{\toclevel@subtable}{1}}{}} |
| 2467 |
% \end{macrocode} |
| 2468 |
% |
| 2469 |
% \end{macro} |
| 2470 |
% \end{macro} |
| 2471 |
% |
| 2472 |
% \subsection{Initialization and Shared Constants} |
| 2473 |
% \begin{macro}{\ifsubcaphang} |
| 2474 |
% \begin{macro}{\ifsubcapcenter} |
| 2475 |
% \begin{macro}{\ifsubcapcenterlast} |
| 2476 |
% \begin{macro}{\ifsubcapnooneline} |
| 2477 |
% \begin{macro}{\ifsubcapraggedright} |
| 2478 |
% |
| 2479 |
% \changes{v2.1}{23 Jan 2002}{Added.} |
| 2480 |
% |
| 2481 |
% These five flags control how the style in which the subfloat label and |
| 2482 |
% caption are printed. The \Lif{subcaphang} flag is first checked and |
| 2483 |
% if true, causes the subcaption label to be typeset separately and |
| 2484 |
% placed to the upper left of the space available for the subcaption. |
| 2485 |
% The \Lif{subcapcenter} flag centers each line of the subcaption. The |
| 2486 |
% \Lif{subcapcenterlast} centers the last line of the subcaption (this |
| 2487 |
% is a {\sc nop} if the \Lif{subcapcenter} flag is true. If the |
| 2488 |
% \Lif{subcapnooneline} is false, then the label plus the text of the |
| 2489 |
% subcaption are centered. If it is true, than the other flags may |
| 2490 |
% cause something different to happen. The purpose of this flag, |
| 2491 |
% generally, is to cause a single line to be left justified when there |
| 2492 |
% is a very short caption. The last flag is the \Lif{subcapraggedright} |
| 2493 |
% which typsets its text without lining up the right side. This is |
| 2494 |
% useful for the subcaptions since they are usually short and prone to |
| 2495 |
% generating hyphenated words unless allowed to be ragged. |
| 2496 |
% |
| 2497 |
% \begin{macrocode} |
| 2498 |
\newif\ifsubcaphang |
| 2499 |
\newif\ifsubcapcenter |
| 2500 |
\newif\ifsubcapcenterlast |
| 2501 |
\newif\ifsubcapnooneline |
| 2502 |
\newif\ifsubcapraggedright |
| 2503 |
\newif\ifsubcapRaggedRight |
| 2504 |
% \end{macrocode} |
| 2505 |
% \end{macro} |
| 2506 |
% \end{macro} |
| 2507 |
% \end{macro} |
| 2508 |
% \end{macro} |
| 2509 |
% \end{macro} |
| 2510 |
% |
| 2511 |
% \noindent |
| 2512 |
% Table~\ref{tab:defaults} gives the initial (default) values of the |
| 2513 |
% internals that are used to control the placement and printing of the |
| 2514 |
% subfloats. |
| 2515 |
% |
| 2516 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the label and caption defaults |
| 2517 |
% from \cmd{\rmfamily}\cmd{\mdseries}\cmd{\upshape} to |
| 2518 |
% \cmd{\familydefault}\cmd{\seriesdefault} \cmd{\shapedefault}.} |
| 2519 |
% \DeleteShortVerb{\|} |
| 2520 |
% \MakeShortVerb{\/} |
| 2521 |
% \begin{table}^ |
| 2522 |
% \def\pz{\phantom{0}}^ |
| 2523 |
% \def\M#1{\vspace*{#1}} |
| 2524 |
% \caption[Default values of the Subfigure constants.]% |
| 2525 |
% {Default values of the Subfigure constants. These |
| 2526 |
% values are set during the options processing (see |
| 2527 |
% section~\ref{sec:startup}).}^ |
| 2528 |
% \label{tab:defaults}^ |
| 2529 |
% \vspace{5pt}^ |
| 2530 |
% \begin{minipage}{4.8in}^ |
| 2531 |
% \setlength\tabcolsep{5pt}^ |
| 2532 |
% \rr |
| 2533 |
% \begin{tabular}{|l|c|p{1.3in}|p{1.963in}|}\hline |
| 2534 |
% \multicolumn{1}{|c|}{\raisebox{-1.5ex}{\bf Command}} |
| 2535 |
% & \multicolumn{1}{c|}{\bf \Lopt{loose}} |
| 2536 |
% & \multicolumn{1}{c|}{\bf \Lopt{tight}} |
| 2537 |
% & |
| 2538 |
% \multicolumn{1}{c|}{\raisebox{-1.5ex}{\bf Description}} |
| 2539 |
% \\ |
| 2540 |
% & \multicolumn{1}{c|}{\bf Option} |
| 2541 |
% & \multicolumn{1}{c|}{\bf Option} |
| 2542 |
% & \\ \hline |
| 2543 |
% \raisebox{-2.1ex}{\cmd{\subfigtopskip}} |
| 2544 |
% & \raisebox{-2.1ex}{10 pt} |
| 2545 |
% & \M{0.6ex}\hfil 5 pt |
| 2546 |
% & \rr Length from the top of the subfloat |
| 2547 |
% box to the beginning of the figure. |
| 2548 |
% \\ \hline |
| 2549 |
% \raisebox{-1.5ex}{\cmd{\subfigcapskip}} |
| 2550 |
% & \raisebox{-1.5ex}{10 pt} |
| 2551 |
% & \M{0.0ex}\hfil 0 pt |
| 2552 |
% & \rr Length between the baseline of the |
| 2553 |
% subcaption and the figure. |
| 2554 |
% \\ \hline |
| 2555 |
% \raisebox{-2.1ex}{\cmd{\subfigcaptopadj}} |
| 2556 |
% & \raisebox{-2.1ex}{\pz0 pt} |
| 2557 |
% & \M{0.4ex}\hfil 3 pt |
| 2558 |
% & \rr Length added to /\subfigcapskip/ |
| 2559 |
% when the caption is above the figure. |
| 2560 |
% \\ \hline |
| 2561 |
% \raisebox{-2.1ex}{\cmd{\subfigbottomskip}} |
| 2562 |
% & \raisebox{-2.1ex}{10 pt} |
| 2563 |
% & \M{0.7ex}\hfil 5 pt |
| 2564 |
% & \rr Length from the bottom of the |
| 2565 |
% subcaption to the bottom of the |
| 2566 |
% subfloat. |
| 2567 |
% \\ \hline |
| 2568 |
% \raisebox{-3.5ex}{\cmd{\subfigcapmargin}} |
| 2569 |
% & \raisebox{-3.5ex}{10 pt} |
| 2570 |
% & \M{2.0ex}\hfil 0 pt |
| 2571 |
% & \rr Indentation of the subcaption from |
| 2572 |
% the sides of the subfloat box. (This |
| 2573 |
% should always be positive or zero.) |
| 2574 |
% \\ \hline |
| 2575 |
% \raisebox{-1.5ex}{\cmd{\subfiglabelskip}} |
| 2576 |
% & \raisebox{-1.5ex}{0.33 em} |
| 2577 |
% & \raggedleft 0.33 em plus 0.07 em minus 0.03 em |
| 2578 |
% & \rr Space between the label and the |
| 2579 |
% text of the subcaption. |
| 2580 |
% \\ \hline |
| 2581 |
% \raisebox{-1.5ex}{\cmd{\subcapsize}} |
| 2582 |
% & \multicolumn{2}{c|}{\raisebox{-1.5ex}{footnotesize}} |
| 2583 |
% & \rr Size for the text portion of the |
| 2584 |
% subcaption font. |
| 2585 |
% \\ \hline |
| 2586 |
% \raisebox{-1.5ex}{\cmd{\subcaplabelfont}} |
| 2587 |
% & \multicolumn{2}{c|}{\raisebox{-1.5ex}{(Default family, series and shape)}} |
| 2588 |
% & \rr Font for the label portion of the |
| 2589 |
% subcaption. |
| 2590 |
% \\ \hline |
| 2591 |
% \raisebox{-1.5ex}{\cmd{\subcapfont}} |
| 2592 |
% & \multicolumn{2}{c|}{\raisebox{-1.5ex}{(Default family, series and shape)}} |
| 2593 |
% & \rr Font for the text portion of the |
| 2594 |
% subcaption. |
| 2595 |
% \\ \hline |
| 2596 |
% \end{tabular} |
| 2597 |
% \end{minipage} |
| 2598 |
% \end{table} |
| 2599 |
% \DeleteShortVerb{\/} |
| 2600 |
% \MakeShortVerb{\|} |
| 2601 |
% |
| 2602 |
% \begin{macro}{\subfigtopskip} |
| 2603 |
% \begin{macro}{\subfigcapskip} |
| 2604 |
% \begin{macro}{\subfigcaptopadj} |
| 2605 |
% \begin{macro}{\subfigbottomskip} |
| 2606 |
% |
| 2607 |
% \changes{v2.1}{22 Jan 1997}{Reduced the space to the values separating |
| 2608 |
% subfloat caption and figure box and its top and bottom. Added |
| 2609 |
% \cmd{\subfigcaptopadj} in case it is needed in styles that with figure |
| 2610 |
% subcaptions on the bottom and table subcaptions on the top.} |
| 2611 |
% |
| 2612 |
% See figure~\ref{fig:layout} for details of where these take effect. |
| 2613 |
% Generally the |\subfigtopskip| appears between the figure or table and |
| 2614 |
% the edge of the box. |\subfigbottomskip| appears between the |
| 2615 |
% subcaption and the edge of the box. If the subcaption follows the |
| 2616 |
% figure or table, then |\subfigcapskip| is placed before it along with |
| 2617 |
% ({\it i.e.\/}, in addition to) a |\baselineskip|. If the subcaption |
| 2618 |
% comes before the figure or table then |\subfigcapskip| is placed |
| 2619 |
% after it along with |\subfigcaptopadj|. Although several of the above |
| 2620 |
% are {\tt skip}'s they are typset at their base size and will not |
| 2621 |
% shrink or expand. |
| 2622 |
% |
| 2623 |
% \begin{macrocode} |
| 2624 |
\newskip\subfigtopskip \subfigtopskip = 5\p@ |
| 2625 |
\newskip\subfigcapskip \subfigcapskip = 0\p@ |
| 2626 |
\newdimen\subfigcaptopadj \subfigcaptopadj = 3\p@ |
| 2627 |
\newskip\subfigbottomskip \subfigbottomskip = 5\p@ |
| 2628 |
% \end{macrocode} |
| 2629 |
% \end{macro} |
| 2630 |
% \end{macro} |
| 2631 |
% \end{macro} |
| 2632 |
% \end{macro} |
| 2633 |
% |
| 2634 |
% \begin{macro}{\subfigcapmargin} |
| 2635 |
% |
| 2636 |
% \changes{v2.1}{22 Jan 1997}{Reduced \cmd{\subfigcapmargin} to zero.} |
| 2637 |
% \begin{macro}{\subfiglabelskip} |
| 2638 |
% |
| 2639 |
% \changes{v2.1}{23 Jan 2002}{Added to replace the space between the |
| 2640 |
% subcaption label and text.} |
| 2641 |
% |
| 2642 |
% These two values are used to typeset the subcaption The width of the |
| 2643 |
% subcaption is the same as that of its associated figure or table |
| 2644 |
% width. |\subfigcapmargin| is placed on either side of the caption and |
| 2645 |
% |\subfiglabelskip| is placed between the subcaption label and the |
| 2646 |
% subcaption text. Depending on the manner of typesetting the |
| 2647 |
% subcaption, this may shrink or expand. By default, the |
| 2648 |
% |\subfigcapmargin| is zero to allow as much room of the subcaption as |
| 2649 |
% possible. |
| 2650 |
% |
| 2651 |
% \begin{macrocode} |
| 2652 |
\newdimen\subfigcapmargin \subfigcapmargin = \z@ |
| 2653 |
\newskip\subfiglabelskip \subfiglabelskip = 0.33em plus 0.07em minus 0.03em |
| 2654 |
% \end{macrocode} |
| 2655 |
% \end{macro} |
| 2656 |
% \end{macro} |
| 2657 |
% |
| 2658 |
% \begin{macro}{\subcapsize} |
| 2659 |
% |
| 2660 |
% |\subcapsize| is used to set the size of both the subcaption label and |
| 2661 |
% the subcaption text. The options allow it to be set to any of the |
| 2662 |
% following: |\scriptsize|, |\footnotesize|, |\small|, |\normalsize|, |
| 2663 |
% |\large|, |\Large|. It may also be set to |\tiny|, |\LARGE|, |\huge| |
| 2664 |
% or |\HUGE| by hand if need be for special instances. |
| 2665 |
% |
| 2666 |
% \begin{macrocode} |
| 2667 |
\newcommand*{\subcapsize}{} |
| 2668 |
% \end{macrocode} |
| 2669 |
% \end{macro} |
| 2670 |
% |
| 2671 |
% \begin{macro}{\subcaplabelfont} |
| 2672 |
% \begin{macro}{\subcaplabelfont@f} |
| 2673 |
% |
| 2674 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcaplabelfont@f} |
| 2675 |
% default value to \cmd{\familydefault}.} |
| 2676 |
% |
| 2677 |
% \begin{macro}{\subcaplabelfont@c} |
| 2678 |
% |
| 2679 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcaplabelfont@c} |
| 2680 |
% default value to \cmd{\seriesdefault}.} |
| 2681 |
% |
| 2682 |
% \begin{macro}{\subcaplabelfont@s} |
| 2683 |
% |
| 2684 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcaplabelfont@s} |
| 2685 |
% default value to \cmd{\shapedefault}.} |
| 2686 |
% |
| 2687 |
% The |\subcaplabelfont| is composed of three parts, the font family, |
| 2688 |
% such as roman, san serif or typewriter; the font series, such as |
| 2689 |
% medium or bold; and the font shape, such as italic, slanted, small |
| 2690 |
% caps or upright. These are combined along with the |\subcapsize| to |
| 2691 |
% select the font for the subcaption label. |
| 2692 |
% |
| 2693 |
% \begin{macrocode} |
| 2694 |
\newcommand*{\subcaplabelfont}{% |
| 2695 |
\subcaplabelfont@f\subcaplabelfont@c\subcaplabelfont@s} |
| 2696 |
\newcommand*{\subcaplabelfont@f}{\fontfamily{\familydefault}\selectfont} |
| 2697 |
\newcommand*{\subcaplabelfont@c}{\fontseries{\seriesdefault}\selectfont} |
| 2698 |
\newcommand*{\subcaplabelfont@s}{\fontshape{\shapedefault}\selectfont} |
| 2699 |
% \end{macrocode} |
| 2700 |
% \end{macro} |
| 2701 |
% \end{macro} |
| 2702 |
% \end{macro} |
| 2703 |
% \end{macro} |
| 2704 |
% |
| 2705 |
% \begin{macro}{\subcapfont} |
| 2706 |
% |
| 2707 |
% \changes{v2.1}{11 Dec 1996}{Added.} |
| 2708 |
% |
| 2709 |
% \begin{macro}{\subcapfont@f} |
| 2710 |
% |
| 2711 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcapfont@f} default |
| 2712 |
% value to \cmd{\familydefault}.} |
| 2713 |
% |
| 2714 |
% \begin{macro}{\subcapfont@c} |
| 2715 |
% |
| 2716 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcapfont@s} default |
| 2717 |
% value to \cmd{\seriesdefault}.} |
| 2718 |
% |
| 2719 |
% \begin{macro}{\subcapfont@s} |
| 2720 |
% |
| 2721 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the \cmd{\subcapfont@s} default |
| 2722 |
% value to \cmd{\shapedefault}.} |
| 2723 |
% |
| 2724 |
% The |\subcapfont| is the same as the |\subcaplabelfont| except that it |
| 2725 |
% is applied to the subcaption text rather than the label. |
| 2726 |
% |
| 2727 |
% \begin{macrocode} |
| 2728 |
\newcommand*{\subcapfont}{% |
| 2729 |
\subcapfont@f\subcapfont@c\subcapfont@s} |
| 2730 |
\newcommand*{\subcapfont@f}{\fontfamily{\familydefault}\selectfont} |
| 2731 |
\newcommand*{\subcapfont@c}{\fontseries{\seriesdefault}\selectfont} |
| 2732 |
\newcommand*{\subcapfont@s}{\fontshape{\shapedefault}\selectfont} |
| 2733 |
% \end{macrocode} |
| 2734 |
% \end{macro} |
| 2735 |
% \end{macro} |
| 2736 |
% \end{macro} |
| 2737 |
% \end{macro} |
| 2738 |
% |
| 2739 |
% \begin{macro}{\ifsf@tight} |
| 2740 |
% |
| 2741 |
% Create an `if' to control whether the check for the top-of-page is |
| 2742 |
% performed in the |\@subfloat| command. This is necessary to preserve |
| 2743 |
% the look-and-feel of the older versions of this package. The |
| 2744 |
% \Lopt{loose} option turns this flag off (no check) and the |
| 2745 |
% \Lopt{tight} option turns it on (do the check). |
| 2746 |
% |
| 2747 |
% \begin{macrocode} |
| 2748 |
\newif\ifsf@tight \sf@tighttrue |
| 2749 |
% \end{macrocode} |
| 2750 |
% \end{macro} |
| 2751 |
% |
| 2752 |
% \subsection{Subfigure Constants} |
| 2753 |
% \label{sec:fig_constants} |
| 2754 |
% \begin{macro}{\c@subfigure} |
| 2755 |
% Subfigure counter. |
| 2756 |
% |
| 2757 |
% \begin{macrocode} |
| 2758 |
\newcounter{subfigure}[figure] |
| 2759 |
% \end{macrocode} |
| 2760 |
% \end{macro} |
| 2761 |
% |
| 2762 |
% \begin{macro}{\iffiguretopcap} |
| 2763 |
% |
| 2764 |
% \changes{v2.1}{23 Jan 2002}{Added check for existing |
| 2765 |
% \cmd{\figuretopcaptrue} so that this package will work with the |
| 2766 |
% captcont package.} |
| 2767 |
% |
| 2768 |
% \changes{v2.1}{22 Jan 1997}{Added to control label numbering for |
| 2769 |
% captions at the top vs.\ at the bottom.} |
| 2770 |
% |
| 2771 |
% \begin{macro}{\ifsubfiguretopcap} |
| 2772 |
% |
| 2773 |
% \changes{v2.1}{15 Nov 1997}{Added to control placement of the |
| 2774 |
% subcaption at the top vs.\ at the bottom.} |
| 2775 |
% |
| 2776 |
% These control how the \Lpack{hhsubfigure} \Lcount{caption} numbering is |
| 2777 |
% obtained and where the figure caption and subcaption should appear |
| 2778 |
% relative to the body of the \Lenv{subfigure}. The boolean |
| 2779 |
% |\iffiguretopcap| indicates that the \Lcount{caption} counter is |
| 2780 |
% current and there is no need to increment it. The boolean |
| 2781 |
% |\ifsubfiguretopcap| indicates that the subcaption will be printed |
| 2782 |
% above the body portion of the \Lpack{subfigure}. |
| 2783 |
% |
| 2784 |
% \begin{macrocode} |
| 2785 |
\@ifundefined{figuretopcaptrue}{\newif\iffiguretopcap}{} |
| 2786 |
\newif\ifsubfiguretopcap |
| 2787 |
% \end{macrocode} |
| 2788 |
% \end{macro} |
| 2789 |
% \end{macro} |
| 2790 |
% |
| 2791 |
% \begin{macro}{\p@subfigure} |
| 2792 |
% \begin{macro}{\thesubfigure} |
| 2793 |
% \begin{macro}{\@thesubfigure} |
| 2794 |
% \begin{macro}{\@@thesubfigure} |
| 2795 |
% |
| 2796 |
% \changes{v2.1}{23 Jan 2002}{Added.} |
| 2797 |
% |
| 2798 |
% The |\thesubfigure| command defines the label for text references |
| 2799 |
% (prefixed by |\p@subfigure|). This is the value saved by the |\label| |
| 2800 |
% and retrieved by the |\ref| commands. In the case of a |
| 2801 |
% conflict between this package and a prior one over the definition |
| 2802 |
% of |\thesubfigure|, this package will win. This is insured by first |
| 2803 |
% specifying the |\providecommand| for the |\thesubfigure| and then |
| 2804 |
% |\renewcommand|. This is necessary because some packages incorrectly |
| 2805 |
% insert this command. |
| 2806 |
% |
| 2807 |
% The |\@thesubfigure| value defines the the caption label complete |
| 2808 |
% offset from the beginning of the caption text. It is used in the |
| 2809 |
% subfigure caption and normally takes the label portion as defined |
| 2810 |
% by |\thesubfigure|. |
| 2811 |
% |
| 2812 |
% Finally, the value defined by |\@@thesubfigure| is also saved by the |
| 2813 |
% |\label| command and may be retrieved with the |\subref| command. This is |
| 2814 |
% often useful in the subcaption or caption text when referring to the |
| 2815 |
% individual subfigures. This value is also the one that is used in |
| 2816 |
% the List-of-Figures. |
| 2817 |
% |
| 2818 |
% These multiple ``views'' of the \Lcount{subfigure} counter allow a |
| 2819 |
% style to define the way the label looks in the figure, for example |
| 2820 |
% ``{\bf (a)}\textvisiblespace''. Then references to it with |\ref| |
| 2821 |
% have the form ``2.1a'', and with |\subref| ``(a)'' (This latter form |
| 2822 |
% is also used to label references in the List-of-Figures section). |
| 2823 |
% |
| 2824 |
% \begin{macrocode} |
| 2825 |
\let\p@subfigure=\thefigure |
| 2826 |
\providecommand*{\thesubfigure}{(\alph{subfigure})} |
| 2827 |
\renewcommand*{\thesubfigure}{(\alph{subfigure})} |
| 2828 |
\newcommand*{\@thesubfigure}{\thesubfigure\hskip\subfiglabelskip} |
| 2829 |
\newcommand*{\@@thesubfigure}{\thesubfigure} |
| 2830 |
% \end{macrocode} |
| 2831 |
% \end{macro} |
| 2832 |
% \end{macro} |
| 2833 |
% \end{macro} |
| 2834 |
% \end{macro} |
| 2835 |
% |
| 2836 |
% \begin{macro}{\ext@subfigure} |
| 2837 |
% \begin{macro}{\l@subfigure} |
| 2838 |
% |
| 2839 |
% \changes{v2.1}{11 Oct 1996}{Changed the indentation of the |
| 2840 |
% List-of-Figures line from 2.3em to 2.5em.} |
| 2841 |
% |
| 2842 |
% \begin{macro}{\c@lofdepth} |
| 2843 |
% |
| 2844 |
% These values define how and if the subfigure caption will appear in a |
| 2845 |
% List-of-Figures file. |\ext@subfigure| defines the default subfigure |
| 2846 |
% file extension (which is the same as |\ext@figure| --- the |
| 2847 |
% List-of-Figures file, \Lcount{lof}). |\l@subfigure| |
| 2848 |
% shows how to print an \Lfile{lof} subfigure line and defines that line |
| 2849 |
% at level two. |\c@lofdepth| is an extension of the Table-of-Contents |
| 2850 |
% depth value and controls the depth to which captions in the file are |
| 2851 |
% printed to the actual page. By default, the subcaptions are not. |
| 2852 |
% |
| 2853 |
% \begin{macrocode} |
| 2854 |
\let\ext@subfigure=\ext@figure |
| 2855 |
% \end{macrocode} |
| 2856 |
% |
| 2857 |
% \begin{macrocode} |
| 2858 |
\newcommand*{\l@subfigure}{% |
| 2859 |
\@dottedxxxline{\ext@subfigure}{2}{3.8em}{2.5em}} |
| 2860 |
% \end{macrocode} |
| 2861 |
% |
| 2862 |
% \begin{macrocode} |
| 2863 |
\newcounter{lofdepth} |
| 2864 |
\setcounter{lofdepth}{1} |
| 2865 |
% \end{macrocode} |
| 2866 |
% \end{macro} |
| 2867 |
% \end{macro} |
| 2868 |
% \end{macro} |
| 2869 |
% |
| 2870 |
% \subsection{Subtable Constants} |
| 2871 |
% This section is symmetric to section~\ref{sec:fig_constants}. |
| 2872 |
% \begin{macro}{\c@subtable} |
| 2873 |
% Subtable counter. |
| 2874 |
% |
| 2875 |
% \begin{macrocode} |
| 2876 |
\newcounter{subtable}[table] |
| 2877 |
% \end{macrocode} |
| 2878 |
% \end{macro} |
| 2879 |
% |
| 2880 |
% \begin{macro}{\iftabletopcap} |
| 2881 |
% |
| 2882 |
% \changes{v2.1}{23 Jan 2002}{Added check for existing |
| 2883 |
% \cmd{\tabeltopcaptrue} so that this package will work with the |
| 2884 |
% captcont package.} |
| 2885 |
% |
| 2886 |
% \changes{v2.1}{22 Jan 1997}{Added to control label numbering for |
| 2887 |
% captions at the top vs.\ at the bottom.} |
| 2888 |
% |
| 2889 |
% \begin{macro}{\ifsubtabletopcap} |
| 2890 |
% \changes{v2.1}{15 Nov 1997}{Added to control placement of the |
| 2891 |
% subcaption at the top vs.\ at the bottom.} |
| 2892 |
% |
| 2893 |
% These define the form that the subcaption prefix is generated. The |
| 2894 |
% boolean |\iftabletopcap| works with the numbering of the subcaption |
| 2895 |
% label and uses the current \Lcount{table} counter value if true and |
| 2896 |
% the next value if false. The boolean |\ifsubtabletopcap| sets the |
| 2897 |
% subcaption before the main body of the subfigure, if true; and, after |
| 2898 |
% it, if false. |
| 2899 |
% |
| 2900 |
% \begin{macrocode} |
| 2901 |
\@ifundefined{tabletopcaptrue}{\newif\iftabletopcap}{} |
| 2902 |
\newif\ifsubtabletopcap |
| 2903 |
% \end{macrocode} |
| 2904 |
% \end{macro} |
| 2905 |
% \end{macro} |
| 2906 |
% |
| 2907 |
% \begin{macro}{\p@subtable} |
| 2908 |
% \begin{macro}{\thesubtable} |
| 2909 |
% \begin{macro}{\@thesubtable} |
| 2910 |
% \begin{macro}{\@@thesubtable} |
| 2911 |
% |
| 2912 |
% \changes{v2.1}{23 Jan 2002}{Added.} |
| 2913 |
% |
| 2914 |
% The |\thesubtable| command defines the label for text references |
| 2915 |
% (prefixed by |\p@subtable|), while the |\@thesubtable| command defines |
| 2916 |
% what appears in the subcaption under or over the subtable. The |
| 2917 |
% |\@@thesubtable| command defines an alternative reference to the label |
| 2918 |
% for use in the subcaption and caption of the table (see the discussion |
| 2919 |
% above for the equivalent figure values). The latter form is also used |
| 2920 |
% for the List-of-Tables label. As above, the |\thesubtable| command is |
| 2921 |
% twice specified |
| 2922 |
% |
| 2923 |
% \begin{macrocode} |
| 2924 |
\let\p@subtable=\thetable |
| 2925 |
\providecommand*{\thesubtable}{(\alph{subtable})} |
| 2926 |
\renewcommand*{\thesubtable}{(\alph{subtable})} |
| 2927 |
\newcommand*{\@thesubtable}{\thesubtable\hskip\subfiglabelskip} |
| 2928 |
\newcommand*{\@@thesubtable}{\thesubtable} |
| 2929 |
% \end{macrocode} |
| 2930 |
% \end{macro} |
| 2931 |
% \end{macro} |
| 2932 |
% \end{macro} |
| 2933 |
% \end{macro} |
| 2934 |
% |
| 2935 |
% \begin{macro}{\ext@subtable} |
| 2936 |
% \begin{macro}{\l@subtable} |
| 2937 |
% |
| 2938 |
% \changes{v2.1}{11 Oct 1996}{Changed the indentation of the |
| 2939 |
% List-of-Tables line from 2.3em to 2.5em.} |
| 2940 |
% |
| 2941 |
% \begin{macro}{\c@lotdepth} |
| 2942 |
% |
| 2943 |
% These define how and if the subtable caption will appear in a |
| 2944 |
% List-of-Tables file. |\ext@subtable| defines the default subtable |
| 2945 |
% file extension (which is the same as |\ext@table| --- the |
| 2946 |
% List-of-Tables file, \Lcount{lot}). |\l@subtable| shows how to print |
| 2947 |
% an \Lfile{lot} subtable line and defines that line at level two. |
| 2948 |
% |\c@lotdepth| is an extension of the table-of-contents depth value and |
| 2949 |
% controls the depth to which captions in the file are printed to the |
| 2950 |
% actual page. By default, the subcaptions are not printed. |
| 2951 |
% |
| 2952 |
% \begin{macrocode} |
| 2953 |
\let\ext@subtable=\ext@table |
| 2954 |
% \end{macrocode} |
| 2955 |
% |
| 2956 |
% \begin{macrocode} |
| 2957 |
\newcommand*{\l@subtable}{% |
| 2958 |
\@dottedxxxline{\ext@subtable}{2}{3.8em}{2.5em}} |
| 2959 |
% \end{macrocode} |
| 2960 |
% |
| 2961 |
% \begin{macrocode} |
| 2962 |
\newcounter{lotdepth} |
| 2963 |
\setcounter{lotdepth}{1} |
| 2964 |
% \end{macrocode} |
| 2965 |
% \end{macro} |
| 2966 |
% \end{macro} |
| 2967 |
% \end{macro} |
| 2968 |
% |
| 2969 |
% \subsection{Declaration of Options} |
| 2970 |
% |
| 2971 |
% The following options allow general compatibility with the |
| 2972 |
% \Lpack{caption} and \Lpack{caption2} packages by H.A. Sommerfeldt |
| 2973 |
% \cite{Somm95a}. There are six different subcaption layout options |
| 2974 |
% supported: \Lopt{normal}, \Lopt{hang} (or \Lopt{isu}), \Lopt{center}, |
| 2975 |
% \Lopt{centerlast} (or \Lopt{anne}), \Lopt{nooneline} and |
| 2976 |
% \Lopt{raggedright}. The \Lopt{hang} subcaption may be combined with |
| 2977 |
% the \Lopt{center} or \Lopt{centerlast} options. The \Lopt{nooneline} |
| 2978 |
% may be combined with any of the other options (but it's effect is |
| 2979 |
% negated or looks bad with either of \Lopt{center} or \Lopt{centerlast} |
| 2980 |
% unless the \Lopt{hang} option is also used). \Lopt{raggedright} |
| 2981 |
% overrides the \Lopt{center} or \Lopt{centerlast} options. |
| 2982 |
% |
| 2983 |
% \begin{macrocode} |
| 2984 |
\DeclareOption{normal}{% |
| 2985 |
\subcaphangfalse |
| 2986 |
\subcapcenterfalse |
| 2987 |
\subcapcenterlastfalse |
| 2988 |
\subcapnoonelinefalse |
| 2989 |
\subcapraggedrightfalse |
| 2990 |
\subcapRaggedRightfalse} |
| 2991 |
% \end{macrocode} |
| 2992 |
% |
| 2993 |
% \begin{macrocode} |
| 2994 |
\DeclareOption{hang}{\subcaphangtrue} |
| 2995 |
\DeclareOption{center}{\subcapcentertrue} |
| 2996 |
\DeclareOption{centerlast}{\subcapcenterlasttrue} |
| 2997 |
\DeclareOption{nooneline}{\subcapnoonelinetrue} |
| 2998 |
\DeclareOption{raggedright}{\subcapraggedrighttrue} |
| 2999 |
\DeclareOption{RaggedRight}{\subcapRaggedRighttrue} |
| 3000 |
% \end{macrocode} |
| 3001 |
% |
| 3002 |
% \begin{macrocode} |
| 3003 |
\DeclareOption{isu}{\ExecuteOption{hang}} |
| 3004 |
\DeclareOption{anne}{\ExecuteOption{centerlast}} |
| 3005 |
% \end{macrocode} |
| 3006 |
% |
| 3007 |
% \newpage^finalhack |
| 3008 |
% |
| 3009 |
% \noindent |
| 3010 |
% There are options for six different font sizes available. |
| 3011 |
% |
| 3012 |
% \begin{macrocode} |
| 3013 |
\DeclareOption{scriptsize}{\renewcommand*{\subcapsize}{\scriptsize}} |
| 3014 |
\DeclareOption{footnotesize}{\renewcommand*{\subcapsize}{\footnotesize}} |
| 3015 |
\DeclareOption{small}{\renewcommand*{\subcapsize}{\small}} |
| 3016 |
\DeclareOption{normalsize}{\renewcommand*{\subcapsize}{\normalsize}} |
| 3017 |
\DeclareOption{large}{\renewcommand*{\subcapsize}{\large}} |
| 3018 |
\DeclareOption{Large}{\renewcommand*{\subcapsize}{\Large}} |
| 3019 |
% \end{macrocode} |
| 3020 |
% |
| 3021 |
% \noindent |
| 3022 |
% There are eighteen options available to set the font attributes of the |
| 3023 |
% subcaptions. The first nine affect only the subcaption label |
| 3024 |
% The last nine affect only the subcaption text. |
| 3025 |
% |
| 3026 |
% \changes{v2.1}{22 Jan 1997}{Changed order of font options.} |
| 3027 |
% |
| 3028 |
% \changes{v2.1}{15 Nov 1997}{Added nine new options to set the format |
| 3029 |
% of the caption text separately from the caption label.} |
| 3030 |
% |
| 3031 |
% \begin{macrocode} |
| 3032 |
\DeclareOption{rm}{\renewcommand*{\subcaplabelfont@f}{\rmfamily}} |
| 3033 |
\DeclareOption{sf}{\renewcommand*{\subcaplabelfont@f}{\sffamily}} |
| 3034 |
\DeclareOption{tt}{\renewcommand*{\subcaplabelfont@f}{\ttfamily}} |
| 3035 |
\DeclareOption{md}{\renewcommand*{\subcaplabelfont@c}{\mdseries}} |
| 3036 |
\DeclareOption{bf}{\renewcommand*{\subcaplabelfont@c}{\bfseries}} |
| 3037 |
\DeclareOption{up}{\renewcommand*{\subcaplabelfont@s}{\upshape}} |
| 3038 |
\DeclareOption{it}{\renewcommand*{\subcaplabelfont@s}{\itshape}} |
| 3039 |
\DeclareOption{sl}{\renewcommand*{\subcaplabelfont@s}{\slshape}} |
| 3040 |
\DeclareOption{sc}{\renewcommand*{\subcaplabelfont@s}{\scshape}} |
| 3041 |
% \end{macrocode} |
| 3042 |
% |
| 3043 |
% \begin{macrocode} |
| 3044 |
\DeclareOption{RM}{\renewcommand*{\subcapfont@f}{\rmfamily}} |
| 3045 |
\DeclareOption{SF}{\renewcommand*{\subcapfont@f}{\sffamily}} |
| 3046 |
\DeclareOption{TT}{\renewcommand*{\subcapfont@f}{\ttfamily}} |
| 3047 |
\DeclareOption{MD}{\renewcommand*{\subcapfont@c}{\mdseries}} |
| 3048 |
\DeclareOption{BF}{\renewcommand*{\subcapfont@c}{\bfseries}} |
| 3049 |
\DeclareOption{IT}{\renewcommand*{\subcapfont@s}{\itshape}} |
| 3050 |
\DeclareOption{SL}{\renewcommand*{\subcapfont@s}{\slshape}} |
| 3051 |
\DeclareOption{SC}{\renewcommand*{\subcapfont@s}{\scshape}} |
| 3052 |
\DeclareOption{UP}{\renewcommand*{\subcapfont@s}{\upshape}} |
| 3053 |
% \end{macrocode} |
| 3054 |
% |
| 3055 |
% \noindent |
| 3056 |
% There are eight options available to control the caption placement |
| 3057 |
% and the proper numbering in association with the figure or table |
| 3058 |
% caption placement. The first four affect only the caption numbering |
| 3059 |
% by informing the internals that the associated figure or table |
| 3060 |
% caption appears before or after the subfloat. The second four do |
| 3061 |
% this and, in addition, shift the subfloat caption to the bottom or |
| 3062 |
% top of the subfloat. The |\subfigure| and |\subtable| commands each |
| 3063 |
% have a set of flags since it is often the case that a document style |
| 3064 |
% requires that figure captions follow the figure and table captions |
| 3065 |
% precede the table. |
| 3066 |
% |
| 3067 |
% \begin{macrocode} |
| 3068 |
\DeclareOption{figbotcap}{\figuretopcapfalse} |
| 3069 |
\DeclareOption{figtopcap}{\figuretopcaptrue} |
| 3070 |
\DeclareOption{tabbotcap}{\tabletopcapfalse} |
| 3071 |
\DeclareOption{tabtopcap}{\tabletopcaptrue} |
| 3072 |
% \end{macrocode} |
| 3073 |
% |
| 3074 |
% \begin{macrocode} |
| 3075 |
\DeclareOption{FIGBOTCAP}{\ExecuteOptions{figbotcap}\subfiguretopcapfalse} |
| 3076 |
\DeclareOption{FIGTOPCAP}{\ExecuteOptions{figtopcap}\subfiguretopcaptrue} |
| 3077 |
\DeclareOption{TABBOTCAP}{\ExecuteOptions{tabbotcap}\subtabletopcapfalse} |
| 3078 |
\DeclareOption{TABTOPCAP}{\ExecuteOptions{tabtopcap}\subtabletopcaptrue} |
| 3079 |
% \end{macrocode} |
| 3080 |
% |
| 3081 |
% \newpage^finalhack |
| 3082 |
% |
| 3083 |
% \begin{macro}{\subfigtopskip} |
| 3084 |
% \begin{macro}{\subfigcapskip} |
| 3085 |
% \begin{macro}{\subfigcaptopadj} |
| 3086 |
% \begin{macro}{\subfigbottomskip} |
| 3087 |
% \begin{macro}{\subfigcapmargin} |
| 3088 |
% \begin{macro}{\subfiglabelskip} |
| 3089 |
% |
| 3090 |
% \noindent |
| 3091 |
% The last two options control the overall ``look-and-feel'' of the |
| 3092 |
% subfloat. The \Lopt{loose} option is the default and makes the |
| 3093 |
% subfloat look like it always has with lots of extra room around the |
| 3094 |
% subfigure and subcaption. |
| 3095 |
% |
| 3096 |
% \begin{macrocode} |
| 3097 |
\DeclareOption{loose}{% |
| 3098 |
\subfigtopskip = 10\p@ |
| 3099 |
\subfigcapskip = 10\p@ |
| 3100 |
\subfigcaptopadj = 0\p@ |
| 3101 |
\subfigbottomskip = 10\p@ |
| 3102 |
\subfigcapmargin = 10\p@ |
| 3103 |
\subfiglabelskip = 0.33em |
| 3104 |
% \end{macrocode} |
| 3105 |
% \end{macro} |
| 3106 |
% \end{macro} |
| 3107 |
% \end{macro} |
| 3108 |
% \end{macro} |
| 3109 |
% \end{macro} |
| 3110 |
% \end{macro} |
| 3111 |
% |
| 3112 |
% \begin{macro}{\@thesubfigure} |
| 3113 |
% \begin{macro}{\@thesubtable} |
| 3114 |
% Next, it replaces the glue at the end of the subcaption label with a |
| 3115 |
% |\space| like the older version of the \Lpack{subfigure} package. |
| 3116 |
% |
| 3117 |
% \begin{macrocode} |
| 3118 |
\renewcommand*{\@thesubfigure}{\thesubfigure\space} |
| 3119 |
\renewcommand*{\@thesubtable}{\thesubtable\space} |
| 3120 |
% \end{macrocode} |
| 3121 |
% \end{macro} |
| 3122 |
% \end{macro} |
| 3123 |
% |
| 3124 |
% \begin{macro}{\ifsf@tight} |
| 3125 |
% |
| 3126 |
% Finally, set the \Lif{sf@tight} flag to make the |\@subfloat| command |
| 3127 |
% skip its check for the top of a page or minipage and to always add |
| 3128 |
% its topmost vertical spacing. (For more details about the |
| 3129 |
% |\@subfloat| command, see section~\ref{sec:mainmacros}.) |
| 3130 |
% |
| 3131 |
% \begin{macrocode} |
| 3132 |
\sf@tightfalse} |
| 3133 |
% \end{macrocode} |
| 3134 |
% \end{macro} |
| 3135 |
% |
| 3136 |
% |
| 3137 |
% \begin{macro}{\subfigtopskip} |
| 3138 |
% \begin{macro}{\subfigcapskip} |
| 3139 |
% \begin{macro}{\subfigcaptopadj} |
| 3140 |
% \begin{macro}{\subfigbottomskip} |
| 3141 |
% \begin{macro}{\subfigcapmargin} |
| 3142 |
% \begin{macro}{\subfiglabelskip} |
| 3143 |
% |
| 3144 |
% The \Lopt{tight} option is the is the preferred version and has less white |
| 3145 |
% space around the subfloat. It also will omit the space above the subfloat |
| 3146 |
% at the top of the page or minipage. |
| 3147 |
% |
| 3148 |
% \begin{macrocode} |
| 3149 |
\DeclareOption{tight}{% |
| 3150 |
\subfigtopskip = 5\p@ |
| 3151 |
\subfigcapskip = 0\p@ |
| 3152 |
\subfigcaptopadj = 3\p@ |
| 3153 |
\subfigbottomskip = 5\p@ |
| 3154 |
\subfigcapmargin = \z@ |
| 3155 |
\subfiglabelskip = 0.33em plus 0.07em minus 0.03em |
| 3156 |
% \end{macrocode} |
| 3157 |
% |
| 3158 |
% \end{macro} |
| 3159 |
% \end{macro} |
| 3160 |
% \end{macro} |
| 3161 |
% \end{macro} |
| 3162 |
% \end{macro} |
| 3163 |
% \end{macro} |
| 3164 |
% |
| 3165 |
% \begin{macro}{\@thesubfigure} |
| 3166 |
% \begin{macro}{\@thesubtable} |
| 3167 |
% Next, it keeps the glue at the end of the subcaption label to allow |
| 3168 |
% better subcaption fitting. |
| 3169 |
% |
| 3170 |
% \begin{macrocode} |
| 3171 |
\renewcommand*{\@thesubfigure}{\thesubfigure\hskip\subfiglabelskip} |
| 3172 |
\renewcommand*{\@thesubtable}{\thesubtable\hskip\subfiglabelskip} |
| 3173 |
% \end{macrocode} |
| 3174 |
% \end{macro} |
| 3175 |
% \end{macro} |
| 3176 |
% |
| 3177 |
% \begin{macro}{\ifsf@tight} |
| 3178 |
% |
| 3179 |
% Finally, set the \Lif{sf@tight} flag to make the |\@subfloat| command |
| 3180 |
% check for the top of a page or minipage and to skip adding any vertical |
| 3181 |
% space there. (For more details about the |\@subfloat| command, see |
| 3182 |
% section~\ref{sec:mainmacros}.) |
| 3183 |
% |
| 3184 |
% \begin{macrocode} |
| 3185 |
\sf@tighttrue} |
| 3186 |
% \end{macrocode} |
| 3187 |
% \end{macro} |
| 3188 |
% |
| 3189 |
% \subsection{Execution of Options} |
| 3190 |
% \label{sec:startup} |
| 3191 |
% |
| 3192 |
% \changes{v2.1}{11 Oct 1996}{Added a check for a local configuration file.} |
| 3193 |
% |
| 3194 |
% \changes{v2.1}{15 Nov 1997}{Added the \Lopt{FIGBOTCAP} and |
| 3195 |
% \Lopt{TABBOTCAP} options.} |
| 3196 |
% |
| 3197 |
% \changes{v2.1.4}{30 Apr 2002}{Changed the subcaption label defaults |
| 3198 |
% to be hard coded above and no longer in the options list.} |
| 3199 |
% |
| 3200 |
% The \Lopt{normal} type of subcaption is preselected, the standard |
| 3201 |
% subcaption size is set to \Lopt{footnotesize}, and the font for both |
| 3202 |
% the subcaption label and text is set above to the global defaults for |
| 3203 |
% family, series, and shape. Also, the subcaptions for the subfigure |
| 3204 |
% and subtable are placed after the figure box and it is assumed that |
| 3205 |
% the figure or table caption follows all of the associated subfloats. |
| 3206 |
% Finally, the \Lopt{loose} form is selected in order to cause minimal |
| 3207 |
% change to existing papers using the \Lpack{subfigure} package. |
| 3208 |
% |
| 3209 |
% The preferred form would be to have the \Lopt{TABTOPCAP} and |
| 3210 |
% \Lopt{tight} be the defaults, but this would adversely affect the |
| 3211 |
% existing papers that have used the official releases of this package. |
| 3212 |
% |
| 3213 |
% \begin{macrocode} |
| 3214 |
\ExecuteOptions{normal,footnotesize,FIGBOTCAP,TABBOTCAP,loose} |
| 3215 |
\InputIfFileExists{subfigure.cfg}{% |
| 3216 |
\typeout{****************************************^^J% |
| 3217 |
* Local config file subfigure.cfg used *^^J% |
| 3218 |
****************************************}}{} |
| 3219 |
\ProcessOptions |
| 3220 |
% \end{macrocode} |
| 3221 |
% |
| 3222 |
% \subsection{The Subfigure and Subtable Commands} |
| 3223 |
% \label{sec:mainmacros} |
| 3224 |
% |
| 3225 |
% \changes{v2.1}{23 Jan 2002}{Added setting \cmd{\label} to |
| 3226 |
% \cmd{\subfloat@label}.} |
| 3227 |
% |
| 3228 |
% \changes{v2.1}{11 Oct 1996}{Added command lines. The subfigure |
| 3229 |
% command was updated to allow a second optional argument. This |
| 3230 |
% causes changes all the way down to the \cmd{\@subcaption} command.} |
| 3231 |
% |
| 3232 |
% \begin{macro}{\subfigure} |
| 3233 |
% \label{sec:subfigure} |
| 3234 |
% |
| 3235 |
% \changes{v2.1.2}{26 Mar 2002}{Added check to see if \cmd{\subfig@oldlabel} |
| 3236 |
% is defined and if not to save the current definition.} |
| 3237 |
% |
| 3238 |
% \changes{v2.1}{22 Jan 1997}{Changed the counter advance to occur |
| 3239 |
% only if the related boolean is false. This allows \cmd{\caption}'s |
| 3240 |
% to occur before the subfloats rather than after.} |
| 3241 |
% |
| 3242 |
% \changes{v2.1}{07 Mar 1997}{Moved \cmd{\leavevmode} to \cmd{\@subfloat}.} |
| 3243 |
% |
| 3244 |
% The |\subfigure| command acts as cover function for the |\@subfloat| |
| 3245 |
% command. It locally changes the |\label| command to our special version |
| 3246 |
% that supports the |\subref|'s (see section~\ref{sec:patches}). It |
| 3247 |
% insures that the proper counter is used and has the correct value. |
| 3248 |
% Since the caption is usually generated later, we must locally |
| 3249 |
% anticipate the future value of its counter by adding one to it within |
| 3250 |
% a local group. Upon leaving |\subfigure|, the old value is restored. |
| 3251 |
% |
| 3252 |
% \begin{macrocode} |
| 3253 |
\newcommand*{\subfigure}{% |
| 3254 |
\bgroup |
| 3255 |
\let\subfig@oldlabel=\label |
| 3256 |
\let\label=\subfloat@label |
| 3257 |
\@nameuse{if\@captype topcap}\else |
| 3258 |
\advance\@nameuse{c@\@captype}\@ne |
| 3259 |
\fi |
| 3260 |
\refstepcounter{sub\@captype}% |
| 3261 |
\@ifnextchar [% |
| 3262 |
{\@subfigure}% |
| 3263 |
{\@subfigure[\@empty]}} |
| 3264 |
% \end{macrocode} |
| 3265 |
% \end{macro} |
| 3266 |
% |
| 3267 |
% \begin{macro}{\subtable} |
| 3268 |
% |
| 3269 |
% The |\subtable| command is identical to |\subfigure|. The of names |
| 3270 |
% at the user level is purely cosmetic (and historical). |
| 3271 |
% |
| 3272 |
% \begin{macrocode} |
| 3273 |
\let\subtable=\subfigure |
| 3274 |
% \end{macrocode} |
| 3275 |
% \end{macro} |
| 3276 |
% |
| 3277 |
% |
| 3278 |
% \enlargethispage{-24pt}^finalhack |
| 3279 |
% |
| 3280 |
% \begin{macro}{\@subfigure} |
| 3281 |
% \changes{v2.1.4}{07 Jun 2002}{Added curly brackets around the |
| 3282 |
% argument when passing it on as an optional argument.} |
| 3283 |
% |
| 3284 |
% Here we are still setting up for the main |\@subfloat| command. We |
| 3285 |
% check for a second optional argument. If one is not found, than any |
| 3286 |
% optional argument from the last |\subfigure| or |\subtable| becomes |
| 3287 |
% the main caption and we give |\@empty| as the default list-entry |
| 3288 |
% caption. If we see another optional argument, then we make that one |
| 3289 |
% the main caption and use any prior optional argument as the list-entry |
| 3290 |
% caption. See Table~\ref{tab:calling} for how this looks to the user. |
| 3291 |
% |
| 3292 |
% \begin{macrocode} |
| 3293 |
\def\@subfigure[#1]{% |
| 3294 |
\@ifnextchar [% |
| 3295 |
{\@subfloat{sub\@captype}[{#1}]}% |
| 3296 |
{\@subfloat{sub\@captype}[\@empty{#1}][{#1}]}} |
| 3297 |
% \end{macrocode} |
| 3298 |
% \end{macro} |
| 3299 |
% |
| 3300 |
% \begin{macro}{\@subfloat} |
| 3301 |
% |
| 3302 |
% \changes{v2.1.4}{24 Apr 2002}{Changed \cmd{\@subfloat} to globally |
| 3303 |
% reset the figure/table counter if it was incremented so that any |
| 3304 |
% subfloat body that resets the counters globally will not cause |
| 3305 |
% errors ({\it e.g.\/}, the \Lpack{tabularx} package} |
| 3306 |
% |
| 3307 |
% \changes{v2.1}{23 Jan 2002}{Now using \cmd{\@nameuse} to build names. |
| 3308 |
% Made the \cmd{\def} a \cmd{\long}\cmd{\def}.} |
| 3309 |
% |
| 3310 |
% \changes{v2.1}{22 Apr 1998}{Added some percents to keep out whitespace} |
| 3311 |
% |
| 3312 |
% \changes{v2.1}{07 Mar 1997}{Changed the addition of the |
| 3313 |
% \cmd{\subfigtopskip} to be added only if not at the top of the |
| 3314 |
% float and only in vertical mode. Moved \cmd{\leavevmode} from |
| 3315 |
% \cmd{\subfigure} to after the topskip addition.} |
| 3316 |
% |
| 3317 |
% \changes{v2.1}{17 Jan 1997}{Added swap of the top and bottom space |
| 3318 |
% when in TOPCAP mode.} |
| 3319 |
% |
| 3320 |
% This is the common code for setting up the subfloat box and drawing |
| 3321 |
% the subcaption under it. The two skips are used only here to keep |
| 3322 |
% track of what vertical space is to be placed before and after the |
| 3323 |
% figure. |
| 3324 |
% |
| 3325 |
% The first argument is the type of object being generated: that is, |
| 3326 |
% a |subfigure| or a |subtable|. The second and third are the |
| 3327 |
% \texttt{subcaption} and \texttt{subfigure} arguments from the |
| 3328 |
% calling |\subfigure| or |\subtable| command. |
| 3329 |
% |
| 3330 |
% \begin{macrocode} |
| 3331 |
\newskip\subfig@top |
| 3332 |
\newskip\subfig@bottom |
| 3333 |
% \end{macrocode} |
| 3334 |
% |
| 3335 |
% If \Lif{ifsf@tight} is true, then the |\@subfloat| command checks to |
| 3336 |
% see if it is at the top of a page or a minipage and will suppress the |
| 3337 |
% top vertical space in that case; otherwise, it always adds the space. |
| 3338 |
% |
| 3339 |
% \begin{macrocode} |
| 3340 |
\long\def\@subfloat#1[#2][#3]#4{% |
| 3341 |
\@tempcnta=1 |
| 3342 |
\ifsf@tight |
| 3343 |
\if@minipage |
| 3344 |
\@tempcnta=\z@ |
| 3345 |
\else\ifdim \lastskip=\z@ \else |
| 3346 |
\@tempcnta=2 |
| 3347 |
\fi\fi |
| 3348 |
\fi |
| 3349 |
% \end{macrocode} |
| 3350 |
% |
| 3351 |
% Based on the |\iffiguretopcap| or |\iftabletopcap| flags we |
| 3352 |
% select which vertical space is to be placed above and below the figure |
| 3353 |
% or table and save it in |\subfig@top| and |\subfig@bottom|. |
| 3354 |
% |
| 3355 |
% \begin{macrocode} |
| 3356 |
\@nameuse{if\@captype topcap}% |
| 3357 |
\subfig@top=\subfigbottomskip |
| 3358 |
\subfig@bottom=\subfigtopskip |
| 3359 |
\else |
| 3360 |
\subfig@top=\subfigtopskip |
| 3361 |
\subfig@bottom=\subfigbottomskip |
| 3362 |
\fi |
| 3363 |
% \end{macrocode} |
| 3364 |
% |
| 3365 |
% The |\leavevmode| is here to inhibit any \LaTeX\ errors that the |
| 3366 |
% surreounding environment might generate if we stay in vertical mode. |
| 3367 |
% Then it determines the width of the figure or table by placing it in a |
| 3368 |
% box and testing the box. |
| 3369 |
% |
| 3370 |
% \begin{macrocode} |
| 3371 |
\leavevmode |
| 3372 |
\setbox\@tempboxa \hbox{#4}% |
| 3373 |
\@tempdima=\wd\@tempboxa |
| 3374 |
% \end{macrocode} |
| 3375 |
% |
| 3376 |
% Finally we put the figure together in a vertical box. At the very top |
| 3377 |
% goes any vertical space, but only if we are not at the top of the page |
| 3378 |
% or minipage as determined above. |
| 3379 |
% |
| 3380 |
% \begin{macrocode} |
| 3381 |
\vtop\bgroup |
| 3382 |
\vbox\bgroup |
| 3383 |
\ifcase\@tempcnta |
| 3384 |
\@minipagefalse |
| 3385 |
\or |
| 3386 |
\vspace{\subfig@top}% |
| 3387 |
\or |
| 3388 |
\ifdim \lastskip=\z@ \else |
| 3389 |
\@tempskipb\subfig@top\relax\@xaddvskip |
| 3390 |
\fi |
| 3391 |
\fi |
| 3392 |
% \end{macrocode} |
| 3393 |
% |
| 3394 |
% Next, based on the `topcap' flags, we check if the subcaption or the |
| 3395 |
% figure goes next. If it is the subcaption, then we add some extra |
| 3396 |
% |\subfigcaptopadj| space between the subcaption and the figure and |
| 3397 |
% table in addtion to the regular |\subfigcapskip| space. This finishes |
| 3398 |
% off the top box and establishes our baseline. |
| 3399 |
% |
| 3400 |
% After that we add in either the figure or subcaption (whichever we |
| 3401 |
% have not typeset yet and follow it with the bottom vertical space. |
| 3402 |
% (see figure~\ref{fig:layout-C} for a diagram of this layout). |
| 3403 |
% |
| 3404 |
% Finally, we globally ({\bf !}) reset the \Lcount{figure} or |
| 3405 |
% \Lcount{table} counter, if we incremented it at the beginning of the |
| 3406 |
% |\subfigure| or |\subtable| command so that any functions used inside |
| 3407 |
% the command body which globally sets the counters ({\it e.g.\/}, the |
| 3408 |
% \Lpack{tabularx} package) will not cause problems. |
| 3409 |
% |
| 3410 |
% \begin{macrocode} |
| 3411 |
\@nameuse{if#1topcap}% |
| 3412 |
\ifx \@empty#3\relax \else |
| 3413 |
\@subcaption{#1}{#2}{#3}% |
| 3414 |
\vskip\subfigcapskip |
| 3415 |
\vskip\subfigcaptopadj |
| 3416 |
\fi\egroup |
| 3417 |
\box\@tempboxa |
| 3418 |
\else |
| 3419 |
\box\@tempboxa\egroup |
| 3420 |
\ifx \@empty#3\relax \else |
| 3421 |
\vskip\subfigcapskip |
| 3422 |
\@subcaption{#1}{#2}{#3}% |
| 3423 |
\fi |
| 3424 |
\fi |
| 3425 |
\vspace{\subfig@bottom}% |
| 3426 |
\egroup |
| 3427 |
\@nameuse{if\@captype topcap}\else |
| 3428 |
\global\advance\@nameuse{c@\@captype}\m@ne |
| 3429 |
\fi |
| 3430 |
\egroup} |
| 3431 |
% \end{macrocode} |
| 3432 |
% \end{macro} |
| 3433 |
% |
| 3434 |
% \begin{macro}{\@subfigcaptionlist} |
| 3435 |
% |
| 3436 |
% \begin{macro}{\@subcaption} |
| 3437 |
% |
| 3438 |
% \changes{v2.1}{23 Jan 2002}{Now using \cmd{\@nameuse} to build names. |
| 3439 |
% Also use \@@thesubfigure and \@@thesubtable stored label.} |
| 3440 |
% |
| 3441 |
% \begin{macro}{\listsubcaptions} |
| 3442 |
% |
| 3443 |
% \changes{v2.1.4}{09 Jul 2002}{Changed \cmd{\@tempa} to \cmd{\sf@temp} |
| 3444 |
% at the request of Donald Arseneau to remove the potential of problems |
| 3445 |
% with others using the same variable.} |
| 3446 |
% \changes{v2.1}{22 Oct 1996}{Added to allow the user to cause a dump |
| 3447 |
% of the currently queued subcaptions to the ``List-of'' page. This |
| 3448 |
% is necessary when the \cmd{caption} is placed before the subfloats |
| 3449 |
% as is often the case for subtables.} |
| 3450 |
% |
| 3451 |
% \changes{v2.1}{11 Oct 1996}{Fixed \cmd{\protect} related bug caused by |
| 3452 |
% a change in \LaTeX3.} |
| 3453 |
% \begin{macro}{\@listsubcaptions} |
| 3454 |
% |
| 3455 |
% \changes{v2.1}{23 Jan 2002}{Added checks for undefined \cmd{\@captype} |
| 3456 |
% and \cmd{ext@<\@captype>} just in case the \cmd{caption} is called |
| 3457 |
% outside the \Lenv{float} or the current float type does not support |
| 3458 |
% subfigures.} |
| 3459 |
% |
| 3460 |
% \changes{v2.1}{11 Oct 1996}{Added to print the queued subcaptions. |
| 3461 |
% This is also used by the \Lpack{captcont} package to correctly print |
| 3462 |
% the subcaptions.} |
| 3463 |
% |
| 3464 |
% \changes{v2.1}{17 Jan 1997}{Changed the source of the label for the |
| 3465 |
% ``List-of'' pages to use the \cmd{\thesubfigure} or \cmd{\thesubtable} |
| 3466 |
% value rather than the \cmd{\@currentlabel}. This usually will be |
| 3467 |
% cleaner since the figure number won't be repeated.} |
| 3468 |
% |
| 3469 |
% \changes{v2.1}{05 Jan 1998}{Changed \cmd{\edef} to \cmd{\def} and added |
| 3470 |
% back the \cmd{\protect} due to changes in the use of the |
| 3471 |
% \cmd{\@subcaption}.} |
| 3472 |
% |
| 3473 |
% The following series of commands control exactly how the subcaption is |
| 3474 |
% typeset. The |\@subcaption| command adds the subcaption to the current |
| 3475 |
% list of subcaptions to be added to the ``List-of'' page as soon as |
| 3476 |
% the major caption is declared (see |\@caption| below). |
| 3477 |
% ({\scshape Note}: only one list is kept because that seems right; |
| 3478 |
% if there is a mix of tables and figures, they will be grouped |
| 3479 |
% under the next |\caption|\@.) Next |\@subcaption| calls the |
| 3480 |
% appropriate float-type specific command to decide how to size and shape |
| 3481 |
% the subcaption text. |
| 3482 |
% |
| 3483 |
% \begin{macrocode} |
| 3484 |
\newcommand*{\@subfigcaptionlist}{} |
| 3485 |
% \end{macrocode} |
| 3486 |
% \begin{macrocode} |
| 3487 |
\newcommand{\@subcaption}[3]{% |
| 3488 |
\ifx \relax#2\relax \else |
| 3489 |
\bgroup |
| 3490 |
\let\label=\@gobble |
| 3491 |
\let\protect=\string |
| 3492 |
\def\@subcaplabel{\@nameuse{@@the#1}}% |
| 3493 |
\xdef\@subfigcaptionlist{% |
| 3494 |
\@subfigcaptionlist,% |
| 3495 |
{\protect\numberline{\@subcaplabel}\noexpand{\ignorespaces #2}}}% |
| 3496 |
\egroup |
| 3497 |
\fi |
| 3498 |
\@nameuse{@make#1caption}{\@nameuse{@the#1}}{#3}} |
| 3499 |
% \end{macrocode} |
| 3500 |
% |
| 3501 |
% \begin{macrocode} |
| 3502 |
\newcommand*{\listsubcaptions}{% |
| 3503 |
\@ifstar |
| 3504 |
{\gdef\@subfigcaptionlist{}}% |
| 3505 |
{\@listsubcaptions{\@captype}}} |
| 3506 |
% \end{macrocode} |
| 3507 |
% |
| 3508 |
% \begin{macrocode} |
| 3509 |
\newcommand*{\@listsubcaptions}[1]{% |
| 3510 |
\@ifundefined{@captype}{}{% |
| 3511 |
\@ifundefined{ext@sub#1}{}{% |
| 3512 |
\@for \sf@temp:=\@subfigcaptionlist \do {% |
| 3513 |
\ifx \@empty\sf@temp\relax \else |
| 3514 |
\addcontentsline |
| 3515 |
{\@nameuse{ext@sub#1}}% |
| 3516 |
{sub#1}% |
| 3517 |
{\sf@temp}% |
| 3518 |
\fi}}}% |
| 3519 |
\gdef\@subfigcaptionlist{}} |
| 3520 |
% \end{macrocode} |
| 3521 |
% \end{macro} |
| 3522 |
% \end{macro} |
| 3523 |
% \end{macro} |
| 3524 |
% \end{macro} |
| 3525 |
% |
| 3526 |
% \begin{macro}{\@makesubfigurecaption} |
| 3527 |
% \begin{macro}{\@makesubtablecaption} |
| 3528 |
% |
| 3529 |
% \changes{v2.1}{17 Jan 1997}{Added the new font control.} |
| 3530 |
% |
| 3531 |
% By default, the |\@subfigurecaption| and |\@subtablecaption| |
| 3532 |
% commands are identical. Unlike the standard |\@makecaption| command, |
| 3533 |
% we assume that the first argument (the label number produced by |
| 3534 |
% the |\@thesubfigure| or the |\@thesubtable|) contains any trailing |
| 3535 |
% separator characters or spacing (which makes it easier to customize). |
| 3536 |
% |
| 3537 |
% \newpage^finalhack |
| 3538 |
% |
| 3539 |
% The |\@makesubfigurecaption| command first checks the size of the |
| 3540 |
% caption typeset as a single line. It knocks off twice the |
| 3541 |
% |\subfigcapmargin| (at it's regular size) to determine the with of the |
| 3542 |
% caption and label. |
| 3543 |
% |
| 3544 |
% \begin{macrocode} |
| 3545 |
\newcommand{\@makesubfigurecaption}[2]{% |
| 3546 |
\setbox\@tempboxa\hbox{% |
| 3547 |
\subcapsize |
| 3548 |
{\subcaplabelfont #1}% |
| 3549 |
{\subcapfont\ignorespaces #2}}% |
| 3550 |
\@tempdimb=-\subfigcapmargin |
| 3551 |
\multiply\@tempdimb\tw@ |
| 3552 |
\advance\@tempdimb\@tempdima |
| 3553 |
% \end{macrocode} |
| 3554 |
% |
| 3555 |
% Next it creates a horizontal box of that width and if the label plus |
| 3556 |
% the text was too wide or if the \Lif{subcapnooneline} flag is true, |
| 3557 |
% then it sends off the label and subcaption to |\subfig@caption| to |
| 3558 |
% typset as a paragraph. NOTE: |\subfig@caption| assumes that |
| 3559 |
% |\@tempbdimb| has the calculated width for the paragraph. |
| 3560 |
% |
| 3561 |
% If the label plus the text will fit and the \Lif{subcapnooneline} flag |
| 3562 |
% is false, then we just return them (from box |\@tempboxa|). |
| 3563 |
% |
| 3564 |
% \begin{macrocode} |
| 3565 |
\hbox to\@tempdima{% |
| 3566 |
\hss |
| 3567 |
\ifdim \wd\@tempboxa >\@tempdimb |
| 3568 |
\subfig@caption{#1}{#2}% |
| 3569 |
\else\ifsubcapnooneline |
| 3570 |
\subfig@caption{#1}{#2}% |
| 3571 |
\else |
| 3572 |
\box\@tempboxa |
| 3573 |
\fi\fi |
| 3574 |
\hss}} |
| 3575 |
% \end{macrocode} |
| 3576 |
% |
| 3577 |
% \begin{macrocode} |
| 3578 |
\let\@makesubtablecaption=\@makesubfigurecaption |
| 3579 |
% \end{macrocode} |
| 3580 |
% \end{macro} |
| 3581 |
% \end{macro} |
| 3582 |
% |
| 3583 |
% \begin{macro}{\subfig@caption} |
| 3584 |
% |
| 3585 |
% \changes{v2.1}{23 Jan 2002}{Added \cmd{\subcapfont} and |
| 3586 |
% \cmd{\ignorespaces} before the caption text. So that it does not |
| 3587 |
% interfere with the label font settings. This fixes a bug found by |
| 3588 |
% Axel Sommerfeldt.} |
| 3589 |
% |
| 3590 |
% \begin{macro}{\subfig@captionpar} |
| 3591 |
% |
| 3592 |
% \changes{v2.1}{23 Jan 2002}{Simplified by removing the font settings. |
| 3593 |
% It is up to the caller to enforce these! This fixes a bug found by |
| 3594 |
% Axel Sommerfeldt.} |
| 3595 |
% |
| 3596 |
% \changes{v2.1}{17 Jan 1997}{Added the new font control.} |
| 3597 |
% |
| 3598 |
% These commands are called to typeset a multiple-line subcaption (or a |
| 3599 |
% single line when \Lif{subcapnooneline} is true). Depending on the |
| 3600 |
% \Lif{subcapcenter} and \Lif{subcapcenterlast} flags, the text will be |
| 3601 |
% justified (both false), centered (\Lif{subcapcenter} true), or |
| 3602 |
% justified with the last line centered (only the flag |
| 3603 |
% \Lif{subcapcenterlast} set true). |
| 3604 |
% |
| 3605 |
% \begin{macrocode} |
| 3606 |
\newcommand{\subfig@caption}[2]{% |
| 3607 |
\ifsubcaphang |
| 3608 |
\sbox{\@tempboxa}{\subcapsize\subcaplabelfont #1}% |
| 3609 |
\addtolength{\@tempdimb}{-\wd\@tempboxa}% |
| 3610 |
\usebox{\@tempboxa}% |
| 3611 |
\subfig@captionpar{\@tempdimb}{% |
| 3612 |
{\subcapfont\ignorespaces #2}}% |
| 3613 |
\else |
| 3614 |
\subfig@captionpar{\@tempdimb}{% |
| 3615 |
{\subcaplabelfont #1}% |
| 3616 |
{\subcapfont\ignorespaces #2}}% |
| 3617 |
\fi} |
| 3618 |
% \end{macrocode} |
| 3619 |
% |
| 3620 |
% \begin{macrocode} |
| 3621 |
\newcommand{\subfig@captionpar}[2]{% |
| 3622 |
\parbox[t]{#1}{% |
| 3623 |
\subcapsize |
| 3624 |
\ifsubcapraggedright |
| 3625 |
\setlength{\leftskip}{\z@}% |
| 3626 |
\setlength{\@rightskip}{\@flushglue}% |
| 3627 |
\setlength{\rightskip}{\@rightskip}% |
| 3628 |
\setlength{\parindent}{\z@}% |
| 3629 |
\else\ifsubcapRaggedRight |
| 3630 |
\setlength{\leftskip}{\z@}% |
| 3631 |
\setlength{\@rightskip}{\z@ plus \tw@ em}% |
| 3632 |
\setlength{\rightskip}{\@rightskip}% |
| 3633 |
\setlength{\parfillskip}{\z@ plus \@ne fil}% |
| 3634 |
\setlength{\parindent}{\z@}% |
| 3635 |
\else\ifsubcapcenter |
| 3636 |
\setlength{\leftskip}{\@flushglue}% |
| 3637 |
\setlength{\rightskip}{\@flushglue}% |
| 3638 |
\setlength{\parfillskip}{\z@skip}% |
| 3639 |
\else\ifsubcapcenterlast |
| 3640 |
\addtolength{\leftskip}{\z@ plus 1fil}% |
| 3641 |
\addtolength{\rightskip}{\z@ plus -1fil}% |
| 3642 |
\setlength{\parfillskip}{\z@ plus 2fil}% |
| 3643 |
\fi\fi\fi\fi |
| 3644 |
#2}} |
| 3645 |
% \end{macrocode} |
| 3646 |
% \end{macro} |
| 3647 |
% \end{macro} |
| 3648 |
% |
| 3649 |
% \subsection{Patches to the Standard Environment} |
| 3650 |
% \label{sec:patches} |
| 3651 |
% |
| 3652 |
% The following adjust the standard environment for the |
| 3653 |
% \Lpack{subfigure} package. They are designed as wrappers to the |
| 3654 |
% current definition of the standard commands to minimize any chance of |
| 3655 |
% conflict with other packages or to extend \LaTeX. |
| 3656 |
% |
| 3657 |
% \begin{macro}{\@dottedxxxline} |
| 3658 |
% \label{sec:dl} |
| 3659 |
% This is a generalized wrapper for the |\@dottedtocline| command. |
| 3660 |
% It checks for the level based on the output file (first argument) |
| 3661 |
% and not using only |\@tocdepth|. (See section~\ref{sec:listof} |
| 3662 |
% for a description of the arguments.) |
| 3663 |
% |
| 3664 |
% \begin{macrocode} |
| 3665 |
\newcommand*{\@dottedxxxline}[6]{% |
| 3666 |
\ifnum #2>\@nameuse{c@#1depth}\else |
| 3667 |
\@dottedtocline{0}{#3}{#4}{#5}{#6} |
| 3668 |
\fi} |
| 3669 |
% \end{macrocode} |
| 3670 |
% \end{macro} |
| 3671 |
% |
| 3672 |
% \begin{macro}{\subfig@end@float} |
| 3673 |
% \begin{macro}{\subfig@end@dblfloat} |
| 3674 |
% \begin{macro}{\end@float} |
| 3675 |
% \begin{macro}{\end@dblfloat} |
| 3676 |
% |
| 3677 |
% \changes{v2.1}{05 Jan 1998}{Added this section to minimize the need |
| 3678 |
% for \cmd{\listofcaptions}.} |
| 3679 |
% |
| 3680 |
% These commands patch the end of the \Lenv{float} environment so that it will |
| 3681 |
% dump out the subcaptions if any remain at this point. This can occur |
| 3682 |
% when using the \Lopt{TOPCAP} options. |
| 3683 |
% \begin{macrocode} |
| 3684 |
\let\subfig@end@float=\end@float |
| 3685 |
% \end{macrocode} |
| 3686 |
% |
| 3687 |
% \begin{macrocode} |
| 3688 |
\renewcommand*{\end@float}{% |
| 3689 |
\@listsubcaptions{\@captype}% |
| 3690 |
\subfig@end@float} |
| 3691 |
% \end{macrocode} |
| 3692 |
% |
| 3693 |
% \begin{macrocode} |
| 3694 |
\let\subfig@end@dblfloat=\end@dblfloat |
| 3695 |
% \end{macrocode} |
| 3696 |
% |
| 3697 |
% \begin{macrocode} |
| 3698 |
\renewcommand*{\end@dblfloat}{% |
| 3699 |
\@listsubcaptions{\@captype}% |
| 3700 |
\subfig@end@dblfloat} |
| 3701 |
% \end{macrocode} |
| 3702 |
% \end{macro} |
| 3703 |
% \end{macro} |
| 3704 |
% \end{macro} |
| 3705 |
% \end{macro} |
| 3706 |
% |
| 3707 |
% \newpage^finalhack |
| 3708 |
% |
| 3709 |
% \begin{macro}{\subfig@oldcaption} |
| 3710 |
% \begin{macro}{\@caption} |
| 3711 |
% |
| 3712 |
% \changes{v2.1}{23 Jan 2002}{Now using \cmd{\@nameuse} to build names. |
| 3713 |
% Added a check for topcap flag. If it is not defined, we assume that |
| 3714 |
% this float type does not support subfigures.} |
| 3715 |
% |
| 3716 |
% \changes{v2.1}{05 Jan 1998}{Changed to print the subcaptions before |
| 3717 |
% or after the caption, depending on the TOPCAP setting of the current |
| 3718 |
% environment.} |
| 3719 |
% |
| 3720 |
% Next, we redefine the current |\@caption| command to dump any |
| 3721 |
% subcaptions saved. First the `old' caption command is called to |
| 3722 |
% add the line to the ``List-of'' file and then the list of |
| 3723 |
% subcaptions, |\@subfigcaptionlist| is written to the same file. |
| 3724 |
% Lastly, the |\@subfigcaptionlist| is reinitialized. |
| 3725 |
% |
| 3726 |
% \begin{macrocode} |
| 3727 |
\let\subfig@oldcaption=\@caption |
| 3728 |
% \end{macrocode} |
| 3729 |
% |
| 3730 |
% \begin{macrocode} |
| 3731 |
\long\def\@caption#1[#2]#3{% |
| 3732 |
\@ifundefined{if#1topcap}% |
| 3733 |
{\subfig@oldcaption{#1}[{#2}]{#3}}% |
| 3734 |
{\@nameuse{if#1topcap}% |
| 3735 |
\@listsubcaptions{#1}% |
| 3736 |
\subfig@oldcaption{#1}[{#2}]{#3}% |
| 3737 |
\else |
| 3738 |
\subfig@oldcaption{#1}[{#2}]{#3}% |
| 3739 |
\@listsubcaptions{#1}% |
| 3740 |
\fi}} |
| 3741 |
% \end{macrocode} |
| 3742 |
% \end{macro} |
| 3743 |
% \end{macro} |
| 3744 |
% |
| 3745 |
% \begin{macro}{\subfig@oldlabel} |
| 3746 |
% |
| 3747 |
% To support the redefinition of the |\label| command within the body of |
| 3748 |
% the subfloats, we will use |\subfig@oldlabel| to save the current |
| 3749 |
% definition of |\label| and create the |\subfloat@label| command to take its |
| 3750 |
% place during the processing of the |\subfigure| command. Since the |
| 3751 |
% definition of |\label| may change as packages are loaded, we save the |
| 3752 |
% definition each time that |\label| is replaced with |\sub@label| |
| 3753 |
% (see \ref{sec:subfigure} above). |
| 3754 |
% |
| 3755 |
% \begin{macrocode} |
| 3756 |
\let\subfig@oldlabel=\relax |
| 3757 |
% \end{macrocode} |
| 3758 |
% \end{macro} |
| 3759 |
% |
| 3760 |
% \begin{macro}{\subfloat@label} |
| 3761 |
% \begin{macro}{\sub@label} |
| 3762 |
% |
| 3763 |
% \changes{v2.1.4}{02 Jul 2002}{Added reference to this command via |
| 3764 |
% the name \cmd{subfloat@label} to avoid packages that replace the |
| 3765 |
% name without the support of the optional argument. The old name |
| 3766 |
% is still here to decoy the other packages. Added chapter number |
| 3767 |
% in the automatically generated label to increase uniqueness.} |
| 3768 |
% |
| 3769 |
% One difference from the regular |\label| command is that there is an |
| 3770 |
% optional argument (note with parentheses rather than square brackets) |
| 3771 |
% that is only used with the \Lpack{hyperref} package to define the |
| 3772 |
% {\em bookmark\/} argument to the label. Typically, this would be a |
| 3773 |
% copy or paraphrase of the subcaption text. If this is not given and |
| 3774 |
% the \Lpack{hyperref} package is being used, then the {\em bookmark\/} |
| 3775 |
% argument is of the form ``Subfigure\textvisiblespace 1(a)''. |
| 3776 |
% |
| 3777 |
% \begin{macrocode} |
| 3778 |
\newcommand*{\subfloat@label}{% |
| 3779 |
\@ifnextchar( |
| 3780 |
{\sf@sub@label} |
| 3781 |
{\sf@sub@label(Sub\@captype\space |
| 3782 |
\@ifundefined{thechapter}{}{% |
| 3783 |
\@nameuse{thechapter}\space}% |
| 3784 |
\@nameuse{p@sub\@captype}% |
| 3785 |
\@nameuse{thesub\@captype}.)}} |
| 3786 |
% \end{macrocode} |
| 3787 |
% \begin{macrocode} |
| 3788 |
\let\sub@label\subfloat@label |
| 3789 |
% \end{macrocode} |
| 3790 |
% |
| 3791 |
% \end{macro} |
| 3792 |
% \end{macro} |
| 3793 |
% |
| 3794 |
% \newpage^finalhack |
| 3795 |
% |
| 3796 |
% \begin{macro}{\sf@sub@label} |
| 3797 |
% |
| 3798 |
% \changes{v2.1.4}{02 Jul 2002}{Moved \cmd{\relax} from the |
| 3799 |
% \cmd{\sf@@sub@label} to here.} |
| 3800 |
% |
| 3801 |
% \changes{v2.1.1}{15 Mar 2002}{Added coordination with the hyperref |
| 3802 |
% package.} |
| 3803 |
% |
| 3804 |
% The |\sf@sub@label| parses the optional argument and (if the |
| 3805 |
% \Lpack{hyperref} Package is loaded) saves the {\em bookmark\/} text |
| 3806 |
% as |\@currentlabelname|. It then calls the |\sf@@sub@label| command |
| 3807 |
% to the real processing of the label. |
| 3808 |
% |
| 3809 |
% \begin{macrocode} |
| 3810 |
\def\sf@sub@label(#1)#2{% |
| 3811 |
\ifhyperrefloaded |
| 3812 |
\protected@edef\@currentlabelname{% |
| 3813 |
\expandafter\strip@period #1\relax.\relax\@@@}% |
| 3814 |
\fi |
| 3815 |
\sf@@sub@label{#2}} |
| 3816 |
% \end{macrocode} |
| 3817 |
% \end{macro} |
| 3818 |
% |
| 3819 |
% \begin{macro}{\sf@@sub@label} |
| 3820 |
% |
| 3821 |
% \changes{v2.1.4}{02 Jul 2002}{Moved \cmd{\relax} from here to the |
| 3822 |
% \cmd{\sf@sub@label}.} |
| 3823 |
% |
| 3824 |
% \changes{v2.1.2}{26 Mar 2002}{Changed to simplify the operation and |
| 3825 |
% to avoid a bug in the hyperref package.} |
| 3826 |
% |
| 3827 |
% \changes{v2.1.1}{15 Mar 2002}{Added coordination with the hyperref |
| 3828 |
% package.} |
| 3829 |
% |
| 3830 |
% In order to support the \Lpack{hyperref} package we check if it was |
| 3831 |
% loaded and use the proper form of the |\newlabel| command. |\sf@@sub@label| |
| 3832 |
% operates by first calling the old |\label| definition (which adds a |
| 3833 |
% |\newlabel| command to the \Lfile{*.aux} file) and then adds another |
| 3834 |
% |\newlabel| command to the \Lfile{*.aux} file with a similar reference |
| 3835 |
% name (with `sub@' prepended) and the value of |\@@thesubfigure| or |
| 3836 |
% |\@@thesubtable|. |
| 3837 |
% |
| 3838 |
% If the |\ifhyperrefloaded| flag is set, then the |\newlabel| command |
| 3839 |
% has three extra fields, the first is the value of |\@currentlabelname|, |
| 3840 |
% which is either of the form ``Subfigure\textvisiblespace1(a)'' or |
| 3841 |
% was defined by the optional argument to |\label| (actually |
| 3842 |
% |\sub@label|). The second extra field is the hypertext anchor name |
| 3843 |
% and the third is unused. Otherwise, the we us the standard |\newlabel| |
| 3844 |
% form to write the sub-reference. |
| 3845 |
% |
| 3846 |
% \begin{macrocode} |
| 3847 |
\newcommand*{\sf@@sub@label}[1]{% |
| 3848 |
\@bsphack |
| 3849 |
\subfig@oldlabel{#1}% |
| 3850 |
\ifhyperrefloaded |
| 3851 |
\protected@write\@auxout{}{% |
| 3852 |
\string\newlabel{sub@#1}% |
| 3853 |
{{\@nameuse{@@thesub\@captype}}% |
| 3854 |
{\thepage}% |
| 3855 |
{\expandafter\strip@period\@currentlabelname\relax.\relax\@@@}% |
| 3856 |
{\@currentHref}% |
| 3857 |
{}}}% |
| 3858 |
\else |
| 3859 |
\protected@write\@auxout{}{% |
| 3860 |
\string\newlabel{sub@#1}% |
| 3861 |
{{\@nameuse{@@thesub\@captype}}% |
| 3862 |
{\thepage}}}% |
| 3863 |
\fi |
| 3864 |
\@esphack} |
| 3865 |
% \end{macrocode} |
| 3866 |
% |
| 3867 |
% \end{macro} |
| 3868 |
% |
| 3869 |
% \enlargethispage{24pt}^finalhack |
| 3870 |
% \vspace{-10pt}^finalhack |
| 3871 |
% |
| 3872 |
% \begin{macro}{\subref} |
| 3873 |
% |
| 3874 |
% The |\subref| command is the same as the |\ref| command except that |
| 3875 |
% |\@@thesubtable| instead of |\p@subfigure\thesubfigure| or |
| 3876 |
% |\p@subtable\thesubtable|. This is often of use for local references |
| 3877 |
% within the figure where the figure number may be assumed; or, for ease |
| 3878 |
% in constructing a range of references within a figure with many |
| 3879 |
% subfigures. |
| 3880 |
% |
| 3881 |
% \begin{macrocode} |
| 3882 |
\newcommand\subref[1]{% |
| 3883 |
\ref{sub@#1}} |
| 3884 |
% \end{macrocode} |
| 3885 |
% |
| 3886 |
% \end{macro} |
| 3887 |
% |
| 3888 |
% \begin{macro}{\Subref} |
| 3889 |
% |
| 3890 |
% \changes{v2.1.2}{26 Mar 2002}{Changed \cmd{\subref*} to \cmd{\Subref} to |
| 3891 |
% avoid problems in writing to the \Lfile{aux} file.} |
| 3892 |
% |
| 3893 |
% \changes{v2.1}{23 Jan 2002}{Added \cmd{\subref*} at the request of Benoit |
| 3894 |
% Hudson (bhudson\@cs.cmu.edu).} |
| 3895 |
% |
| 3896 |
% The |\Subref| command is the same as |\subref|, except that it adds |
| 3897 |
% |\subcaplabelfont| before the reference so that it uses the same font |
| 3898 |
% (except that the current font size is maintained). |
| 3899 |
% |
| 3900 |
% \begin{macrocode} |
| 3901 |
\newcommand\Subref[1]{% |
| 3902 |
{\subcaplabelfont |
| 3903 |
\ref{sub@#1}}} |
| 3904 |
% \end{macrocode} |
| 3905 |
% \end{macro} |
| 3906 |
% |
| 3907 |
% \iffalse |
| 3908 |
%</package> |
| 3909 |
% \fi |
| 3910 |
% |
| 3911 |
% \Finale |
| 3912 |
% |
| 3913 |
\endinput |