| 1 |
% \iffalse THIS IS A META-COMMENT |
| 2 |
%<*dtx> |
| 3 |
\ProvidesFile |
| 4 |
%======================================================================== |
| 5 |
{FIGCAPS.DTX} |
| 6 |
%======================================================================== |
| 7 |
%</dtx> |
| 8 |
%% Copyright 1993-1999 Patrick W Daly |
| 9 |
%% Max-Planck-Institut f\"ur Aeronomie |
| 10 |
%% Max-Planck-Str. 2 |
| 11 |
%% D-37191 Katlenburg-Lindau |
| 12 |
%% Germany |
| 13 |
%% E-mail: [email protected] |
| 14 |
% |
| 15 |
% This program can be redistributed and/or modified under the terms |
| 16 |
% of the LaTeX Project Public License Distributed from CTAN |
| 17 |
% archives in directory macros/latex/base/lppl.txt; either |
| 18 |
% version 1 of the License, or any later version. |
| 19 |
% |
| 20 |
% This is a contributed file to the LaTeX2e system. |
| 21 |
% ------------------------------------------------- |
| 22 |
% This is a LaTeX package to put tables and figure captions at the end of an |
| 23 |
% article even though the environments appear in the text. |
| 24 |
% Installation: |
| 25 |
% LaTeX this file: creates docstrip installation file figcaps.ins |
| 26 |
% AND the (LaTeX2e) documentation |
| 27 |
% (La)TeX figcaps.ins: creates package files figcaps.sty, and optionally |
| 28 |
% documentation driver figcaps.drv |
| 29 |
% (figcaps.ins may be edited as needed) |
| 30 |
% Docstrip options available: |
| 31 |
% package - to produce a (LaTeX2e) package .sty file |
| 32 |
% plates - to include plate environments, just like figures |
| 33 |
% longtab - to include longtable environment, for longtable package (2e) |
| 34 |
% sublab - to include coding for use with sublabel.sty |
| 35 |
% toc - to enable tables of contents to be used; writes to auxiliary |
| 36 |
% files .pot and pof instead of .lof and .lot |
| 37 |
% driver - to produce a driver file to print the documentation |
| 38 |
% 209 - (with package) for package that runs under LaTeX 2.09 |
| 39 |
% subpack - (with package) for coding included in other packages |
| 40 |
% agu - (with package,subpack) for inclusion in aguplus package |
| 41 |
% egs - (with package,subpack) for inclusion in egs package |
| 42 |
%-------------------------------------------------------------------------- |
| 43 |
%<*!subpack> |
| 44 |
%<package&209>\def\ProvidesPackage#1#2] |
| 45 |
%<package&209> {\typeout{Style option `#1'#2]}} |
| 46 |
% |
| 47 |
% *** Identify the package file:- |
| 48 |
%<package&!209>\NeedsTeXFormat{LaTeX2e}[1994/06/01] |
| 49 |
%<package>\ProvidesPackage{figcaps} |
| 50 |
%</!subpack> |
| 51 |
% |
| 52 |
% *** Provide command to dislay module version |
| 53 |
%<package&subpack>\def\ModuleVersion#1[#2]{} |
| 54 |
%<package&subpack> \ModuleVersion{figcaps} |
| 55 |
% |
| 56 |
% *** Identify the driver file:- |
| 57 |
%<driver>\NeedsTeXFormat{LaTeX2e} |
| 58 |
%<driver>\ProvidesFile{figcaps.drv} |
| 59 |
% |
| 60 |
% *** The DATE, VERSION, and other INFO |
| 61 |
%\fi |
| 62 |
%\ProvidesFile{figcaps} |
| 63 |
[1999/02/23 4.7 (PWD)] |
| 64 |
% \changes{4.0}{1993 Oct 12}{First integrated documented version} |
| 65 |
% \changes{4.1}{1993 Oct 29}{Add coding for JGR, GRL, NLINPROC} |
| 66 |
% \changes{4.1}{1993 Oct 29}{Add \cs{iffigmark} for marginal notes} |
| 67 |
% \changes{4.1}{1993 Oct 29}{Add \cs{@tempa} construct to get \cs{@float} |
| 68 |
% out of \cs{if} \cs{fi} brackets} |
| 69 |
% \changes{4.1}{1993 Nov 15}{For JGR and GRL, tables after captions} |
| 70 |
% \changes{4.1}{1993 Nov 20}{Add coding for AGU supplement} |
| 71 |
% \changes{4.2}{1993 Nov 20}{Add \cs{figbox} for AGU supplement} |
| 72 |
% \changes{4.2}{1993 Nov 20}{AGU supplement: captions in two widths again} |
| 73 |
% \changes{4.2}{1993 Dec 16}{Suppress floats for AGU planotable} |
| 74 |
% \changes{4.2}{1993 Dec 21}{Add \cs{if@filesw} for extra appendix entries} |
| 75 |
% \changes{4.3}{1994 May 19}{Convert to \LaTeXe, add language and other |
| 76 |
% options, add \cs{figmarkon/off} and \cs{figcapson/off}} |
| 77 |
% \changes{4.3a}{1994 Jun 06}{For AGU, change \cs{@makefcaption}} |
| 78 |
% \changes{4.3b}{1994 Jun 22}{Update to first official release of \LaTeXe} |
| 79 |
% \changes{4.3c}{1994 Nov 30}{Bad bug in \cs{figmarkoff} fixed, caused |
| 80 |
% crashes} |
| 81 |
% \changes{4.3d}{1995 Jan 3}{Update documentation to PWD standard} |
| 82 |
% \changes{4.4}{1995 Jan 8}{Fix bug caused by LTX 94/12/1 \cs{@writefile}} |
| 83 |
% \changes{4.5}{1996 Jan 10}{Allow first float to be in appendix} |
| 84 |
% \changes{4.5a}{1996 Jun 27}{Change \texttt{nlinproc} option to \texttt{egs}} |
| 85 |
% \changes{4.5b}{1996 Jul 22}{Allow \cs{figbox} to scale automatically} |
| 86 |
% \changes{4.5c}{1996 Jul 29}{Add \cs{figbox*} to suppress frame} |
| 87 |
% \changes{4.5d}{1996 Aug 20}{Fix table notes for AGU} |
| 88 |
% \changes{4.5e}{1996 Oct 10}{Zero \cs{parindent} for EGS} |
| 89 |
% \changes{4.5f}{1997 Mar 16}{Fix copyright for subpack} |
| 90 |
% \changes{4.5g}{1997 Apr 29}{Conform to new \texttt{docstrip}} |
| 91 |
% \changes{4.5h}{1997 Nov 18}{Fix appendix problem for AGU} |
| 92 |
% \changes{4.6}{1998 Sep 14}{Add \texttt{longtable} environment} |
| 93 |
% \changes{4.7}{1999 Feb 23}{Update copyright notice} |
| 94 |
% |
| 95 |
% \CheckSum{1417} |
| 96 |
% \CharacterTable |
| 97 |
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 98 |
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 99 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 100 |
% Exclamation \! Double quote \" Hash (number) \# |
| 101 |
% Dollar \$ Percent \% Ampersand \& |
| 102 |
% Acute accent \' Left paren \( Right paren \) |
| 103 |
% Asterisk \* Plus \+ Comma \, |
| 104 |
% Minus \- Point \. Solidus \/ |
| 105 |
% Colon \: Semicolon \; Less than \< |
| 106 |
% Equals \= Greater than \> Question mark \? |
| 107 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 108 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 109 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 110 |
% Right brace \} Tilde \~} |
| 111 |
% |
| 112 |
% \iffalse |
| 113 |
%<*install> |
| 114 |
%^^A ============================================= |
| 115 |
%^^A Here is the docstrip installation file |
| 116 |
%^^A It is written on first LaTeX run if it |
| 117 |
%^^A does not already exist |
| 118 |
%^^A ============================================= |
| 119 |
\begin{filecontents*}{figcaps.ins} |
| 120 |
% File: figcaps.ins |
| 121 |
% Copyright 1999 Patrick W. Daly |
| 122 |
% |
| 123 |
% This file can be redistributed and/or modified under the terms |
| 124 |
% of the LaTeX Project Public License Distributed from CTAN |
| 125 |
% archives in directory macros/latex/base/lppl.txt; either |
| 126 |
% version 1 of the License, or any later version. |
| 127 |
% |
| 128 |
% It is an installation file for extracting package and driver |
| 129 |
% files from the original source file. Simply process it under |
| 130 |
% TeX or LaTeX. |
| 131 |
|
| 132 |
\input docstrip |
| 133 |
|
| 134 |
\preamble |
| 135 |
============================================= |
| 136 |
IMPORTANT NOTICE: |
| 137 |
|
| 138 |
This program can be redistributed and/or modified under the terms |
| 139 |
of the LaTeX Project Public License Distributed from CTAN |
| 140 |
archives in directory macros/latex/base/lppl.txt; either |
| 141 |
version 1 of the License, or any later version. |
| 142 |
|
| 143 |
This is a generated file. |
| 144 |
It may not be distributed without the original source file \inFileName. |
| 145 |
|
| 146 |
Full documentation can be obtained by LaTeXing that original file. |
| 147 |
Only a few abbreviated comments remain here to describe the usage. |
| 148 |
============================================= |
| 149 |
\endpreamble |
| 150 |
\postamble |
| 151 |
|
| 152 |
<<<<< End of generated file <<<<<< |
| 153 |
\endpostamble |
| 154 |
|
| 155 |
\declarepreamble\driver |
| 156 |
============================================ |
| 157 |
This is the driver file to produce the LaTeX documentation |
| 158 |
from the original source file \inFileName. |
| 159 |
|
| 160 |
Make changes to it as needed. (Never change the file \inFileName!) |
| 161 |
============================================ |
| 162 |
\endpreamble |
| 163 |
|
| 164 |
\declarepostamble\driverq |
| 165 |
|
| 166 |
End of documentation driver file. |
| 167 |
\endpostamble |
| 168 |
|
| 169 |
\keepsilent |
| 170 |
\askforoverwritefalse |
| 171 |
|
| 172 |
\generate{\file{figcaps.sty}{\from{figcaps.dtx}{package}} |
| 173 |
\file{figcaps.drv}{\usepreamble\driver\usepostamble\driverq |
| 174 |
\from{figcaps.dtx}{driver}} |
| 175 |
} |
| 176 |
|
| 177 |
\obeyspaces |
| 178 |
\Msg{******************************************}% |
| 179 |
\Msg{* For documentation, process figcaps.dtx *}% |
| 180 |
\Msg{* or the driver file figcaps.drv *}% |
| 181 |
\Msg{******************************************} |
| 182 |
|
| 183 |
\endbatchfile |
| 184 |
\end{filecontents*} |
| 185 |
%</install> |
| 186 |
%<*driver> |
| 187 |
\documentclass{ltxdoc} |
| 188 |
%<driver>%\documentclass[twoside]{ltxdoc} |
| 189 |
%<driver>%\documentclass[a4paper]{ltxdoc} |
| 190 |
%<driver>%\documentclass[twoside,a4paper]{ltxdoc} |
| 191 |
\raggedbottom |
| 192 |
|
| 193 |
%** To include the detailed explanation of the coding, comment out |
| 194 |
%** the next line |
| 195 |
\OnlyDescription |
| 196 |
|
| 197 |
%** To produce a command index: add the following line for one run, |
| 198 |
%** then run makeindex -s gind.ist natbib |
| 199 |
%** and reprocess, with or without this line (much faster without) |
| 200 |
%<driver>% \EnableCrossrefs\CodelineIndex |
| 201 |
|
| 202 |
%** To produce a change history: add the following line for one run, |
| 203 |
%** then run makeindex -s gglo.ist -o natbib.gls natbib.glo |
| 204 |
%** and reprocess, with or without this line (faster without) |
| 205 |
%<driver>% \RecordChanges |
| 206 |
|
| 207 |
\DisableCrossrefs %May stay; zapped by \EnableCrossrefs |
| 208 |
\CodelineNumbered %May stay |
| 209 |
|
| 210 |
\begin{document} |
| 211 |
\DocInput{figcaps.dtx} |
| 212 |
\end{document} |
| 213 |
%</driver> |
| 214 |
%\fi |
| 215 |
% |
| 216 |
% \DoNotIndex{\begin,\CodelineIndex,\CodelineNumbered,\def,\DisableCrossrefs} |
| 217 |
% \DoNotIndex{\DocInput,\documentclass,\EnableCrossrefs,\end,\GetFileInfo} |
| 218 |
% \DoNotIndex{\NeedsTeXFormat,\OnlyDescription,\RecordChanges,\usepackage} |
| 219 |
% \DoNotIndex{\ProvidesClass,\ProvidesPackage,\ProvidesFile,\RequirePackage} |
| 220 |
% \DoNotIndex{\LoadClass,\PassOptionsToClass,\PassOptionsToPackage} |
| 221 |
% \DoNotIndex{\DeclareOption,\CurrentOption,\ProcessOptions,\ExecuteOptions} |
| 222 |
% \DoNotIndex{\AtEndOfClass,\AtEndOfPackage,\AtBeginDocument,\AtEndDocument} |
| 223 |
% \DoNotIndex{\InputIfFileExists,\IfFileExists,\ClassError,\PackageError} |
| 224 |
% \DoNotIndex{\ClassWarning,\PackageWarning,\ClassWarningNoLine} |
| 225 |
% \DoNotIndex{\PackageWarningNoLine,\ClassInfo,\PackageInfo,\MessageBreak} |
| 226 |
% \DoNotIndex{\space,\protect,\DeclareRobustCommand,\CheckCommand} |
| 227 |
% \DoNotIndex{\newcommand,\renewcommand,\providecommand,\newenvironment} |
| 228 |
% \DoNotIndex{\renewenvironment,\newif,\newlength,\newcounter,\setlength} |
| 229 |
% \DoNotIndex{\setcounter,\if,\ifx,\ifcase,\ifnum,\ifdim,\else,\fi} |
| 230 |
% \DoNotIndex{\texttt,\textbf,\textrm,\textsl,\textsc} |
| 231 |
% \DoNotIndex{\textup,\textit,\textmd,\textsf,\emph} |
| 232 |
% \DoNotIndex{\ttfamily,\rmfamily,\sffamily,\mdseries,\bfseries,\upshape} |
| 233 |
% \DoNotIndex{\slshape,\scshape,\itshape,\em,\LaTeX,\LaTeXe} |
| 234 |
% \DoNotIndex{\filename,\fileversion,\filedate,\let} |
| 235 |
% \DoNotIndex{\@ifundefined,\@input,\@latexerr,\@makecaption,\@makeother} |
| 236 |
% \DoNotIndex{\@mkboth,\@namedef,\@tempa,\@tempb,\@writefile,\\,\{,\},\^} |
| 237 |
% \DoNotIndex{\active,\addcontentsline,\addtocontents,\begingroup,\bgroup} |
| 238 |
% \DoNotIndex{\bigskip,\catcode,\clearpage,\closeout,\def,\do,\dospecials} |
| 239 |
% \DoNotIndex{\egroup,\else,\end@dblfloat,\end@float,\endgroup,\expandafter} |
| 240 |
% \DoNotIndex{\fi,\filedate,\filename,\fileversion,\gdef,\ifx,\immediate} |
| 241 |
% \DoNotIndex{\jobname,\label,\let,\long,\newcounter,\newif,\newpage} |
| 242 |
% \DoNotIndex{\newwrite,\openout,\par,\refstepcounter,\relax,\space} |
| 243 |
% \DoNotIndex{\stepcounter,\string,\typeout,\uppercase,\vbox,\vskip} |
| 244 |
% \DoNotIndex{\vspace,\marginpar,\if@filesw,\parindent} |
| 245 |
% \DoNotIndex{\advance,\divide,\fboxrule,\fboxsep,\fnum@figure,\fnum@plate} |
| 246 |
% \DoNotIndex{\fnum@table,\framebox,\hbox,\hfil,\hsize,\newdimen} |
| 247 |
% \DoNotIndex{\providecommand,\section,\setcounter,\small,\textwidth} |
| 248 |
% \DoNotIndex{\vrule,\vss,\z@} |
| 249 |
% \DoNotIndex{\@caption,\@captype,\@dblfloat,\@depth,\@float,\@height} |
| 250 |
% \DoNotIndex{\@ifnextchar,\@tempdima,\@term,\@width,\cl@section} |
| 251 |
% \DoNotIndex{\cr@relax,\fbox} |
| 252 |
% |
| 253 |
% \setcounter{IndexColumns}{2} |
| 254 |
% \setlength{\IndexMin}{10cm} |
| 255 |
% \setcounter{StandardModuleDepth}{1} |
| 256 |
% |
| 257 |
% \GetFileInfo{figcaps} |
| 258 |
% |
| 259 |
% \title{\bfseries A Package to Put Figures and Tables at the End of |
| 260 |
% an Article} |
| 261 |
% |
| 262 |
% \author{Patrick W. Daly} |
| 263 |
% |
| 264 |
% \date{This paper describes package \texttt{\filename}\\ |
| 265 |
% version \fileversion{} from \filedate\\[1ex] |
| 266 |
% \textsl{It is part of the \texttt{preprint} collection of packages} |
| 267 |
% } |
| 268 |
% |
| 269 |
% \maketitle |
| 270 |
% |
| 271 |
% \pagestyle{myheadings} |
| 272 |
% \markboth{P. W. Daly}{PUTTING FIGURES AND TABLES AT THE END} |
| 273 |
% |
| 274 |
%^^A In order to keep all marginal notes on the one (left) side: |
| 275 |
%^^A (otherwise they switch sides disasterously with twoside option) |
| 276 |
% \makeatletter \@mparswitchfalse \makeatother |
| 277 |
% |
| 278 |
% \newcommand{\thestyle}{\texttt{\filename}} |
| 279 |
% |
| 280 |
%\begin{small}\begin{center}\textbf{Summary}\end{center} |
| 281 |
% The stripped version of this file contains the following brief description: |
| 282 |
%\iffalse |
| 283 |
%<*package&!subpack> |
| 284 |
%\fi |
| 285 |
% \begin{verbatim} |
| 286 |
% This option allows the figure captions to be collected throughout |
| 287 |
% the paper and printed on a separate page at the end. The figures |
| 288 |
% themselves will not appear in the text. This is for purposes of |
| 289 |
% a manuscript for submission. |
| 290 |
% Similarly, tables are not printed in the text, but are outputted at |
| 291 |
% the end, after the figure captions. |
| 292 |
%<*plates> |
| 293 |
% A plate environment also exists, handled just like figures. |
| 294 |
%</plates> |
| 295 |
%<*longtab> |
| 296 |
% A longtable environment exists, for use with the longtable tools package. |
| 297 |
%</longtab> |
| 298 |
% The figures themselves may appear, with captions, at |
| 299 |
% the end, after the tables. This is done with command \printfigures |
| 300 |
% in the preamble. This only makes sense if the figures have been |
| 301 |
% generated by LaTeX or if they are being imported. |
| 302 |
% Marginal notes added where environments placed if \figmarkon given. |
| 303 |
% NOTE: Only works for article-like styles at present, where \section is |
| 304 |
% the highest sectioning level. |
| 305 |
%<*!toc> |
| 306 |
% NOTE: Tables of contents (incl figures and tables) cannot be used |
| 307 |
%</!toc> |
| 308 |
% NOTE: This file must be read in AFTER \appendix has been defined; |
| 309 |
%<*sublab> |
| 310 |
% if sublabel.sty is also used, it must be read in first. |
| 311 |
%</sublab> |
| 312 |
%<agu> % The captions are formatted as for AGU journals. |
| 313 |
%<egs> % The captions are formatted as for EGS journals. |
| 314 |
%<*!209> |
| 315 |
% |
| 316 |
% Options with LaTeX2e: |
| 317 |
% printfigures - prints the figures at the end of the article, (is |
| 318 |
% like issuing the \printfigures command) |
| 319 |
% figmark - turns on the markers for figures and tables in the text, |
| 320 |
% (is like issuing \figmarkon) |
| 321 |
% figon/off - activates or deactivates the whole procedure (is like |
| 322 |
% (issuing \figcapson or \figcapsoff). Default=on. |
| 323 |
% mylang - (default) leaves explicit text (e.g. `Figure Captions' |
| 324 |
% as is, or if undefined, makes them English |
| 325 |
% english,american,german,austrian,french,esperanto - changes explicit |
| 326 |
% texts accordingly |
| 327 |
% blank - makes explicit texts empty. |
| 328 |
%</!209> |
| 329 |
% \end{verbatim} |
| 330 |
%\iffalse |
| 331 |
%----------------------------------------------------------- |
| 332 |
%</package&!subpack> |
| 333 |
%\fi |
| 334 |
%\end{small} |
| 335 |
% |
| 336 |
% \section{Introduction} |
| 337 |
% Often when producing manuscripts for submission to a journal, it is |
| 338 |
% required that the figure captions be listed at the end on a separate |
| 339 |
% page, and also that tables be put at the end too. Then when the |
| 340 |
% manuscript is ready and camera-ready copy, or a preprint, is to be |
| 341 |
% generated, one has to move them all back to the proper positions in the |
| 342 |
% paper. |
| 343 |
% |
| 344 |
% This style alleviates this problem. The \texttt{figure} and \texttt{table} |
| 345 |
% environments are placed in the text as they should be for the preprint or |
| 346 |
% camera-ready copy, but the tables actually are printed at the end. The |
| 347 |
% figures are not printed at all, but their captions are listed on a |
| 348 |
% separate page at the end. Optionally, the figures themselves may be |
| 349 |
% printed at the very end. This last only makes sense if there is something |
| 350 |
% in the figures, i.e., they have been produced with \texttt{picture} or are |
| 351 |
% imported graphics. |
| 352 |
% |
| 353 |
% \section{Invoking the Package} |
| 354 |
% The macros in this package are included in the main document |
| 355 |
% with the |\usepackage| command of \LaTeXe, |
| 356 |
% \begin{quote} |
| 357 |
% |\documentclass[..]{...}|\\ |
| 358 |
% |\usepackage[|\emph{options}|]{|\texttt{\filename}|}| |
| 359 |
% \end{quote} |
| 360 |
% where the possible \emph{options} are described below. |
| 361 |
% |
| 362 |
% Alternatively, the name of the package is added as an option to the |
| 363 |
% |\documentstyle| command in \LaTeX~2.09 compatibility mode, as |
| 364 |
% \begin{quote} |
| 365 |
% |\documentstyle[..|\texttt{\filename}|..]{...}| |
| 366 |
% \end{quote} |
| 367 |
% |
| 368 |
% It may only be used for \texttt{article}, or an article-like main class. |
| 369 |
% That is, for one that does not contain the |\chapter| level of |
| 370 |
% sectioning. |
| 371 |
% |
| 372 |
% The order in which other packages are loaded is important for certain |
| 373 |
% features. If my package |
| 374 |
% \texttt{sublabel} is included, then it must come before \thestyle. |
| 375 |
% Furthermore, \thestyle{} adds to the existing definition of |
| 376 |
% |\appendix|, so that if the author has any packages that alter this |
| 377 |
% definition, they must come before \thestyle. Clearly, |\appendix| may |
| 378 |
% not be redefined afterwards. |
| 379 |
% |
| 380 |
% \section{Using the Package} |
| 381 |
% \DescribeMacro{\figcapson}\DescribeMacro{\figcapsoff} |
| 382 |
% The macro package in \thestyle{} operates pretty much automatically. |
| 383 |
% The whole thing may be turned on and off with the commands |\figcapson| |
| 384 |
% and |\figcapsoff|. The default is \meta{on}. One might want to |
| 385 |
% control the placement of figures and tables with this flag rather than by |
| 386 |
% adding and removing the option from the |\documentclass| command. |
| 387 |
% |
| 388 |
% Alternatively, the \LaTeXe{} options \texttt{figon} and \texttt{figoff} |
| 389 |
% have the same effect, with \texttt{figon} being the default. |
| 390 |
% |
| 391 |
% \DescribeMacro{\printfigures} |
| 392 |
% The only other means of interacting with the macros is with the command |
| 393 |
% |\printfigures|, which, when given anywhere in the text, enables the |
| 394 |
% figures themselves to be output at the very end of the paper. Without |
| 395 |
% this, only the captions are listed. With it, both captions and figures |
| 396 |
% are output. |
| 397 |
% |
| 398 |
% The \LaTeXe{} option \texttt{printfigures} in |\usepackage| is |
| 399 |
% equivalent to issuing the command |\printfigures| in the text. |
| 400 |
% |
| 401 |
% \DescribeMacro{\figmarkon} |
| 402 |
% \DescribeMacro{\figmarkoff} |
| 403 |
% Another option is to put marginal notes into the text at the place |
| 404 |
% where the float environment is entered. This is useful for camera-ready |
| 405 |
% copy that will be cut-and-pasted together to indicate where the figures |
| 406 |
% and tables should appear. The commands |\figmarkon| and |\figmarkoff| |
| 407 |
% control this feature, with the default being \meta{off}. |
| 408 |
% |
| 409 |
% The \LaTeXe{} option \texttt{figmark} in |\usepackage| sets this |
| 410 |
% default to \meta{on}; in other words, it is equivalent to issuing |
| 411 |
% |\figmarkon| in the text. |
| 412 |
% |
| 413 |
% \DescribeMacro{\figurecapname} |
| 414 |
% \DescribeMacro{\tablepagename} |
| 415 |
% \DescribeMacro{\figurepagename} |
| 416 |
% The text that is written as header at the top of the special pages is |
| 417 |
% defined in three commands |\figurecapname|, |\tablepagename|, and |
| 418 |
% |\figurepagename|. They default to English text, but may be redefined to |
| 419 |
% other languages, or suppressed altogether, with |\renewcommand| or with |
| 420 |
% \LaTeXe{} options (see page~\pageref{names}). |
| 421 |
% |
| 422 |
% \section{How it Works} |
| 423 |
% The contents of all the \texttt{figure} and \texttt{table} environments are |
| 424 |
% written to auxiliary files {\tt.lof} and {\tt.lot} respectively, and then |
| 425 |
% these are read in again at the end of the paper. Since these auxiliary |
| 426 |
% files are normally used to write information for the lists of figures and |
| 427 |
% tables, this capability is lost. However, it is not likely that one wants |
| 428 |
% such lists, or even a table of contents, in a manuscript. In fact, the |
| 429 |
% commands |\tableofcontents|, |\listoffigures|, |\listoftables| are turned |
| 430 |
% off (they issue a warning message). |
| 431 |
% |
| 432 |
% If you really do need tables of contents, then see the extra features |
| 433 |
% below. |
| 434 |
% |
| 435 |
% \subsection{With the \texttt{longtable} Package} |
| 436 |
% This package may optionally be used with the \texttt{longtable} environment defined |
| 437 |
% in the package of the same name. Since such tables are normally long, i.e.\ |
| 438 |
% over a page, the list of tables at the back will always start a new page for |
| 439 |
% each of these. |
| 440 |
% |
| 441 |
% For preprints, when the tables are not moved to the back (|\figcapsoff|), it |
| 442 |
% makes sense to put the \texttt{longtable} environment inside the |\afterpage| |
| 443 |
% command (from the \texttt{afterpage} package). However, with |\figcapson|, |
| 444 |
% and the table is move, this is useless. In this case, the |\afterpage| |
| 445 |
% command is deactivated. One should realize this in case it is used for other |
| 446 |
% purposes. |
| 447 |
% |
| 448 |
% \subsection{As Module to Journal-Specific Styles} |
| 449 |
% Although \thestyle{} is meant to be an all-purpose bibliographic style |
| 450 |
% \emph{package}, it may also be incorporated as a module to other |
| 451 |
% packages for specific journals. In this case, many of the general features may |
| 452 |
% be left off. This is allowed for with \texttt{docstrip} options that not |
| 453 |
% only leave off certain codelines, but also include extra ones. So far, |
| 454 |
% options exist for |
| 455 |
% \begin{description} |
| 456 |
% \item[\ttfamily egs] for \textsl{European Geophysical Society} journals. |
| 457 |
% \item[\ttfamily agu] for \textsl{American Geophysical Union} journals. |
| 458 |
% \end{description} |
| 459 |
% |
| 460 |
% Previous options \texttt{jgr} and \texttt{grl} have become obsolete due |
| 461 |
% to revisions in these journals; they have been replaced by the more |
| 462 |
% general \texttt{agu} option. |
| 463 |
% |
| 464 |
% \section{\LaTeXe{} Options} |
| 465 |
% Under \LaTeXe, \emph{options} may be added to the |\usepackage| command |
| 466 |
% that loads the package. Available options for \thestyle{} set certain |
| 467 |
% control flags, thus replacing the equivalent commands, or select the |
| 468 |
% language for the texts that are printed by |\figurecapname|, |
| 469 |
% |\tablepagename|, and |\figurepagename|. |
| 470 |
% \begin{description} |
| 471 |
% \item[\ttfamily figon] (default) activates the whole procedure of moving |
| 472 |
% figures and tables to the back of the article, (same as |
| 473 |
% |\figcapson|); |
| 474 |
% |
| 475 |
% \item[\ttfamily figoff] deactivates the whole procedure, (same as |
| 476 |
% |\figcapsoff|); |
| 477 |
% |
| 478 |
% \item[\ttfamily printfigures] allows the figures themselves and not just |
| 479 |
% their captions to be output at the very end, in addition to the |
| 480 |
% caption page, (same as |\printfigures|); by default this is not done; |
| 481 |
% |
| 482 |
% \item[\ttfamily figmark] enables marking of figure and table environments |
| 483 |
% in the text with marginal notes; (same as |\figmarkon|); |
| 484 |
% |
| 485 |
% \item[\ttfamily mylang] (default) leaves the three \texttt{name} commands |
| 486 |
% as they are; however if they are not defined at all, then they are |
| 487 |
% given English values; since these name commands are not standard, one |
| 488 |
% cannot expect them to be set by other language adaption packages; |
| 489 |
% |
| 490 |
% \item[\ttfamily english, american, german, austrian, french, esperanto] |
| 491 |
% \label{names} |
| 492 |
% set the \texttt{name} commands to the translation in the |
| 493 |
% corresponding language, overwriting any previous definitions; |
| 494 |
% |
| 495 |
% \item[\ttfamily blank] sets the text of |\figurecapname|, |
| 496 |
% |\tablepagename|, and |\figurepagename| to nothing. |
| 497 |
% \end{description} |
| 498 |
% |
| 499 |
% \StopEventually{\PrintIndex\PrintChanges} |
| 500 |
% |
| 501 |
% \section{Options with \texttt{docstrip}} |
| 502 |
% The source \texttt{.dtx} file is meant to be processed with |
| 503 |
% \texttt{docstrip}, for which a number of options are available: |
| 504 |
% \begin{description} |
| 505 |
% \item[\ttfamily plates] permits \texttt{plate} and \texttt{plate*} |
| 506 |
% environments to be treated just like \texttt{figure} and |
| 507 |
% \texttt{figure*}; the contents are written to the same auxiliary file |
| 508 |
% and the captions are mixed with those of the figures. The environments |
| 509 |
% must already exist though, for with this option the coding is included |
| 510 |
% to treat plates like figures, but it does not define such plate |
| 511 |
% environments. |
| 512 |
% |
| 513 |
% \item[\ttfamily longtab] permits \texttt{longtable} environment from the |
| 514 |
% \texttt{longtable} tools package to be treated too (\LaTeXe\ only). |
| 515 |
% |
| 516 |
% \item[\ttfamily sublab] adds coding to enable the \thestyle{} macros to |
| 517 |
% function with my other option \texttt{sublabel}, which permits objects |
| 518 |
% to be numbered 4{\it a}, 4{\it b}, etc. This coding may always be |
| 519 |
% included, even if \texttt{sublabel} is not invoked; the converse is |
| 520 |
% not true: if \texttt{sublabel} is present, then this coding must also |
| 521 |
% be there, and \texttt{sublabel} must precede \thestyle{} in the list |
| 522 |
% of options. |
| 523 |
% |
| 524 |
% \item[\ttfamily toc] allows auxiliary files with the extensions {\tt.pof} |
| 525 |
% and {\tt.pot} so that there is no conflict with the tables of contents |
| 526 |
% files. Thus |\tableofcontents|, |\listoffigures|, |\listoftables|, and |
| 527 |
% possibly |\listofplates| may be used as normal. |
| 528 |
% |
| 529 |
% \item[\ttfamily package] to produce a \texttt{.sty} package file with most |
| 530 |
% comments removed; |
| 531 |
% |
| 532 |
% \item[\ttfamily 209] for a style option file that will run under the older |
| 533 |
% \LaTeX~2.09; |
| 534 |
% |
| 535 |
% \item[\ttfamily subpack] (together with \texttt{package}) for coding that |
| 536 |
% is to be included inside a larger package; even more comments are |
| 537 |
% removed, as well as \LaTeXe{} option handling and identification; |
| 538 |
% |
| 539 |
% \item[\ttfamily agu] (with \texttt{package,subpack}) for special coding |
| 540 |
% for the \textsl{AGU$^{++}$} package; |
| 541 |
% |
| 542 |
% \item[\ttfamily egs] (with \texttt{package,subpack}) for special |
| 543 |
% coding for the \textsl{EGS} package; |
| 544 |
% |
| 545 |
% \item[\ttfamily driver] to produce a driver \texttt{.drv} file that will |
| 546 |
% print out the documentation under \LaTeXe. The documentation cannot |
| 547 |
% be printed under \LaTeX~2.09. |
| 548 |
% |
| 549 |
% \end{description} |
| 550 |
% The source file \texttt{\filename.dtx} is itself a driver file and can |
| 551 |
% be processed directly by \LaTeXe. |
| 552 |
% |
| 553 |
% \section{The Coding} |
| 554 |
% This section presents and explains the actual coding of the macros. |
| 555 |
% It is nested between |%<*package>| and |%</package>|, which |
| 556 |
% are indicators to \texttt{docstrip} that this coding belongs to the package |
| 557 |
% file. |
| 558 |
% |
| 559 |
% The \texttt{docstrip} option |<subpack>| should only be called if the |
| 560 |
% coding is to be included as part of another package, in which case the |
| 561 |
% announcement text and \LaTeXe{} options are suppressed. |
| 562 |
% |
| 563 |
% An inferior version of this coding is provided for running as a |
| 564 |
% style file under \LaTeX~2.09. Code lines belonging to this are |
| 565 |
% indicated with guard |<209>|; those for LaTeXe{} only with |<!209>|. |
| 566 |
% |
| 567 |
% Now test that the main style is article-like, i.e., it has no chapters. |
| 568 |
% This is because the figure caption list as well as the tables page are output |
| 569 |
% under a |\section*|, and because of the relabelling of figures, tables, |
| 570 |
% equations within appendices. (Maybe someday this will be changed.) |
| 571 |
% \begin{macrocode} |
| 572 |
%<*package> |
| 573 |
\@ifundefined{chapter}{}{% |
| 574 |
%<209> \@latexerr |
| 575 |
%<!209> \PackageError{figcaps} |
| 576 |
{`figcaps' may only be used with article-like classes} |
| 577 |
{There is no help. You just cannot use `figcaps'}} |
| 578 |
% \end{macrocode} |
| 579 |
% |
| 580 |
% \begin{macro}{\iffigcaps} |
| 581 |
% \begin{macro}{\iffigmark} |
| 582 |
% \changes{4.1}{1993 Oct 18}{Add flag to switch marginal notes on/off} |
| 583 |
% \begin{macro}{\if@figpage} |
| 584 |
% Define a few flags that control the operations, such as whether the whole |
| 585 |
% procedure is turned on, whether figures and tables are marked in the text |
| 586 |
% where they should appear, and whether a page of figures (not just |
| 587 |
% captions) is output. These are set by commands defined below and/or by |
| 588 |
% \LaTeXe options. |
| 589 |
% \begin{macrocode} |
| 590 |
\newif\iffigcaps \figcapstrue |
| 591 |
\newif\iffigmark \figmarkfalse |
| 592 |
\newif\if@figpage \@figpagefalse |
| 593 |
% \end{macrocode} |
| 594 |
% \end{macro}\end{macro}\end{macro} |
| 595 |
% |
| 596 |
% \subsection{Setting Defaults and \LaTeXe{} Options} |
| 597 |
% \begin{macro}{\figurecapname} |
| 598 |
% \begin{macro}{\tablepagename} |
| 599 |
% \begin{macro}{\figurepagename} |
| 600 |
% Define explicit text with name commands that may be changed by language |
| 601 |
% adaptations. Since these are non-standard, it is unlikely that they |
| 602 |
% already exist, but nevertheless, it does not hurt to assume that they do. |
| 603 |
% \begin{macrocode} |
| 604 |
%<*subpack|209> |
| 605 |
\@ifundefined{figurecapname}{\def\figurecapname{Figure Captions}}{} |
| 606 |
\@ifundefined{tablepagename}{\def\tablepagename{Tables}}{} |
| 607 |
\@ifundefined{figurepagename}{\def\figurepagename{Figures}}{} |
| 608 |
%</subpack|209> |
| 609 |
% \end{macrocode} |
| 610 |
% |
| 611 |
% \begin{macro}{\DeclareOption} |
| 612 |
% \changes{4.3}{1994 May 19}{Add language options for \LaTeXe} |
| 613 |
% In \LaTeXe, the initial values of these commands can be set with options |
| 614 |
% to the |\usepackage| command. They are processed in the order given, not |
| 615 |
% in the order defined (starred version of |\ProcessOptions|). |
| 616 |
% \begin{macrocode} |
| 617 |
%<*!subpack&!209> |
| 618 |
\DeclareOption{english}{\def\figurecapname{Figure Captions}% |
| 619 |
\def\tablepagename{Tables}% |
| 620 |
\def\figurepagename{Figures}} |
| 621 |
\DeclareOption{american}{\ExecuteOptions{english}} |
| 622 |
\DeclareOption{german}{\def\figurecapname{Untertiteln der Abbildungen}% |
| 623 |
\def\tablepagename{Tabellen}% |
| 624 |
\def\figurepagename{Abbildungen}} |
| 625 |
\DeclareOption{austrian}{\ExecuteOptions{german}} |
| 626 |
\DeclareOption{french}{\def\figurecapname{Titres des Figures}% |
| 627 |
\def\tablepagename{Tableaux}% |
| 628 |
\def\figurepagename{Figures}} |
| 629 |
\DeclareOption{esperanto}{\def\figurecapname{Titroj de la Figuroj}% |
| 630 |
\def\tablepagename{Tabeloj}% |
| 631 |
\def\figurepagename{Figuroj}} |
| 632 |
\DeclareOption{blank}{\def\figurecapname{}% |
| 633 |
\def\tablepagename{}% |
| 634 |
\def\figurepagename{}} |
| 635 |
\DeclareOption{blank}{\def\appendixname{}} |
| 636 |
\DeclareOption{mylang}{\providecommand{\figurecapname}{Figure Captions}% |
| 637 |
\providecommand{\tablepagename}{Tables}% |
| 638 |
\providecommand{\figurepagename}{Figures}} |
| 639 |
\DeclareOption{figmark}{\figmarktrue} |
| 640 |
\DeclareOption{printfigures}{\@figpagetrue} |
| 641 |
\DeclareOption{figon}{\figcapstrue} |
| 642 |
\DeclareOption{figoff}{\figcapsfalse} |
| 643 |
\ExecuteOptions{mylang,figon} |
| 644 |
\ProcessOptions* |
| 645 |
%</!subpack&!209> |
| 646 |
% \end{macrocode} |
| 647 |
% \end{macro}\end{macro}\end{macro}\end{macro} |
| 648 |
% |
| 649 |
% \subsection{Low Level Routines --- the Tricky Bits} |
| 650 |
% The way in which this routine is to work is as follows: the float |
| 651 |
% commands |\figure|, |\table|, and optionally |\plate| are redefined so |
| 652 |
% that they write everything up to the corresponding |\end| command to an |
| 653 |
% auxiliary file. These files have extensions {\tt.lof} (for figures and |
| 654 |
% plates) and {\tt.lot} (for tables). The entire contents must be written |
| 655 |
% literally, that is as verbatim, without any expansion. The terminal |
| 656 |
% |\end| text must also be literal. |
| 657 |
% |
| 658 |
% The actual internal commands that will do this are called |\@vfig|, |
| 659 |
% |\@vsfig|, etc., where the second variant is for the starred version of |
| 660 |
% the float command. These must be defined in such a way that |\|, |{|, |
| 661 |
% and |}| are temporarily characters (catcode=12); their functionality is |
| 662 |
% taken over by \verb!|!, |[|, and |]|. Furthermore, the carriage return |
| 663 |
% |^^M| must also be made active so that it may be used as a character |
| 664 |
% within the template of the definitions. Its function is to separate the |
| 665 |
% individual lines of text. It must be active, not `other', because |
| 666 |
% |\set@literal| (see below) will give it a definition of |\relax|. (It |
| 667 |
% probably cannot be made `other' anyway because it is unprintable.) |
| 668 |
% |
| 669 |
% Switch the category codes, within a group, of course, to keep them local. |
| 670 |
% \begin{macrocode} |
| 671 |
\begingroup |
| 672 |
\catcode `|=0 \catcode `[= 1 |
| 673 |
\catcode`]=2 \catcode `\{=12 \catcode `\}=12 |
| 674 |
\catcode`\^^M=13 \catcode`\\=12 % |
| 675 |
% \end{macrocode} |
| 676 |
% \begin{macro}{\@vfig} |
| 677 |
% Now define the true working commands. Take |\@vfig| as prototype for all |
| 678 |
% the others. Its arguement is everything up to the literal text |
| 679 |
% |\end{figure}|. This argument is expanded and used as argument to |
| 680 |
% |\writelof| with an extra line termination (|^^M|) and the text |
| 681 |
% |\end{figure}| added. The function |\writelof| dissects its argument into |
| 682 |
% individual lines (as indicated by the active |^^M|) and writes them to |
| 683 |
% the {\tt.lof} file, until it finds a line of text equal to |\@term|. |
| 684 |
% Hence, this termination command is first defined as |\end{figure}|. |
| 685 |
% Finally, |\@vfig| issues the \emph{command} (not the literal text) |
| 686 |
% |\end{figure}| in order to close the \texttt{figure} environment. This last |
| 687 |
% command appears in the definition as \verb!|end[figure]! because of the |
| 688 |
% altered category codes. |
| 689 |
% \SpecialEscapechar{\|} |
| 690 |
% \begin{macrocode} |
| 691 |
|long|gdef|@vfig#1\end{figure}[|def|@term[\end{figure}]% |
| 692 |
|expandafter|writelof#1^^M\end{figure}^^M|end[figure]]% |
| 693 |
% \end{macrocode} |
| 694 |
% \end{macro} |
| 695 |
% \begin{macro}{\@vsfig} |
| 696 |
% The equivalent function for \texttt{figure*} is now defined. |
| 697 |
% \SpecialEscapechar{\|} |
| 698 |
% \begin{macrocode} |
| 699 |
|long|gdef|@vsfig#1\end{figure*}[|def|@term[\end{figure*}]% |
| 700 |
|expandafter|writelof#1^^M\end{figure*}^^M|end[figure*]]% |
| 701 |
% \end{macrocode} |
| 702 |
% \end{macro} |
| 703 |
% \begin{macro}{\@vtab} |
| 704 |
% \begin{macro}{\@vstab} |
| 705 |
% Next, the same functions for tables. Here |\writelot| is used instead |
| 706 |
% of |\writelof| because the text goes to a different auxiliary file. |
| 707 |
% \SpecialEscapechar{\|} |
| 708 |
% \begin{macrocode} |
| 709 |
|long|gdef|@vtab#1\end{table}[|def|@term[\end{table}]% |
| 710 |
|expandafter|writelot#1^^M\end{table}^^M|end[table]]% |
| 711 |
|long|gdef|@vstab#1\end{table*}[|def|@term[\end{table*}]% |
| 712 |
|expandafter|writelot#1^^M\end{table*}^^M|end[table*]]% |
| 713 |
% \end{macrocode} |
| 714 |
% \end{macro}\end{macro} |
| 715 |
% |
| 716 |
% \begin{macro}{\@vltab} |
| 717 |
% \changes{4.6}{1998 Sep 14}{Add macro for \texttt{longtable} package} |
| 718 |
% For use with the \texttt{longtable} package and its environment of the same |
| 719 |
% name, need special coding. This environment is never put into a |
| 720 |
% \texttt{figure} environment, but rather is used on its own. |
| 721 |
% \SpecialEscapechar{\|} |
| 722 |
% \begin{macrocode} |
| 723 |
%<*longtab&!209> |
| 724 |
|long|gdef|@vltab#1\end{longtable}[|def|@term[\end{longtable}]% |
| 725 |
|expandafter|writelot#1^^M\end{longtable}^^M|end[longtable]]% |
| 726 |
%</longtab&!209> |
| 727 |
% \end{macrocode} |
| 728 |
% \end{macro} |
| 729 |
% |
| 730 |
% \begin{macro}{\@vpla} |
| 731 |
% \begin{macro}{\@vspla} |
| 732 |
% For the event that a \texttt{plate} environment is also present (as in |
| 733 |
% \textsl{AGU}, for example) we must include two more such functions. These |
| 734 |
% operate exactly like \texttt{figure}, even using |\writelof| instead of |
| 735 |
% |\writelot|. |
| 736 |
% \SpecialEscapechar{\|} |
| 737 |
% \begin{macrocode} |
| 738 |
%<*plates> |
| 739 |
|long|gdef|@vpla#1\end{plate}[|def|@term[\end{plate}]% |
| 740 |
|expandafter|writelof#1^^M\end{plate}^^M|end[plate]]% |
| 741 |
|long|gdef|@vspla#1\end{plate*}[|def|@term[\end{plate*}]% |
| 742 |
|expandafter|writelof#1^^M\end{plate*}^^M|end[plate*]]% |
| 743 |
%</plates> |
| 744 |
% \end{macrocode} |
| 745 |
% \end{macro}\end{macro} |
| 746 |
% \begin{macro}{\@vptab} |
| 747 |
% \changes{4.5f}{1997 Mar 16}{For AGU only} |
| 748 |
% In the AGU supplement, there is an additional \texttt{table} environment |
| 749 |
% called \texttt{planotable}. This must then be provided for here. It has |
| 750 |
% no starred version. |
| 751 |
% \SpecialEscapechar{\|} |
| 752 |
% \begin{macrocode} |
| 753 |
%<agu> |long|gdef|@vptab#1\end{planotable}[|def|@term[\end{planotable}]% |
| 754 |
%<agu> |expandafter|writelot#1^^M\end{planotable}^^M|end[planotable]]% |
| 755 |
% \end{macrocode} |
| 756 |
% \end{macro} |
| 757 |
% |
| 758 |
% \begin{macro}{\@fcaponly} |
| 759 |
% \changes{4.1}{1993 Nov 20}{Remove caption-only commands for AGU} |
| 760 |
% \begin{macro}{\@feject} |
| 761 |
% \begin{macro}{\@pcaponly} |
| 762 |
% \begin{macro}{\@peject} |
| 763 |
% Some more special commands are needed with literal commands in their |
| 764 |
% templates. These are used to print only the captions when the figures |
| 765 |
% auxiliary file is reread in. First |\@fcaponly| reads everything up to |
| 766 |
% the |\caption| and throws it away. Then |\@feject| removes all text from |
| 767 |
% its current position (which will be right after |\caption|) to the end of |
| 768 |
% the \texttt{figure} environment. Similar functions exist for \texttt{plate}, |
| 769 |
% but not for \texttt{table}, since tables are always reproduced in full. |
| 770 |
% |
| 771 |
% The AGU supplement does not make use of these commands, since it works |
| 772 |
% in a different way. |
| 773 |
% \SpecialEscapechar{\|} |
| 774 |
% \begin{macrocode} |
| 775 |
%<*!agu> |
| 776 |
|long|gdef|@fcaponly#1\caption[|endgroup|@fcaption]% |
| 777 |
|long|gdef|@feject#1\end{figure}[|end[figure]]% |
| 778 |
%<*plates> |
| 779 |
|long|gdef|@pcaponly#1\caption[|endgroup|@pcaption]% |
| 780 |
|long|gdef|@peject#1\end{plate}[|end[plate]]% |
| 781 |
%</plates> |
| 782 |
%</!agu> |
| 783 |
|endgroup |
| 784 |
% \end{macrocode} |
| 785 |
% \end{macro}\end{macro}\end{macro}\end{macro} |
| 786 |
% Here the category codes are restored to their normal values with the |
| 787 |
% ending of the group. Note that each of the above lines must have |%| at |
| 788 |
% the end to avoid \meta{end-of-line}, which is active. |
| 789 |
% |
| 790 |
% \begin{macro}{\FC@writefile} |
| 791 |
% \changes{4.4}{1995 Jan 8}{Add macro, equal to old definition of standard |
| 792 |
% \cmd{\@writefile}} |
| 793 |
% The release of \LaTeX\ on 1995/12/01 changed the internal definition |
| 794 |
% of |\@writefile| such as to make it robuster: the text is written literally |
| 795 |
% to the file. This means that my |\string\begin{figure}| is written as |
| 796 |
% |\string \begin {figure}| instead of |\begin{figure}|. To get around this, |
| 797 |
% keeping capatibility with older versions, and not interfering with |
| 798 |
% other uses of |\@writefile|, I add may own version, equal to the |
| 799 |
% older definition. |
| 800 |
% \begin{macrocode} |
| 801 |
\long\def\FC@writefile#1#2{\@ifundefined{tf@#1}{}{% |
| 802 |
\immediate\write\csname tf@#1\endcsname{#2}}} |
| 803 |
% \end{macrocode} |
| 804 |
% \end{macro} |
| 805 |
% |
| 806 |
% \begin{macro}{\writelof} |
| 807 |
% \begin{macro}{\writelot} |
| 808 |
% \changes{4.0}{1993 Oct 12}{Add \texttt{toc} option to determine extension |
| 809 |
% of auxiliary files. Tables of contents were previously allowed, now |
| 810 |
% only optionally allowed.} |
| 811 |
% Now, the command that write the text to the auxiliary file |\writelof| |
| 812 |
% takes the text one line at a time, checks if it |
| 813 |
% equals |\@term|; if not, it is output to {\tt.lof} and |\writelof| is |
| 814 |
% called again; if yes, the routine comes to an end. The |
| 815 |
% \meta{end-of-line} |^^M| must be made active again at this stage so that |
| 816 |
% it has the correct category code in the definition. For tables, the |
| 817 |
% corresponding |\writelot| is analogous. |
| 818 |
% |
| 819 |
% Before we do this, however, it should be pointed out that these auxiliary |
| 820 |
% files are normally used for lists of figures and tables information. Thus |
| 821 |
% they may not be used for this purpose. Normally, one does not have such |
| 822 |
% tables of contents in an article, but if that should be required, then |
| 823 |
% we provide a \texttt{docstrip} option \texttt{toc} to change the extensions |
| 824 |
% to {\tt.pof} and {\tt.pot}. |
| 825 |
% \begin{macrocode} |
| 826 |
%<*!toc> |
| 827 |
\def\lof{lof} \def\lot{lot} |
| 828 |
%</!toc> |
| 829 |
%<toc>\def\lof{pof} \def\lot{pot} |
| 830 |
|
| 831 |
{\catcode`\^^M=13% |
| 832 |
\long\gdef\writelof#1^^M{\def\@tempb{#1}% |
| 833 |
\ifx\@tempb\@term\let\@tempa\relax\else |
| 834 |
\if@filesw\FC@writefile{pof}{#1}\fi\let\@tempa\writelof\fi \@tempa} |
| 835 |
\long\gdef\writelot#1^^M{\def\@tempb{#1}% |
| 836 |
\ifx\@tempb\@term\let\@tempa\relax\else |
| 837 |
\if@filesw\FC@writefile{pot}{#1}\fi\let\@tempa\writelot\fi \@tempa} |
| 838 |
} |
| 839 |
% \end{macrocode} |
| 840 |
% \end{macro}\end{macro} |
| 841 |
% |
| 842 |
% \subsection{Caption Commands} |
| 843 |
% \begin{macro}{\@fcaption} |
| 844 |
% \changes{4.1}{1993 Nov 20}{Remove caption-only commands for AGU} |
| 845 |
% \begin{macro}{\@@fcapopt} |
| 846 |
% \begin{macro}{\@@fcap} |
| 847 |
% Here are the modified |\caption| commands for printing only the captions. |
| 848 |
% In |\@figurecaps|, the command |\@fcaponly| is called at the start of |
| 849 |
% a \texttt{figure} environment, which ejects all text up to the |\caption| |
| 850 |
% command, and then calls |\@fcaption|. This then selects |\@@fcap| or |
| 851 |
% |\@@fcapopt| depending on the presence of the optional argument. Both do |
| 852 |
% essentially the same thing: they call the true caption command |
| 853 |
% |\@caption| to process the argument, and then call |\@feject| to remove |
| 854 |
% the remaining text in the \texttt{figure} environment. Note: this is only |
| 855 |
% done when the auxiliary {\tt.lof} file is being read in to produce a list |
| 856 |
% of captions. |
| 857 |
% \begin{macrocode} |
| 858 |
%<*!agu> |
| 859 |
\def\@fcaption{\refstepcounter\@captype \@ifnextchar[{\@@fcapopt}{\@@fcap}} |
| 860 |
\def\@@fcapopt[#1]#2{\@caption\@captype[]{#2}\begingroup\set@literal\@feject} |
| 861 |
\def\@@fcap#1{\@caption\@captype[]{#1}\begingroup\set@literal\@feject} |
| 862 |
% \end{macrocode} |
| 863 |
% \end{macro}\end{macro}\end{macro} |
| 864 |
% |
| 865 |
% \begin{macro}{\@pcaption} |
| 866 |
% \begin{macro}{\@@pcapopt} |
| 867 |
% \begin{macro}{\@@pcap} |
| 868 |
% The same thing for plates. |
| 869 |
% \begin{macrocode} |
| 870 |
%<*plates> |
| 871 |
\def\@pcaption{\refstepcounter\@captype \@ifnextchar[{\@@pcapopt}{\@@pcap}} |
| 872 |
\def\@@pcapopt[#1]#2{\@caption\@captype[]{#2}\begingroup\set@literal\@peject} |
| 873 |
\def\@@pcap#1{\@caption\@captype[]{#1}\begingroup\set@literal\@peject} |
| 874 |
%</plates> |
| 875 |
%</!agu> |
| 876 |
% \end{macrocode} |
| 877 |
% \end{macro}\end{macro}\end{macro} |
| 878 |
% |
| 879 |
% \subsection{The High Level Commands for Float Environments} |
| 880 |
% \begin{macro}{\figcapson} |
| 881 |
% \changes{4.3}{1994 May 19}{Add on/off commands to set whole thing |
| 882 |
% on/off} |
| 883 |
% \begin{macro}{\figcapsoff} |
| 884 |
% \changes{4.3}{1994 May 19}{Add on/off commands to set whole thing |
| 885 |
% on/off} |
| 886 |
% Here are the new definitions of the figure and table, which are to |
| 887 |
% be executed in the main text where the environments are entered. These |
| 888 |
% new definitions are only in effect if the flag \texttt{figcaps} is |
| 889 |
% \meta{true}, otherwise the original definitions hold. This flag allows |
| 890 |
% the style to be input in the |\documentstyle| line, or with |
| 891 |
% |\usepackage|, even if it is not yet, or no longer, wanted. |
| 892 |
% \begin{macrocode} |
| 893 |
\def\figcapson{\figcapstrue} |
| 894 |
\def\figcapsoff{\figcapsfalse} |
| 895 |
% \end{macrocode} |
| 896 |
% \end{macro}\end{macro} |
| 897 |
% |
| 898 |
% \begin{macro}{\figmarkon} |
| 899 |
% \changes{4.3}{1994 May 19}{Add on/off commands to set flag |
| 900 |
% \cmd{\iffigmark}, consistent with older manuals!} |
| 901 |
% \begin{macro}{\figmarkoff} |
| 902 |
% \changes{4.3}{1994 May 19}{Add on/off commands to set flag |
| 903 |
% \cmd{\iffigmark}, consistent with older manuals!} |
| 904 |
% \changes{4.3c}{1994 Nov 30}{Correct very bad bug!} |
| 905 |
% Another flag allows the figures and tables in the text to be marked with |
| 906 |
% a marginal note to indicate where they are first referred to. Since this is |
| 907 |
% only necessary for cut-and-paste procedures, the default is to have the |
| 908 |
% flag set \meta{false} unless the \LaTeXe{} option \texttt{figmark} has |
| 909 |
% been given. These commands set the state of the flag. |
| 910 |
% \begin{macrocode} |
| 911 |
\def\figmarkon{\figmarktrue} |
| 912 |
\def\figmarkoff{\figmarkfalse} |
| 913 |
% \end{macrocode} |
| 914 |
% \end{macro}\end{macro} |
| 915 |
% |
| 916 |
% \begin{macro}{\figure} |
| 917 |
% \changes{4.1}{1993 Oct 18}{Add marginal note with \cmd{\iffigmark}} |
| 918 |
% \changes{4.1}{1993 Oct 29}{Add \cmd{\@zfigure} to bring |
| 919 |
% float out of the if clause} |
| 920 |
% \changes{4.5}{1996 Jan 10}{Test for \cs{ifFC@appendix}} |
| 921 |
% In the new definitions, the |
| 922 |
% necessary auxiliary file is opened, the counter is stepped, the caption |
| 923 |
% type determined (these are normal functions of the float routine), and |
| 924 |
% then |\begin{figure}| is written literally to the auxiliary file. |
| 925 |
% Finally, |\@vfig|, or equivalent, is called to process the rest of the |
| 926 |
% environment's contents. |
| 927 |
% |
| 928 |
% If |figcaps| is \meta{false}, then the normal |\@float| command is used. |
| 929 |
% \begin{macrocode} |
| 930 |
\def\figure{\iffigcaps \let\@tempb=\@zfigure \else \let\@tempb=\@float\fi |
| 931 |
\@tempb{figure}} |
| 932 |
\def\@zfigure#1{\begingroup\set@literal\@ifnextchar[{\@figure}{\@figure[]}} |
| 933 |
\def\@figure[#1]{\@ifundefined{tf@pof}{\newwrite\tf@pof |
| 934 |
\if@filesw\immediate\openout\tf@pof\jobname.\lof\relax |
| 935 |
\ifFC@appendix\FC@writefile{pof}{\string\doappendix}\fi\fi}{}% |
| 936 |
\refstepcounter{figure}\iffigmark\marginpar{\fbox{\fnum@figure}}\fi |
| 937 |
\def\@captype{figure}\if@filesw\FC@writefile{pof}{\string\begin{figure}}\fi |
| 938 |
\@vfig} |
| 939 |
|
| 940 |
\def\endfigure{\iffigcaps |
| 941 |
\endgroup\if@filesw\FC@writefile{pof}{\string\end{figure}}\fi\else |
| 942 |
\end@float\fi} |
| 943 |
|
| 944 |
\@namedef{figure*}{\iffigcaps \let\@tempb=\@zsfigure \else |
| 945 |
\let\@tempb=\@dblfloat\fi \@tempb{figure}} |
| 946 |
\def\@zsfigure#1{\begingroup\set@literal\@ifnextchar[{\@sfigure}{\@sfigure[]}} |
| 947 |
\def\@sfigure[#1]{\@ifundefined{tf@pof}{\newwrite\tf@pof |
| 948 |
\if@filesw\immediate\openout\tf@pof\jobname.\lof\relax |
| 949 |
\ifFC@appendix\FC@writefile{pof}{\string\doappendix}\fi\fi}{}% |
| 950 |
\refstepcounter{figure}\iffigmark\marginpar{\fbox{\fnum@figure}}\fi |
| 951 |
\def\@captype{figure}\if@filesw\FC@writefile{pof}{\string\begin{figure}}\fi |
| 952 |
\@vsfig} |
| 953 |
|
| 954 |
\@namedef{endfigure*}{\iffigcaps\endfigure\else\end@dblfloat\fi} |
| 955 |
% \end{macrocode} |
| 956 |
% \end{macro} |
| 957 |
% |
| 958 |
% \begin{macro}{\plate} |
| 959 |
% \changes{3.2}{1993 Feb 9}{Add possibility of plate environments} |
| 960 |
% \changes{4.1}{1993 Oct 18}{Add marginal note with \cmd{\iffigmark}} |
| 961 |
% \changes{4.1}{1993 Oct 29}{Add \cmd{\@zfigure} to bring |
| 962 |
% float out of the if clause} |
| 963 |
% \changes{4.5}{1996 Jan 10}{Test for \cs{ifFC@appendix}} |
| 964 |
% Plates are defined in the same way, and write to the same auxiliary |
| 965 |
% file as figures. We must first test if there really is a plate counter, |
| 966 |
% otherwise we will have trouble later. |
| 967 |
% \begin{macrocode} |
| 968 |
%<*plates> |
| 969 |
\@ifundefined{c@plate}{\newcounter{plate}}{} |
| 970 |
|
| 971 |
\def\plate{\iffigcaps \let\@tempb=\@zplate \else \let\@tempb=\@float\fi |
| 972 |
\@tempb{plate}} |
| 973 |
\def\@zplate#1{\begingroup\set@literal\@ifnextchar[{\@plate}{\@plate[]}} |
| 974 |
\def\@plate[#1]{\@ifundefined{tf@pof}{\newwrite\tf@pof |
| 975 |
\if@filesw\immediate\openout\tf@pof\jobname.\lof\relax |
| 976 |
\ifFC@appendix\FC@writefile{pof}{\string\doappendix}\fi\fi}{}% |
| 977 |
\refstepcounter{plate}\iffigmark\marginpar{\fbox{\fnum@plate}}\fi |
| 978 |
\def\@captype{plate}\if@filesw\FC@writefile{pof}{\string\begin{plate}}\fi |
| 979 |
\@vpla} |
| 980 |
|
| 981 |
\def\endplate{\iffigcaps |
| 982 |
\endgroup\if@filesw\FC@writefile{pof}{\string\end{plate}}\fi\else |
| 983 |
\end@float\fi} |
| 984 |
|
| 985 |
\@namedef{plate*}{\iffigcaps \let\@tempb=\@zsplate \else |
| 986 |
\let\@tempb=\@dblfloat\fi \@tempb{plate}} |
| 987 |
\def\@zsplate#1{\begingroup\set@literal\@ifnextchar[{\@splate}{\@splate[]}} |
| 988 |
\def\@splate[#1]{\@ifundefined{tf@pof}{\newwrite\tf@pof |
| 989 |
\if@filesw\immediate\openout\tf@pof\jobname.\lof\relax |
| 990 |
\ifFC@appendix\FC@writefile{pof}{\string\doappendix}\fi\fi}{}% |
| 991 |
\refstepcounter{plate}\iffigmark\marginpar{\fbox{\fnum@plate}}\fi |
| 992 |
\def\@captype{plate}\if@filesw\FC@writefile{pof}{\string\begin{plate}}\fi |
| 993 |
\@vspla} |
| 994 |
|
| 995 |
\@namedef{endplate*}{\iffigcaps\endplate\else\end@dblfloat\fi} |
| 996 |
%</plates> |
| 997 |
% \end{macrocode} |
| 998 |
% \end{macro} |
| 999 |
% |
| 1000 |
% \begin{macro}{\table} |
| 1001 |
% \changes{4.1}{1993 Oct 18}{Add marginal note with \cmd{\iffigmark}} |
| 1002 |
% \changes{4.1}{1993 Oct 29}{Add \cmd{\@zfigure} to bring |
| 1003 |
% float out of the if clause} |
| 1004 |
% \changes{4.5}{1996 Jan 10}{Test for \cs{ifFC@appendix}} |
| 1005 |
% \changes{4.5d}{1996 Aug 20}{Add \cs{spew@tblnotes} for AGU} |
| 1006 |
% The table environments are made up the same way, but write to {\tt.lot} |
| 1007 |
% instead of {\tt.lof}. |
| 1008 |
% \begin{macrocode} |
| 1009 |
\def\table{\iffigcaps \let\@tempb=\@ztable \else \let\@tempb=\@float\fi |
| 1010 |
\@tempb{table}} |
| 1011 |
\def\@ztable#1{\begingroup\set@literal\@ifnextchar[{\@table}{\@table[]}} |
| 1012 |
\def\@table[#1]{\@ifundefined{tf@pot}{\newwrite\tf@pot |
| 1013 |
\if@filesw\immediate\openout\tf@pot\jobname.\lot\relax |
| 1014 |
\ifFC@appendix\FC@writefile{pot}{\string\doappendix}\fi\fi}{}% |
| 1015 |
\refstepcounter{table}\iffigmark\marginpar{\fbox{\fnum@table}}\fi |
| 1016 |
\def\@captype{table}\if@filesw\FC@writefile{pot}{\string\begin{table}}\fi |
| 1017 |
\@vtab} |
| 1018 |
|
| 1019 |
\def\endtable{\iffigcaps |
| 1020 |
\endgroup\if@filesw\FC@writefile{pot}{\string\end{table}}\fi\else |
| 1021 |
%<agu> \spew@tblnotes |
| 1022 |
\end@float\fi} |
| 1023 |
|
| 1024 |
\@namedef{table*}{\iffigcaps \let\@tempb=\@zstable \else |
| 1025 |
\let\@tempb=\@dblfloat\fi \@tempb{table}} |
| 1026 |
\def\@zstable#1{\begingroup\set@literal\@ifnextchar[{\@stable}{\@stable[]}} |
| 1027 |
\def\@stable[#1]{\@ifundefined{tf@pot}{\newwrite\tf@pot |
| 1028 |
\if@filesw\immediate\openout\tf@pot\jobname.\lot\relax |
| 1029 |
\ifFC@appendix\FC@writefile{pot}{\string\doappendix}\fi\fi}{}% |
| 1030 |
\refstepcounter{table}\iffigmark\marginpar{\fbox{\fnum@table}}\fi |
| 1031 |
\def\@captype{table}\if@filesw\FC@writefile{pot} |
| 1032 |
{\string\begin{table}}% |
| 1033 |
\fi\@vstab} |
| 1034 |
|
| 1035 |
\@namedef{endtable*}{\iffigcaps\endtable\else |
| 1036 |
%<agu> \spew@tblnotes |
| 1037 |
\end@dblfloat\fi} |
| 1038 |
% \end{macrocode} |
| 1039 |
% \end{macro} |
| 1040 |
% |
| 1041 |
% \begin{macro}{\longtable} |
| 1042 |
% \changes{4.6}{1998 Sep 14}{Add macro for \texttt{longtable} package} |
| 1043 |
% For the \texttt{longtable} package, add environment of same name. |
| 1044 |
% This coding to be added after the preamble so that the order of loading |
| 1045 |
% \thestyle{} and \texttt{longtable} is unimportant. The \cs{LT@makecaptions} |
| 1046 |
% is fixed to use the \cs{\@makecaptions} format that is current. |
| 1047 |
% Since it makes sense to use the \texttt{longtable} environment with the |
| 1048 |
% \texttt{afterpage} command, but not when the table is moved to the back, |
| 1049 |
% switch off that command when moving is active. |
| 1050 |
% \begin{macrocode} |
| 1051 |
%<*longtab&!209> |
| 1052 |
\AtBeginDocument{\let\FC@ltab=\longtable |
| 1053 |
\let\FC@endltab=\endlongtable |
| 1054 |
\def\longtable{\iffigcaps \let\@tempb=\@ltable \else |
| 1055 |
\let\@tempb=\FC@ltab\fi \@tempb} |
| 1056 |
\def\@ltable{\begingroup\set@literal |
| 1057 |
\@ifundefined{tf@pot}{\newwrite\tf@pot |
| 1058 |
\if@filesw\immediate\openout\tf@pot\jobname.\lot\relax |
| 1059 |
\ifFC@appendix\FC@writefile{pot}{\string\doappendix}\fi\fi}{}% |
| 1060 |
\refstepcounter{table}\iffigmark\marginpar{\fbox{\fnum@table}}\fi |
| 1061 |
\def\@captype{table}\if@filesw\FC@writefile{pot} |
| 1062 |
{\string\begin{longtable}}\fi \@vltab} |
| 1063 |
\def\endlongtable{\iffigcaps |
| 1064 |
\endgroup\if@filesw\FC@writefile{pot}{\string\end{longtable}}\fi\else |
| 1065 |
\FC@endltab\fi} |
| 1066 |
\@ifpackageloaded{longtable}{% |
| 1067 |
\def\LT@makecaption#1#2#3{% |
| 1068 |
\LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% |
| 1069 |
\@makecaption{#1{#2}}{#3}% |
| 1070 |
\endgraf\vskip\baselineskip}% |
| 1071 |
\hss}}}}{} |
| 1072 |
\@ifpackageloaded{afterpage}{% |
| 1073 |
\let\FC@afterpage=\afterpage |
| 1074 |
\def\afterpage{\iffigcaps \let\@tempb\relax \else \let\@tempb\FC@afterpage\fi |
| 1075 |
\@tempb}}{} |
| 1076 |
} |
| 1077 |
%</longtab&!209> |
| 1078 |
% \end{macrocode} |
| 1079 |
% \end{macro} |
| 1080 |
% |
| 1081 |
% \begin{macro}{\planotable} |
| 1082 |
% \changes{4.1}{1993 Nov 20}{Add for AGU supplement} |
| 1083 |
% \changes{4.5}{1996 Jan 10}{Test for \cs{ifFC@appendix}} |
| 1084 |
% For the AGU supplement, we need to add the environment \texttt{planotable}. |
| 1085 |
% \begin{macrocode} |
| 1086 |
%<agu>\let\aguplano=\planotable |
| 1087 |
%<agu>\let\endaguplano=\endplanotable |
| 1088 |
%<agu> |
| 1089 |
%<agu>\def\planotable{\iffigcaps \let\@tempb=\@ptable \else |
| 1090 |
%<agu> \let\@tempb=\aguplano\fi \@tempb} |
| 1091 |
%<agu>\def\@ptable{\begingroup\set@literal |
| 1092 |
%<agu> \@ifundefined{tf@pot}{\newwrite\tf@pot |
| 1093 |
%<agu> \if@filesw\immediate\openout\tf@pot\jobname.\lot\relax |
| 1094 |
%<agu> \ifFC@appendix\FC@writefile{pot}{\string\doappendix}\fi\fi}{}% |
| 1095 |
%<agu> \refstepcounter{table}\iffigmark\marginpar{\fbox{\fnum@table}}\fi |
| 1096 |
%<agu> \def\@captype{table}\if@filesw\FC@writefile{pot} |
| 1097 |
%<agu> {\string\begin{planotable}}\fi \@vptab} |
| 1098 |
%<agu> |
| 1099 |
%<agu>\def\endplanotable{\iffigcaps |
| 1100 |
%<agu> \endgroup\if@filesw\FC@writefile{pot}{\string\end{planotable}}\fi\else |
| 1101 |
%<agu> \endaguplano\fi} |
| 1102 |
% \end{macrocode} |
| 1103 |
% \end{macro} |
| 1104 |
% |
| 1105 |
% \begin{macro}{\tableofcontents} |
| 1106 |
% \changes{4.4}{1995 Jan 8}{Use \LaTeXe{} warning command} |
| 1107 |
% \begin{macro}{\listoffigures} |
| 1108 |
% \changes{4.4}{1995 Jan 8}{Use \LaTeXe{} warning command} |
| 1109 |
% \begin{macro}{\listoftables} |
| 1110 |
% \changes{4.4}{1995 Jan 8}{Use \LaTeXe{} warning command} |
| 1111 |
% \begin{macro}{\listofplates} |
| 1112 |
% \changes{4.4}{1995 Jan 8}{Use \LaTeXe{} warning command} |
| 1113 |
% Unless the \texttt{docstrip} option \texttt{toc} has been selected, turn off |
| 1114 |
% the tables of contents commands, because they will interfere with the |
| 1115 |
% writing of the auxiliary files. |
| 1116 |
% \begin{macrocode} |
| 1117 |
%<*!toc> |
| 1118 |
\def\tableofcontents{% |
| 1119 |
%<209> \@@warning |
| 1120 |
%<!209> \PackageWarningNoLine{figcaps} |
| 1121 |
{Ignored: \protect\tableofcontents\space command}} |
| 1122 |
\def\listoffigures{% |
| 1123 |
%<209> \@@warning |
| 1124 |
%<!209> \PackageWarningNoLine{figcaps} |
| 1125 |
{Ignored: \protect\listoffigures\space command}} |
| 1126 |
\def\listoftables{% |
| 1127 |
%<209> \@@warning |
| 1128 |
%<!209> \PackageWarningNoLine{figcaps} |
| 1129 |
{Ignored: \protect\listoftables\space command}} |
| 1130 |
%<*plates> |
| 1131 |
\def\listofplates{% |
| 1132 |
%<209> \@@warning |
| 1133 |
%<!209> \PackageWarningNoLine{figcaps} |
| 1134 |
{Ignored: \protect\listofplates\space command}} |
| 1135 |
%</plates> |
| 1136 |
\def\addtocontents#1#2{\relax} |
| 1137 |
\def\addcontentsline#1#2#3{\relax} |
| 1138 |
%</!toc> |
| 1139 |
% \end{macrocode} |
| 1140 |
% \end{macro}\end{macro}\end{macro}\end{macro} |
| 1141 |
% |
| 1142 |
% \begin{macro}{\set@literal} |
| 1143 |
% \changes{3.1}{1992 Oct 14}{Use {\tt\symbol{94}\symbol{94}M!=\protect\bslash |
| 1144 |
% relax} in place of {\tt\protect\bslash obeylines} which caused problems |
| 1145 |
% with floats inside paragraphs because then |
| 1146 |
% {\tt\symbol{94}\symbol{94}M!=\protect\bslash par}} |
| 1147 |
% Here is the command that makes all characters literal. It especially |
| 1148 |
% makes |^^M| to be active, defined to be |\relax|. In earlier versions, |
| 1149 |
% |\obeylines| was used instead, but that sets |^^M| to |\par| and there |
| 1150 |
% were problems when the floats appeared in the middle of a paragraph. |
| 1151 |
% \begin{macrocode} |
| 1152 |
{\catcode`\^^M=\active \gdef\cr@relax{\catcode`\^^M=\active \let^^M=\relax}} |
| 1153 |
\def\set@literal{\cr@relax \let\do\@makeother\dospecials} |
| 1154 |
% \end{macrocode} |
| 1155 |
% \end{macro} |
| 1156 |
% |
| 1157 |
% \subsection{Commands to Put Saved Text at the End} |
| 1158 |
% \begin{macro}{\@figurecaps} |
| 1159 |
% \changes{4.1}{1993 Nov 20}{Revisions for AGU supplement} |
| 1160 |
% \changes{4.3a}{1994 Jun 6}{Zero \cmd{\parindent} for AGU} |
| 1161 |
% \changes{4.5e}{1996 Oct 17}{Zero \cmd{\parindent} generally} |
| 1162 |
% Now define the routine to read in the {\tt.lof} auxiliary file with the |
| 1163 |
% purpose of listing only the captions. Since the list is to be made under |
| 1164 |
% a |\section*|, there may be trouble if |\appendix| has been called |
| 1165 |
% already. The redefined |\section*| command may print out |\appendixname|. |
| 1166 |
% Thus this name is set to blank if it exists. |
| 1167 |
% |
| 1168 |
% The |\reset@figtab| command is called to reset the figure, plate, table |
| 1169 |
% counters to zero. This is because they are to go through their automatic |
| 1170 |
% sequence once more as they are read in. Actually, this is not necessary, |
| 1171 |
% since the |\caption|s were never really called in the text part. However, |
| 1172 |
% it is better to be certain that the counters are where we expect them. |
| 1173 |
% |
| 1174 |
% An entry is made to the running heads and to the table of contents. |
| 1175 |
% The \texttt{figure} environment is redefined yet again to make use of |
| 1176 |
% |\@fcaponly|, and |\addcontentsline| is set to swallow its arguments. |
| 1177 |
% This latter is called by the |\@caption| command and we do not want the |
| 1178 |
% entries to be made at this point. The |\@makecaption| command must be |
| 1179 |
% altered to a special format for the captions list. |
| 1180 |
% Finally, the auxiliary file {\tt.lof} is input. |
| 1181 |
% |
| 1182 |
% For the AGU supplement, the procedure is different. Instead of ignoring |
| 1183 |
% everything except the |\caption|, all printable text is contained in |
| 1184 |
% a |\figbox|, which here is defined to swallow its argument. (Actually the |
| 1185 |
% internal |\@figbox| is redefined.) |
| 1186 |
% |
| 1187 |
% For AGU, need to call |\noappendix| and to set |\parindent| to zero. |
| 1188 |
% This is because the manuscript part of AGU\TeX{} redefines |\@caption| |
| 1189 |
% so that this is no longer done there. |
| 1190 |
% |
| 1191 |
% Also need to zero |\parindent| for EGS. So why not do it generally? |
| 1192 |
% |
| 1193 |
% Note: no distinction is made between \texttt{figure} and \texttt{figure*}, |
| 1194 |
% since both environments write the unstarred variant to the auxiliary |
| 1195 |
% file. For a list of captions, there is no need for a distinction. |
| 1196 |
% |
| 1197 |
% \begin{macrocode} |
| 1198 |
\def\@figurecaps{\@ifundefined{tf@pof}{}{\if@filesw |
| 1199 |
\immediate\closeout\tf@pof\fi |
| 1200 |
\@ifundefined{appendixname}{}{\def\appendixname{}} |
| 1201 |
%<agu> \noappendix |
| 1202 |
\parindent\z@ |
| 1203 |
\reset@figtab\clearpage\section*{\figurecapname}\vspace{1cm}% |
| 1204 |
\@mkboth{\uppercase{\figurecapname}}{\uppercase{\figurecapname}}% |
| 1205 |
\addcontentsline{toc}{section}{\figurecapname}% |
| 1206 |
\def\figure{\def\addcontentsline####1####2####3{}% |
| 1207 |
\def\@captype{figure}% |
| 1208 |
%<*!agu> |
| 1209 |
\begingroup\set@literal\@fcaponly |
| 1210 |
}\def\endfigure{\endgroup\bigskip}% |
| 1211 |
%</!agu> |
| 1212 |
%<agu> \vbox\bgroup |
| 1213 |
%<agu> }\def\endfigure{\egroup\bigskip}% |
| 1214 |
%<*plates> |
| 1215 |
\def\plate{\def\addcontentsline####1####2####3{}% |
| 1216 |
\def\@captype{plate}% |
| 1217 |
%<*!agu> |
| 1218 |
\begingroup\set@literal\@pcaponly |
| 1219 |
%</!agu> |
| 1220 |
%<agu> \vbox\bgroup |
| 1221 |
}\let\endplate=\endfigure |
| 1222 |
%</plates> |
| 1223 |
{\let\@makecaption=\@makefcaption |
| 1224 |
%<agu> \def\@figbox##1##2##3{\relax} |
| 1225 |
\@input{\jobname.\lof}}% |
| 1226 |
\clearpage}}% |
| 1227 |
% \end{macrocode} |
| 1228 |
% \end{macro} |
| 1229 |
% |
| 1230 |
% \begin{macro}{\@tablepage} |
| 1231 |
% \changes{4.1}{1993 Oct 22}{For NLINPROC, add explicit |
| 1232 |
% {\tt\protect\bslash small}} |
| 1233 |
% \changes{4.1}{1993 Nov 20}{Revisions for AGU supplement} |
| 1234 |
% \changes{4.2}{1993 Dec 16}{For AGU: suppress floats for \texttt{planotable}} |
| 1235 |
% \changes{4.3a}{1994 Jun 6}{Zero \cmd{\parindent} for AGU} |
| 1236 |
% \changes{4.5e}{1996 Oct 17}{Zero \cmd{\parindent} generally} |
| 1237 |
% The page(s) of tables are written similarly, except no effort is made to |
| 1238 |
% list only the captions. The whole set of tables is read in as is, |
| 1239 |
% except that the tables are not to `float'. |
| 1240 |
% \begin{macrocode} |
| 1241 |
\def\@tablepage{\@ifundefined{tf@pot}{}{\if@filesw |
| 1242 |
\immediate\closeout\tf@pot\fi |
| 1243 |
\@ifundefined{appendixname}{}{\def\appendixname{}} |
| 1244 |
%<agu> \noappendix |
| 1245 |
\parindent\z@ |
| 1246 |
\reset@figtab\clearpage\section*{\tablepagename} |
| 1247 |
\@mkboth{\uppercase{\tablepagename}}{\uppercase{\tablepagename}}% |
| 1248 |
\def\table{\def\@captype{table}\vbox\bgroup |
| 1249 |
%<egs> \small |
| 1250 |
%<*!agu> |
| 1251 |
}\def\endtable{\egroup\bigskip}% |
| 1252 |
%</!agu> |
| 1253 |
%<agu> }\def\endtable{\spew@tblnotes\egroup\bigskip}% |
| 1254 |
%<agu> \let\planotable=\aguplano \let\endplanotable=\endaguplano |
| 1255 |
%<agu> \def\@float##1{\def\@captype{table}\vbox\bgroup} |
| 1256 |
%<agu> \let\@dblfloat=\@float \let\clearpage=\newpage |
| 1257 |
%<longtab&!209> \def\longtable{\newpage\FC@ltab} \let\endlongtable=\FC@endltab |
| 1258 |
\@input{\jobname.\lot} |
| 1259 |
\clearpage}} |
| 1260 |
% \end{macrocode} |
| 1261 |
% |
| 1262 |
% Note that \texttt{agu} needs to provide for \texttt{planotable}. Since that |
| 1263 |
% environment calls |\@float| or |\@dblfloat| explicitly, the only way to |
| 1264 |
% turn of the floating mechanism is to redefine those commands. The |
| 1265 |
% |\clearpage| is also turned into |\newpage| otherwise \texttt{planotable} |
| 1266 |
% tries to eject some pseudo floats when tables are continued, resulting in |
| 1267 |
% an unwanted blank page. |
| 1268 |
% |
| 1269 |
% The \texttt{longtable} environment does not call the floating mechanism, |
| 1270 |
% but we do have to restore the original definitions here. But add |
| 1271 |
% \cs{newpage} to \cs{longtable} so that each such table starts on a new page. |
| 1272 |
% \end{macro} |
| 1273 |
% |
| 1274 |
% \begin{macro}{\printfigures} |
| 1275 |
% A similar page of figures (as opposed to their captions only) is added |
| 1276 |
% only optionally if the command |\printfigures| is given in the preamble. |
| 1277 |
% \begin{macrocode} |
| 1278 |
\def\printfigures{\@figpagetrue} |
| 1279 |
% \end{macrocode} |
| 1280 |
% \end{macro} |
| 1281 |
% |
| 1282 |
% \begin{macro}{\@figurepage} |
| 1283 |
% \changes{4.1}{1993 Nov 20}{Revisions for AGU supplement} |
| 1284 |
% \changes{4.3a}{1994 Jun 6}{Zero \cmd{\parindent} for AGU} |
| 1285 |
% \changes{4.3a}{1994 Jun 6}{Add \cmd{\figurewidth} and \cmd{\platewidth} for |
| 1286 |
% AGU} |
| 1287 |
% The page(s) of figures are much like those for the tables, except that |
| 1288 |
% the |\label| command must be switched off. This is because the labels |
| 1289 |
% have already been defined during the list of captions. However, any |
| 1290 |
% entries to a list of figures will be made here, since |
| 1291 |
% |\addtocontentsline| is in effect. |
| 1292 |
% |
| 1293 |
% For AGU, make the |\figurewidth| and |\platewidth| commands set |\hsize| |
| 1294 |
% (as well as |\pt@width|) in order to avoid overfull hboxes. |
| 1295 |
% \begin{macrocode} |
| 1296 |
\def\@figurepage{\if@figpage\@ifundefined{tf@pof}{}{% |
| 1297 |
\@ifundefined{appendixname}{}{\def\appendixname{}} |
| 1298 |
%<agu> \noappendix \parindent\z@ |
| 1299 |
\reset@figtab\clearpage\section*{\figurepagename}% |
| 1300 |
\@mkboth{\uppercase{\figurepagename}}{\uppercase{\figurepagename}}% |
| 1301 |
\begingroup |
| 1302 |
%<agu> \def\figurewidth##1{\pt@width##1\hsize##1} |
| 1303 |
\def\figure{\def\@captype{figure}\vbox\bgroup}\def\endfigure{\egroup |
| 1304 |
\vspace{20pt}}% |
| 1305 |
%<*plates> |
| 1306 |
%<agu> \let\platewidth=\figurewidth |
| 1307 |
\def\plate{\def\@captype{plate}\vbox\bgroup}\let\endplate=\endfigure |
| 1308 |
%</plates> |
| 1309 |
\def\label##1{}% |
| 1310 |
\@input{\jobname.\lof}\newpage\endgroup}\fi} |
| 1311 |
% \end{macrocode} |
| 1312 |
% \end{macro} |
| 1313 |
% |
| 1314 |
% \begin{macro}{\@makefcaption} |
| 1315 |
% The special caption format for the captions list is defined here. The |
| 1316 |
% difference between this and the regular |\@makecaption| is that it is |
| 1317 |
% never centered if the text is less than one line. Unfortunately, this may |
| 1318 |
% alter the style of the caption. Maybe some better solution can be found. |
| 1319 |
% (The specific journals have special definitions of |\@makefcaption| |
| 1320 |
% that are given later.) |
| 1321 |
% \begin{macrocode} |
| 1322 |
%<*!agu&!egs> |
| 1323 |
\long\def\@makefcaption#1#2{% |
| 1324 |
\vskip 10pt |
| 1325 |
#1. #2\par } |
| 1326 |
%</!agu&!egs> |
| 1327 |
% \end{macrocode} |
| 1328 |
% \end{macro} |
| 1329 |
% |
| 1330 |
% \begin{macro}{\reset@figtab} |
| 1331 |
% The command to reset the figure and table counters. |
| 1332 |
% \begin{macrocode} |
| 1333 |
\def\reset@figtab{% |
| 1334 |
\setcounter{figure}{0}\setcounter{table}{0} |
| 1335 |
%<*plates> |
| 1336 |
\setcounter{plate}{0} |
| 1337 |
%</plates> |
| 1338 |
} |
| 1339 |
% \end{macrocode} |
| 1340 |
% \end{macro} |
| 1341 |
% |
| 1342 |
% \begin{macro}{\enddocument} |
| 1343 |
% \changes{3.4}{1993 Aug 10}{Change order of pages to tables, figcaps, |
| 1344 |
% figures} |
| 1345 |
% \changes{4.1}{1993 Nov 15}{For AGU, order is figcaps, tables, figures} |
| 1346 |
% The pages of figures, tables, and captions should be printed |
| 1347 |
% automatically at the end of the document without any extra commands from |
| 1348 |
% the author. To do this, put them into the |\end{document}|. |
| 1349 |
% (This can be done much more easily in \LaTeXe.) |
| 1350 |
% \begin{macrocode} |
| 1351 |
%<*209> |
| 1352 |
\let\@nddoc=\enddocument |
| 1353 |
%<!agu>\def\enddocument{\iffigcaps\@tablepage\@figurecaps\@figurepage\fi\@nddoc} |
| 1354 |
%<agu>\def\enddocument{\iffigcaps\@figurecaps\@tablepage\@figurepage\fi\@nddoc} |
| 1355 |
%</209> |
| 1356 |
%<*!209> |
| 1357 |
%<!agu>\AtEndDocument{\iffigcaps\@tablepage\@figurecaps\@figurepage\fi} |
| 1358 |
%<agu>\AtEndDocument{\iffigcaps\@figurecaps\@tablepage\@figurepage\fi} |
| 1359 |
%</!209> |
| 1360 |
% \end{macrocode} |
| 1361 |
% \end{macro} |
| 1362 |
% |
| 1363 |
% \subsection{Complications with the Appendix} |
| 1364 |
% The problem is that the figures etc.\ are stored to auxiliary files |
| 1365 |
% {\tt.lof} or {\tt.lot} and then read in later at the end of the paper. |
| 1366 |
% Thus these files must know when the |\appendix| has been given and when |
| 1367 |
% |\section| commands have been issued (new appendices) in order to keep the |
| 1368 |
% number labels straight. It is also necessary to reset things to their |
| 1369 |
% previous status. The |\@addtoreset| command must be undone, something that |
| 1370 |
% is not normally allowed for. |
| 1371 |
% |
| 1372 |
% The modifications here are added to the |\appendix| definition that |
| 1373 |
% exists \emph{before} this file is read in. The |\appendix| is not |
| 1374 |
% defined here, nor need it even include such subnumbering. |
| 1375 |
% The following macros merely allow such subnumbering to function properly |
| 1376 |
% under this style option. |
| 1377 |
% |
| 1378 |
% \begin{macro}{\appendix} |
| 1379 |
% \changes{3.3}{1993 Jul 23}{Add possibility of subnumbered figures and |
| 1380 |
% tables in appendix} |
| 1381 |
% \changes{4.2}{1993 Dec 21}{Add auxiliary file switch test for the appendix |
| 1382 |
% entries to the \texttt{pof} and \texttt{pot} files} |
| 1383 |
% \changes{4.5}{1996 Jan 10}{Add flag to indicate appendix is on} |
| 1384 |
% \changes{4.5h}{1997 Nov 18}{Globally \cs{let} some things be redefined} |
| 1385 |
% The existing definition of |\appendix| is stored and the new |\appendix| |
| 1386 |
% command is defined. It writes |\doappendix| to the auxiliary files, |
| 1387 |
% redefines |\section| so that it puts a |\stepcounter{section}| command |
| 1388 |
% into the auxiliary files, and executes |\doappendix|. |
| 1389 |
% The definition of the |\section| command must be stored at a number of |
| 1390 |
% locations: |\@section| is the original non-appendix version, while |
| 1391 |
% |\@@section| contains any redinitions made by |\doappendix|, i.e., by the |
| 1392 |
% original |\appendix| command. |
| 1393 |
% |
| 1394 |
% Both |\@section| and |\reset@figtab| are globally set to avoid a problem |
| 1395 |
% if the appendix occurs inside an environment. This does occur with the |
| 1396 |
% AGU |\begin{article}|\dots|\end{article}| feature. |
| 1397 |
% |
| 1398 |
% The flag |\ifFC@appendix| is used to test if the appendix is active when |
| 1399 |
% the first float appears, so that when the auxiliary file is opened, the |
| 1400 |
% |\doappendix| is written immediately to it. Previously, without this, if |
| 1401 |
% the first figure or table appeared in the appendix, the listed captions |
| 1402 |
% did not have appendix numbering because this command was missing in the |
| 1403 |
% captions files. |
| 1404 |
% |
| 1405 |
% \begin{macrocode} |
| 1406 |
\let\@appendix=\appendix |
| 1407 |
\newif\ifFC@appendix \FC@appendixfalse |
| 1408 |
\def\appendix{\FC@appendixtrue |
| 1409 |
\@ifundefined{tf@pof}{}{\if@filesw\FC@writefile{pof}{\string\doappendix}\fi}% |
| 1410 |
\@ifundefined{tf@pot}{}{\if@filesw\FC@writefile{pot}{\string\doappendix}\fi}% |
| 1411 |
\global\let\@section=\section |
| 1412 |
\doappendix |
| 1413 |
\let\@@section=\section |
| 1414 |
\def\section{% |
| 1415 |
\@ifundefined{tf@pof}{}{\if@filesw\FC@writefile{pof}{\string |
| 1416 |
\stepcounter{section}}\fi}% |
| 1417 |
\@ifundefined{tf@pot}{}{\if@filesw\FC@writefile{pot}{\string |
| 1418 |
\stepcounter{section}}\fi}% |
| 1419 |
\@@section} |
| 1420 |
\global\let\reset@figtab=\@unappendix} |
| 1421 |
% \end{macrocode} |
| 1422 |
% The last step alters |\reset@figtab| so that appendix features are |
| 1423 |
% reset as well as the counters. |
| 1424 |
% \end{macro} |
| 1425 |
% |
| 1426 |
% \begin{macro}{\doappendix} |
| 1427 |
% \changes{4.5h}{1997 Nov 18}{Globally \cs{let} some things be redefined} |
| 1428 |
% The |\doappendix| contains those commands that must be executed when |
| 1429 |
% |\appendix| is given, both in the main text, and when the auxiliary files |
| 1430 |
% are reread in. It first saves the current definitions of |\thexxx| |
| 1431 |
% and of |\cl@section| (the list of counters that are reset when the section |
| 1432 |
% counter is incremented). |
| 1433 |
% \begin{macrocode} |
| 1434 |
\def\doappendix{% |
| 1435 |
\global\let\@thefigure=\thefigure |
| 1436 |
\global\let\@thetable=\thetable |
| 1437 |
%<*plates> |
| 1438 |
\global\let\@theplate=\theplate |
| 1439 |
%</plates> |
| 1440 |
\global\let\@cl@section=\cl@section |
| 1441 |
\@appendix |
| 1442 |
} |
| 1443 |
% \end{macrocode} |
| 1444 |
% \end{macro} |
| 1445 |
% |
| 1446 |
% \begin{macro}{\@unappendix} |
| 1447 |
% The |\@unappendix| undoes the changes made by |\doappendix|. |
| 1448 |
% It becomes |\reset@figcaps| when |\appendix| is called. |
| 1449 |
% It is thus invoked by |\@figurecaps|, |\@tablepage|, and |\@figurepage|. |
| 1450 |
% \begin{macrocode} |
| 1451 |
\def\@unappendix{\FC@appendixfalse |
| 1452 |
\setcounter{figure}{0}\setcounter{table}{0} |
| 1453 |
\let\thefigure=\@thefigure |
| 1454 |
\let\thetable=\@thetable |
| 1455 |
%<*plates> |
| 1456 |
\setcounter{plate}{0}% |
| 1457 |
\let\theplate=\@theplate |
| 1458 |
%</plates> |
| 1459 |
\let\cl@section=\@cl@section |
| 1460 |
\let\section=\@section |
| 1461 |
} |
| 1462 |
% \end{macrocode} |
| 1463 |
% \end{macro} |
| 1464 |
% |
| 1465 |
% \subsection{Complications with \texttt{sublabel.sty}} |
| 1466 |
% \begin{macro}{\sublabon} |
| 1467 |
% \changes{3.3}{1993 Jul 23}{Additions to allow for style option {\tt |
| 1468 |
% sublabel.sty}} |
| 1469 |
% \begin{macro}{\sublaboff} |
| 1470 |
% A similar problem exists if the style option \texttt{sublabel} has been |
| 1471 |
% activated. This could mean that figures and tables are subnumbered even |
| 1472 |
% outside of an appendix. Subnumbering here means e.g., 4{\it a}, 4{\it b}, |
| 1473 |
% etc. As for the appendix, here too the auxiliary files must know when |
| 1474 |
% subnumbering is turned on and off. This means that these commands must be |
| 1475 |
% written to the auxiliary files whenever issued. |
| 1476 |
% |
| 1477 |
% These modifications here can only be made \emph{after} |
| 1478 |
% \texttt{sublabel.sty} has been read in, for obvious reasons. |
| 1479 |
% \begin{macrocode} |
| 1480 |
%<*sublab> |
| 1481 |
\let\orisubon=\sublabon |
| 1482 |
\let\orisuboff=\sublaboff |
| 1483 |
\def\sublabon#1{\orisubon{#1}\if@filesw |
| 1484 |
\iffigcaps\def\@tempb{#1} |
| 1485 |
\def\@tempa{figure}\ifx\@tempa\@tempb |
| 1486 |
\@ifundefined{tf@pof}{\newwrite\tf@pof |
| 1487 |
\immediate\openout\tf@pof\jobname.\lof}{}% |
| 1488 |
\FC@writefile{pof}{\string\orisubon{#1}}\fi |
| 1489 |
%<*plates> |
| 1490 |
\def\@tempa{plate}\ifx\@tempa\@tempb |
| 1491 |
\@ifundefined{tf@pof}{\newwrite\tf@pof |
| 1492 |
\immediate\openout\tf@pof\jobname.\lof}{}% |
| 1493 |
\FC@writefile{pof}{\string\orisubon{#1}}\fi |
| 1494 |
%</plates> |
| 1495 |
\def\@tempa{table}\ifx\@tempa\@tempb |
| 1496 |
\@ifundefined{tf@pot}{\newwrite\tf@pot |
| 1497 |
\immediate\openout\tf@pot\jobname.\lot}{}% |
| 1498 |
\FC@writefile{pot}{\string\orisubon{#1}}\fi |
| 1499 |
\fi\fi} |
| 1500 |
\def\sublaboff#1{\orisuboff{#1}\if@filesw |
| 1501 |
\iffigcaps\def\@tempb{#1} |
| 1502 |
\def\@tempa{figure}\ifx\@tempa\@tempb |
| 1503 |
\@ifundefined{tf@pof}{\newwrite\tf@pof |
| 1504 |
\immediate\openout\tf@pof\jobname.\lof}{}% |
| 1505 |
\FC@writefile{pof}{\string\orisuboff{#1}}\fi |
| 1506 |
%<*plates> |
| 1507 |
\def\@tempa{plate}\ifx\@tempa\@tempb |
| 1508 |
\@ifundefined{tf@pof}{\newwrite\tf@pof |
| 1509 |
\immediate\openout\tf@pof\jobname.\lof}{}% |
| 1510 |
\FC@writefile{pof}{\string\orisuboff{#1}}\fi |
| 1511 |
%</plates> |
| 1512 |
\def\@tempa{table}\ifx\@tempa\@tempb |
| 1513 |
\@ifundefined{tf@pot}{\newwrite\tf@pot |
| 1514 |
\immediate\openout\tf@pot\jobname.\lot}{}% |
| 1515 |
\FC@writefile{pot}{\string\orisuboff{#1}}\fi |
| 1516 |
\fi\fi} |
| 1517 |
%</sublab> |
| 1518 |
% \end{macrocode} |
| 1519 |
% \end{macro}\end{macro} |
| 1520 |
% |
| 1521 |
% \subsection{Journal-Specific Coding} |
| 1522 |
% \changes{4.1}{1993 Oct 22}{Add extra coding for JGR, GRL, and NLINPROC} |
| 1523 |
% \changes{4.1}{1993 Nov 20}{Add extra coding for AGU supplement} |
| 1524 |
% \changes{4.3}{1994 May 19}{Remove obsolete JGR, GRL coding} |
| 1525 |
% When \thestyle{} is used as a module to other main styles for specific |
| 1526 |
% journals, there are some extra details that must be seen to. |
| 1527 |
% |
| 1528 |
% \begin{macro}{\figbox} |
| 1529 |
% \changes{4.2}{1993 Nov 20}{Add for AGU supplement, to remove figures |
| 1530 |
% from list of figure captions} |
| 1531 |
% \changes{4.5b}{1996 Jul 22}{Let size fit contents automatically} |
| 1532 |
% \changes{4.5c}{1996 Jul 29}{Add starred version for no frame} |
| 1533 |
% For the AGU supplement, figures and plates are put into a |\figbox| |
| 1534 |
% which reserves space for them, or which can contain a real figure. |
| 1535 |
% During the printing of the captions, this command is set to swallow |
| 1536 |
% its argument. The normal captions-only system cannot be used for this |
| 1537 |
% because there may be additional width commands in the |figure| environment |
| 1538 |
% for setting the caption widths, which must be observed, i.e., read in. |
| 1539 |
% This box takes three arguments: width, height, and contents, which |
| 1540 |
% are centered horizontally and vertically in the box. The box is framed |
| 1541 |
% with |\framebox| so the parameters |\fboxsep| and |\fboxrule| may |
| 1542 |
% be used to control its appearance. |
| 1543 |
% The starred version of this command suppresses the frame without changing |
| 1544 |
% the |\framebox| parameters. It actually uses |\makebox| instead. |
| 1545 |
% It is better to use |\figbox*| to remove the frame because |\framebox| |
| 1546 |
% is also used in the marginal notes for the figures, which always should |
| 1547 |
% have the frame. |
| 1548 |
% |
| 1549 |
% If the first argument (width) is left empty, the box is made to fit its |
| 1550 |
% contents, both vertically and horizontally. If only the second argument |
| 1551 |
% (width) is left empty, the width will be as given and the height is scaled |
| 1552 |
% automatically. This is for use with |\epsfig| and relatives. |
| 1553 |
% \begin{macrocode} |
| 1554 |
%<agu>\def\figbox{\@ifstar{\let\agubox\makebox\@figbox} |
| 1555 |
%<agu> {\let\agubox\framebox\@figbox}} |
| 1556 |
%<agu>\def\@figbox#1#2#3{\hbox to \hsize{\hfil |
| 1557 |
%<agu> \ifx!#1!\agubox{#3}\else |
| 1558 |
%<agu> \agubox[#1][c]{\ifx!#2!#3\else\@tempdima#2\relax |
| 1559 |
%<agu> \divide\@tempdima by2\relax |
| 1560 |
%<agu> \advance\@tempdima by-\fboxsep \advance\@tempdima by-\fboxrule |
| 1561 |
%<agu> \vrule\@height\@tempdima\@depth\@tempdima\@width\z@ |
| 1562 |
%<agu> \vbox to \z@{\vss\hbox{#3}\vss}\fi}\fi\hfil}} |
| 1563 |
% \end{macrocode} |
| 1564 |
% \end{macro} |
| 1565 |
% |
| 1566 |
% The marking of figures and tables with marginal notes should be |
| 1567 |
% enabled by default. |
| 1568 |
% \begin{macrocode} |
| 1569 |
%<agu>\figmarktrue |
| 1570 |
% \end{macrocode} |
| 1571 |
% |
| 1572 |
% For the AGU supplement, the necessary flag is |\if@preprint|. Furthermore, |
| 1573 |
% for AGU preprints and manuscripts, we need to turn off the |\figurewidth| |
| 1574 |
% and |\platewidth| commands that come with the AGU-supplied macros. |
| 1575 |
% \begin{macrocode} |
| 1576 |
%<agu>\if@preprint \figcapsfalse |
| 1577 |
%<agu> \def\figurewidth#1{\pt@width=\hsize} |
| 1578 |
%<agu> \def\platewidth#1{\pt@width=\hsize} |
| 1579 |
%<agu>\fi |
| 1580 |
%<agu>\if@draft |
| 1581 |
%<agu> \def\figurewidth#1{\pt@width=\hsize} |
| 1582 |
%<agu> \def\platewidth#1{\pt@width=\hsize} |
| 1583 |
%<agu>\fi |
| 1584 |
% \end{macrocode} |
| 1585 |
% |
| 1586 |
% \begin{macro}{\@makefcaption} |
| 1587 |
% \changes{4.2}{1993 Nov 20}{Redefine for AGU supplement, to print captions |
| 1588 |
% in two widths} |
| 1589 |
% \changes{4.3a}{1994 Jun 6}{For AGU, set \cmd{\hsize} to avoid overfull |
| 1590 |
% hbox messages} |
| 1591 |
% Now define |\@makefcaption|, the special version of |\@makecaption| for |
| 1592 |
% the page of captions, for AGU. This is either the supplied version of |
| 1593 |
% the macro, or a special version that prints the caption twice, in two |
| 1594 |
% widths. |
| 1595 |
% \begin{macrocode} |
| 1596 |
%<agu>\let\ori@makecap=\@makecaption |
| 1597 |
%<agu>\def\@makefcaption#1#2{{\if@dblcap\if@camera\pt@width=\textwidth |
| 1598 |
%<agu> \ori@makecap{#1}{#2} |
| 1599 |
%<agu> \pt@width=\wpt@width |
| 1600 |
%<agu> \hsize=\pt@width |
| 1601 |
%<agu> \vskip10pt \def\label##1{}\fi\fi |
| 1602 |
%<agu> \ori@makecap{#1}{#2}} |
| 1603 |
%<agu>} |
| 1604 |
% \end{macrocode} |
| 1605 |
% \end{macro} |
| 1606 |
% \begin{macro}{\doublecaption} |
| 1607 |
% \changes{4.2}{1993 Nov 20}{Add for AGU supplement, to enable doubled captions |
| 1608 |
% in two widths} |
| 1609 |
% To enable this double caption, one must give |\doublecaption| |
| 1610 |
% with the width of the wider caption as argument in the preamble. |
| 1611 |
% A normal value for \textsl{AGU} journals is 35~pc. |
| 1612 |
% \begin{macrocode} |
| 1613 |
%<agu>\newdimen\wpt@width |
| 1614 |
%<agu>\newif\if@dblcap \@dblcapfalse |
| 1615 |
%<agu>\def\doublecaption#1{\wpt@width=#1\relax\@dblcaptrue} |
| 1616 |
% \end{macrocode} |
| 1617 |
% \end{macro} |
| 1618 |
% Finally, for \emph{EGS}, the regular |\@makecaptions| |
| 1619 |
% macro is sufficient. In that journal, all captions are flush-left to |
| 1620 |
% begin with, so this might as well be kept for the figure captions too. |
| 1621 |
% \begin{macrocode} |
| 1622 |
%<egs>\let\@makefcaption=\@makecaption |
| 1623 |
% \end{macrocode} |
| 1624 |
% The whole figure caption business is activated only for |draft| mode. |
| 1625 |
% \begin{macrocode} |
| 1626 |
%<egs>\if@draft\figcapstrue\else\figcapsfalse\fi |
| 1627 |
% \end{macrocode} |
| 1628 |
% |
| 1629 |
% This terminates the special coding, and thus the style file. |
| 1630 |
% \begin{macrocode} |
| 1631 |
%</package> |
| 1632 |
% \end{macrocode} |
| 1633 |
% |
| 1634 |
% \Finale |