| 1 |
%% |
| 2 |
%% This is file `caption_2020-10-26.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% fallback/v3.5/caption.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% Copyright (C) 1994-2023 Axel Sommerfeldt ([email protected]) |
| 10 |
%% |
| 11 |
%% https://gitlab.com/axelsommerfeldt/caption |
| 12 |
%% |
| 13 |
%% -------------------------------------------------------------------------- |
| 14 |
%% |
| 15 |
%% This work may be distributed and/or modified under the |
| 16 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 17 |
%% of this license or (at your option) any later version. |
| 18 |
%% The latest version of this license is in |
| 19 |
%% http://www.latex-project.org/lppl.txt |
| 20 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 21 |
%% version 2003/12/01 or later. |
| 22 |
%% |
| 23 |
%% This work has the LPPL maintenance status "maintained". |
| 24 |
%% |
| 25 |
%% This Current Maintainer of this work is Axel Sommerfeldt. |
| 26 |
%% |
| 27 |
%% This work consists of the files |
| 28 |
%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, |
| 29 |
%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, |
| 30 |
%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, |
| 31 |
%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, |
| 32 |
%% the derived files |
| 33 |
%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, |
| 34 |
%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, |
| 35 |
%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, |
| 36 |
%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. |
| 37 |
%% |
| 38 |
\NeedsTeXFormat{LaTeX2e}[1994/12/01] |
| 39 |
\ProvidesPackage{caption}[2023/08/05 v3.5j Customizing captions (AR)] |
| 40 |
\RequirePackage{caption3}[=2020/10/06] % needs v2.2b or newer |
| 41 |
\caption@ifbool{documentclass}{}{% |
| 42 |
\caption@WarningNoLine{% |
| 43 |
Unknown document class (or package),\MessageBreak |
| 44 |
standard defaults will be used}} |
| 45 |
\@ifpackageloaded{caption2}{% |
| 46 |
\caption@Error{% |
| 47 |
You can't use both, the (obsolete) caption2 *and*\MessageBreak |
| 48 |
the (current) caption package}% |
| 49 |
\endinput |
| 50 |
}{} |
| 51 |
\caption@AtBeginDocument{% |
| 52 |
\@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}% |
| 53 |
\@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}% |
| 54 |
\@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}} |
| 55 |
\newcommand*\caption@DisablePositionOption[1]{% |
| 56 |
\caption@InfoNoLine{% |
| 57 |
`#1' package detected; setting `position=b' for compatibility reasons}% |
| 58 |
\caption@setposition b% |
| 59 |
\DeclareCaptionOption{position}{% |
| 60 |
\caption@Error{Usage of the `position' option is incompatible\MessageBreak |
| 61 |
to the `#1' package}}} |
| 62 |
\@onlypreamble\caption@DisablePositionOption |
| 63 |
\DeclareCaptionOption*{config}[caption]{% |
| 64 |
\InputIfFileExists{#1.cfg}% |
| 65 |
{\typeout{*** Local configuration file #1.cfg used ***}}% |
| 66 |
{\caption@Warning{Configuration file #1.cfg not found}}} |
| 67 |
\newcommand*\caption@selectlistentry[1]{% |
| 68 |
\caption@ifinlist{#1}{heading}{% |
| 69 |
\let\caption@iflistheading\@firstoftwo |
| 70 |
}{\caption@ifinlist{#1}{default,list-entry,entry}{% |
| 71 |
\let\caption@iflistheading\@secondoftwo |
| 72 |
}{% |
| 73 |
\caption@Error{Undefined list-entry selection `#1'}% |
| 74 |
}}} |
| 75 |
\DeclareCaptionOption{list-entry}{\caption@selectlistentry{#1}} |
| 76 |
\captionsetup{list-entry=default} |
| 77 |
\newcommand\caption@declparboxrestore{% |
| 78 |
\caption@decl{parboxrestore}} |
| 79 |
\@onlypreamble\caption@declparboxrestore |
| 80 |
\newcommand*\caption@setparboxrestore{% |
| 81 |
\caption@set{parboxrestore}} |
| 82 |
\caption@declparboxrestore{full}{% |
| 83 |
\@parboxrestore} |
| 84 |
\caption@declparboxrestore{partial}{% |
| 85 |
\let\if@nobreak\iffalse |
| 86 |
\let\if@noskipsec\iffalse |
| 87 |
\let\par\@@par |
| 88 |
\parindent\z@ \parskip\z@skip |
| 89 |
\everypar{}% |
| 90 |
\leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip |
| 91 |
\parfillskip\@flushglue \lineskip\normallineskip |
| 92 |
\baselineskip\normalbaselineskip |
| 93 |
\sloppy |
| 94 |
\let\\\@normalcr} |
| 95 |
\caption@declparboxrestore{mini}{% |
| 96 |
\let\par\@@par |
| 97 |
\parindent\z@ \parskip\z@skip |
| 98 |
\sloppy} |
| 99 |
\SetCaptionDefault{parboxrestore}{full} |
| 100 |
\DeclareCaptionOption{parboxrestore}{\caption@setparboxrestore{#1}} |
| 101 |
\captionsetup{parboxrestore=default} |
| 102 |
\DeclareCaptionOption{@minipage}{% |
| 103 |
\caption@ifinlist{#1}{auto,default}% |
| 104 |
{\let\caption@if@minipage\@gobbletwo}% |
| 105 |
{\caption@set@bool\caption@if@minipage{#1}}} |
| 106 |
\captionsetup{@minipage=default} |
| 107 |
\DeclareCaptionOption{compatibility}[v1]{% |
| 108 |
\caption@ifinlist{#1}{v1,1,true,yes,on}{% |
| 109 |
\let\caption@ifcompatibility\@firstoftwo |
| 110 |
}{\caption@ifinlist{#1}{v3,3,0,false,no,off}{% |
| 111 |
\let\caption@ifcompatibility\@secondoftwo |
| 112 |
}{% |
| 113 |
\caption@Error{Undefined compatibility value `#1'}% |
| 114 |
}}} |
| 115 |
\@onlypreamble@key{caption}{compatibility} |
| 116 |
\caption@setbool{compatibility}{0} % default: Try not to be compatible to v1.x |
| 117 |
\newcommand*\caption@setincompatible[2]{% |
| 118 |
#1{% |
| 119 |
\caption@WarningNoLine{% |
| 120 |
#2;\MessageBreak |
| 121 |
Setting compatibility to v1}% |
| 122 |
\caption@setbool{compatibility}{1}% |
| 123 |
}{}} |
| 124 |
\caption@AtBeginDocument{\caption@ifcompatibility{}{% |
| 125 |
\caption@setincompatible{\@ifpackageloaded{captcont}}{captcont package is loaded}% |
| 126 |
}} |
| 127 |
\DeclareCaptionOptionNoValue*{normal}{% |
| 128 |
\caption@setup{format=plain,justification=justified}} |
| 129 |
\DeclareCaptionOptionNoValue*{isu}{% |
| 130 |
\caption@setup{format=hang,justification=justified}} |
| 131 |
\DeclareCaptionOptionNoValue*{hang}{% |
| 132 |
\caption@setup{format=hang,justification=justified}} |
| 133 |
\DeclareCaptionOptionNoValue*{center}{% |
| 134 |
\caption@setup{format=plain,justification=centering}} |
| 135 |
\DeclareCaptionOptionNoValue*{centerlast}{% |
| 136 |
\caption@setup{format=plain,justification=centerlast}} |
| 137 |
\DeclareCaptionOptionNoValue*{scriptsize}{\def\captionfont{\scriptsize}} |
| 138 |
\DeclareCaptionOptionNoValue*{footnotesize}{\def\captionfont{\footnotesize}} |
| 139 |
\DeclareCaptionOptionNoValue*{small}{\def\captionfont{\small}} |
| 140 |
\DeclareCaptionOptionNoValue*{normalsize}{\def\captionfont{\normalsize}} |
| 141 |
\DeclareCaptionOptionNoValue*{large}{\def\captionfont{\large}} |
| 142 |
\DeclareCaptionOptionNoValue*{Large}{\def\captionfont{\Large}} |
| 143 |
\DeclareCaptionOptionNoValue*{up}{\caption@setup{labelfont+=up}} |
| 144 |
\DeclareCaptionOptionNoValue*{it}{\caption@setup{labelfont+=it}} |
| 145 |
\DeclareCaptionOptionNoValue*{sl}{\caption@setup{labelfont+=sl}} |
| 146 |
\DeclareCaptionOptionNoValue*{sc}{\caption@setup{labelfont+=sc}} |
| 147 |
\DeclareCaptionOptionNoValue*{md}{\caption@setup{labelfont+=md}} |
| 148 |
\DeclareCaptionOptionNoValue*{bf}{\caption@setup{labelfont+=bf}} |
| 149 |
\DeclareCaptionOptionNoValue*{rm}{\caption@setup{labelfont+=rm}} |
| 150 |
\DeclareCaptionOptionNoValue*{sf}{\caption@setup{labelfont+=sf}} |
| 151 |
\DeclareCaptionOptionNoValue*{tt}{\caption@setup{labelfont+=tt}} |
| 152 |
\DeclareCaptionOptionNoValue*{nooneline}{\caption@setup{slc=0}} |
| 153 |
\caption@setbool{ruled}{0} |
| 154 |
\DeclareCaptionOptionNoValue*{ruled}{\caption@setbool{ruled}{1}} |
| 155 |
\DeclareCaptionOptionNoValue*{flushleft}{% |
| 156 |
\caption@setup{format=plain,justification=raggedright}} |
| 157 |
\DeclareCaptionOptionNoValue*{flushright}{% |
| 158 |
\caption@setup{format=plain,justification=raggedleft}} |
| 159 |
\DeclareCaptionOptionNoValue*{oneline}{\caption@setup{slc=1}} |
| 160 |
\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{% |
| 161 |
\caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}} |
| 162 |
\DeclareCaptionOption*{caption}{% |
| 163 |
\caption@setbool{temp}{#1}% |
| 164 |
\caption@ifbool{temp}{}{% |
| 165 |
\caption@Error{% |
| 166 |
The package option `caption=#1' is obsolete.\MessageBreak |
| 167 |
Please pass this option to the subfig package instead\MessageBreak |
| 168 |
and do *not* load the caption package anymore}}} |
| 169 |
\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}} |
| 170 |
\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}} |
| 171 |
\@onlypreamble@key{caption}{FPlist} |
| 172 |
\@onlypreamble@key{caption}{FPref} |
| 173 |
\newcommand*\caption@setFPoption[2]{% |
| 174 |
\edef\caption@tempa{\@car#2\@nil}% |
| 175 |
\caption@setbool{FP#1cap}{\if c\caption@tempa 1\else 0\fi}} |
| 176 |
\@onlypreamble\caption@setFPoption |
| 177 |
\captionsetup{FPlist=caption,FPref=figure} |
| 178 |
\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}} |
| 179 |
\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}} |
| 180 |
\captionsetup{hypcap=1,hypcapspace=.5\baselineskip} |
| 181 |
\caption@documentclass@code |
| 182 |
\let\caption@documentclass@code\@undefined |
| 183 |
\let\AtCaptionPackage\@firstofone |
| 184 |
\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}} |
| 185 |
\caption@ProcessOptions*{caption} |
| 186 |
\newcounter{caption@flags} |
| 187 |
\newcommand*\caption@ifflag[1]{% |
| 188 |
\@tempcnta\c@caption@flags |
| 189 |
\divide\@tempcnta #1\relax |
| 190 |
\ifodd\@tempcnta |
| 191 |
\expandafter\@firstoftwo |
| 192 |
\else |
| 193 |
\expandafter\@secondoftwo |
| 194 |
\fi} |
| 195 |
\newcommand*\caption@clrflags{% |
| 196 |
\setcounter{caption@flags}\z@} |
| 197 |
\newcommand*\caption@clrflag[1]{% |
| 198 |
\caption@ifflag{#1}{\caption@addtoflags{-#1}}{}} |
| 199 |
\newcommand*\caption@setflag[1]{% |
| 200 |
\caption@ifflag{#1}{}{\caption@addtoflags{#1}}} |
| 201 |
\newcommand*\caption@addtoflags{% |
| 202 |
\addtocounter{caption@flags}} |
| 203 |
\def\caption@caption{% |
| 204 |
\caption@iftype |
| 205 |
{\caption@checkgrouplevel\@empty\caption |
| 206 |
\caption@star |
| 207 |
{\caption@refstepcounter\@captype}% |
| 208 |
{\caption@dblarg{\@caption\@captype}}}% |
| 209 |
{\caption@Error{\noexpand\caption outside float}% |
| 210 |
\caption@gobble}} |
| 211 |
\newcommand*\caption@star[2]{% |
| 212 |
\@ifstar{\caption@startrue#2[]}{#1#2}} |
| 213 |
\long\def\caption@@caption#1[#2]#3{% |
| 214 |
\ifcaption@star \else |
| 215 |
\caption@prepareanchor{#1}{#2}% |
| 216 |
\memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}% |
| 217 |
\@nameuse{nag@hascaptiontrue}% |
| 218 |
\fi |
| 219 |
\par |
| 220 |
\caption@beginex{#1}{#2}{#3}% |
| 221 |
\caption@setfloatcapt{% |
| 222 |
\caption@parboxrestore |
| 223 |
\if@minipage |
| 224 |
\@setminipage |
| 225 |
\fi |
| 226 |
\caption@normalsize |
| 227 |
\ifcaption@star |
| 228 |
\let\caption@makeanchor\@firstofone |
| 229 |
\fi |
| 230 |
\@makecaption{\csname fnum@#1\endcsname}% |
| 231 |
{\ignorespaces\caption@makeanchor{#3}}\par |
| 232 |
\caption@if@minipage\@minipagetrue\@minipagefalse}% |
| 233 |
\caption@end} |
| 234 |
\newcommand*\caption@before@parboxrestore{} |
| 235 |
\newcommand*\caption@after@parboxrestore{} |
| 236 |
\providecommand\memcaptioninfo[4]{} |
| 237 |
\newcommand*\caption@prepareanchor[2]{% |
| 238 |
\caption@makecurrent{#1}{#2}% |
| 239 |
\caption@ifhypcap\caption@@start\relax |
| 240 |
\M@gettitle{#2}} |
| 241 |
\providecommand\M@gettitle[1]{} |
| 242 |
\long\def\caption@makecaption#1#2{% |
| 243 |
\caption@make@above |
| 244 |
\caption@@make{#1}{#2}% |
| 245 |
\caption@make@below} |
| 246 |
\newcommand*\caption@make@above{% |
| 247 |
\caption@iftop |
| 248 |
\caption@belowskip |
| 249 |
{\caption@rule\caption@aboveskip}} |
| 250 |
\newcommand*\caption@make@below{% |
| 251 |
\caption@iftop |
| 252 |
{\caption@aboveskip\caption@rule}% |
| 253 |
\caption@belowskip} |
| 254 |
\newcommand*\caption@redefine{} |
| 255 |
\g@addto@macro\caption@redefine{% |
| 256 |
\caption@ifcompatibility{% |
| 257 |
\caption@InfoNoLine{ |
| 258 |
\noexpand\caption will not be redefined since `compatibility' is set to v1}% |
| 259 |
\renewcommand*\caption@redefine{}% |
| 260 |
\renewcommand*\caption@continuedfloat[1]{% |
| 261 |
\caption@Error{Not available with option `compatibility=v1'}}% |
| 262 |
\caption@AtBeginDocument*{% |
| 263 |
\let\caption@start\relax |
| 264 |
\caption@ifdefined\caption@ORI@capstart{% |
| 265 |
\caption@Debug{% |
| 266 |
Restore hypcap definition of \string\capstart\@gobble}% |
| 267 |
\let\capstart\caption@ORI@capstart}{}% |
| 268 |
}% |
| 269 |
\renewcommand*\caption@star[2]{#1#2}% |
| 270 |
}{% |
| 271 |
\renewcommand*\caption@redefine{% |
| 272 |
\let\caption\caption@caption |
| 273 |
\let\@caption\caption@@caption}% |
| 274 |
}% |
| 275 |
\caption@redefine |
| 276 |
\caption@AtBeginDocument*{% |
| 277 |
\let\caption@ORI@capstart\@undefined}% |
| 278 |
\let\caption@ORI@xfloat\@xfloat |
| 279 |
\def\@xfloat#1[#2]{% |
| 280 |
\caption@ORI@xfloat{#1}[#2]% |
| 281 |
\caption@settype{#1}% |
| 282 |
\caption@xfloat@hook}% |
| 283 |
\newcommand*\caption@xfloat@hook{}% |
| 284 |
\let\caption@ORI@xdblfloat\@xdblfloat |
| 285 |
\def\@xdblfloat#1[#2]{% |
| 286 |
\caption@ORI@xdblfloat{#1}[#2]% expands to \@xfloat{#1}[#2] + extra stuff |
| 287 |
\caption@setoptions{#1*}% |
| 288 |
\caption@xdblfloat@hook}% |
| 289 |
\newcommand*\caption@xdblfloat@hook{}% |
| 290 |
} |
| 291 |
\caption@AtBeginDocument{\caption@redefine} |
| 292 |
\let\@makecaption\caption@makecaption |
| 293 |
\newcommand\phantomcaption{% |
| 294 |
\caption@iftype |
| 295 |
{\caption@refstepcounter\@captype}% |
| 296 |
{\caption@Error{\noexpand\phantomcaption outside float}}}% |
| 297 |
\caption@AtBeginDocument{% |
| 298 |
\DeclareCaptionOption{type}{\setcaptiontype{#1}}% |
| 299 |
\DeclareCaptionOption{type*}{\setcaptiontype*{#1}}% |
| 300 |
\DeclareCaptionOptionNoValue{subtype}{\setcaptionsubtype\relax}% |
| 301 |
\DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}% |
| 302 |
} |
| 303 |
\def\setcaptiontype{% |
| 304 |
\caption@parboxrestore@mini |
| 305 |
\caption@settype} |
| 306 |
\newcommand\setcaptionsubtype{% |
| 307 |
\caption@iftype |
| 308 |
\caption@setsubtype |
| 309 |
{\caption@Error{\noexpand\setcaptionsubtype outside float}}}% |
| 310 |
\newcommand\caption@setsubtype{% |
| 311 |
\caption@teststar\caption@@setsubtype\@firstoftwo\@secondoftwo} |
| 312 |
\newcommand*\caption@@setsubtype[1]{% |
| 313 |
\caption@@@settype{sub}{#1}{sub\@captype}} |
| 314 |
\newcommand*\caption@settype{% |
| 315 |
\caption@clrflags |
| 316 |
\caption@set@type} |
| 317 |
\newcommand*\caption@set@type{% |
| 318 |
\caption@teststar\caption@@settype\@firstoftwo\@secondoftwo} |
| 319 |
\newcommand*\caption@@settype{% |
| 320 |
\caption@@@settype{}} |
| 321 |
\newcommand*\caption@@@settype[3]{% |
| 322 |
\caption@Debug{#1type=#3}% |
| 323 |
\@nameuse{caption@check#1type}{#3}% |
| 324 |
{\caption@checkgrouplevel{#1}{% |
| 325 |
\captionsetup{#1type#2*\@empty=...}#2{ or |
| 326 |
\@backslashchar#1captionof}{}}% |
| 327 |
\edef\caption@tempa{#3}% |
| 328 |
\expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else |
| 329 |
\ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi |
| 330 |
\fi |
| 331 |
\expandafter\let\csname @#1captype\endcsname\caption@tempa |
| 332 |
\@nameuse{caption@#1typehook}% |
| 333 |
\caption@setoptions{#3}% |
| 334 |
\ifx\caption@opt\relax |
| 335 |
\@nameundef{caption@#1type@warning}% |
| 336 |
\else |
| 337 |
\@namedef{caption@#1type@warning}{\caption@Warning{% |
| 338 |
The #1type was already set to |
| 339 |
`\csname @#1captype\endcsname'\MessageBreak}}% |
| 340 |
\fi |
| 341 |
#2{}{% |
| 342 |
\let\@currentlabel\caption@undefinedlabel |
| 343 |
\ifx\caption@x@label\@undefined |
| 344 |
\let\caption@x@label\label |
| 345 |
\let\label\caption@xlabel |
| 346 |
\fi |
| 347 |
\caption@start}}} |
| 348 |
\newcommand*\caption@iftype{\caption@ifdefined\@captype} |
| 349 |
\newcommand*\caption@checktype[1]{% |
| 350 |
\caption@ifsubtype{#1}\@firstoftwo{\caption@ifin@list\sf@counterlist{#1}}% |
| 351 |
{\caption@Error{Should not be used with subtype `#1'}% |
| 352 |
\@gobble}% |
| 353 |
\@firstofone} |
| 354 |
\newcommand*\caption@checksubtype[1]{% |
| 355 |
\caption@ifsubtype{#1}% |
| 356 |
\@firstofone |
| 357 |
{\caption@ifin@list\sf@counterlist{#1}% |
| 358 |
{\caption@Warning{% |
| 359 |
\noexpand\setcaptionsubtype without \string\DeclareCaptionSubType.\MessageBreak |
| 360 |
This is not designed to work; you could try replacing\MessageBreak |
| 361 |
the `subfig' package with `subcaption' to resolve\MessageBreak |
| 362 |
this problem which occurred}% |
| 363 |
\@firstofone}% |
| 364 |
{\caption@Error{Undefined subtype `#1'}% |
| 365 |
\@gobble}}} |
| 366 |
\newcommand*\caption@checkgrouplevel[2]{% |
| 367 |
\@ifundefined{#1caption@grouplevel}{% |
| 368 |
\caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}% |
| 369 |
\ifnum\currentgrouplevel>\caption@grouplevel\relax |
| 370 |
\expandafter\edef\csname #1caption@grouplevel\endcsname{% |
| 371 |
\the\currentgrouplevel}% |
| 372 |
\else |
| 373 |
\caption@Warning{\string#2\MessageBreak outside box or environment}% |
| 374 |
\fi |
| 375 |
}{}}% |
| 376 |
\newcommand*\caption@undefinedlabel{% |
| 377 |
\protect\caption@xref{\caption@labelname}{\on@line}} |
| 378 |
\DeclareRobustCommand*\caption@xref[2]{% |
| 379 |
\caption@WarningNoLine{\noexpand\label without proper reference#2}% |
| 380 |
\@setref\relax\@undefined{#1}} |
| 381 |
\newcommand*\caption@labelname{??} |
| 382 |
\newcommand*\caption@xlabel{% |
| 383 |
\caption@withoptargs\caption@@xlabel} |
| 384 |
\newcommand*\caption@@xlabel[2]{% |
| 385 |
\caption@@@xlabel |
| 386 |
\def\caption@labelname{#2}% |
| 387 |
\caption@x@label#1{#2}} |
| 388 |
\newcommand*\caption@@@xlabel{% |
| 389 |
\global\let\caption@@@xlabel\@empty |
| 390 |
\@bsphack |
| 391 |
\protected@write\@auxout{}% |
| 392 |
{\string\providecommand*\string\caption@xref[2]{% |
| 393 |
\string\@setref\string\relax\string\@undefined{\string##1}}}% |
| 394 |
\@esphack} |
| 395 |
\caption@AtBeginDocument{% |
| 396 |
\def\captionof{\caption@teststar\caption@of{\caption*}\caption}} |
| 397 |
\providecommand*\caption@of[2]{\setcaptiontype*{#2}#1} |
| 398 |
\newcommand*\captionlistentry{% |
| 399 |
\caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo} |
| 400 |
\newcommand*\@captionlistentry[1]{% |
| 401 |
\@testopt{\caption@listentry{#1}}\@captype} |
| 402 |
\def\caption@listentry#1[#2]#3{% |
| 403 |
\@bsphack |
| 404 |
#1{\caption@gettitle{#3}}% |
| 405 |
{\caption@refstepcounter{#2}% |
| 406 |
\caption@makecurrent{#2}{#3}}% |
| 407 |
\caption@addcontentsline{#2}{#3}% |
| 408 |
\@esphack} |
| 409 |
\newcommand*\captionbox{% |
| 410 |
\caption@withoptargs{\caption@ibox\@gobble}} |
| 411 |
\newcommand\caption@ibox[3]{% |
| 412 |
\kernel@ifnextchar[%] |
| 413 |
{\caption@iibox{#1}{#2}{#3}}% |
| 414 |
{\caption@iibox@{#1}{#2}{#3}}} |
| 415 |
\long\def\caption@iibox#1#2#3[#4]{% |
| 416 |
\@testopt{\caption@iiibox{#1}{#2}{#3}[{#4}]}\captionbox@innerpos@default} |
| 417 |
\long\def\caption@iibox@#1#2#3#4{% |
| 418 |
\setbox\@tempboxa\hbox{#4}% |
| 419 |
\caption@iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox@innerpos@default]{\unhbox\@tempboxa}} |
| 420 |
\long\def\caption@iiibox#1{% |
| 421 |
\caption@iiiibox{#1}\vbox\vtop} |
| 422 |
\long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{% |
| 423 |
\begingroup |
| 424 |
#1*% set \caption@position |
| 425 |
\caption@iftop{% |
| 426 |
\endgroup |
| 427 |
\parbox[t]{#6}{% |
| 428 |
#1\relax |
| 429 |
\caption@setposition t% |
| 430 |
#2{\caption#4{#5}}% |
| 431 |
\captionbox@hrule |
| 432 |
\csname caption@justification@#7\endcsname |
| 433 |
#8}% |
| 434 |
}{% |
| 435 |
\endgroup |
| 436 |
\parbox[b]{#6}{% |
| 437 |
#1\relax |
| 438 |
\caption@setposition b% |
| 439 |
\csname caption@justification@#7\endcsname |
| 440 |
#8% |
| 441 |
\captionbox@hrule |
| 442 |
#3{\caption#4{#5}}}% |
| 443 |
}} |
| 444 |
\newcommand*\captionbox@innerpos@default{c} |
| 445 |
\newcommand*\captionbox@hrule{\hrule\@height\z@\relax} |
| 446 |
\providecommand*\caption@justification@c{\centering} |
| 447 |
\providecommand*\caption@justification@l{\raggedright} |
| 448 |
\providecommand*\caption@justification@r{\raggedleft} |
| 449 |
\providecommand*\caption@justification@s{} |
| 450 |
\def\continuedfloat{% |
| 451 |
\caption@iftype |
| 452 |
{\caption@continuedfloat\@captype}% |
| 453 |
{\caption@Error{\noexpand\continuedfloat outside float}}} |
| 454 |
\newcommand*\caption@continuedfloat[1]{% |
| 455 |
\@ifstar |
| 456 |
{\caption@@refstepcounter\@captype |
| 457 |
\caption@@continuedfloat{#1}}% |
| 458 |
{\caption@continued@float{#1}}} |
| 459 |
\newcommand*\caption@continued@float[1]{% |
| 460 |
\edef\caption@tempa{#1}% |
| 461 |
\ifx\caption@tempa\caption@CFtype |
| 462 |
\caption@@continuedfloat{#1}% |
| 463 |
\else |
| 464 |
\caption@Error{Continued `#1' after `\caption@CFtype'}% |
| 465 |
\fi} |
| 466 |
\newcommand*\caption@@continuedfloat{% |
| 467 |
\caption@setflag1% continued float |
| 468 |
\caption@@@continuedfloat} |
| 469 |
\newcommand*\caption@@@continuedfloat{% |
| 470 |
\stepcounter{continuedfloat}% |
| 471 |
\caption@@@@continuedfloat} |
| 472 |
\newcommand*\caption@@@@continuedfloat[1]{% |
| 473 |
\caption@setoptions{ContinuedFloat}% for compatibility reasons |
| 474 |
\caption@setoptions{continuedfloat}% |
| 475 |
\caption@setoptions{continued#1}% |
| 476 |
\expandafter\l@addto@macro\csname the#1\endcsname\thecontinuedfloat |
| 477 |
\@ifundefined{theH#1}{}{% |
| 478 |
\expandafter\l@addto@macro\csname theH#1\endcsname{% |
| 479 |
\@alph\c@continuedfloat}}% |
| 480 |
\let\caption@@@@continuedfloat\@gobble} |
| 481 |
\newcommand*\caption@CFtype{??} |
| 482 |
\newcounter{continuedfloat} |
| 483 |
\let\c@ContinuedFloat\c@continuedfloat % defined for compatibility reasons |
| 484 |
\def\thecontinuedfloat{\theContinuedFloat} |
| 485 |
\let\theContinuedFloat\@empty % defined for compatibility reasons |
| 486 |
\newcommand*\caption@reset@continuedfloat[1]{% |
| 487 |
\xdef\caption@CFtype{#1}% |
| 488 |
\@stpelt{continuedfloat}} |
| 489 |
\def\ContinuedFloat{\continuedfloat} % defined for compatibility reasons |
| 490 |
\def\caption@ContinuedFloat{% |
| 491 |
\let\caption@reset@continuedfloat\@gobble |
| 492 |
\caption@@@continuedfloat} |
| 493 |
\newcommand*\caption@refstepcounter[1]{% |
| 494 |
\@ifundefined{c@#1}% |
| 495 |
{\caption@Error{No float type '#1' defined}}% |
| 496 |
{\caption@ref@stepcounter{#1}% |
| 497 |
\caption@fixposition % TODO: Make this independant on the "position" setting |
| 498 |
\caption@iftop\caption@setflag\caption@clrflag2% caption |
| 499 |
\caption@clrflag4% subcaption |
| 500 |
\@nameuse{donemaincaptiontrue}}} |
| 501 |
\newcommand*\caption@ref@stepcounter{% |
| 502 |
\caption@ifflag1{% continued float |
| 503 |
\let\caption@tempa\caption@@refcounter |
| 504 |
\caption@clrflag1% continued float |
| 505 |
}{% |
| 506 |
\let\caption@tempa\caption@@refstepcounter |
| 507 |
\caption@ifflag2{}{% caption |
| 508 |
\caption@ifflag4{% subcaption |
| 509 |
% Counter was already incremented by content, so we suppress \stepcounter{#1} here |
| 510 |
\let\caption@tempa\caption@@refcounter |
| 511 |
}{}% |
| 512 |
}% |
| 513 |
}% |
| 514 |
\caption@tempa} |
| 515 |
\newcommand*\caption@@refcounter[1]{% |
| 516 |
\let\caption@stepcounter@ORI\stepcounter |
| 517 |
\def\stepcounter##1{% |
| 518 |
\edef\caption@tempa{#1}% |
| 519 |
\edef\caption@tempb{##1}% |
| 520 |
\ifx\caption@tempa\caption@tempb \else |
| 521 |
\caption@stepcounter@ORI{##1}% |
| 522 |
\fi}% |
| 523 |
\caption@@@refstepcounter{#1}% |
| 524 |
\let\stepcounter\caption@stepcounter@ORI} |
| 525 |
\newcommand*\caption@@refstepcounter[1]{% |
| 526 |
\caption@prepare@stepcounter{#1}{ref}% |
| 527 |
\caption@@@refstepcounter{#1}} |
| 528 |
\newcommand*\caption@@stepcounter[1]{% |
| 529 |
\caption@prepare@stepcounter{#1}{}% |
| 530 |
\caption@@@stepcounter{#1}} |
| 531 |
\newcommand*\caption@prepare@stepcounter[2]{% |
| 532 |
\caption@addsubcontentslines{#2stepcounter}% |
| 533 |
\caption@reset@continuedfloat{#1}} |
| 534 |
\newcommand*\caption@@@refstepcounter{\refstepcounter} |
| 535 |
\newcommand*\caption@@@stepcounter{\stepcounter} |
| 536 |
\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{} |
| 537 |
\newcommand\caption@dblarg[1]{% |
| 538 |
\kernel@ifnextchar[{\caption@ydblarg{#1}}{\caption@xdblarg{#1}}} |
| 539 |
\newcommand\caption@xdblarg[2]{% |
| 540 |
#1[{#2\relax}]{#2}} |
| 541 |
\long\def\caption@ydblarg#1[#2]#3{% |
| 542 |
\caption@iflistheading{#1[{#3}]{#3}}{#1[{#2}]{#3}}} |
| 543 |
\newcommand*\caption@begin[1]{% |
| 544 |
\caption@fixposition |
| 545 |
\begingroup |
| 546 |
\caption@setfnum{#1}} |
| 547 |
\newcommand\caption@beginex[3]{% |
| 548 |
\caption@begin{#1}% |
| 549 |
\caption@beginex@hook |
| 550 |
\caption@addcontentsline{#1}{#2}% |
| 551 |
\caption@ifempty{#3}{}} |
| 552 |
\newcommand*\caption@beginex@hook{} |
| 553 |
\newcommand*\caption@end{% |
| 554 |
\endgroup} |
| 555 |
\newcommand*\caption@setfnum[1]{% |
| 556 |
\@ifundefined{caption@fnum@#1}% |
| 557 |
{\expandafter\let\csname caption@fnum@#1\expandafter\endcsname\csname fnum@#1\endcsname |
| 558 |
\@namedef{fnum@#1}{\caption@fnum{#1}}}% |
| 559 |
{}} |
| 560 |
\newcommand*\caption@normalsize{% |
| 561 |
\caption@font@normal\@unused} |
| 562 |
\let\caption@setfloatcapt\@firstofone |
| 563 |
\newcommand*\caption@makecurrent[1]{\caption@gettitle} |
| 564 |
\let\caption@makeanchor\@firstofone |
| 565 |
\let\caption@start\relax |
| 566 |
\let\caption@@start\relax |
| 567 |
\let\caption@freezeHref\relax |
| 568 |
\let\caption@defrostHref\relax |
| 569 |
\newcommand\caption@gettitle[1]{% |
| 570 |
\caption@ifdefined\NR@gettitle |
| 571 |
{\NR@gettitle{#1}}% % support for recent versions of nameref package |
| 572 |
{\caption@ifdefined\NR@sect{\def\@currentlabelname{#1}}{}}} % support for older versions of nameref package |
| 573 |
\newcommand*\caption@subtypehook{% |
| 574 |
\ifx\caption\caption@subcaption \else |
| 575 |
\caption@warmup |
| 576 |
\caption@ifflag2{}{% caption |
| 577 |
\let\caption@add@contentsline\caption@addsubcontentsline |
| 578 |
\let\caption@addsubcontentslines\@gobble |
| 579 |
\caption@ifflag4{}{% subcaption |
| 580 |
\caption@ifflag1{% continued float |
| 581 |
\caption@clrflag1% |
| 582 |
}{% |
| 583 |
\caption@@stepcounter\@captype |
| 584 |
}% |
| 585 |
\caption@setflag4% subcaption |
| 586 |
}% |
| 587 |
}% |
| 588 |
\c@continuedfloat=0\relax |
| 589 |
\let\caption@setfloatcapt\@firstofone |
| 590 |
\let\caption@chkfloat\@gobbletwo |
| 591 |
\caption@set{box}{none}% |
| 592 |
\caption@clearmargin |
| 593 |
\caption@iflist{}{\let\caption@setlist\@gobble}% |
| 594 |
\caption@setoptions{sub}% |
| 595 |
\caption@setoptions{subfloat}% for subfig-package compatibility |
| 596 |
\def\caption@settype{\caption@withoptargs\caption@sub@settype}% |
| 597 |
\def\caption@sub@settype##1##2{% |
| 598 |
\edef\caption@tempa{##2}% |
| 599 |
\ifx\caption@tempa\@captype |
| 600 |
%%% \caption@setsubtype##1\relax |
| 601 |
\else |
| 602 |
\caption@Error{##2 inside \@subcaptype}% |
| 603 |
\fi}% |
| 604 |
\let\caption\caption@subcaption |
| 605 |
\let\@caption\caption@@caption |
| 606 |
\let\phantomcaption\caption@subphantom |
| 607 |
\let\captionlistentry\caption@sublistentry |
| 608 |
\let\caption@refstepcounter\caption@@@refstepcounter |
| 609 |
\if@subfloatrow |
| 610 |
\caption@Debug{Keeping \string\@makecaption}% |
| 611 |
\else |
| 612 |
\let\@makecaption\caption@makecaption |
| 613 |
\fi |
| 614 |
\fi}% |
| 615 |
\caption@AtBeginDocument{% |
| 616 |
\caption@ifundefined\@subfloatrowtrue |
| 617 |
{\newif\if@subfloatrow |
| 618 |
\caption@ifundefined\subfloatrow |
| 619 |
{}% |
| 620 |
{\caption@Debug{Patching subfloatrow environment}% |
| 621 |
\g@addto@macro\capsubrowsettings{\@subfloatrowtrue}% |
| 622 |
\g@addto@macro\killfloatstyle{% |
| 623 |
\ifx\c@FRobj\c@FRsobj\@subfloatrowtrue\fi}}}% |
| 624 |
{\caption@Debug{\string\if@subfloatrow is already defined}}}% |
| 625 |
\newcommand*\caption@subcaption{% |
| 626 |
\caption@checkgrouplevel{sub}\subcaption |
| 627 |
\caption@star |
| 628 |
{\caption@refstepcounter\@subcaptype}% |
| 629 |
{\caption@dblarg{\@caption\@subcaptype}}} |
| 630 |
\newcommand*\caption@subphantom{% |
| 631 |
\caption@checkgrouplevel{sub}\phantomsubcaption |
| 632 |
\caption@refstepcounter\@subcaptype} |
| 633 |
\newcommand*\caption@sublistentry{% |
| 634 |
\caption@teststar\@subcaptionlistentry\@firstoftwo\@secondoftwo} |
| 635 |
\newcommand*\@subcaptionlistentry[1]{% |
| 636 |
\@testopt{\caption@listentry{#1}}\@subcaptype} |
| 637 |
\newcommand*\caption@clearsubcontentslines{% |
| 638 |
\global\let\caption@subcontentslines\@empty} |
| 639 |
\caption@clearsubcontentslines |
| 640 |
\newcommand*\caption@addsubcontentsline[4]{% |
| 641 |
\caption@Debug{\string\caption@addsubcontentsline{#1}{#2}}% |
| 642 |
\begingroup |
| 643 |
\let\label\caption@gobble |
| 644 |
\let\index\caption@gobble |
| 645 |
\let\glossary\caption@gobble |
| 646 |
\protected@edef\@tempa{\endgroup |
| 647 |
\noexpand\g@addto@macro\noexpand\caption@subcontentslines{% |
| 648 |
\noexpand\@namedef{the#2}{\csname the#2\endcsname}% |
| 649 |
\ifx\@currentHref\@undefined \else |
| 650 |
\noexpand\def\noexpand\@currentHref{\@currentHref}% |
| 651 |
\fi |
| 652 |
\noexpand\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}% |
| 653 |
\@tempa} |
| 654 |
\newcommand*\flushsubcaptionlistentries{% |
| 655 |
\caption@addsubcontentslines{user}} |
| 656 |
\renewcommand*\caption@addsubcontentslines[1]{% |
| 657 |
\caption@Debug{\string\flushsubcaptionlistentries (#1)}% |
| 658 |
\begingroup |
| 659 |
\caption@subcontentslines |
| 660 |
\endgroup |
| 661 |
\caption@clearsubcontentslines} |
| 662 |
\AtBeginDocument{% |
| 663 |
\caption@ifdefined\chapter{% |
| 664 |
\let\caption@chapter@ORI\chapter |
| 665 |
\def\chapter{% |
| 666 |
\caption@addsubcontentslines{chapter}\caption@chapter@ORI}}{}% |
| 667 |
\caption@ifdefined\appendix{% |
| 668 |
\let\caption@appendix@ORI\appendix |
| 669 |
\def\appendix{% |
| 670 |
\caption@addsubcontentslines{appendix}\caption@appendix@ORI}}{}% |
| 671 |
\caption@addsubcontentslines{AtEndDocument}% |
| 672 |
} |
| 673 |
\caption@IfBabelArabi{% |
| 674 |
\let\@makecaption\caption@makecaption |
| 675 |
\def\fnum@figure{\figurename\nobreakspace\thefigure}% |
| 676 |
\def\fnum@table{\tablename\nobreakspace\thetable}% |
| 677 |
}{} |
| 678 |
\caption@IfFrenchLe{% |
| 679 |
\def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% |
| 680 |
\def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% |
| 681 |
\let\@eatDP\@undefined |
| 682 |
\caption@AtBeginDocument{% |
| 683 |
\let\caption@original@makecaption\@makecaption}% |
| 684 |
\g@addto@macro\GOfrench{% |
| 685 |
\let\@makecaption\caption@original@makecaption}% |
| 686 |
}{} |
| 687 |
\caption@IfBabelHungarian{% |
| 688 |
\caption@AtBeginDocument{% |
| 689 |
\let\caption@original@makecaption\@makecaption}% |
| 690 |
\caption@ifdefined\extrashungarian{% |
| 691 |
\addto\extrashungarian{% |
| 692 |
\let\@makecaption\caption@original@makecaption}}{}% |
| 693 |
\caption@ifdefined\extrasmagyar{% |
| 694 |
\addto\extrasmagyar{% |
| 695 |
\let\@makecaption\caption@original@makecaption}}{}% |
| 696 |
}{} |
| 697 |
\caption@IfBabelLatvian{% |
| 698 |
\let\@makecaption\caption@makecaption |
| 699 |
}{} |
| 700 |
\newcommand\caption@IfPackageLoaded[1]{% |
| 701 |
\@testopt{\caption@@IfPackageLoaded{#1}}{}} |
| 702 |
\@onlypreamble\caption@IfPackageLoaded |
| 703 |
\long\def\caption@@IfPackageLoaded#1[#2]#3#4{% |
| 704 |
\@ifpackageloaded{#1}\@firstofone{% |
| 705 |
\caption@Debug{#1 package is not loaded (yet)\@gobble}% |
| 706 |
\caption@AtBeginDocument}{% |
| 707 |
\caption@If@Package@Loaded{#1}[{#2}]{#3}{#4}}} |
| 708 |
\@onlypreamble\caption@@IfPackageLoaded |
| 709 |
\long\def\caption@If@Package@Loaded#1[#2]{% |
| 710 |
\@ifpackageloaded{#1}{% |
| 711 |
\caption@InfoNoLine{#1 package is loaded}% |
| 712 |
\@ifpackagelater{#1}{#2}\@firstoftwo{% |
| 713 |
\caption@Error{% |
| 714 |
For a successful cooperation we need at least version\MessageBreak |
| 715 |
`#2' of package #1,\MessageBreak |
| 716 |
but only version\MessageBreak |
| 717 |
`\csname ver@#1.\@pkgextension\endcsname'\MessageBreak |
| 718 |
is available}% |
| 719 |
\@secondoftwo}% |
| 720 |
}{\@secondoftwo}} |
| 721 |
\@onlypreamble\caption@If@Package@Loaded |
| 722 |
\newcommand*\caption@clearmargin{% |
| 723 |
\setcaptionmargin\z@ |
| 724 |
\let\caption@minmargin\@undefined} |
| 725 |
\caption@setbool{needfreeze}{0} |
| 726 |
\caption@AtBeginDocument*{% |
| 727 |
\caption@ifneedfreeze{% |
| 728 |
\newcommand*\caption@freezetype[1]{% |
| 729 |
\caption@settype*{#1}% |
| 730 |
\captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround! |
| 731 |
\caption@freeze}% |
| 732 |
\newcommand*\caption@freeze{% |
| 733 |
\let\caption@frozen@continuedfloat\continuedfloat |
| 734 |
\def\continuedfloat{% |
| 735 |
\caption@@freeze{\caption@@@@continuedfloat\@captype}% |
| 736 |
\caption@frozen@continuedfloat}% |
| 737 |
\let\caption@frozen@setup\caption@setup |
| 738 |
\def\caption@setup##1{% |
| 739 |
\caption@@freeze{\caption@setup{##1}}% |
| 740 |
\caption@frozen@setup{##1}}% |
| 741 |
\let\caption@frozen@caption\caption |
| 742 |
\def\caption{% |
| 743 |
\def\caption{% |
| 744 |
\caption@Error{% |
| 745 |
Only one \noexpand\caption can be placed in this environment}% |
| 746 |
\caption@gobble}% |
| 747 |
\@ifstar |
| 748 |
{\caption@SC@caption*}% |
| 749 |
{\let\@currentlabel\caption@SClabel |
| 750 |
\caption@withoptargs\caption@SC@caption}}% |
| 751 |
\long\def\caption@SC@caption##1##2{% |
| 752 |
\caption@@freeze{\caption##1{##2}}% |
| 753 |
\ignorespaces}% |
| 754 |
\let\caption@frozen@label\label |
| 755 |
\def\label{% |
| 756 |
\caption@withoptargs\caption@SC@label}% |
| 757 |
\def\caption@SC@label##1##2{% |
| 758 |
\ifx\@currentlabel\caption@SClabel |
| 759 |
\@bsphack |
| 760 |
\caption@freeze@label{##1}{##2}% |
| 761 |
\@esphack |
| 762 |
\else |
| 763 |
\caption@frozen@label##1{##2}% |
| 764 |
\fi}% |
| 765 |
\def\caption@SClabel{\caption@undefinedlabel}% |
| 766 |
\def\caption@freeze@label##1##2{% |
| 767 |
\caption@@freeze{\label##1{##2}}}% |
| 768 |
\global\let\caption@frozen@content\@empty |
| 769 |
\long\def\caption@@freeze{% |
| 770 |
\g@addto@macro\caption@frozen@content}% |
| 771 |
\def\caption@warmup{% |
| 772 |
\let\continuedfloat\caption@frozen@continuedfloat |
| 773 |
\let\caption@setup\caption@frozen@setup |
| 774 |
\let\caption\caption@frozen@caption |
| 775 |
\let\label\caption@frozen@label}}% |
| 776 |
\newcommand*\caption@prepare@defrost{% |
| 777 |
\let\caption@settype\caption@set@type} |
| 778 |
\newcommand*\caption@defrost{% |
| 779 |
\ifx\caption@frozen@caption\@undefined |
| 780 |
\caption@frozen@content |
| 781 |
\else |
| 782 |
\caption@Error{Internal Error:\MessageBreak |
| 783 |
\noexpand\caption@defrost in same group as \string\caption@freeze}% |
| 784 |
\fi}% |
| 785 |
}{}% |
| 786 |
\caption@undefbool{needfreeze}} |
| 787 |
\let\caption@warmup\relax |
| 788 |
\caption@IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{% |
| 789 |
\newdimen\caption@adjustwidth@hsize |
| 790 |
\newdimen\caption@adjustwidth@linewidth |
| 791 |
\providecommand*\caption@set@adjustwidth{% |
| 792 |
\caption@adjustwidth@hsize\hsize |
| 793 |
\caption@adjustwidth@linewidth\linewidth |
| 794 |
\l@addto@macro\caption@beginex@hook\caption@test@adjustwidth}% |
| 795 |
\providecommand*\caption@patch@changepage[1]{% |
| 796 |
\expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname |
| 797 |
\expandafter\renewcommand\csname #1\endcsname[2]{% |
| 798 |
\@nameuse{caption@#1}{##1}{##2}% |
| 799 |
\caption@set@adjustwidth}}% |
| 800 |
\caption@patch@changepage{adjustwidth}% |
| 801 |
\caption@patch@changepage{adjustwidth*}% |
| 802 |
\let\caption@patch@changepage\relax |
| 803 |
\providecommand\caption@test@adjustwidth{% |
| 804 |
\ifdim\hsize=\caption@adjustwidth@hsize |
| 805 |
\ifdim\linewidth=\caption@adjustwidth@linewidth |
| 806 |
\hsize=\linewidth |
| 807 |
\fi |
| 808 |
\fi}% |
| 809 |
}{}% |
| 810 |
\caption@IfPackageLoaded{chkfloat}[2012/08/19 v0.1]{% |
| 811 |
\caption@ifdefined\chkfloat@addcontentsline{% |
| 812 |
\renewcommand\caption@chkfloat{\chkfloat@addcontentsline}% |
| 813 |
}{% |
| 814 |
\renewcommand\caption@chkfloat[2]{% |
| 815 |
\caption@ifdefined\chkfloat@page{% |
| 816 |
\addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}% |
| 817 |
}{}}% |
| 818 |
}% |
| 819 |
}{}% |
| 820 |
\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{% |
| 821 |
\@ifpackageloaded{floatrow}{% |
| 822 |
\caption@If@Package@Loaded{floatrow}[2007/08/24 v0.2a]{}{}% |
| 823 |
}{% |
| 824 |
\let\caption@ORI@float@setevery\@float@setevery |
| 825 |
\def\@float@setevery#1{% |
| 826 |
\float@ifcaption{#1}{% |
| 827 |
\caption@setposition{\@fs@iftopcapt t\else b\fi}% |
| 828 |
\renewcommand\caption@setfloatcapt[1]{% |
| 829 |
\let\@makecaption\caption@@make |
| 830 |
\global\setbox\@floatcapt\vbox{% |
| 831 |
\color@begingroup ##1\color@endgroup}}% |
| 832 |
\float@getstyle\float@style{#1}% |
| 833 |
\caption@setstyle*\float@style |
| 834 |
\caption@setoptions\float@style |
| 835 |
}{}% |
| 836 |
\caption@float@setname{#1}% |
| 837 |
\caption@freezeHref % will be defrosted in \float@makebox |
| 838 |
\caption@ORI@float@setevery{#1}}% |
| 839 |
\caption@AtBeginDocument{\caption@ifcompatibility{}{% |
| 840 |
\caption@ifdefined\HyOrg@float@makebox |
| 841 |
{\let\caption@ORI@float@makebox\HyOrg@float@makebox}% |
| 842 |
{\let\caption@ORI@float@makebox\float@makebox}% |
| 843 |
\renewcommand\float@makebox[1]{% |
| 844 |
\caption@ORI@float@makebox{#1\relax \caption@defrostHref}}% |
| 845 |
}}% |
| 846 |
\newcommand*\caption@float@setname[1]{% |
| 847 |
\expandafter\ifx\csname #1name\endcsname\relax |
| 848 |
\expandafter\let\csname #1name\expandafter\endcsname\csname fname@#1\endcsname |
| 849 |
\fi}% |
| 850 |
\g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% |
| 851 |
\g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% |
| 852 |
\providecommand*\float@getstyle[2]{% |
| 853 |
\edef#1{% |
| 854 |
\noexpand\expandafter\noexpand\@gobblefour\noexpand\string |
| 855 |
\expandafter\expandafter\expandafter\noexpand |
| 856 |
\csname fst@#2\endcsname}% |
| 857 |
\edef#1{#1}% |
| 858 |
\caption@Debug{floatstyle{#2} = `#1'}}% |
| 859 |
\providecommand*\float@ifcaption[1]{% |
| 860 |
\expandafter\ifx\csname @float@c@#1\endcsname\float@caption |
| 861 |
\expandafter\@firstoftwo |
| 862 |
\else |
| 863 |
\expandafter\@secondoftwo |
| 864 |
\fi}% |
| 865 |
}}{% |
| 866 |
\providecommand*\float@ifcaption[1]{\@secondoftwo}% |
| 867 |
} |
| 868 |
\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used |
| 869 |
\caption@ifbool{ruled}{% |
| 870 |
\captionsetup[ruled]{margin=0pt,minmargin=0,slc=0}% |
| 871 |
}{% |
| 872 |
\DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% |
| 873 |
} |
| 874 |
\caption@undefbool{ruled} |
| 875 |
\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{% |
| 876 |
\let\caption@ORI@floatingfigure\floatingfigure |
| 877 |
\def\floatingfigure{% |
| 878 |
\caption@floatflt{figure}% |
| 879 |
\caption@ORI@floatingfigure}% |
| 880 |
\let\caption@ORI@floatingtable\floatingtable |
| 881 |
\def\floatingtable{% |
| 882 |
\caption@floatflt{table}% |
| 883 |
\caption@ORI@floatingtable}% |
| 884 |
\newcommand*\caption@floatflt[1]{% |
| 885 |
\caption@settype{#1}% |
| 886 |
\caption@clearmargin |
| 887 |
\caption@setparboxrestore{full}% |
| 888 |
\caption@setoptions{floating#1}}% |
| 889 |
}{} |
| 890 |
\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% |
| 891 |
\caption@setbool{needfreeze}{1}% |
| 892 |
\renewcommand\FP@positionLabel{% |
| 893 |
FP\FP@captype-\number\value{FP@\FP@captype C}-pos}% |
| 894 |
\renewcommand\FP@helpNote[2]{% |
| 895 |
\begingroup % save \caption@thepage |
| 896 |
\caption@pageref{#2}% |
| 897 |
\typeout{FP#1 is inserted on page \caption@thepage!}% |
| 898 |
\endgroup}% |
| 899 |
\renewcommand*\FP@floatBegin[1]{% |
| 900 |
\def\FP@captype{#1}% |
| 901 |
\begin{lrbox}{\FP@floatCorpusBOX}% |
| 902 |
\minipage\hsize % changes from LR mode to vertical mode |
| 903 |
\caption@freezetype{#1}% |
| 904 |
\ignorespaces}% |
| 905 |
\renewcommand*\FP@floatEnd{% |
| 906 |
\endminipage |
| 907 |
\end{lrbox}% |
| 908 |
\stepcounter{FP@\FP@captype C}% |
| 909 |
\caption@label\FP@positionLabel |
| 910 |
\FP@helpNote\FP@captype\FP@positionLabel |
| 911 |
\FP@float |
| 912 |
{\FP@positionLabel}% location label test |
| 913 |
{\caption@prepare@defrost |
| 914 |
\begin\FP@captype[p!]% |
| 915 |
\usebox\FP@floatCorpusBOX |
| 916 |
\end\FP@captype}% |
| 917 |
{\@ifundefined{theH\FP@captype}{}{% |
| 918 |
\expandafter\l@addto@macro\csname theH\FP@captype\endcsname{.FP}}}% |
| 919 |
{\caption@prepare@defrost |
| 920 |
\begin\FP@captype[b!]% |
| 921 |
\let\FP@savedSetfnumCommand\caption@setfnum |
| 922 |
\def\caption@setfnum##1{% |
| 923 |
\FP@savedSetfnumCommand{##1}% |
| 924 |
\ifx\FP@guide\@empty \else |
| 925 |
\expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}% |
| 926 |
\fi}% |
| 927 |
\setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption |
| 928 |
\setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption |
| 929 |
\caption@setoptions{FP\@captype}% |
| 930 |
\FP@separatorCaption |
| 931 |
\caption@defrost |
| 932 |
\end\FP@captype}% |
| 933 |
}% |
| 934 |
}{% |
| 935 |
\let\caption@ifFPlistcap\@undefined |
| 936 |
\let\caption@ifFPrefcap\@undefined |
| 937 |
} |
| 938 |
\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{% |
| 939 |
% Test if hyperref has stopped early |
| 940 |
\caption@ifundefined\IfHyperBoolean{% |
| 941 |
\caption@set@bool\caption@ifhyp@stoppedearly0% |
| 942 |
\caption@ifundefined\H@refstepcounter |
| 943 |
{\caption@set@bool\caption@ifhyp@stoppedearly1}{% |
| 944 |
\caption@ifundefined\hyper@makecurrent |
| 945 |
{\caption@set@bool\caption@ifhyp@stoppedearly1}{% |
| 946 |
\caption@ifundefined\measuring@true |
| 947 |
{\caption@set@bool\caption@ifhyp@stoppedearly1}{}}}% |
| 948 |
}{% |
| 949 |
\def\caption@ifhyp@stoppedearly{\IfHyperBoolean{stoppedearly}}% |
| 950 |
}% |
| 951 |
\caption@ifhyp@stoppedearly{% hyperref has stopped early |
| 952 |
\caption@InfoNoLine{% |
| 953 |
Hyperref support is turned off\MessageBreak |
| 954 |
because hyperref has stopped early}% |
| 955 |
}{% |
| 956 |
\g@addto@macro\caption@prepareslc{\measuring@true}% |
| 957 |
\renewcommand*\caption@@@refstepcounter{\H@refstepcounter}% |
| 958 |
\renewcommand*\caption@makecurrent[2]{% |
| 959 |
\caption@makecurrentHref{#1}% |
| 960 |
\caption@Debug{hyperref current=\@currentHref}% |
| 961 |
\caption@gettitle{#2}}% |
| 962 |
\newcommand*\caption@makecurrentHref{\hyper@makecurrent}% |
| 963 |
\renewcommand\caption@makeanchor[1]{% |
| 964 |
\caption@Debug{hyperref anchor: \@currentHref}% |
| 965 |
% If we cannot have nesting, the anchor is empty. |
| 966 |
\ifHy@nesting |
| 967 |
\expandafter\hyper@@anchor\expandafter{\@currentHref}{#1}% |
| 968 |
\else |
| 969 |
\Hy@raisedlink{% |
| 970 |
\expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% |
| 971 |
}#1% |
| 972 |
\fi}% |
| 973 |
\g@addto@macro\caption@prepareslc{\let\caption@makeanchor\@firstofone}% |
| 974 |
\newif\if@capstart |
| 975 |
\def\caption@start{\caption@ifhypcap\caption@start@\relax}% |
| 976 |
\def\caption@start@{% |
| 977 |
\caption@makestart\@captype |
| 978 |
\caption@startanchor\@currentHref |
| 979 |
\global\@capstarttrue |
| 980 |
\let\hc@currentHref\@currentHref |
| 981 |
\def\caption@makecurrentHref##1{% |
| 982 |
\global\@capstartfalse |
| 983 |
\global\let\@currentHref\hc@currentHref}% |
| 984 |
\let\caption@makeanchor\@firstofone |
| 985 |
}% |
| 986 |
\newcommand*\caption@makestart[1]{% |
| 987 |
\begingroup |
| 988 |
\Hy@hypertexnamesfalse |
| 989 |
\hyper@makecurrent{#1.caption}% |
| 990 |
\endgroup |
| 991 |
\caption@Debug{hypcap start=\@currentHref}}% |
| 992 |
\newcommand*\caption@startanchor[1]{% |
| 993 |
\ifvmode\begingroup |
| 994 |
\caption@Debug{hypcap anchor: #1 (vertical mode)}% |
| 995 |
\@tempdima\prevdepth |
| 996 |
\nointerlineskip |
| 997 |
\vspace*{-\caption@hypcapspace}% |
| 998 |
\caption@anchor{#1}% |
| 999 |
\vspace*{\caption@hypcapspace}% |
| 1000 |
\prevdepth\@tempdima |
| 1001 |
\endgroup\else |
| 1002 |
\caption@Debug{hypcap anchor: #1 (horizontal mode)}% |
| 1003 |
\caption@anchor{#1}% |
| 1004 |
\fi}% |
| 1005 |
\newcommand*\caption@anchor[1]{% |
| 1006 |
\ifmeasuring@ \else |
| 1007 |
\caption@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}% |
| 1008 |
\fi}% |
| 1009 |
\ifx\HyperRaiseLinkLength\@tempdima |
| 1010 |
\def\caption@raisedlink#1{\ifvmode#1\else\Hy@raisedlink{#1}\fi}% |
| 1011 |
\else |
| 1012 |
\let\caption@raisedlink\Hy@raisedlink |
| 1013 |
\fi |
| 1014 |
\def\caption@@start{% |
| 1015 |
\caption@ifundefined\hc@currentHref{% |
| 1016 |
\caption@Warning{% |
| 1017 |
The option `hypcap=true' will be ignored for this\MessageBreak |
| 1018 |
particular \string\caption}}{}}% |
| 1019 |
\def\caption@freezeHref{% |
| 1020 |
\let\caption@ORI@start\caption@start |
| 1021 |
\def\caption@start{\let\caption@start\caption@ORI@start}% |
| 1022 |
\global\let\caption@currentHref\@undefined |
| 1023 |
\def\caption@@start{\global\let\caption@currentHref\@currentHref}% |
| 1024 |
\let\caption@ORI@setfloatcapt\caption@setfloatcapt |
| 1025 |
\renewcommand*\caption@setfloatcapt{% |
| 1026 |
\ifx\caption@currentHref\@undefined \else |
| 1027 |
\let\caption@makeanchor\@firstofone |
| 1028 |
\fi |
| 1029 |
\caption@ORI@setfloatcapt}}% |
| 1030 |
\def\caption@defrostHref{% |
| 1031 |
\ifx\caption@currentHref\@undefined \else |
| 1032 |
\caption@startanchor\caption@currentHref |
| 1033 |
\global\let\caption@currentHref\@undefined |
| 1034 |
\fi}% |
| 1035 |
}}{} |
| 1036 |
\caption@IfPackageLoaded{hypcap}{% v1.0 |
| 1037 |
\ifx\caption@start\relax \else % hyperref hasn't stopped early |
| 1038 |
\let\caption@ORI@capstart\capstart % save for compatibility mode |
| 1039 |
\caption@ifundefined\capstarttrue % check for v1.10 of hypcap package |
| 1040 |
{\def\capstart{\caption@start@}}% |
| 1041 |
{\def\capstart{\ifcapstart\caption@start@\fi}}% |
| 1042 |
\let\caption@start\relax |
| 1043 |
\let\caption@@start\relax |
| 1044 |
\caption@set@bool\caption@ifhypcap 1% |
| 1045 |
\renewcommand*\caption@hypcapspace{\hypcapspace}% |
| 1046 |
\fi}{} |
| 1047 |
\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% |
| 1048 |
\caption@setbool{lst@Init}{0}% |
| 1049 |
\lst@AddToHook{Init}{\caption@setbool{lst@Init}{1}}% |
| 1050 |
\let\caption@ORI@lst@MakeCaption\lst@MakeCaption |
| 1051 |
\def\lst@MakeCaption#1{% #1 is `t' or `b' |
| 1052 |
\begingroup |
| 1053 |
\caption@iflst@Init{}{% |
| 1054 |
\edef\caption@lst@leftskip{\noexpand\hskip-\the\@totalleftmargin\noexpand\relax}% |
| 1055 |
\l@addto@macro\caption@beginhook\caption@lst@leftskip}% |
| 1056 |
\caption@setposition{#1}% |
| 1057 |
\caption@iftop{% |
| 1058 |
\@tempdima\belowcaptionskip |
| 1059 |
\belowcaptionskip\abovecaptionskip |
| 1060 |
\abovecaptionskip\@tempdima}{}% |
| 1061 |
\caption@setup{rule=0}% |
| 1062 |
\caption@setoptions{lstlisting}% |
| 1063 |
\caption@setautoposition{#1}% |
| 1064 |
\caption@begin{lstlisting}% |
| 1065 |
\caption@ORI@lst@MakeCaption{#1}% |
| 1066 |
\caption@end |
| 1067 |
\endgroup}% |
| 1068 |
\def\lst@makecaption{\caption@starfalse\@makecaption}% |
| 1069 |
\def\lst@maketitle{\caption@startrue\@makecaption\@empty}% |
| 1070 |
\providecommand*\ext@lstlisting{lol}% |
| 1071 |
\l@addto@macro\caption@beginex@hook{\let\lst@@caption\relax}% |
| 1072 |
}{} |
| 1073 |
\providecommand*\LTcaptype{table} |
| 1074 |
\providecommand*\caption@LT@array{} |
| 1075 |
\newcommand\caption@AtBeginLongtable{% |
| 1076 |
\g@addto@macro\caption@LT@array} |
| 1077 |
\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{% |
| 1078 |
\RequirePackage{ltcaption}[=2018/08/26]% |
| 1079 |
\let\LT@@makecaption\@undefined |
| 1080 |
\caption@AtBeginDocument{% |
| 1081 |
\let\caption@ORI@LT@array\LT@array |
| 1082 |
\renewcommand*\LT@array{% |
| 1083 |
\caption@LT@array |
| 1084 |
\caption@ORI@LT@array}}% |
| 1085 |
\caption@AtBeginLongtable{% |
| 1086 |
\global\let\caption@opt@@longtable\@undefined |
| 1087 |
\def\captionsetup{% |
| 1088 |
\noalign\bgroup |
| 1089 |
\@ifstar\@captionsetup\@captionsetup}% gobble * |
| 1090 |
\def\@captionsetup#1{\LT@captionsetup{#1}\egroup}% |
| 1091 |
\def\LT@captionsetup#1{% |
| 1092 |
\captionsetup@startrue\caption@setup@options[@longtable]{#1}% |
| 1093 |
\global\let\caption@opt@@longtable\caption@opt@@longtable}% |
| 1094 |
\def\captionlistentry{% |
| 1095 |
\noalign\bgroup |
| 1096 |
\@ifstar{\egroup\LT@listentry\LTcaptype}% gobble * |
| 1097 |
{\egroup\LT@listentry\LTcaptype}}% |
| 1098 |
%% \let\Hy@LT@currentHlabel\@currentHlabel |
| 1099 |
%% \let\@currentHlabel\Hy@LT@currentHlabel |
| 1100 |
\def\continuedfloat{\noalign{% |
| 1101 |
\caption@Error{\noexpand\continuedfloat outside float}}}% |
| 1102 |
\let\bicaption\LT@bicaption |
| 1103 |
}% |
| 1104 |
\def\LT@capti@n{% |
| 1105 |
\@ifstar |
| 1106 |
{\egroup\LT@c@ption\@gobble[]}% |
| 1107 |
{\egroup\caption@xdblarg{\LT@c@ption\@firstofone}}}% |
| 1108 |
\renewcommand\LT@makecaption[3]{% |
| 1109 |
\caption@LT@make{% |
| 1110 |
\caption@LT@settype\LTcaptype |
| 1111 |
\caption@LT@setup |
| 1112 |
\caption@setautoposition{\ifcase\LT@rows t\else b\fi}% |
| 1113 |
\caption@startrue#1\caption@starfalse |
| 1114 |
\caption@prepare@stepcounter\LTcaptype{LT}% |
| 1115 |
\caption@begin\LTcaptype |
| 1116 |
\caption@normalsize |
| 1117 |
\vskip-\ht\strutbox |
| 1118 |
\caption@ifdefined\FBifcaptop{% |
| 1119 |
\let\caption@belowskip\@empty}{}% |
| 1120 |
\caption@make@above |
| 1121 |
\caption@@make{#2}{#3}\endgraf |
| 1122 |
\caption@make@below |
| 1123 |
\caption@end}}% |
| 1124 |
\renewcommand*\LT@listentry[2]{% |
| 1125 |
\begingroup |
| 1126 |
\caption@LT@settype{#1}% |
| 1127 |
\caption@listentry\@firstoftwo[{#1}]{#2}% |
| 1128 |
\endgroup\ignorespaces}% |
| 1129 |
\newcommand*\caption@LT@settype[1]{% |
| 1130 |
\caption@settype*{#1}% |
| 1131 |
\ifdim\LTcapwidth=4in \else |
| 1132 |
\setcaptionwidth\LTcapwidth |
| 1133 |
\fi |
| 1134 |
\caption@setoptions{longtable}% |
| 1135 |
\caption@setoptions{@longtable}}% |
| 1136 |
\caption@AtBeginDocument{\caption@ifdefined\flrow@setlist@{% |
| 1137 |
\caption@InfoNoLine{Fixing longtable code of `floatrow' package}% |
| 1138 |
\let\caption@flrow@setlist@\flrow@setlist@ |
| 1139 |
\renewcommand\flrow@setlist@[1]{% |
| 1140 |
\def\caption@tempa{{table}{longtable}}% |
| 1141 |
\def\caption@tempb{#1}% |
| 1142 |
\ifx\caption@tempa\caption@tempb |
| 1143 |
\def\@captype{table}% |
| 1144 |
\fi |
| 1145 |
\caption@flrow@setlist@{#1}}% |
| 1146 |
}{}}% |
| 1147 |
}{% |
| 1148 |
\let\caption@AtBeginLongtable\@gobble |
| 1149 |
\let\caption@LT@array\@undefined |
| 1150 |
} |
| 1151 |
\providecommand*\caption@LT@setup{} |
| 1152 |
\caption@IfPackageLoaded{picinpar}{% |
| 1153 |
\long\def\figwindow[#1,#2,#3,#4] {% |
| 1154 |
\caption@window{figure}% |
| 1155 |
\caption@setoptions{figwindow}% |
| 1156 |
\begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% |
| 1157 |
\long\def\tabwindow[#1,#2,#3,#4] {% |
| 1158 |
\caption@window{table}% |
| 1159 |
\caption@setoptions{tabwindow}% |
| 1160 |
\begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% |
| 1161 |
\newcommand*\caption@window[1]{% |
| 1162 |
\let\@makecaption\caption@@make |
| 1163 |
\caption@setautoposition b% |
| 1164 |
\caption@settype{#1}% |
| 1165 |
\caption@clearmargin |
| 1166 |
\caption@setparboxrestore{full}}% |
| 1167 |
\newcommand\caption@wincaption[1]{% |
| 1168 |
\ifdim\picwd=\z@ |
| 1169 |
\let\caption@makecurrent\@gobbletwo |
| 1170 |
\let\caption@@start\relax |
| 1171 |
\caption@prepareslc |
| 1172 |
\else |
| 1173 |
\caption@setflag1% |
| 1174 |
\fi |
| 1175 |
\edef\@tempa{\expandafter\noexpand\@car#1\@nil}% |
| 1176 |
\if\@tempa*% |
| 1177 |
\let\@tempa\@firstofone |
| 1178 |
\else\if\@tempa[%] |
| 1179 |
\let\@tempa\@firstofone |
| 1180 |
\else |
| 1181 |
\let\@tempa\@empty |
| 1182 |
\fi\fi |
| 1183 |
\expandafter\caption\@tempa{#1}}% |
| 1184 |
}{} |
| 1185 |
\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}} |
| 1186 |
\caption@IfPackageLoaded{picins}{% |
| 1187 |
\caption@ifundefined\@piccaptype{% |
| 1188 |
\caption@iftype{% |
| 1189 |
\let\@piccaptype\@captype |
| 1190 |
}{% |
| 1191 |
\def\@piccaptype{figure}% |
| 1192 |
}% |
| 1193 |
}{}% |
| 1194 |
\let\@captype\@undefined |
| 1195 |
\def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}% |
| 1196 |
\let\caption@ORI@make@piccaption\make@piccaption |
| 1197 |
\def\make@piccaption{% |
| 1198 |
\let\caption@ORI\caption |
| 1199 |
\long\def\caption[##1]##2{% |
| 1200 |
\caption@freezeHref % will be defrosted in \ivparpic |
| 1201 |
\caption@settype\@piccaptype |
| 1202 |
\caption@clearmargin |
| 1203 |
\caption@setparboxrestore{full}% |
| 1204 |
\caption@setoptions{parpic}% |
| 1205 |
\caption@setautoposition b% |
| 1206 |
\expandafter\expandafter\expandafter\caption@ORI |
| 1207 |
\expandafter\expandafter\expandafter[% |
| 1208 |
\expandafter\expandafter\expandafter{% |
| 1209 |
\expandafter##1\expandafter}\expandafter]\expandafter{##2}}% |
| 1210 |
\caption@ORI@make@piccaption |
| 1211 |
\let\caption\caption@ORI}% |
| 1212 |
|
| 1213 |
\let\caption@ORI@ivparpic\ivparpic |
| 1214 |
\def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{% |
| 1215 |
\let\caption@ORI@noindent\noindent |
| 1216 |
\def\noindent{% |
| 1217 |
\caption@defrostHref |
| 1218 |
\let\noindent\caption@ORI@noindent |
| 1219 |
\noindent}% |
| 1220 |
\caption@ORI@ivparpic(#1,#2)(#3,#4)[{#5}][{#6}]{#7}% |
| 1221 |
\let\noindent\caption@ORI@noindent}% |
| 1222 |
}{% |
| 1223 |
\let\piccaptiontype\@undefined |
| 1224 |
} |
| 1225 |
\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{% |
| 1226 |
\def\rotcaption{\let\@makecaption\@makerotcaption\caption}% |
| 1227 |
\def\rotcaptionof{% |
| 1228 |
\caption@teststar\caption@of{\rotcaption*}\rotcaption}% |
| 1229 |
\long\def\@makerotcaption#1#2{% |
| 1230 |
\rotatebox{90}{% |
| 1231 |
\ifdim\captionwidth=\z@ |
| 1232 |
\setcaptionwidth{.8\vsize}% |
| 1233 |
\l@addto@macro\caption@singleline{% |
| 1234 |
\caption@setup{parbox=none}}% |
| 1235 |
\fi |
| 1236 |
\let\caption@calcmargin\relax |
| 1237 |
\caption@@make{#1}{#2}}% |
| 1238 |
\nobreak\hspace{12pt}}% |
| 1239 |
}{} |
| 1240 |
\caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{% |
| 1241 |
\caption@setbool{needfreeze}{1}% |
| 1242 |
\let\caption@ORI@SC@zfloat\SC@zfloat |
| 1243 |
\def\SC@zfloat#1#2#3[#4]{% |
| 1244 |
\caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]% |
| 1245 |
\SC@RestoreCommands |
| 1246 |
\caption@freezetype{#2}% |
| 1247 |
\let\SC@label\label |
| 1248 |
\ignorespaces}% |
| 1249 |
\providecommand*\SC@RestoreCommands{% |
| 1250 |
\let\caption=\SC@orig@caption \let\label=\SC@orig@label}% |
| 1251 |
\let\caption@ORI@endSC@FLOAT\endSC@FLOAT |
| 1252 |
\def\endSC@FLOAT{% |
| 1253 |
\def\caption@setSC@justify{% |
| 1254 |
\caption@clearmargin |
| 1255 |
\ifx\SC@justify\@empty \else |
| 1256 |
\let\caption@justification\SC@justify |
| 1257 |
\let\SC@justify\@empty |
| 1258 |
\fi}% |
| 1259 |
\let\caption\SC@orig@caption |
| 1260 |
\def\SC@orig@caption[##1]##2{% |
| 1261 |
\caption@setSC@justify |
| 1262 |
%%% \caption@setoptions{SC}% |
| 1263 |
\caption@setoptions{SC\@captype}% |
| 1264 |
\caption@defrost}% |
| 1265 |
\caption@setSC@justify % for compatibility mode |
| 1266 |
\caption@prepare@defrost |
| 1267 |
\caption@ORI@endSC@FLOAT}% |
| 1268 |
}{} |
| 1269 |
\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{% |
| 1270 |
\def\sf@ifpositiontop{% |
| 1271 |
\ifx\@captype\@undefined |
| 1272 |
\expandafter\@gobbletwo |
| 1273 |
\else\ifx\@captype\relax |
| 1274 |
\expandafter\expandafter\expandafter\@gobbletwo |
| 1275 |
\else |
| 1276 |
\expandafter\expandafter\expandafter\sf@if@position@top |
| 1277 |
\fi\fi} |
| 1278 |
\def\sf@if@position@top{% |
| 1279 |
\@ifundefined{if\@captype topcap}% |
| 1280 |
{\@gobbletwo}% |
| 1281 |
{\@nameuse{if\@captype topcap}% |
| 1282 |
\expandafter\@firstoftwo |
| 1283 |
\else |
| 1284 |
\expandafter\@secondoftwo |
| 1285 |
\fi}} |
| 1286 |
}{} |
| 1287 |
\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{% |
| 1288 |
\renewcommand*\tablecaption{% |
| 1289 |
\caption@star |
| 1290 |
{\refstepcounter{table}}% |
| 1291 |
{\caption@dblarg{\@xtablecaption}}}% |
| 1292 |
\let\caption@ORI@xtablecaption\@xtablecaption |
| 1293 |
\long\def\@xtablecaption[#1]#2{% |
| 1294 |
\caption@gettitle{#2}% |
| 1295 |
\caption@ORI@xtablecaption[{#1}]{#2}}% |
| 1296 |
\long\def\ST@caption#1[#2]#3{\par% |
| 1297 |
\caption@settype*{#1}% |
| 1298 |
\caption@setoptions{supertabular}% |
| 1299 |
\caption@setposition{\if@topcaption t\else b\fi}% |
| 1300 |
\caption@beginex{#1}{#2}{#3}% |
| 1301 |
\caption@parboxrestore |
| 1302 |
\caption@normalsize |
| 1303 |
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par |
| 1304 |
\caption@end}% |
| 1305 |
}{} |
| 1306 |
\caption@IfPackageLoaded{xtab}[2000/04/09 v2.3]{% |
| 1307 |
\renewcommand*\tablecaption{% |
| 1308 |
\caption@star |
| 1309 |
{\refstepcounter{table}}% |
| 1310 |
{\caption@dblarg{\@xtablecaption}}}% |
| 1311 |
\let\caption@ORI@xtablecaption\@xtablecaption |
| 1312 |
\long\def\@xtablecaption[#1]#2{% |
| 1313 |
\caption@gettitle{#2}% |
| 1314 |
\caption@ORI@xtablecaption[{#1}]{#2}}% |
| 1315 |
\long\def\ST@caption#1[#2]#3{\par% |
| 1316 |
\caption@settype*{#1}% |
| 1317 |
\caption@setoptions{xtabular}% |
| 1318 |
\caption@set{position}{\if@topcaption t\else b\fi}% |
| 1319 |
\@initisotab |
| 1320 |
\caption@beginex{#1}{#2}{#3}% |
| 1321 |
\caption@parboxrestore |
| 1322 |
\caption@normalsize |
| 1323 |
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par |
| 1324 |
\caption@end |
| 1325 |
\global\advance\ST@pageleft -\PWSTcapht |
| 1326 |
\ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}% |
| 1327 |
}{} |
| 1328 |
\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{% |
| 1329 |
\let\caption@ORI@threeparttable\threeparttable |
| 1330 |
\renewcommand*\threeparttable{% |
| 1331 |
\caption@settype{\@ifundefined{@captype}{table}{\@captype}}% |
| 1332 |
%%% \caption@setposition{auto}% ? |
| 1333 |
\caption@clearmargin |
| 1334 |
\caption@setoptions{threeparttable}% |
| 1335 |
\caption@ORI@threeparttable}% |
| 1336 |
\let\caption@ORI@measuredfigure\measuredfigure |
| 1337 |
\renewcommand*\measuredfigure{% |
| 1338 |
\caption@settype{\@ifundefined{@captype}{figure}{\@captype}}% |
| 1339 |
%%% \caption@setposition{auto}% ? |
| 1340 |
\caption@clearmargin |
| 1341 |
\caption@setoptions{measuredfigure}% |
| 1342 |
\caption@ORI@measuredfigure}% |
| 1343 |
\def\TPT@caption#1[#2]#3{% |
| 1344 |
\gdef\TPT@docapt{% |
| 1345 |
\global\let\TPT@docapt\@undefined |
| 1346 |
\caption@setautoposition\caption@TPT@position |
| 1347 |
\TPT@LA@caption{#1}[{#2}]{#3}}% |
| 1348 |
\ifx\TPT@hsize\@empty |
| 1349 |
\let\label\TPT@gatherlabel % Bug: does not work for measuredfigures |
| 1350 |
\gdef\caption@TPT@position{t}% |
| 1351 |
\g@addto@macro\TPT@docapt\caption@TPT@eatvskip |
| 1352 |
\else |
| 1353 |
\def\caption@TPT@position{b}% |
| 1354 |
\TPT@docapt |
| 1355 |
\fi |
| 1356 |
\ignorespaces}% |
| 1357 |
%\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}% |
| 1358 |
\def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}% |
| 1359 |
}{} |
| 1360 |
\caption@IfPackageLoaded{wrapfig}[2003/01/31 v3.6]{% |
| 1361 |
\renewcommand*\wrapfloat[1]{% |
| 1362 |
\def\@captype{#1}% |
| 1363 |
\@ifundefined{fst@#1}{}{% |
| 1364 |
\@nameuse{fst@#1}% |
| 1365 |
\def\WF@floatstyhook{\let\@currbox\WF@box |
| 1366 |
\global\setbox\WF@box\float@makebox{\wd\WF@box}}}% |
| 1367 |
\@ifnextchar[\WF@wr{\WF@wr[]}} |
| 1368 |
\def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, |
| 1369 |
\gdef\WF@ovh{#1}% hold overhang for later, when \width is known |
| 1370 |
\global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% |
| 1371 |
\expandafter\WF@captionstyhook\expandafter{\@captype}% <= new |
| 1372 |
\ifdim\hsize>\z@ \@parboxrestore \else |
| 1373 |
\setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption |
| 1374 |
\ignorespaces \fi}% |
| 1375 |
\def\WF@captionstyhook#1{% |
| 1376 |
\let\@captype\@undefined |
| 1377 |
\@ifundefined{fst@#1}{}{\@float@setevery{#1}}% |
| 1378 |
\caption@settype{#1}% |
| 1379 |
\caption@clearmargin |
| 1380 |
%%% \caption@setoptions{wrap}% |
| 1381 |
\caption@setoptions{wrap#1}}% |
| 1382 |
}{} |
| 1383 |
\caption@endtitles@code |
| 1384 |
\let\caption@endtitles@code\@undefined |
| 1385 |
\let\AfterCaptionPackage\@firstofone |
| 1386 |
\endinput |
| 1387 |
%% |
| 1388 |
%% End of file `caption_2020-10-26.sty'. |