| 1 |
%% |
| 2 |
%% This is file `caption3_2020-10-26.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% fallback/v3.5/caption3.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% Copyright (C) 1994-2022 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{caption3}[2022/04/06 v2.2h caption3 kernel (AR)] |
| 40 |
\providecommand*\@nameundef[1]{% |
| 41 |
\expandafter\let\csname #1\endcsname\@undefined} |
| 42 |
\providecommand\l@addto@macro[2]{% |
| 43 |
\edef#1{\unexpanded\expandafter{#1#2}}} |
| 44 |
\def\bothIfFirst#1#2{\caption@bothif{#1}{#1#2}} |
| 45 |
\def\bothIfSecond#1#2{\caption@bothif{#2}{#1#2}} |
| 46 |
\newcommand*\caption@bothif[2]{% |
| 47 |
\begingroup |
| 48 |
\caption@prepare@bothif |
| 49 |
\protected@xdef\caption@tempa{#1}% |
| 50 |
\endgroup |
| 51 |
\ifx\caption@tempa\@empty \else |
| 52 |
#2% |
| 53 |
\fi} |
| 54 |
\providecommand*\caption@prepare@bothif{} |
| 55 |
\g@addto@macro\caption@prepare@bothif{% |
| 56 |
\let\inputencoding\@gobble} |
| 57 |
\newcommand*\caption@ifundefined[1]{% |
| 58 |
\ifdefined#1% |
| 59 |
\ifx#1\relax |
| 60 |
\expandafter\expandafter\expandafter\@firstoftwo |
| 61 |
\else |
| 62 |
\expandafter\expandafter\expandafter\@secondoftwo |
| 63 |
\fi |
| 64 |
\else |
| 65 |
\expandafter\@firstoftwo |
| 66 |
\fi} |
| 67 |
\newcommand*\caption@ifdefined[1]{% |
| 68 |
\ifdefined#1% |
| 69 |
\ifx#1\relax |
| 70 |
\expandafter\expandafter\expandafter\@secondoftwo |
| 71 |
\else |
| 72 |
\expandafter\expandafter\expandafter\@firstoftwo |
| 73 |
\fi |
| 74 |
\else |
| 75 |
\expandafter\@secondoftwo |
| 76 |
\fi} |
| 77 |
\newcommand*\caption@ifinlist{% |
| 78 |
\@expandtwoargs\caption@@ifinlist} |
| 79 |
\newcommand*\caption@@ifinlist[2]{% |
| 80 |
\begingroup |
| 81 |
\def\@tempa##1,#1,##2\@nil{% |
| 82 |
\endgroup |
| 83 |
\ifx\relax##2\relax |
| 84 |
\expandafter\@secondoftwo |
| 85 |
\else |
| 86 |
\expandafter\@firstoftwo |
| 87 |
\fi}% |
| 88 |
\@tempa,#2,#1,\@nil}% |
| 89 |
\newcommand*\caption@ifin@list[2]{% |
| 90 |
\caption@ifempty@list#1% |
| 91 |
{\@secondoftwo}% |
| 92 |
{\@expandtwoargs\caption@@ifinlist{#2}{#1}}} |
| 93 |
\newcommand*\caption@g@addto@list[2]{% |
| 94 |
\caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}} |
| 95 |
\newcommand*\caption@l@addto@list[2]{% |
| 96 |
\caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}} |
| 97 |
\newcommand*\caption@g@removefrom@list[2]{% |
| 98 |
\caption@l@removefrom@list#1{#2}% |
| 99 |
\global\let#1#1} |
| 100 |
\newcommand*\caption@l@removefrom@list[2]{% |
| 101 |
\caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}} |
| 102 |
\newcommand*\caption@for@list[2]{% |
| 103 |
\caption@ifempty@list#1{}% |
| 104 |
{\def\caption@tempb##1{#2}% |
| 105 |
\@for\caption@tempa:=#1\do{% |
| 106 |
\expandafter\caption@tempb\expandafter{\caption@tempa}}}} |
| 107 |
\newcommand*\caption@ifempty@list[1]{% |
| 108 |
\ifx#1\@undefined |
| 109 |
\expandafter\@firstoftwo |
| 110 |
\else\ifx#1\relax |
| 111 |
\expandafter\expandafter\expandafter\@firstoftwo |
| 112 |
\else\ifx#1\@empty |
| 113 |
\expandafter\expandafter\expandafter\expandafter |
| 114 |
\expandafter\expandafter\expandafter\@firstoftwo |
| 115 |
\else |
| 116 |
\expandafter\expandafter\expandafter\expandafter |
| 117 |
\expandafter\expandafter\expandafter\@secondoftwo |
| 118 |
\fi\fi\fi} |
| 119 |
\newcommand*\caption@setbool[1]{% |
| 120 |
\expandafter\caption@set@bool\csname caption@if#1\endcsname} |
| 121 |
\newcommand*\caption@set@bool[2]{% |
| 122 |
\caption@if@bool{#2}{\let#1\@firstoftwo}{\let#1\@secondoftwo}} |
| 123 |
\newcommand*\caption@if@bool[1]{% |
| 124 |
\caption@ifinlist{#1}{1,true,yes,on}% |
| 125 |
{\@firstoftwo}% |
| 126 |
{\caption@ifinlist{#1}{0,false,no,off}% |
| 127 |
{}% |
| 128 |
{\caption@Error{Undefined boolean value `#1'}}% |
| 129 |
\@secondoftwo}} |
| 130 |
\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}} |
| 131 |
\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}} |
| 132 |
\newcommand*\caption@teststar[3]{% |
| 133 |
\@ifstar{#1{#2}}{#1{#3}}} |
| 134 |
\newcommand*\caption@teststar@[3]{% |
| 135 |
\@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}} |
| 136 |
\AtBeginDocument{\let\caption@teststar@\caption@teststar} |
| 137 |
\newcommand*\caption@ifatletter{% |
| 138 |
\ifnum\the\catcode`\@=11 |
| 139 |
\expandafter\@firstoftwo |
| 140 |
\else |
| 141 |
\expandafter\@secondoftwo |
| 142 |
\fi} |
| 143 |
\AtBeginDocument{\let\caption@ifatletter\@secondoftwo} |
| 144 |
\newcommand*\caption@withoptargs[1]{% |
| 145 |
\@ifstar |
| 146 |
{\def\caption@tempa{*}\caption@@withoptargs{#1}}% |
| 147 |
{\def\caption@tempa{}\caption@@withoptargs{#1}}} |
| 148 |
\def\caption@@withoptargs#1{% |
| 149 |
\@ifnextchar[%] |
| 150 |
{\caption@@@withoptargs{#1}}% |
| 151 |
{\caption@@@@withoptargs{#1}}} |
| 152 |
\def\caption@@@withoptargs#1[#2]{% |
| 153 |
\l@addto@macro\caption@tempa{[{#2}]}% |
| 154 |
\caption@@withoptargs{#1}} |
| 155 |
\def\caption@@@@withoptargs#1{% |
| 156 |
\def\caption@tempb{#1}% |
| 157 |
\expandafter\caption@tempb\expandafter{\caption@tempa}} |
| 158 |
\DeclareRobustCommand*\caption@gobble{% |
| 159 |
\caption@withoptargs\@gobbletwo} |
| 160 |
\let\caption@begindocumenthook\@empty |
| 161 |
\let\caption@@begindocumenthook\@empty |
| 162 |
\def\caption@AtBeginDocument{% |
| 163 |
\caption@teststar\g@addto@macro |
| 164 |
\caption@@begindocumenthook\caption@begindocumenthook} |
| 165 |
\AtBeginDocument{% |
| 166 |
\caption@InfoNoLine{Begin \noexpand\AtBeginDocument code}% |
| 167 |
\def\caption@AtBeginDocument{% |
| 168 |
\@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}% |
| 169 |
\caption@begindocumenthook |
| 170 |
\let\caption@begindocumenthook\relax |
| 171 |
\def\caption@AtBeginDocument{% |
| 172 |
\@ifstar\@firstofone\@firstofone}% |
| 173 |
\caption@@begindocumenthook |
| 174 |
\let\caption@@begindocumenthook\relax |
| 175 |
\caption@InfoNoLine{End \noexpand\AtBeginDocument code}} |
| 176 |
\newcommand*\caption@Info[1]{% |
| 177 |
\PackageInfo{caption}{#1}} |
| 178 |
\newcommand*\caption@InfoNoLine[1]{% |
| 179 |
\caption@Info{#1\@gobble}} |
| 180 |
\newcommand*\caption@Warning[1]{% |
| 181 |
\caption@WarningNoLine{#1\on@line}} |
| 182 |
\newcommand*\caption@WarningNoLine[1]{% |
| 183 |
\PackageWarning{caption}{#1.^^J\caption@wh\@gobbletwo}} |
| 184 |
\newcommand*\caption@wh{% |
| 185 |
See the caption package documentation for explanation.} |
| 186 |
\newcommand*\caption@Error[1]{% |
| 187 |
\PackageError{caption}{#1}{\caption@@eh{caption}}} |
| 188 |
\newcommand*\caption@@eh[1]{% |
| 189 |
If you do not understand this error, please take a closer look\MessageBreak |
| 190 |
at the documentation of the `#1' package, especially the\MessageBreak |
| 191 |
section about errors.\MessageBreak\@ehc} |
| 192 |
\let\caption@KV@err\caption@Error |
| 193 |
\RequirePackage{keyval}[1997/11/10] |
| 194 |
\providecommand*\undefine@key[2]{% |
| 195 |
\@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} |
| 196 |
\providecommand*\@preamble@keys{} |
| 197 |
\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}} |
| 198 |
\@onlypreamble\@onlypreamble@key |
| 199 |
\@onlypreamble\@preamble@keys |
| 200 |
\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}} |
| 201 |
\caption@AtBeginDocument*{% |
| 202 |
\def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}% |
| 203 |
\@preamble@keys |
| 204 |
\let\@elt\relax} |
| 205 |
\newcommand*\DeclareCaptionOption{% |
| 206 |
\caption@teststar\caption@declareoption\AtEndOfPackage\@gobble} |
| 207 |
\@onlypreamble\DeclareCaptionOption |
| 208 |
\newcommand*\caption@declareoption[2]{% |
| 209 |
#1{\undefine@key{caption}{#2}}\caption@declare@option{#2}} |
| 210 |
\@onlypreamble\caption@declareoption |
| 211 |
\newcommand*\caption@declare@option{% |
| 212 |
\define@key{caption}} |
| 213 |
%% no \@onlypreamble\caption@declare@option since it will be used by \captionsetup |
| 214 |
\newcommand*\DeclareCaptionOptionNoValue{% |
| 215 |
\caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble} |
| 216 |
\@onlypreamble\DeclareCaptionOptionNoValue |
| 217 |
\newcommand\caption@declareoption@novalue[3]{% |
| 218 |
\caption@declareoption{#1}{#2}[\KV@err]{% |
| 219 |
\caption@option@novalue{#2}{##1}{#3}}} |
| 220 |
\@onlypreamble\caption@declareoption@novalue |
| 221 |
\newcommand*\caption@option@novalue[2]{% |
| 222 |
\ifx\KV@err#2% |
| 223 |
\expandafter\@firstofone |
| 224 |
\else |
| 225 |
\KV@err{No value allowed for #1}% |
| 226 |
\expandafter\@gobble |
| 227 |
\fi} |
| 228 |
\newif\ifcaptionsetup@star |
| 229 |
\newcommand*\captionsetup{% |
| 230 |
\caption@teststar@\@captionsetup\@gobble\@firstofone} |
| 231 |
\newcommand*\@captionsetup[1]{% |
| 232 |
\captionsetup@startrue#1\captionsetup@starfalse |
| 233 |
\@ifnextchar[%] |
| 234 |
\caption@setup@options\caption@setup} |
| 235 |
\newcommand*\caption@setup{% |
| 236 |
\caption@setkeys{caption}} |
| 237 |
\def\caption@setup@options[#1]{% |
| 238 |
\@ifnextchar[%] |
| 239 |
{\caption@stepthecounter |
| 240 |
\@expandtwoargs\caption@setup@options@@{#1}{@\caption@thecounter}}% |
| 241 |
{\caption@setup@options@{#1}}} |
| 242 |
\def\caption@setup@options@@#1#2[#3]#4{% |
| 243 |
\caption@declare@option{#2}[]{\caption@setup@options@{#3}{#4}}% |
| 244 |
\caption@setup@options@{#1}{#2}} |
| 245 |
\newcommand*\caption@setup@options@[2]{% |
| 246 |
\@bsphack |
| 247 |
\ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi |
| 248 |
\caption@checkoptions{#2}% |
| 249 |
\expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}% |
| 250 |
\@esphack} |
| 251 |
\newcommand*\caption@checkoptions[1]{% |
| 252 |
\begingroup |
| 253 |
\caption@prepare@optioncheck |
| 254 |
\caption@setup{#1}% |
| 255 |
\endgroup} |
| 256 |
\providecommand*\caption@prepare@optioncheck{} |
| 257 |
\let\IfCaptionOptionCheck\@secondoftwo |
| 258 |
\g@addto@macro\caption@prepare@optioncheck{% |
| 259 |
\let\IfCaptionOptionCheck\@firstoftwo} |
| 260 |
\newcommand*\clearcaptionsetup{% |
| 261 |
\caption@teststar@\@clearcaptionsetup\@gobble\@firstofone} |
| 262 |
\newcommand*\@clearcaptionsetup[1]{% |
| 263 |
\let\caption@tempa#1% |
| 264 |
\@testopt\@@clearcaptionsetup{}} |
| 265 |
\def\@@clearcaptionsetup[#1]#2{% |
| 266 |
\@bsphack |
| 267 |
\expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname |
| 268 |
{\caption@tempa{\caption@Warning{Option list `#2' undefined}}}% |
| 269 |
{\ifx,#1,% |
| 270 |
\caption@clearsetup{#2}% |
| 271 |
\else |
| 272 |
\caption@@removefromsetup{#1}{#2}% |
| 273 |
\fi}% |
| 274 |
\@esphack} |
| 275 |
\newcommand*\caption@clearsetup[1]{% |
| 276 |
\caption@removefromoptlist{#1}% |
| 277 |
\@nameundef{caption@opt@#1}} |
| 278 |
\newcommand*\caption@removefromsetup{% |
| 279 |
\let\caption@tempa\@gobble |
| 280 |
\caption@@removefromsetup} |
| 281 |
\newcommand*\caption@@removefromsetup[2]{% |
| 282 |
\expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname |
| 283 |
\expandafter\let\csname caption@opt@#2\endcsname\@undefined |
| 284 |
\def\@tempb##1=##2\@nil{##1}% |
| 285 |
\edef\@tempc{#1}% |
| 286 |
\@for\@tempa:=\@tempa\do{% |
| 287 |
\edef\@tempd{\expandafter\@tempb\@tempa=\@nil}% |
| 288 |
\ifx\@tempd\@tempc |
| 289 |
\let\caption@tempa\@gobble |
| 290 |
\else |
| 291 |
\expandafter\expandafter\expandafter\caption@l@addto@list |
| 292 |
\expandafter\csname caption@opt@#2\expandafter\endcsname |
| 293 |
\expandafter{\@tempa}% |
| 294 |
\fi}% |
| 295 |
\expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname |
| 296 |
{\caption@removefromoptlist{#2}}{}% |
| 297 |
\caption@tempa{\caption@Warning{% |
| 298 |
Option `#1' was not in list `#2'}}} |
| 299 |
\newcommand*\showcaptionsetup[2][\@firstofone]{% |
| 300 |
\@bsphack |
| 301 |
\GenericWarning{}{% |
| 302 |
#1 Caption Info: Option list on `#2'\MessageBreak |
| 303 |
#1 Caption Data: \@ifundefined{caption@opt@#2}{% |
| 304 |
-none-% |
| 305 |
}{% |
| 306 |
{\expandafter\expandafter\expandafter\strip@prefix |
| 307 |
\expandafter\meaning\csname caption@opt@#2\endcsname}% |
| 308 |
}}% |
| 309 |
\@esphack} |
| 310 |
\DeclareCaptionOption{options}{\caption@setoptions{#1}} |
| 311 |
\newcommand*\caption@setoptions[1]{% |
| 312 |
\caption@Debug{options=#1}% |
| 313 |
\expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname |
| 314 |
\ifx\caption@opt\relax \else |
| 315 |
\caption@xsetup\caption@opt |
| 316 |
\caption@clearsetup{#1}% |
| 317 |
\fi} |
| 318 |
\newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}} |
| 319 |
\newcommand*\caption@addtooptlist[1]{% |
| 320 |
\@ifundefined{caption@opt@#1@lineno}% |
| 321 |
{\caption@dooptlist\caption@g@addto@list{#1}% |
| 322 |
\expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}}% |
| 323 |
{}} |
| 324 |
\newcommand*\caption@removefromoptlist[1]{% |
| 325 |
\caption@dooptlist\caption@g@removefrom@list{#1}% |
| 326 |
\global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined} |
| 327 |
\newcommand*\caption@dooptlist[2]{% |
| 328 |
\begingroup |
| 329 |
\edef\@tempa{#2}\@onelevel@sanitize\@tempa |
| 330 |
\expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}% |
| 331 |
\endgroup} |
| 332 |
\AtEndDocument{% |
| 333 |
\caption@for@list\caption@optlist |
| 334 |
{\caption@WarningNoLine{% |
| 335 |
Unused \string\captionsetup[#1] |
| 336 |
on input line \csname caption@opt@#1@lineno\endcsname}}} |
| 337 |
\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys} |
| 338 |
\long\def\caption@@setkeys[#1]#2#3{% |
| 339 |
\@bsphack |
| 340 |
\expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err |
| 341 |
\expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx |
| 342 |
\expandafter\let\csname ORI@XKV@err\caption@keydepth\endcsname\XKV@err |
| 343 |
\edef\caption@keydepth{\caption@keydepth i}% |
| 344 |
\expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname |
| 345 |
\ifx\KV@err\relax |
| 346 |
\def\KV@err##1{\PackageError{#1}{##1}{% |
| 347 |
See the #1 package documentation for explanation.}}% |
| 348 |
\fi |
| 349 |
\def\KV@errx{\KV@err}% |
| 350 |
\def\XKV@err{\let\@tempa\XKV@tkey\KV@err}% |
| 351 |
\caption@Debug{\noexpand\setkeys{#2}{#3}}% |
| 352 |
\setkeys{#2}{#3}% |
| 353 |
\edef\caption@keydepth{\expandafter\@gobble\caption@keydepth}% |
| 354 |
\expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname |
| 355 |
\expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname |
| 356 |
\expandafter\let\expandafter\XKV@err\csname ORI@XKV@err\caption@keydepth\endcsname |
| 357 |
\ifx\caption@keydepth\@empty \captionsetup@starfalse \fi |
| 358 |
\@esphack} |
| 359 |
\let\caption@keydepth\@empty |
| 360 |
\newcommand*\caption@ExecuteOptions[2]{% |
| 361 |
\expandafter\@expandtwoargs\csname caption@setkeys@#1\endcsname{#1}{#2}}% |
| 362 |
\@onlypreamble\caption@ExecuteOptions |
| 363 |
\newcommand*\caption@ProcessOptions{% |
| 364 |
\caption@teststar\caption@@ProcessOptions\@gobble\@firstofone} |
| 365 |
\@onlypreamble\caption@ProcessOptions |
| 366 |
\newcommand\caption@@ProcessOptions[2]{% |
| 367 |
\let\@tempc\relax |
| 368 |
\let\caption@tempa\@empty |
| 369 |
#1{% \@firstofone -or- \@gobble |
| 370 |
\@for\CurrentOption:=\@classoptionslist\do{% |
| 371 |
\@ifundefined{KV@#2@\CurrentOption}{}{% |
| 372 |
\@ifundefined{KV@#2@\CurrentOption @default}{% |
| 373 |
\PackageInfo{#2}{Global option `\CurrentOption' ignored}% |
| 374 |
}{% |
| 375 |
\PackageInfo{#2}{Global option `\CurrentOption' processed}% |
| 376 |
\edef\caption@tempa{\caption@tempa\CurrentOption,}% |
| 377 |
\@expandtwoargs\@removeelement\CurrentOption |
| 378 |
\@unusedoptionlist\@unusedoptionlist |
| 379 |
}% |
| 380 |
}% |
| 381 |
}% |
| 382 |
\let\CurrentOption\@empty |
| 383 |
}% |
| 384 |
\caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}% |
| 385 |
\AtEndOfPackage{\let\@unprocessedoptions\relax}} |
| 386 |
\@onlypreamble\caption@@ProcessOptions |
| 387 |
\newcommand\caption@SetupOptions[2]{% |
| 388 |
\@namedef{caption@setkeys@#1}##1##2{#2}% |
| 389 |
\expandafter\@onlypreamble\csname caption@setkeys@#1\endcsname |
| 390 |
\@cons\caption@SetupOptions@list{{#1}}} |
| 391 |
\@onlypreamble\caption@SetupOptions |
| 392 |
\newcommand*\caption@SetupOptions@list{} |
| 393 |
\@onlypreamble\caption@SetupOptions@list |
| 394 |
\let\caption@onefilewithoptions\@onefilewithoptions |
| 395 |
\def\@onefilewithoptions#1[#2]{% |
| 396 |
\begingroup |
| 397 |
\def\@tempa{% |
| 398 |
\endgroup |
| 399 |
\caption@onefilewithoptions{#1}[{#2}]}% |
| 400 |
\def\@tempb{#1}% |
| 401 |
\def\@elt##1{% |
| 402 |
\def\@tempc{##1}% |
| 403 |
\ifx\@tempb\@tempc |
| 404 |
\def\@tempa{% |
| 405 |
\endgroup |
| 406 |
\caption@ExecuteOptions{#1}{#2}% |
| 407 |
\caption@onefilewithoptions{#1}[]}% |
| 408 |
\fi} |
| 409 |
\caption@SetupOptions@list |
| 410 |
\@tempa} |
| 411 |
\@onlypreamble\caption@onefilewithoptions |
| 412 |
\newcommand*\caption@decl[3][\def]{% |
| 413 |
\global\long\expandafter#1\csname caption@#2@#3\endcsname} |
| 414 |
\@onlypreamble\caption@decl |
| 415 |
\newcommand*\caption@ifdecl[2]{% |
| 416 |
\@ifundefined{caption@#1@#2}\@secondoftwo\@firstoftwo} |
| 417 |
\newcommand*\caption@checkdecl[2]{% |
| 418 |
\caption@ifdecl{#1}{#2}% |
| 419 |
\@firstofone |
| 420 |
{\caption@Error{Undefined #1 `#2'}% |
| 421 |
\@gobble}} |
| 422 |
\newcommand*\caption@set{% |
| 423 |
\caption@maparg\caption@@set}% |
| 424 |
\newcommand*\caption@@set[3]{% |
| 425 |
\caption@checkdecl{#1}{#3}{% |
| 426 |
\expandafter\def\csname caption@#2\expandafter\endcsname\expandafter{\csname caption@#1@#3\endcsname}}} |
| 427 |
\newcommand*\SetCaptionDefault{% |
| 428 |
\caption@teststar\caption@setdefault\def\edef} |
| 429 |
\@onlypreamble\SetCaptionDefault |
| 430 |
\newcommand*\caption@setdefault[2]{% |
| 431 |
\@ifundefined{caption@setdefault@#2}% |
| 432 |
{\caption@maparg\caption@@setdefault}% |
| 433 |
{\@nameuse{caption@setdefault@#2}{#1}}% |
| 434 |
{#2}} |
| 435 |
\newcommand*\caption@@setdefault[3]{% |
| 436 |
\caption@ifdefault{#3}% |
| 437 |
{\caption@Error{Invalid argument for \string\SetCaptionDefault: `#3'}}% would cause an infinite loop otherwise |
| 438 |
{\caption@@set{#1}{#2@default}{#3}}} |
| 439 |
\newcommand*\caption@ifdefault{\caption@ifequal{default}} |
| 440 |
\newcommand*\caption@ifequal[2]{% |
| 441 |
\edef\caption@tempa{#1}% |
| 442 |
\edef\caption@tempb{#2}% |
| 443 |
\ifx\caption@tempa\caption@tempb |
| 444 |
\expandafter\@firstoftwo |
| 445 |
\else |
| 446 |
\expandafter\@secondoftwo |
| 447 |
\fi} |
| 448 |
\newcommand*\caption@setmapping[2]{% |
| 449 |
\@namedef{caption@map@#1}{#2}} |
| 450 |
\@onlypreamble\caption@setmapping |
| 451 |
\newcommand*\caption@maparg[2]{% |
| 452 |
\@ifundefined{caption@map@#2}% |
| 453 |
{#1{#2}}% |
| 454 |
{#1{\csname caption@map@#2\endcsname}}% |
| 455 |
{#2}} |
| 456 |
\def\caption@switchdefault#1#2{% |
| 457 |
\def\caption@tempa##1{#2}% |
| 458 |
\expandafter\caption@tempa\csname caption@#1@default\endcsname |
| 459 |
\caption@setdefault\def{#1}} |
| 460 |
\def\caption@restoredefault#1#2{% |
| 461 |
\caption@checkdecl{#1}{default}{% |
| 462 |
\caption@ifdefined#2{% |
| 463 |
\expandafter\let\csname caption@#1@default\endcsname#2% |
| 464 |
\let#2\@undefined}{}}} |
| 465 |
\newcommand*\SetCaptionFallback{% |
| 466 |
\caption@maparg\caption@@setfallback} |
| 467 |
\@onlypreamble\SetCaptionFallback |
| 468 |
\newcommand*\caption@@setfallback[3]{% |
| 469 |
\caption@ifequal{fallback}{#3}% |
| 470 |
{\caption@Error{Invalid argument for \string\SetCaptionFallback: `#3'}}% would cause an infinite loop otherwise |
| 471 |
{\caption@@set{#1}{#2@fallback}{#3}}} |
| 472 |
\@onlypreamble\caption@@setfallback |
| 473 |
\newcommand*\caption@decl@package[2]{% |
| 474 |
\@ifnextchar[%] |
| 475 |
{\caption@declare@package{#1}{#2}}% |
| 476 |
{\caption@declarepackage{#1}{#2}}} |
| 477 |
\@onlypreamble\caption@decl@package |
| 478 |
\def\caption@declare@package#1#2[#3]#4{% |
| 479 |
\global\@namedef{caption@#1@#4@package}{#3}% |
| 480 |
#2{#4}} |
| 481 |
\@onlypreamble\caption@declare@package |
| 482 |
\newcommand*\caption@declarepackage[3]{% |
| 483 |
\global\@nameundef{caption@#1@#3@package}% |
| 484 |
#2{#3}} |
| 485 |
\@onlypreamble\caption@declarepackage |
| 486 |
\newcommand*\caption@load@package[2]{% |
| 487 |
\expandafter\let\expandafter\caption@tempa\csname caption@#1@#2@package\endcsname |
| 488 |
\caption@ifdefined\caption@tempa |
| 489 |
{\caption@requirepackage\caption@tempa{#1=#2}}% |
| 490 |
{}} |
| 491 |
\newcommand*\DeclareCaptionLength[1]{% |
| 492 |
\expandafter\newdimen\csname caption#1\endcsname |
| 493 |
\@namedef{caption@setdefault@#1}##1{% |
| 494 |
\caption@setdefault@length{##1}}% |
| 495 |
\SetCaptionDefault*{#1}} |
| 496 |
\@onlypreamble\DeclareCaptionLength |
| 497 |
\newcommand*\caption@setdefault@length[3]{% |
| 498 |
\expandafter#1\csname caption#2@default\endcsname{#3}} |
| 499 |
\newcommand*\caption@setlength[2]{% |
| 500 |
\caption@ifdefault{#2}% |
| 501 |
{\expandafter\let\expandafter\caption@tempa\csname caption#1@default\endcsname}% |
| 502 |
{\def\caption@tempa{#2}}% |
| 503 |
\expandafter\setlength\csname caption#1\endcsname\caption@tempa} |
| 504 |
\DeclareCaptionLength{margin}{0pt} |
| 505 |
\DeclareCaptionLength{margin@}{\the\captionmargin} |
| 506 |
\DeclareCaptionLength{width}{0pt} |
| 507 |
\newdimen\caption@tempdima |
| 508 |
\DeclareCaptionOption{margin}{\setcaptionmargin{#1}} |
| 509 |
\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}} |
| 510 |
\DeclareCaptionOption{width}{\setcaptionwidth{#1}} |
| 511 |
\DeclareCaptionOption{width*}{\setcaptionwidth*{#1}} |
| 512 |
\DeclareCaptionOption{calcmargin}{\caption@setcalcmargin{#1}} |
| 513 |
\DeclareCaptionOption{calcmargin*}{\caption@setcalcmargin*{#1}} |
| 514 |
\DeclareCaptionOption{calcwidth}{\caption@setcalcwidth{#1}} |
| 515 |
\DeclareCaptionOption{calcwidth*}{\caption@setcalcwidth*{#1}} |
| 516 |
\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}} |
| 517 |
\DeclareCaptionOptionNoValue{oneside}{\caption@set@bool\caption@iftwoside0} |
| 518 |
\caption@set@bool\caption@iftwoside{\if@twoside 1\else 0\fi} |
| 519 |
\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}} |
| 520 |
\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}} |
| 521 |
\newcommand*\setcaptionmargin{% |
| 522 |
\caption@resetcalcmargin |
| 523 |
\caption@setmargin} |
| 524 |
\newcommand*\caption@setmargin{% |
| 525 |
\caption@teststar\caption@@setmargin\@gobble\@firstofone} |
| 526 |
\newcommand*\caption@@setmargin[2]{% |
| 527 |
#1{\captionwidth\z@}% |
| 528 |
\caption@@@setmargin#2,#2,\@nil} |
| 529 |
\def\caption@@@setmargin#1,#2,#3\@nil{% |
| 530 |
\caption@setlength{margin}{#1}% |
| 531 |
\caption@setlength{margin@}{#2}% |
| 532 |
\addtolength\captionmargin@{-\captionmargin}} |
| 533 |
\newcommand*\setcaptionwidth{% |
| 534 |
\caption@resetcalcmargin |
| 535 |
\caption@setwidth} |
| 536 |
\newcommand*\caption@setwidth{% |
| 537 |
\caption@teststar\caption@@setwidth\@gobble\@firstofone} |
| 538 |
\newcommand*\caption@@setwidth[2]{% |
| 539 |
#1{\captionmargin\z@\captionmargin@\z@}% |
| 540 |
\caption@setlength{width}{#2}}% |
| 541 |
\newcommand*\caption@setcalcmargin{% |
| 542 |
\caption@teststar{\caption@@setcalcmargin\caption@setmargin}% |
| 543 |
\@secondoftwo\@firstoftwo} |
| 544 |
\newcommand*\caption@@setcalcmargin[3]{% |
| 545 |
#2{\caption@resetcalcmargin |
| 546 |
\l@addto@macro\caption@calcmargin@hook{#1{#3}}}% |
| 547 |
{\l@addto@macro\caption@calcmargin@hook{#1*{#3}}}} |
| 548 |
\newcommand*\caption@resetcalcmargin{% |
| 549 |
\let\caption@calcmargin@hook\@empty} |
| 550 |
\newcommand*\caption@setcalcwidth{% |
| 551 |
\caption@teststar{\caption@@setcalcmargin\caption@setwidth}% |
| 552 |
\@secondoftwo\@firstoftwo} |
| 553 |
\newcommand*\caption@thecounter{0} |
| 554 |
\newcommand*\caption@stepthecounter{% |
| 555 |
\@tempcnta\caption@thecounter |
| 556 |
\advance\@tempcnta\@ne\relax |
| 557 |
\xdef\caption@thecounter{\the\@tempcnta}} |
| 558 |
\newcommand*\caption@newlabel{\@newl@bel{caption@r}} |
| 559 |
\newcommand*\caption@thepage{\the\c@page} |
| 560 |
\newcommand*\caption@label[1]{% |
| 561 |
\caption@@label |
| 562 |
\protected@write\@auxout{\let\caption@thepage\relax}% |
| 563 |
{\string\caption@newlabel{#1}{\caption@thepage}}} |
| 564 |
\newcommand*\caption@@label{% |
| 565 |
\global\let\caption@@label\relax |
| 566 |
\protected@write\@auxout{}% |
| 567 |
{\string\providecommand*\string\caption@newlabel[2]{}}} |
| 568 |
\newcommand*\caption@pageref[1]{% |
| 569 |
\expandafter\ifx\csname caption@r@#1\endcsname\relax |
| 570 |
\G@refundefinedtrue % => 'There are undefined references.' |
| 571 |
\@latex@warning{Reference `#1' on page \thepage \space undefined}% |
| 572 |
\else |
| 573 |
\expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname |
| 574 |
\fi} |
| 575 |
\newcommand*\caption@ifoddpage{% |
| 576 |
\caption@iftwoside{% |
| 577 |
\caption@label\caption@thecounter |
| 578 |
\caption@pageref\caption@thecounter |
| 579 |
\ifodd\caption@thepage |
| 580 |
\let\caption@ifoddpage\@firstoftwo |
| 581 |
\else |
| 582 |
\let\caption@ifoddpage\@secondoftwo |
| 583 |
\fi |
| 584 |
}{\let\caption@ifoddpage\@firstoftwo}% |
| 585 |
\caption@ifoddpage} |
| 586 |
\newcommand*\caption@setoptcmd[2]{% |
| 587 |
\caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}} |
| 588 |
\DeclareCaptionLength{@indent}{0pt} |
| 589 |
\DeclareCaptionLength{@parindent}{0pt} |
| 590 |
\DeclareCaptionLength{@hangindent}{0pt} |
| 591 |
\DeclareCaptionOption{indent}[\leftmargini]{% obsolete |
| 592 |
\caption@setlength{@indent}{#1}} |
| 593 |
\DeclareCaptionOption{indention}[\leftmargini]{% |
| 594 |
\caption@setlength{@indent}{#1}} |
| 595 |
\DeclareCaptionOption{parindent}{% |
| 596 |
\caption@setlength{@parindent}{#1}} |
| 597 |
\DeclareCaptionOption{hangindent}{% |
| 598 |
\caption@setlength{@hangindent}{#1}} |
| 599 |
\DeclareCaptionOption{parskip}{% |
| 600 |
\l@addto@macro\caption@@par{\setlength\parskip{#1}}} |
| 601 |
\newcommand*\DeclareCaptionStyle[1]{% |
| 602 |
\@testopt{\caption@declarestyle{#1}}{}} |
| 603 |
\@onlypreamble\DeclareCaptionStyle |
| 604 |
\def\caption@declarestyle#1[#2]#3{% |
| 605 |
\caption@decl{style}{#1}% |
| 606 |
{\def\caption@slsty{#2}% |
| 607 |
\def\caption@sty{#3}}% |
| 608 |
\@namedef{caption@sty@#1}{\@unused}} |
| 609 |
\@onlypreamble\caption@declarestyle |
| 610 |
\DeclareCaptionOption{style}{\caption@setstyle{#1}} |
| 611 |
\DeclareCaptionOption{style*}{\caption@setstyle*{#1}} |
| 612 |
\newcommand*\caption@setstyle{% |
| 613 |
\caption@teststar\caption@@setstyle\caption@ifdecl\caption@checkdecl} |
| 614 |
\newcommand*\caption@@setstyle[2]{% |
| 615 |
#1{style}{#2}% |
| 616 |
{\caption@set{style}{#2}% |
| 617 |
\caption@style % defines \caption@sty & \caption@slsty |
| 618 |
\ifx\caption@setstyle@flag\@undefined |
| 619 |
\let\caption@setstyle@flag\relax % prevent \caption@resetstyle if called recursively |
| 620 |
\caption@resetstyle |
| 621 |
\caption@xsetup\caption@sty |
| 622 |
\let\caption@setstyle@flag\@undefined |
| 623 |
\else |
| 624 |
\caption@xsetup\caption@sty |
| 625 |
\fi}% |
| 626 |
{}} |
| 627 |
\newcommand*\caption@resetstyle{% |
| 628 |
\caption@setup{% |
| 629 |
box=none,boxcolor=white,parbox=parbox,% |
| 630 |
format=plain,labelformat=default,labelsep=colon,textformat=simple,% |
| 631 |
font=,labelfont=,textfont=,size=,% |
| 632 |
justification=justified,slc,rule,strut,% |
| 633 |
margin=0pt,minmargin=0,maxmargin=0,% |
| 634 |
indent=0pt,parindent=0pt,hangindent=0pt}} |
| 635 |
\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{} |
| 636 |
\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{% |
| 637 |
box=default,% |
| 638 |
format=default,labelformat=default,labelsep=default,textformat=default,% |
| 639 |
font=default,labelfont=default,textfont=default,size=default,% |
| 640 |
justification=default,slc=default,margin=default,% |
| 641 |
indent=default,parindent=default,hangindent=default} |
| 642 |
\newcommand*\DeclareCaptionSinglelinecheck[2]{% |
| 643 |
\caption@decl{singlelinecheck}{#1}{#2}} |
| 644 |
\@onlypreamble\DeclareCaptionSinglelinecheck |
| 645 |
\DeclareCaptionOption{singlelinecheck}[1]{\caption@setsinglelinecheck{#1}} |
| 646 |
\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}} |
| 647 |
\DeclareCaptionSinglelinecheck{on}{\@firstoftwo} |
| 648 |
\DeclareCaptionSinglelinecheck{off}{\@secondoftwo} |
| 649 |
\SetCaptionDefault{singlelinecheck}{on} |
| 650 |
\newcommand*\caption@setsinglelinecheck[1]{% |
| 651 |
\caption@ifdecl{singlelinecheck}{#1}% |
| 652 |
{\caption@set{singlelinecheck}{#1}}% |
| 653 |
{\caption@set@bool\caption@singlelinecheck{#1}}} |
| 654 |
\newcommand\DeclareCaptionBox[2]{% |
| 655 |
\caption@decl{box}{#1}##1##2{#2}} |
| 656 |
\@onlypreamble\DeclareCaptionBox |
| 657 |
\DeclareCaptionOption{box}{\caption@set{box}{#1}} |
| 658 |
\DeclareCaptionOption{parbox}{\caption@set{parbox}{#1}} |
| 659 |
\caption@setmapping{parbox}{box} |
| 660 |
\DeclareCaptionBox{empty}{} |
| 661 |
\DeclareCaptionBox{none}{#2} |
| 662 |
\DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}} |
| 663 |
\DeclareCaptionBox{colorbox}{% |
| 664 |
\colorbox{\caption@boxcolor}{% |
| 665 |
\setlength\caption@tempdima{#1}% |
| 666 |
\addtolength\caption@tempdima{-2\fboxsep}% |
| 667 |
\linewidth\caption@tempdima\relax |
| 668 |
\hsize\caption@tempdima\relax |
| 669 |
#2}} |
| 670 |
\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}} |
| 671 |
\DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}} |
| 672 |
\SetCaptionDefault{box}{none} |
| 673 |
\newcommand*\DeclareCaptionFormat{% |
| 674 |
\caption@teststar\caption@declareformat\@gobble\@firstofone} |
| 675 |
\@onlypreamble\DeclareCaptionFormat |
| 676 |
\newcommand*\caption@declareformat[2]{% |
| 677 |
\@dblarg{\caption@@declareformat#1{#2}}} |
| 678 |
\@onlypreamble\caption@declareformat |
| 679 |
\long\def\caption@@declareformat#1#2[#3]#4{% |
| 680 |
\caption@decl[\edef]{format}{#2}{% |
| 681 |
\unexpanded{\let\caption@ifhmode#1}% |
| 682 |
\unexpanded{\long\def\caption@slfmt}####1####2####3\unexpanded{{#3}}% |
| 683 |
\unexpanded{\long\def\caption@fmt}####1####2####3\unexpanded{{#4}}}} |
| 684 |
\@onlypreamble\caption@@declareformat |
| 685 |
\newcommand*\caption@useformat[1]{% used by caption-koma.sto |
| 686 |
\caption@checkdecl{format}{#1}{% |
| 687 |
\begingroup |
| 688 |
\@nameuse{caption@format@#1}\global\let\caption@tempa\caption@fmt |
| 689 |
\endgroup\caption@tempa}} |
| 690 |
\DeclareCaptionOption{format}{\caption@set{format}{#1}} |
| 691 |
\DeclareCaptionFormat{plain}{#1#2#3\par} |
| 692 |
\DeclareCaptionFormat{hang}[#1#2#3\par]{% |
| 693 |
\caption@iflabelseparatorwithnewline |
| 694 |
{\caption@Error{% |
| 695 |
The option `labelsep=\caption@labelsep@name' does not work\MessageBreak |
| 696 |
with `format=hang'}}% |
| 697 |
{\@hangfrom{#1#2}% |
| 698 |
\advance\caption@parindent\hangindent\relax |
| 699 |
\advance\caption@hangindent\hangindent\relax |
| 700 |
\caption@@par#3\par}} |
| 701 |
\SetCaptionDefault{format}{plain} |
| 702 |
\newcommand*\DeclareCaptionLabelFormat[2]{% |
| 703 |
\caption@decl{labelformat}{#1}##1##2{#2}} |
| 704 |
\@onlypreamble\DeclareCaptionLabelFormat |
| 705 |
\DeclareCaptionOption{labelformat}{\caption@set{labelformat}{#1}} |
| 706 |
\DeclareCaptionLabelFormat{empty}{} |
| 707 |
\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} |
| 708 |
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} |
| 709 |
\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} |
| 710 |
\DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}#2\autodot} |
| 711 |
\DeclareCaptionLabelFormat{unnumbered}{#1} |
| 712 |
\DeclareCaptionLabelFormat{original}{% |
| 713 |
\caption@ifdefined\caption@original@fnum |
| 714 |
{\caption@original@fnum}% |
| 715 |
{\caption@labelformat@fallback{#1}{#2}}} |
| 716 |
\SetCaptionDefault{labelformat}{original} |
| 717 |
\SetCaptionFallback{labelformat}{simple} |
| 718 |
\newcommand\DeclareCaptionLabelSeparator{% |
| 719 |
\@ifstar |
| 720 |
\DeclareCaptionLabelSeparator@ |
| 721 |
{\caption@declarelabelseparator\@firstofone}} |
| 722 |
\@onlypreamble\DeclareCaptionLabelSeparator |
| 723 |
\newcommand\DeclareCaptionLabelSeparator@{% |
| 724 |
\@ifstar |
| 725 |
\DeclareCaptionLabelSeparator@@ |
| 726 |
{\caption@declarelabelseparator\@gobble}} |
| 727 |
\@onlypreamble\DeclareCaptionLabelSeparator@ |
| 728 |
\newcommand*\DeclareCaptionLabelSeparator@@[2]{% |
| 729 |
\caption@declarelabelseparator |
| 730 |
{#2\@gobble\@firstofone}% |
| 731 |
{#1}} |
| 732 |
\@onlypreamble\DeclareCaptionLabelSeparator@@ |
| 733 |
\newcommand\caption@declarelabelseparator[3]{% |
| 734 |
\caption@decl{labelseparator}{#2}% |
| 735 |
{\def\caption@iflabelfont{#1}% |
| 736 |
\def\caption@labelsep@name{#2}% |
| 737 |
\def\caption@labelsep{#3}}% |
| 738 |
\@namedef{caption@lsep@#2}{#3}} |
| 739 |
\newcommand*\caption@lsep@default{\caption@labelseparator@default\caption@labelsep}% |
| 740 |
\@onlypreamble\caption@declarelabelseparator |
| 741 |
\newcommand*\caption@LabelSeparatorWithNewline[1]{% |
| 742 |
\caption@g@addto@list\caption@labelsep@crlist{#1}} |
| 743 |
\@onlypreamble\caption@LabelSeparatorWithNewline |
| 744 |
\newcommand*\caption@iflabelseparatorwithnewline{% |
| 745 |
\caption@ifin@list\caption@labelsep@crlist\caption@labelsep@name} |
| 746 |
\DeclareCaptionOption{labelsep}{\caption@set{labelseparator}{#1}} |
| 747 |
\DeclareCaptionOption{labelseparator}{\caption@set{labelseparator}{#1}} |
| 748 |
\DeclareCaptionLabelSeparator{none}{} |
| 749 |
\DeclareCaptionLabelSeparator{colon}{: } |
| 750 |
\DeclareCaptionLabelSeparator{period}{. } |
| 751 |
\DeclareCaptionLabelSeparator{space}{ } |
| 752 |
\DeclareCaptionLabelSeparator*{quad}{\quad} |
| 753 |
\DeclareCaptionLabelSeparator*{newline}{\captionnewline} |
| 754 |
\caption@LabelSeparatorWithNewline{newline} % does not work with "format=hang" |
| 755 |
\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space} |
| 756 |
\DeclareCaptionLabelSeparator{gobble}{ } |
| 757 |
\DeclareCaptionLabelSeparator{gobbletwo}{} |
| 758 |
\newcommand*\captionnewline{\\\relax} |
| 759 |
\SetCaptionDefault{labelseparator}{colon} |
| 760 |
\newcommand\DeclareCaptionTextFormat[2]{% |
| 761 |
\caption@decl{textformat}{#1}##1{#2}} |
| 762 |
\@onlypreamble\DeclareCaptionTextFormat |
| 763 |
\DeclareCaptionOption{textformat}{\caption@set{textformat}{#1}} |
| 764 |
\DeclareCaptionTextFormat{empty}{% |
| 765 |
\caption@get@label#1\caption@makeanchor{}\@nil |
| 766 |
\caption@thelabel |
| 767 |
\global\let\caption@thelabel\relax} |
| 768 |
\long\def\caption@get@label#1\caption@makeanchor#2#3\@nil{% |
| 769 |
\def\caption@tempa{#2}% |
| 770 |
\ifx\caption@tempa\@empty |
| 771 |
\caption@getlabel{#1}% |
| 772 |
\else |
| 773 |
\caption@getlabel{#2}% |
| 774 |
\fi} |
| 775 |
\DeclareCaptionTextFormat{simple}{#1} |
| 776 |
\DeclareCaptionTextFormat{period}{#1.} |
| 777 |
\SetCaptionDefault{textformat}{simple} |
| 778 |
\newcommand\caption@getlabel[1]{% |
| 779 |
\caption@@getlabel#1\label{}\@nil} |
| 780 |
\long\def\caption@@getlabel#1\label#2#3\@nil{% |
| 781 |
\def\@tempa{#2}% |
| 782 |
\ifx\@tempa\@empty |
| 783 |
\let\caption@thelabel\relax |
| 784 |
\else |
| 785 |
\def\@tempb{*}% |
| 786 |
\ifx\@tempa\@tempb |
| 787 |
\def\caption@thelabel{\label*}% |
| 788 |
\caption@@@getlabel#3\@nil |
| 789 |
\else |
| 790 |
\def\caption@thelabel{\label}% |
| 791 |
\caption@@@getlabel{#2}#3\@nil |
| 792 |
\fi |
| 793 |
\fi} |
| 794 |
\long\def\caption@@@getlabel#1#2\@nil{% |
| 795 |
\def\@tempa{#1}% |
| 796 |
\def\@tempb{[}% |
| 797 |
\ifx\@tempa\@tempb |
| 798 |
\caption@@@@getlabel#1#2\@nil |
| 799 |
\else |
| 800 |
\l@addto@macro\caption@thelabel{{#1}}% |
| 801 |
\fi} |
| 802 |
\long\def\caption@@@@getlabel[#1]#2\@nil{% |
| 803 |
\l@addto@macro\caption@thelabel{[{#1}]}% |
| 804 |
\caption@@@getlabel#2\@nil} |
| 805 |
\let\caption@thelabel\relax |
| 806 |
\DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}} |
| 807 |
\newcommand*\DeclareCaptionFont{% |
| 808 |
\caption@decl@package{font}{\caption@declarefont}} |
| 809 |
\@onlypreamble\DeclareCaptionFont |
| 810 |
\newcommand*\caption@declarefont[2]{% |
| 811 |
\caption@decl{font}{#1}##1{#2}% |
| 812 |
\define@key{caption@font}{#1}[]{\caption@addto@font{#1}{##1}}} |
| 813 |
\@onlypreamble\caption@@declarefont |
| 814 |
\newcommand*\caption@addto@font[1]{% |
| 815 |
\caption@load@package{font}{#1}% |
| 816 |
\caption@add@to@font{font}{#1}} |
| 817 |
\newcommand*\caption@add@to@font[3]{% |
| 818 |
\expandafter\g@addto@macro\expandafter\caption@fnt\expandafter{\csname caption@#1@#2\endcsname{#3}}} |
| 819 |
\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} |
| 820 |
\DeclareCaptionOption{font+}{\caption@addtofont{font}{#1}} |
| 821 |
\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} |
| 822 |
\DeclareCaptionOption{labelfont+}{\caption@addtofont{labelfont}{#1}} |
| 823 |
\caption@setmapping{labelfont}{font} |
| 824 |
\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} |
| 825 |
\DeclareCaptionOption{textfont+}{\caption@addtofont{textfont}{#1}} |
| 826 |
\caption@setmapping{textfont}{font} |
| 827 |
\newcommand*\caption@setfont[1]{% |
| 828 |
\expandafter\let\csname caption#1\endcsname\@empty |
| 829 |
\caption@addtofont{#1}} |
| 830 |
\newcommand*\caption@addtofont[2]{% |
| 831 |
\expandafter\let\expandafter\caption@fnt\csname caption#1\endcsname |
| 832 |
\begingroup |
| 833 |
\define@key{caption@font}{default}[]{\caption@add@to@font{#1}{default}{##1}}% |
| 834 |
\caption@setkeys[caption]{caption@font}{#2}% |
| 835 |
\endgroup |
| 836 |
\expandafter\let\csname caption#1\endcsname\caption@fnt} |
| 837 |
\DeclareCaptionFont{normalcolor}{\normalcolor} |
| 838 |
\DeclareCaptionFont{color}{\color{#1}} |
| 839 |
\DeclareCaptionFont{normalfont}{\normalfont} |
| 840 |
\DeclareCaptionFont{up}{\upshape} |
| 841 |
\DeclareCaptionFont{it}{\itshape} |
| 842 |
\DeclareCaptionFont{sl}{\slshape} |
| 843 |
\DeclareCaptionFont{sc}{\scshape} |
| 844 |
\DeclareCaptionFont{md}{\mdseries} |
| 845 |
\DeclareCaptionFont{bf}{\bfseries} |
| 846 |
\DeclareCaptionFont{rm}{\rmfamily} |
| 847 |
\DeclareCaptionFont{sf}{\sffamily} |
| 848 |
\DeclareCaptionFont{tt}{\ttfamily} |
| 849 |
\DeclareCaptionFont{tiny}{\tiny} |
| 850 |
\DeclareCaptionFont{scriptsize}{\scriptsize} |
| 851 |
\DeclareCaptionFont{footnotesize}{\footnotesize} |
| 852 |
\DeclareCaptionFont{small}{\small} |
| 853 |
\DeclareCaptionFont{normalsize}{\normalsize} |
| 854 |
\DeclareCaptionFont{large}{\large} |
| 855 |
\DeclareCaptionFont{Large}{\Large} |
| 856 |
\DeclareCaptionFont{LARGE}{\LARGE} |
| 857 |
\DeclareCaptionFont{huge}{\huge} |
| 858 |
\DeclareCaptionFont{Huge}{\Huge} |
| 859 |
\DeclareCaptionFont{smaller}{\caption@smaller} |
| 860 |
\DeclareCaptionFont{larger}{\caption@larger} |
| 861 |
\DeclareCaptionFont{none}{} |
| 862 |
\DeclareCaptionFont{normal}{% |
| 863 |
\caption@font@normalcolor\@unused |
| 864 |
\caption@font@normalfont\@unused |
| 865 |
\caption@font@normalsize\@unused |
| 866 |
\caption@font@singlespacing\@unused} |
| 867 |
\SetCaptionDefault{font}{none} |
| 868 |
\SetCaptionDefault{labelfont}{none} |
| 869 |
\SetCaptionDefault{textfont}{none} |
| 870 |
\caption@setmapping{footfont}{font} |
| 871 |
\SetCaptionDefault{footfont}{none} |
| 872 |
\caption@setmapping{@tempa}{font} |
| 873 |
\SetCaptionDefault{@tempa}{none} |
| 874 |
\newcommand\caption@smaller{% |
| 875 |
\ifx\@currsize\tiny |
| 876 |
\relax |
| 877 |
\else\ifx\@currsize\scriptsize |
| 878 |
\tiny |
| 879 |
\else\ifx\@currsize\footnotesize |
| 880 |
\scriptsize |
| 881 |
\else\ifx\@currsize\small |
| 882 |
\footnotesize |
| 883 |
\else\ifx\@currsize\normalsize |
| 884 |
\small |
| 885 |
\else\ifx\@currsize\large |
| 886 |
\normalsize |
| 887 |
\else\ifx\@currsize\Large |
| 888 |
\large |
| 889 |
\else\ifx\@currsize\LARGE |
| 890 |
\Large |
| 891 |
\else\ifx\@currsize\huge |
| 892 |
\LARGE |
| 893 |
\else\ifx\@currsize\Huge |
| 894 |
\huge |
| 895 |
\else |
| 896 |
\caption@Warning{% |
| 897 |
Cannot determine current font size.\MessageBreak |
| 898 |
Try setting it with `size=' explicitly}% |
| 899 |
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} |
| 900 |
\newcommand\caption@larger{% |
| 901 |
\ifx\@currsize\tiny |
| 902 |
\scriptsize |
| 903 |
\else\ifx\@currsize\scriptsize |
| 904 |
\footnotesize |
| 905 |
\else\ifx\@currsize\footnotesize |
| 906 |
\small |
| 907 |
\else\ifx\@currsize\small |
| 908 |
\normalsize |
| 909 |
\else\ifx\@currsize\normalsize |
| 910 |
\large |
| 911 |
\else\ifx\@currsize\large |
| 912 |
\Large |
| 913 |
\else\ifx\@currsize\Large |
| 914 |
\LARGE |
| 915 |
\else\ifx\@currsize\LARGE |
| 916 |
\huge |
| 917 |
\else\ifx\@currsize\huge |
| 918 |
\Huge |
| 919 |
\else\ifx\@currsize\Huge |
| 920 |
\relax |
| 921 |
\else |
| 922 |
\caption@Warning{% |
| 923 |
Cannot determine current font size.\MessageBreak |
| 924 |
Try setting it with `size=' explicitly}% |
| 925 |
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} |
| 926 |
\newcommand*\caption@hypersetup{\caption@ifdefined\hypersetup\hypersetup\@gobble} |
| 927 |
\DeclareCaptionFont{hypersetup}{\caption@hypersetup{#1}} % for usage in \captionsetup{font={hypersetup=...}} |
| 928 |
\DeclareCaptionOption{hypersetup}{\caption@hypersetup{#1}} % for usage in \captionsetup[<env>]{hypersetup=...} |
| 929 |
\DeclareCaptionOption{size}{\caption@setfont{size}{#1}} |
| 930 |
\caption@setmapping{size}{font} |
| 931 |
\SetCaptionDefault{size}{none} |
| 932 |
\newcommand*\DeclareCaptionJustification{% |
| 933 |
\caption@withoptargs\caption@declare@justification} |
| 934 |
\newcommand*\caption@declare@justification[3]{% |
| 935 |
\caption@decl@package{justification}{\caption@decl{justification}}#1{#2}{#3}% |
| 936 |
\expandafter\let\csname caption@hj@#2\expandafter\endcsname\csname caption@justification@#2\endcsname} |
| 937 |
\@onlypreamble\DeclareCaptionJustification |
| 938 |
\DeclareCaptionOption{justification}{% |
| 939 |
\caption@load@package{justification}{#1}% |
| 940 |
\caption@set{justification}{#1}} |
| 941 |
\DeclareCaptionJustification{justified}{} |
| 942 |
\DeclareCaptionJustification{centering}{\centering} |
| 943 |
\DeclareCaptionJustification{centerfirst}{\centerfirst} |
| 944 |
\DeclareCaptionJustification{centerlast}{\centerlast} |
| 945 |
\DeclareCaptionJustification{raggedleft}{\raggedleft} |
| 946 |
\DeclareCaptionJustification{raggedright}{\raggedright} |
| 947 |
\SetCaptionDefault{justification}{justified} |
| 948 |
\providecommand\centerfirst{% |
| 949 |
\let\\\@centercr |
| 950 |
\edef\caption@normaladjust{% |
| 951 |
\leftskip\the\leftskip |
| 952 |
\rightskip\the\rightskip |
| 953 |
\parfillskip\the\parfillskip\relax}% |
| 954 |
\leftskip\z@\@plus -1fil% |
| 955 |
\rightskip\z@\@plus 1fil% |
| 956 |
\parfillskip\z@skip |
| 957 |
\noindent\hskip\z@\@plus 2fil% |
| 958 |
\@setpar{\@@par\@restorepar\caption@normaladjust}} |
| 959 |
\providecommand\centerlast{% |
| 960 |
\let\\\@centercr |
| 961 |
\leftskip\z@\@plus 1fil% |
| 962 |
\rightskip\z@\@plus -1fil% |
| 963 |
\parfillskip\z@\@plus 2fil\relax} |
| 964 |
\caption@ifundefined\abovecaptionskip{% |
| 965 |
\newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} |
| 966 |
\caption@ifundefined\belowcaptionskip{% |
| 967 |
\newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} |
| 968 |
\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}} |
| 969 |
\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}} |
| 970 |
\DeclareCaptionOption{skip}{\setlength\abovecaptionskip{#1}} |
| 971 |
\newcommand*\caption@rule{\caption@ifrule\caption@hrule\relax} |
| 972 |
\newcommand*\caption@hrule{\hrule\@height\z@} |
| 973 |
\DeclareCaptionOption{rule}[1]{\caption@set@bool\caption@ifrule{#1}} |
| 974 |
\newcommand*\caption@declare@position[2]{% |
| 975 |
\caption@decl{position}{#1}{#2}} |
| 976 |
\@onlypreamble\caption@declare@position |
| 977 |
\DeclareCaptionOption{position}{\caption@setposition{#1}} |
| 978 |
\DeclareCaptionOption{figureposition}{\captionsetup*[figure]{position=#1}} |
| 979 |
\@onlypreamble@key{caption}{figureposition} |
| 980 |
\DeclareCaptionOption{tableposition}{\captionsetup*[table]{position=#1}} |
| 981 |
\@onlypreamble@key{caption}{tableposition} |
| 982 |
\newcommand*\caption@setposition{\caption@set{position}} |
| 983 |
\caption@declare@position{t}{\@firstoftwo} |
| 984 |
\caption@declare@position{top}{\@firstoftwo} |
| 985 |
\caption@declare@position{above}{\@firstoftwo} |
| 986 |
\caption@declare@position{b}{\@secondoftwo} |
| 987 |
\caption@declare@position{bottom}{\@secondoftwo} |
| 988 |
\caption@declare@position{below}{\@secondoftwo} |
| 989 |
\caption@declare@position{a}{\caption@autoposition}% needed by floatrow package, \flrow@cappos |
| 990 |
\caption@declare@position{auto}{\caption@autoposition} |
| 991 |
\SetCaptionDefault{position}{auto} |
| 992 |
\let\caption@autoposition\@secondoftwo |
| 993 |
\newcommand*\caption@iftop{\caption@position} |
| 994 |
\newcommand*\caption@fixposition{% |
| 995 |
\ifvmode |
| 996 |
\edef\caption@tempa{\the\prevdepth}% |
| 997 |
\caption@Debug{\protect\prevdepth=\caption@tempa}% |
| 998 |
\ifdim\prevdepth>-\p@ |
| 999 |
\let\caption@autoposition\@secondoftwo % position=below |
| 1000 |
\else |
| 1001 |
\let\caption@autoposition\@firstoftwo % position=above |
| 1002 |
\fi |
| 1003 |
\else |
| 1004 |
\caption@Debug{no \protect\prevdepth}% |
| 1005 |
\let\caption@autoposition\@secondoftwo % position=below |
| 1006 |
\fi} |
| 1007 |
\newcommand*\caption@setautoposition[1]{% |
| 1008 |
\def\caption@fixposition{\caption@@set{position}{autoposition}{#1}}} |
| 1009 |
\newcommand*\caption@beginhook{} |
| 1010 |
\newcommand*\caption@endhook{} |
| 1011 |
\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook} |
| 1012 |
\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook} |
| 1013 |
\DeclareCaptionOption{list}[1]{\caption@setlist{#1}} |
| 1014 |
\DeclareCaptionOption{listof}[1]{\caption@setlist{#1}} |
| 1015 |
\newcommand*\caption@setlist{\caption@set@bool\caption@iflist} |
| 1016 |
\caption@setlist{on} |
| 1017 |
\DeclareCaptionOption{listtype}{\caption@setlisttype{#1}} |
| 1018 |
\DeclareCaptionOption{listtype+}{\caption@setlisttype@ext{#1}} |
| 1019 |
\newcommand*\caption@setlisttype{% |
| 1020 |
\caption@setlisttype@ext{}% |
| 1021 |
\caption@@setlisttype\caption@listtype} |
| 1022 |
\newcommand*\caption@@setlisttype[2]{% |
| 1023 |
\edef#1{#2}% |
| 1024 |
\ifx#1\@empty \let#1\@undefined \fi} |
| 1025 |
\newcommand*\caption@setlisttype@ext{% |
| 1026 |
\caption@@setlisttype\caption@listtype@ext} |
| 1027 |
\newcommand*\DeclareCaptionListFormat[2]{% |
| 1028 |
\caption@decl{listformat}{#1}##1##2{#2}} |
| 1029 |
\@onlypreamble\DeclareCaptionListFormat |
| 1030 |
\DeclareCaptionOption{listformat}{\caption@set{listformat}{#1}} |
| 1031 |
\DeclareCaptionListFormat{empty}{} |
| 1032 |
\DeclareCaptionListFormat{simple}{#1#2} |
| 1033 |
\DeclareCaptionListFormat{subsimple}{#2} |
| 1034 |
\DeclareCaptionListFormat{parens}{#1(#2)} |
| 1035 |
\DeclareCaptionListFormat{subparens}{(#2)} |
| 1036 |
\DeclareCaptionListFormat{period}{#1#2.} |
| 1037 |
\DeclareCaptionListFormat{subperiod}{#2.} |
| 1038 |
\SetCaptionDefault{listformat}{subsimple} |
| 1039 |
\newcommand*\caption@lstfmt{\caption@listformat} |
| 1040 |
\DeclareCaptionOption{debug}[1]{% |
| 1041 |
\caption@set@bool\caption@ifdebug{#1}% |
| 1042 |
\caption@ifdebug |
| 1043 |
{\let\caption@Debug\caption@Info}% |
| 1044 |
{\let\caption@Debug\@gobble}} |
| 1045 |
\DeclareOption{debug}{\setkeys{caption}{debug}} |
| 1046 |
\setkeys{caption}{debug=0} |
| 1047 |
\newcommand\@makecaption@standard[2]{% |
| 1048 |
\vskip\abovecaptionskip |
| 1049 |
\sbox\@tempboxa{#1: #2}% |
| 1050 |
\ifdim \wd\@tempboxa >\hsize |
| 1051 |
#1: #2\par |
| 1052 |
\else |
| 1053 |
\global \@minipagefalse |
| 1054 |
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% |
| 1055 |
\fi |
| 1056 |
\vskip\belowcaptionskip} |
| 1057 |
\@onlypreamble\@makecaption@standard |
| 1058 |
\newcommand\@makecaption@arabic[2]{% |
| 1059 |
\vskip\abovecaptionskip |
| 1060 |
\sbox\@tempboxa{#1: #2}% |
| 1061 |
\sbox\@Arabitempboxa{\textRL{#2} : #1}% |
| 1062 |
\if@rl{ |
| 1063 |
\ifdim \wd\@Arabitempboxa >\hsize |
| 1064 |
\textRL{#2} : #1\par |
| 1065 |
\else |
| 1066 |
\global \@minipagefalse |
| 1067 |
\hb@xt@\hsize{\hfil\box\@Arabitempboxa\hfil}% |
| 1068 |
\fi}\else{ |
| 1069 |
\ifdim \wd\@tempboxa >\hsize |
| 1070 |
#1: #2\par |
| 1071 |
\else |
| 1072 |
\global \@minipagefalse |
| 1073 |
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% |
| 1074 |
\fi}\fi |
| 1075 |
\vskip\belowcaptionskip} |
| 1076 |
\@onlypreamble\@makecaption@arabic |
| 1077 |
\newcommand\@makecaption@latvian[2]{% |
| 1078 |
\vskip10\p@ |
| 1079 |
\sbox\@tempboxa{#1\if\empty#2\else: #2\fi}% |
| 1080 |
\ifdim\wd\@tempboxa>\hsize |
| 1081 |
#1: #2\par |
| 1082 |
\else |
| 1083 |
\hbox to\hsize{\hfil\box\@tempboxa\hfil}% |
| 1084 |
\fi} |
| 1085 |
\@onlypreamble\@makecaption@latvian |
| 1086 |
\caption@setbool{documentclass}{1} |
| 1087 |
\caption@ifundefined\caption@documentclass{% |
| 1088 |
\@ifclassloaded{beamer}{% |
| 1089 |
\caption@InfoNoLine{beamer document class detected}% |
| 1090 |
\def\caption@documentclass{beamer}% |
| 1091 |
}{\@ifclassloaded{elsarticle}{% |
| 1092 |
\caption@InfoNoLine{elsarticle document class detected}% |
| 1093 |
\def\caption@documentclass{elsarticle}% |
| 1094 |
}{\@ifclassloaded{memoir}{% |
| 1095 |
\caption@InfoNoLine{memoir document class detected}% |
| 1096 |
\def\caption@documentclass{memoir}% |
| 1097 |
}{\caption@ifdefined\scr@caption{% |
| 1098 |
\caption@InfoNoLine{KOMA-Script document class detected}% |
| 1099 |
\def\caption@documentclass{koma}% |
| 1100 |
}{\caption@ifdefined\@captionheadfont{% |
| 1101 |
\caption@InfoNoLine{AMS or SMF document class detected}% |
| 1102 |
\def\caption@documentclass{ams-smf}% |
| 1103 |
}{\caption@ifdefined\CaptionFonts{% |
| 1104 |
\caption@InfoNoLine{NTG document class detected}% |
| 1105 |
\def\caption@documentclass{ntg}% |
| 1106 |
}{\caption@ifdefined\cph@font{% |
| 1107 |
\caption@ifdefined\cpb@font\@firstoftwo\@secondoftwo |
| 1108 |
}{% |
| 1109 |
\@secondoftwo |
| 1110 |
}{% |
| 1111 |
\caption@InfoNoLine{thesis document class detected}% |
| 1112 |
\def\caption@documentclass{thesis}% |
| 1113 |
}{% |
| 1114 |
\ifx\@makecaption\@undefined |
| 1115 |
\caption@InfoNoLine{Document class w/o caption stuff detected}% |
| 1116 |
\else |
| 1117 |
\ifx\@makecaption\@makecaption@standard |
| 1118 |
\caption@InfoNoLine{Standard document class detected}% |
| 1119 |
\else |
| 1120 |
\ifx\@makecaption\@makecaption@arabic |
| 1121 |
\caption@InfoNoLine{arabic babel option detected}% |
| 1122 |
\else |
| 1123 |
\ifx\@makecaption\@makecaption@latvian |
| 1124 |
\caption@InfoNoLine{latvian babel option detected}% |
| 1125 |
\else |
| 1126 |
\caption@InfoNoLine{% |
| 1127 |
Unknown document class (or package),\MessageBreak |
| 1128 |
standard defaults will be used}% |
| 1129 |
\caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}% |
| 1130 |
\caption@setbool{documentclass}{0}% unknown document class |
| 1131 |
\fi |
| 1132 |
\fi |
| 1133 |
\fi |
| 1134 |
\fi |
| 1135 |
\let\caption@documentclass\@empty % don't load adaption code later on |
| 1136 |
}}}}}}}% |
| 1137 |
}{} |
| 1138 |
\newcommand*\AtCaptionPackage{% |
| 1139 |
\g@addto@macro\caption@documentclass@code} |
| 1140 |
\@onlypreamble\AtCaptionPackage |
| 1141 |
\providecommand*\caption@documentclass@code{} |
| 1142 |
\@onlypreamble\caption@documentclass@code |
| 1143 |
\newcommand*\AfterCaptionPackage{% |
| 1144 |
\g@addto@macro\caption@endtitles@code} |
| 1145 |
\@onlypreamble\AfterCaptionPackage |
| 1146 |
\providecommand*\caption@endtitles@code{} |
| 1147 |
\@onlypreamble\caption@endtitles@code |
| 1148 |
\newcommand*\caption@IfBabelPackageLoaded[4]{% |
| 1149 |
\caption@ifdefined#2\@firstofone\caption@AtBeginDocument{% |
| 1150 |
\caption@if@bool{\@nameuse{caption@ifbabel@#1}}% |
| 1151 |
{\def\caption@tempa{\caption@ifdefined#2}}% |
| 1152 |
{\let\caption@tempa\@secondoftwo}% |
| 1153 |
\caption@tempa |
| 1154 |
{\caption@InfoNoLine{#1 babel package is loaded}#3}% |
| 1155 |
{#4}}} |
| 1156 |
\@onlypreamble\caption@IfBabelPackageLoaded |
| 1157 |
\DeclareCaptionLabelSeparator{arabi}{\if@rl\space\fi: } |
| 1158 |
\newcommand*\caption@IfBabelArabi{% |
| 1159 |
\caption@IfBabelPackageLoaded{arabi}{\ArabiCoreLoaded}} |
| 1160 |
\@onlypreamble\caption@IfBabelArabi |
| 1161 |
\providecommand*\caption@ifbabel@arabi{true} |
| 1162 |
\caption@IfBabelArabi{% |
| 1163 |
\newcommand\caption@rl[1]{\if@rl\textRL{#1}\else\textLR{#1}\fi}% |
| 1164 |
\caption@ifdefined\extrasarabic{% |
| 1165 |
\addto\extrasarabic{% |
| 1166 |
\caption@switchdefault{labelseparator}{\babel@save #1}{arabi}}}{}% |
| 1167 |
\caption@ifdefined\extrasfarsi{% |
| 1168 |
\addto\extrasfarsi{% |
| 1169 |
\caption@switchdefault{labelseparator}{\babel@save #1}{arabi}}}{}% |
| 1170 |
}{% |
| 1171 |
\let\caption@rl\@firstofone |
| 1172 |
} |
| 1173 |
\DeclareCaptionLabelSeparator{french}{\caption@french@labelseparator} |
| 1174 |
\newcommand*\caption@IfBabelFrench{% |
| 1175 |
\caption@IfBabelPackageLoaded{french}{\FB@makecaption}} |
| 1176 |
\@onlypreamble\caption@IfBabelFrench |
| 1177 |
\providecommand*\caption@ifbabel@french{true} |
| 1178 |
\caption@IfBabelFrench{% |
| 1179 |
\providecommand\caption@french@labelseparator{\CaptionSeparator}% |
| 1180 |
\ifFB@active@punct |
| 1181 |
\DeclareCaptionLabelSeparator{colon}{% |
| 1182 |
\ifFBfrench\penalty\@M\FBcolonspace\fi : }% |
| 1183 |
\fi |
| 1184 |
\ifFBOldFigTabCaptions |
| 1185 |
\caption@ifdefined\extrasfrench{% |
| 1186 |
\addto\extrasfrench{% |
| 1187 |
\caption@switchdefault{labelseparator}{\babel@save #1}{french}}}{}% |
| 1188 |
\caption@ifdefined\extrasacadian{% |
| 1189 |
\addto\extrasacadian{% |
| 1190 |
\caption@switchdefault{labelseparator}{\babel@save #1}{french}}}{}% |
| 1191 |
\else |
| 1192 |
\ifFBCustomiseFigTabCaptions |
| 1193 |
\caption@AtBeginDocument{% |
| 1194 |
\ifFB@mainlanguage@FR |
| 1195 |
\SetCaptionDefault{labelseparator}{french}% |
| 1196 |
\fi}% |
| 1197 |
\fi |
| 1198 |
\fi |
| 1199 |
}{} |
| 1200 |
\newcommand*\caption@IfFrenchLe{% |
| 1201 |
\caption@IfBabelPackageLoaded{frenchle}{\frenchTeXmods}} |
| 1202 |
\@onlypreamble\caption@IfBabelFrenchLe |
| 1203 |
\providecommand*\caption@ifbabel@frenchle{true} |
| 1204 |
\caption@IfFrenchLe{% |
| 1205 |
\providecommand\caption@french@labelseparator{\captionseparator\space}% |
| 1206 |
\g@addto@macro\extrasfrench{% |
| 1207 |
\caption@switchdefault{labelseparator}{\let\caption@original@labelseparator#1}{french}% |
| 1208 |
\caption@switchdefault{font}{\let\caption@original@font#1}{it}% |
| 1209 |
\caption@switchdefault{labelfont}{\let\caption@original@labelfont#1}{up}}% |
| 1210 |
\g@addto@macro\extrasenglish{% |
| 1211 |
\caption@restoredefault{labelseparator}{\caption@original@labelseparator}% |
| 1212 |
\caption@restoredefault{font}{\caption@original@font}% |
| 1213 |
\caption@restoredefault{labelfont}{\caption@original@labelfont}}% |
| 1214 |
\caption@AtBeginDocument{% |
| 1215 |
\let\captionfont@original\captionfont |
| 1216 |
\let\captionlabelfont@original\captionlabelfont}% |
| 1217 |
\g@addto@macro\GOfrench{% |
| 1218 |
\let\captionfont\captionfont@original |
| 1219 |
\let\captionlabelfont\captionlabelfont@original}% |
| 1220 |
}{} |
| 1221 |
\DeclareCaptionLabelFormat{magyar}{#2\bothIfSecond{.~}{#1}} |
| 1222 |
\newcommand*\caption@IfBabelHungarian{% |
| 1223 |
\caption@IfBabelPackageLoaded{hungarian}{\magyar@opt@defaults}} |
| 1224 |
\@onlypreamble\caption@IfBabelHungarian |
| 1225 |
\providecommand*\caption@ifbabel@hungarian{true} |
| 1226 |
\caption@IfBabelHungarian{% |
| 1227 |
\caption@ifdefined\extrashungarian{% |
| 1228 |
\addto\extrashungarian{% |
| 1229 |
\caption@switchdefault{labelformat}{\babel@save #1}{magyar}% |
| 1230 |
\caption@switchdefault{labelseparator}{\babel@save #1}{period}% |
| 1231 |
\caption@switchdefault{listformat}{\babel@save #1}{subperiod}}}{}% |
| 1232 |
\caption@ifdefined\extrasmagyar{% |
| 1233 |
\addto\extrasmagyar{% |
| 1234 |
\caption@switchdefault{labelformat}{\babel@save #1}{magyar}% |
| 1235 |
\caption@switchdefault{labelseparator}{\babel@save #1}{period}% |
| 1236 |
\caption@switchdefault{listformat}{\babel@save #1}{subperiod}}}{}% |
| 1237 |
}{} |
| 1238 |
\DeclareCaptionLabelFormat{latvian}{#2\bothIfSecond{~}{#1}} |
| 1239 |
\newcommand*\caption@IfBabelLatvian{% |
| 1240 |
\caption@IfBabelPackageLoaded{latvian}{\bbl@latvianindent}} |
| 1241 |
\@onlypreamble\caption@IfBabelLatvian |
| 1242 |
\providecommand*\caption@ifbabel@latvian{true} |
| 1243 |
\caption@IfBabelLatvian{% |
| 1244 |
\caption@ifdefined\extraslatvian{% |
| 1245 |
\addto\extraslatvian{% |
| 1246 |
\caption@switchdefault{labelformat}{\babel@save #1}{latvian}}}{}% |
| 1247 |
}{} |
| 1248 |
\newcommand*\caption@ifpackageloaded[1]{% |
| 1249 |
\expandafter\ifx\csname ver@#1.\caption@pkgextension\endcsname\relax |
| 1250 |
\expandafter\@secondoftwo |
| 1251 |
\else |
| 1252 |
\expandafter\@firstoftwo |
| 1253 |
\fi} |
| 1254 |
\let\caption@pkgextension\@pkgextension |
| 1255 |
\newcommand*\caption@pkg@list{} |
| 1256 |
\newcommand*\caption@requirepackage[2]{% |
| 1257 |
\caption@ifpackageloaded{#1}{}{\caption@@requirepackage{#1}{#2}}} |
| 1258 |
\newcommand*\caption@@requirepackage[2]{% |
| 1259 |
\@cons\caption@packagelist{{#1}{#2}}} % load package later on |
| 1260 |
\caption@AtBeginDocument{% |
| 1261 |
\renewcommand*\caption@@requirepackage[2]{% |
| 1262 |
\caption@Error{Option `#2' requires the `#1' package}}} |
| 1263 |
\newcommand*\caption@packagelist{} |
| 1264 |
\@onlypreamble\caption@packagelist |
| 1265 |
\caption@AtBeginDocument{% |
| 1266 |
\def\caption@tempa{\endgroup}% |
| 1267 |
\begingroup |
| 1268 |
\def\@elt#1#2{% |
| 1269 |
\g@addto@macro\caption@tempa{% |
| 1270 |
\caption@loadpackage{#1}{#2}}}% |
| 1271 |
\caption@packagelist |
| 1272 |
\caption@tempa} |
| 1273 |
\newcommand*\caption@loadpackage[2]{% |
| 1274 |
\caption@ifpackageloaded{#1}{}{\caption@@loadpackage{#1}{#2}}} |
| 1275 |
\newcommand*\caption@@loadpackage[2]{% |
| 1276 |
\caption@Info{Option `#2' requires the `#1' package}% |
| 1277 |
\RequirePackage{#1}\relax} |
| 1278 |
\caption@AtBeginDocument{% |
| 1279 |
\let\caption@@loadpackage\caption@@requirepackage} |
| 1280 |
\newcommand*\caption@newfloat[2]{% |
| 1281 |
\IfCaptionOptionCheck |
| 1282 |
{\caption@requirepackage{newfloat}{#1}}% |
| 1283 |
{\let\KV@prefix@ORI\KV@prefix |
| 1284 |
\let\@tempc@ORI\@tempc |
| 1285 |
\caption@loadpackage{newfloat}{#1}% |
| 1286 |
#2% |
| 1287 |
\let\@tempc\@tempc@ORI |
| 1288 |
\let\KV@prefix\KV@prefix@ORI}} |
| 1289 |
\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}} |
| 1290 |
\@onlypreamble@key{caption}{figurename} |
| 1291 |
\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}} |
| 1292 |
\@onlypreamble@key{caption}{tablename} |
| 1293 |
\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}} |
| 1294 |
\@onlypreamble@key{caption}{listfigurename} |
| 1295 |
\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}} |
| 1296 |
\@onlypreamble@key{caption}{listtablename} |
| 1297 |
\newcommand*\caption@SetName[2]{% |
| 1298 |
\caption@newfloat{#1name}{\newfloat@setname{#1}{#2}}} |
| 1299 |
\@onlypreamble\caption@SetName |
| 1300 |
\DeclareCaptionOption{name}{% |
| 1301 |
\IfCaptionOptionCheck{}{\caption@setname\@captype{#1}}} |
| 1302 |
\newcommand*\caption@setname[2]{% |
| 1303 |
\@namedef{#1name}{#2}} |
| 1304 |
\DeclareCaptionOption{figurewithin}{\caption@within{figure}{#1}} |
| 1305 |
\DeclareCaptionOptionNoValue{figurewithout}{\caption@within{figure}{none}} |
| 1306 |
\DeclareCaptionOption{tablewithin}{\caption@within{table}{#1}} |
| 1307 |
\DeclareCaptionOptionNoValue{tablewithout}{\caption@within{table}{none}} |
| 1308 |
\newcommand*\caption@within[2]{% |
| 1309 |
\caption@newfloat{#1within=#2}{\newfloat@setwithin{#1}{#2}}} |
| 1310 |
\DeclareCaptionOption{within}{% |
| 1311 |
\caption@newfloat{within=#1}{\newfloatsetup{within=#1}}} |
| 1312 |
\DeclareCaptionOptionNoValue{without}{% |
| 1313 |
\caption@newfloat{without}{\newfloatsetup{without}}} |
| 1314 |
\DeclareCaptionJustification[ragged2e]{Justified}{\justifying} |
| 1315 |
\DeclareCaptionJustification[ragged2e]{Centering}{\Centering} |
| 1316 |
\DeclareCaptionJustification[ragged2e]{RaggedLeft}{\RaggedLeft} |
| 1317 |
\DeclareCaptionJustification[ragged2e]{RaggedRight}{\RaggedRight} |
| 1318 |
\DeclareCaptionFont[sansmath]{sansmath}{\sansmath} |
| 1319 |
\DeclareCaptionFont{singlespacing}{% |
| 1320 |
\caption@ifdefined\setspace@singlespace{% |
| 1321 |
\setstretch\setspace@singlespace}{}}% normally 1 |
| 1322 |
\DeclareCaptionFont[setspace]{onehalfspacing}{\onehalfspacing} |
| 1323 |
\DeclareCaptionFont[setspace]{doublespacing}{\doublespacing} |
| 1324 |
\DeclareCaptionFont[setspace]{stretch}{\setstretch{#1}} |
| 1325 |
\caption@AtBeginDocument{% |
| 1326 |
\def\@tempa{2005/06/28 ver: 1.3 subfig package}% |
| 1327 |
\expandafter\ifx\csname [email protected]\endcsname\@tempa |
| 1328 |
\caption@InfoNoLine{subfig package v1.3 is loaded}% |
| 1329 |
\def\caption@eh{\caption@@eh{subfig}}% |
| 1330 |
\let\caption@setfloattype\@gobble |
| 1331 |
\let\@dottedxxxline\sf@NEW@dottedxxxline |
| 1332 |
\let\sf@subfloat\sf@NEW@subfloat |
| 1333 |
\let\sf@ifpositiontop\caption@iftop |
| 1334 |
\fi |
| 1335 |
\let\sf@NEW@dottedxxxline\@undefined |
| 1336 |
\let\sf@NEW@subfloat\@undefined} |
| 1337 |
\def\sf@NEW@dottedxxxline#1#2#3#4#5#6#7{% |
| 1338 |
\begingroup |
| 1339 |
\caption@setfloattype{#1}% |
| 1340 |
\caption@setoptions{subfloat}% |
| 1341 |
\caption@setoptions{sub#1}% |
| 1342 |
\ifnum #3>\@nameuse{c@#2depth}\else |
| 1343 |
\@dottedtocline{\z@}{#4}{#5}{#6}{#7}% |
| 1344 |
\fi |
| 1345 |
\endgroup} |
| 1346 |
\def\sf@NEW@subfloat{% |
| 1347 |
\begingroup |
| 1348 |
\@nameuse{caption@warmup}% |
| 1349 |
\caption@setfloattype\@captype |
| 1350 |
\sf@ifpositiontop{% |
| 1351 |
\maincaptiontoptrue |
| 1352 |
}{% |
| 1353 |
\maincaptiontopfalse |
| 1354 |
}% |
| 1355 |
\caption@setoptions{subfloat}% |
| 1356 |
\caption@setoptions{sub\@captype}% |
| 1357 |
\let\sf@oldlabel=\label |
| 1358 |
\let\label=\subfloat@label |
| 1359 |
\ifmaincaptiontop\else |
| 1360 |
\advance\@nameuse{c@\@captype}\@ne\relax |
| 1361 |
\fi |
| 1362 |
\refstepcounter{sub\@captype}% |
| 1363 |
\setcounter{sub\@captype @save}{\value{sub\@captype}}% |
| 1364 |
\@ifnextchar [% %] match left bracket |
| 1365 |
{\sf@@subfloat}% |
| 1366 |
{\sf@@subfloat[\@empty]}} |
| 1367 |
\DeclareCaptionOption{lofdepth}[2]{\caption@ifdefined\c@lofdepth{\setcounter{lofdepth}{#1}}{}} |
| 1368 |
\DeclareCaptionOption{lotdepth}[2]{\caption@ifdefined\c@lotdepth{\setcounter{lotdepth}{#1}}{}} |
| 1369 |
\newcommand\caption@addcontentsline[2]{% |
| 1370 |
\caption@ifcontentsline{#2}{% |
| 1371 |
\begingroup |
| 1372 |
\let\@tempa\@gobble |
| 1373 |
\caption@ifdefined\caption@listtype |
| 1374 |
{\let\@tempa\@firstofone}% |
| 1375 |
{\edef\caption@listtype{#1}}% |
| 1376 |
\caption@ifdefined\caption@listtype@ext |
| 1377 |
{\edef\caption@listtype{\caption@listtype\caption@listtype@ext}% |
| 1378 |
\let\@tempa\@firstofone}% |
| 1379 |
{}% |
| 1380 |
\@tempa |
| 1381 |
{\caption@Debug{addcontentsline: #1 => \caption@listtype}% |
| 1382 |
\@namedef{the\caption@listtype}{\@nameuse{the#1}}}% |
| 1383 |
\expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}% |
| 1384 |
\endgroup}% |
| 1385 |
\caption@addsubcontentslines{#1}} |
| 1386 |
\newcommand\caption@@addcontentsline[2]{% |
| 1387 |
{\let\\\space |
| 1388 |
\@ifundefined{ext@#1}% |
| 1389 |
{\caption@Error{No float type '#1' defined}}% |
| 1390 |
{\def\captionlisttype{#1}% |
| 1391 |
\caption@add@contentsline |
| 1392 |
{\csname ext@#1\endcsname}% |
| 1393 |
{#1}% |
| 1394 |
{\caption@listformat{\@nameuse{p@#1}}{\@nameuse{the#1}}}% |
| 1395 |
{\ignorespaces #2}% |
| 1396 |
\caption@chkfloat{#1}{#2}}}} |
| 1397 |
\newcommand*\caption@add@contentsline{% |
| 1398 |
\caption@@@addcontentsline} |
| 1399 |
\newcommand*\caption@@@addcontentsline[4]{% |
| 1400 |
\addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}} |
| 1401 |
\let\caption@chkfloat\@gobbletwo |
| 1402 |
\newcommand\caption@ifcontentsline[1]{% |
| 1403 |
\caption@iflist |
| 1404 |
{\def\@tempa{#1}}% |
| 1405 |
{\let\@tempa\@empty}% |
| 1406 |
\ifx\@tempa\@empty |
| 1407 |
\expandafter\@gobble |
| 1408 |
\else |
| 1409 |
\expandafter\@firstofone |
| 1410 |
\fi} |
| 1411 |
\newcommand*\caption@addsubcontentslines[1]{} |
| 1412 |
\newif\ifcaption@star |
| 1413 |
\newcommand*\caption@aboveskip{% |
| 1414 |
\vskip\abovecaptionskip} |
| 1415 |
\newcommand*\caption@belowskip{% |
| 1416 |
\vskip\belowcaptionskip} |
| 1417 |
\newcommand*\caption@fnum[1]{% |
| 1418 |
\expandafter\let\expandafter\caption@original@fnum\csname caption@fnum@#1\endcsname % for label format `original' |
| 1419 |
\caption@labelformat{\@nameuse{#1name}}{\@nameuse{the#1}}} |
| 1420 |
\newcommand\caption@make[2]{\caption@@make{\caption@labelformat{#1}{#2}}} |
| 1421 |
\newcommand\caption@@make[2]{% |
| 1422 |
\begingroup |
| 1423 |
\caption@@make@{#1}{#2}% |
| 1424 |
\endgroup |
| 1425 |
\caption@@make@epilogue} |
| 1426 |
\newcommand\caption@@make@[2]{% |
| 1427 |
\caption@stepthecounter |
| 1428 |
\caption@beginhook |
| 1429 |
\caption@box\hsize{% |
| 1430 |
\caption@singlelinecheck{\caption@slc{#1}{#2}\caption@singleline\caption@multiline}{\caption@multiline}% |
| 1431 |
\caption@calcmargin |
| 1432 |
\caption@tempdima\captionmargin |
| 1433 |
\ifdim\captionmargin@=\z@ \else |
| 1434 |
\caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@\relax}% |
| 1435 |
\fi |
| 1436 |
\caption@ifhmode{\advance\caption@tempdima\caption@indent\relax}% |
| 1437 |
\hspace\caption@tempdima |
| 1438 |
\caption@tempdima\captionwidth |
| 1439 |
\caption@ifhmode{\advance\caption@tempdima-\caption@indent\relax}% |
| 1440 |
\caption@parbox\caption@tempdima{% |
| 1441 |
\caption@ifhmode{% |
| 1442 |
\ifdim\caption@indent=\z@ |
| 1443 |
\leavevmode |
| 1444 |
\else |
| 1445 |
\hskip-\caption@indent |
| 1446 |
\fi}% |
| 1447 |
\caption@@@make{#1}{#2}}% |
| 1448 |
\caption@tempdima\captionmargin |
| 1449 |
\ifdim\captionmargin@=\z@ \else |
| 1450 |
\caption@ifoddpage{\advance\caption@tempdima\captionmargin@\relax}{}% |
| 1451 |
\fi |
| 1452 |
\hspace\caption@tempdima |
| 1453 |
}% |
| 1454 |
\caption@endhook} |
| 1455 |
\newcommand\caption@@make@epilogue{% |
| 1456 |
\global\caption@starfalse} |
| 1457 |
\newcommand*\caption@calcmargin{% |
| 1458 |
\caption@calcmargin@hook |
| 1459 |
\ifx\caption@maxmargin\@undefined \else |
| 1460 |
\ifdim\captionmargin>\caption@maxmargin\relax |
| 1461 |
\captionmargin\caption@maxmargin\relax |
| 1462 |
\fi |
| 1463 |
\fi |
| 1464 |
\ifx\caption@minmargin\@undefined \else |
| 1465 |
\ifdim\captionmargin<\caption@minmargin\relax |
| 1466 |
\captionmargin\caption@minmargin\relax |
| 1467 |
\fi |
| 1468 |
\fi |
| 1469 |
\ifdim\captionwidth=\z@ |
| 1470 |
\captionwidth\hsize\relax |
| 1471 |
\advance\captionwidth by -2\captionmargin\relax |
| 1472 |
\advance\captionwidth by -\captionmargin@\relax |
| 1473 |
\else |
| 1474 |
\captionmargin\hsize\relax |
| 1475 |
\advance\captionmargin by -\captionwidth\relax |
| 1476 |
\divide\captionmargin by 2\relax |
| 1477 |
\captionmargin@\z@\relax |
| 1478 |
\fi |
| 1479 |
\caption@Debug{% |
| 1480 |
\string\hsize=\the\hsize, |
| 1481 |
\string\captionwidth=\the\captionwidth,\MessageBreak |
| 1482 |
\string\captionmargin=\the\captionmargin, |
| 1483 |
\string\captionmargin@=\the\captionmargin@}% |
| 1484 |
} |
| 1485 |
\newcommand\caption@slc[4]{% |
| 1486 |
\caption@Debug{Begin SLC}% |
| 1487 |
\singlelinecaptiontrue |
| 1488 |
\begingroup |
| 1489 |
\caption@singleline |
| 1490 |
\let\caption@justification\relax |
| 1491 |
\caption@calcmargin % calculate \captionwidth |
| 1492 |
\caption@prepareslc |
| 1493 |
\sbox\@tempboxa{\caption@@@make{#1}{#2}}% |
| 1494 |
\ifdim\wd\@tempboxa>\captionwidth |
| 1495 |
\endgroup |
| 1496 |
\singlelinecaptionfalse |
| 1497 |
#4% |
| 1498 |
\else |
| 1499 |
\endgroup |
| 1500 |
#3% |
| 1501 |
\fi |
| 1502 |
\caption@Debug{End SLC}} |
| 1503 |
\newif\ifsinglelinecaption |
| 1504 |
\newcommand*\caption@singleline{% |
| 1505 |
\caption@xsetup\caption@slsty % Note: This could change \caption@format |
| 1506 |
\caption@format % defines \caption@ifhmode, \caption@slfmt, and \caption@fmt |
| 1507 |
\let\caption@fmt\caption@slfmt} |
| 1508 |
\newcommand*\caption@multiline{% |
| 1509 |
\caption@format} % defines \caption@ifhmode, \caption@slfmt, and \caption@fmt |
| 1510 |
\providecommand*\caption@prepareslc{} |
| 1511 |
\g@addto@macro\caption@prepareslc{% |
| 1512 |
\let\label\caption@gobble |
| 1513 |
\let\hypertarget\@gobbletwo |
| 1514 |
\let\caption@footnote@ORI\footnote |
| 1515 |
\def\footnote{\caption@withoptargs\caption@footnote}% |
| 1516 |
\let\caption@footnotemark@ORI\footnotemark |
| 1517 |
\def\footnotemark{\caption@withoptargs\caption@footnotemark}% |
| 1518 |
\let\caption@footnotetext@ORI\@footnotetext |
| 1519 |
\let\@footnotetext\caption@gobble |
| 1520 |
\let\caption@endnote@ORI\endnote |
| 1521 |
\def\endnote{\caption@withoptargs\caption@endnote}% |
| 1522 |
\let\caption@endnotemark@ORI\endnotemark |
| 1523 |
\def\endnotemark{\caption@withoptargs\caption@endnotemark}% |
| 1524 |
\let\caption@endnotetext@ORI\@endnotetext |
| 1525 |
\let\@endnotetext\caption@gobble |
| 1526 |
\let\acused\@gobble |
| 1527 |
\let\AC@placelabel\@gobble |
| 1528 |
\let\glsunset\@gobble |
| 1529 |
} |
| 1530 |
\newcommand\caption@footnote[2]{% |
| 1531 |
\caption@footnotemark{#1}} |
| 1532 |
\newcommand\caption@footnotemark[1]{% |
| 1533 |
\begingroup |
| 1534 |
\let\stepcounter\caption@l@stepcounter |
| 1535 |
\caption@footnotemark@ORI#1\relax |
| 1536 |
\endgroup} |
| 1537 |
\newcommand\caption@endnote[2]{% |
| 1538 |
\caption@endnotemark{#1}} |
| 1539 |
\newcommand\caption@endnotemark[1]{% |
| 1540 |
\begingroup |
| 1541 |
\let\stepcounter\caption@l@stepcounter |
| 1542 |
\caption@endnotemark@ORI#1\relax |
| 1543 |
\endgroup} |
| 1544 |
\newcommand*\caption@l@stepcounter[1]{% |
| 1545 |
\advance\csname c@#1\endcsname\@ne\relax} |
| 1546 |
\newcommand*\caption@applyfont{% |
| 1547 |
\caption@justification\captionfont\captionsize} |
| 1548 |
\newcommand\caption@@@make[2]{% |
| 1549 |
\ifx\caption@fmt\@undefined\caption@format\fi |
| 1550 |
\let\caption@lfmt\caption@labelformat |
| 1551 |
\global\def\caption@tempa{gobbletwo}% |
| 1552 |
\global\def\caption@tempb{}% |
| 1553 |
\sbox\@tempboxa{% |
| 1554 |
\let\caption@ignorespaces\ignorespaces |
| 1555 |
\def\ignorespaces{% |
| 1556 |
\global\def\caption@tempb{two}% "gobble" -> "gobbletwo" if \ignorespaces is used addtionally |
| 1557 |
\caption@ignorespaces}% |
| 1558 |
#1% |
| 1559 |
{\global\let\caption@tempa\@undefined\aftergroup\@gobble}% |
| 1560 |
{\global\def\caption@tempa{gobble\caption@tempb}}}% |
| 1561 |
\ifdim\wd\@tempboxa=\z@ |
| 1562 |
\gdef\caption@tempa{none}% |
| 1563 |
\fi |
| 1564 |
\ifx\caption@tempa\@undefined \else |
| 1565 |
\@expandtwoargs\caption@set{labelseparator}{\caption@tempa}% |
| 1566 |
\fi |
| 1567 |
\caption@ifempty{#2}{% |
| 1568 |
\caption@set{labelseparator}{none}% |
| 1569 |
\caption@set{textformat}{simple}% |
| 1570 |
}% |
| 1571 |
\caption@labelseparator % defines \caption@iflabelfont, \caption@labelsep and \caption@labelsep@name (the latter is needed by \caption@fmt) |
| 1572 |
\@setpar{\@@par\caption@@par}\caption@@par |
| 1573 |
\caption@applyfont |
| 1574 |
\caption@fmt |
| 1575 |
{\ifcaption@star\else |
| 1576 |
\begingroup |
| 1577 |
\captionlabelfont |
| 1578 |
#1\relax\relax |
| 1579 |
\endgroup |
| 1580 |
\fi}% |
| 1581 |
{\ifcaption@star\else |
| 1582 |
\begingroup |
| 1583 |
\caption@iflabelfont\captionlabelfont |
| 1584 |
\relax\caption@labelsep |
| 1585 |
\endgroup |
| 1586 |
\fi}% |
| 1587 |
{{\captiontextfont |
| 1588 |
\caption@textstart |
| 1589 |
\caption@ifstrut |
| 1590 |
{\vrule\@height\ht\strutbox\@width\z@}% |
| 1591 |
{}% |
| 1592 |
\nobreak\hskip\z@skip % enable hyphenation |
| 1593 |
\caption@textformat{#2}% |
| 1594 |
\caption@ifstrut |
| 1595 |
{\ifhmode\@finalstrut\strutbox\fi}% |
| 1596 |
{}% |
| 1597 |
\caption@textend}}} |
| 1598 |
\newcommand*\caption@textstart{} |
| 1599 |
\newcommand*\caption@textend{\par} |
| 1600 |
\newcommand\caption@ifempty[1]{% |
| 1601 |
\caption@if@empty{#1}% |
| 1602 |
\caption@ifempty\@unused} |
| 1603 |
\newcommand\caption@if@empty[1]{% |
| 1604 |
\def\caption@tempa{#1}% |
| 1605 |
\ifx\caption@tempa\@empty |
| 1606 |
\let\caption@ifempty\@secondoftwo |
| 1607 |
\else |
| 1608 |
\expandafter\def\expandafter\caption@tempa\expandafter{% |
| 1609 |
\caption@car#1\caption@if@empty\caption@nil}% |
| 1610 |
\def\caption@tempb{\caption@if@empty}% |
| 1611 |
\ifx\caption@tempa\caption@tempb |
| 1612 |
\let\caption@ifempty\@secondoftwo |
| 1613 |
\else |
| 1614 |
\def\caption@tempb{\ignorespaces}% |
| 1615 |
\ifx\caption@tempa\caption@tempb |
| 1616 |
\expandafter\caption@if@empty\expandafter{\@gobble#1}% |
| 1617 |
\else |
| 1618 |
\def\caption@tempb{\label}% |
| 1619 |
\ifx\caption@tempa\caption@tempb |
| 1620 |
\expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% |
| 1621 |
\else |
| 1622 |
\def\caption@tempb{\index}% |
| 1623 |
\ifx\caption@tempa\caption@tempb |
| 1624 |
\expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% |
| 1625 |
\else |
| 1626 |
\def\caption@tempb{\glossary}% |
| 1627 |
\ifx\caption@tempa\caption@tempb |
| 1628 |
\expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% |
| 1629 |
\else |
| 1630 |
\let\caption@ifempty\@gobbletwo |
| 1631 |
\fi |
| 1632 |
\fi |
| 1633 |
\fi |
| 1634 |
\fi |
| 1635 |
\fi |
| 1636 |
\fi} |
| 1637 |
\long\def\caption@car#1#2\caption@nil{#1}% same as \@car, but \long |
| 1638 |
\newcommand*\caption@@par{% |
| 1639 |
\parindent\caption@parindent\hangindent\caption@hangindent}% |
| 1640 |
\newcommand*\DeclareCaptionType{% |
| 1641 |
\caption@loadpackage{newfloat}{declare type}% |
| 1642 |
\DeclareFloatingEnvironment} |
| 1643 |
\@onlypreamble\DeclareCaptionType |
| 1644 |
\newcommand*\ForEachCaptionType{% |
| 1645 |
\@ifstar |
| 1646 |
{\caption@foreach@type\@gobble}% |
| 1647 |
{\caption@foreach@type\@iden}} |
| 1648 |
\newcommand\caption@foreach@type[2]{% |
| 1649 |
\caption@ifdefined\ForEachFloatingEnvironment |
| 1650 |
{\ForEachFloatingEnvironment*{#2}}% |
| 1651 |
{\def\@elt##1{#2}% |
| 1652 |
\caption@ifdefined\c@figure\@elt\@gobble{figure}% |
| 1653 |
\caption@ifdefined\c@table\@elt\@gobble{table}% |
| 1654 |
\let\@elt\relax}% |
| 1655 |
#1{\newfloat@addtohook{#2}}} |
| 1656 |
\providecommand\newfloat@addtohook[1]{% |
| 1657 |
\toks@=\expandafter{\newfloat@hook{##1}#1}% |
| 1658 |
\edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}% |
| 1659 |
\@tempa} |
| 1660 |
\providecommand*\newfloat@hook[1]{} |
| 1661 |
\newcommand*\DeclareCaptionSubType{% |
| 1662 |
\caption@teststar\caption@declaresubtype\@firstoftwo\@secondoftwo} |
| 1663 |
\@onlypreamble\DeclareCaptionSubType |
| 1664 |
\newcommand*\caption@declaresubtype[1]{% |
| 1665 |
\@testopt{\caption@@declaresubtype{#1}}{alph}} |
| 1666 |
\@onlypreamble\caption@declaresubtype |
| 1667 |
\def\caption@@declaresubtype#1[#2]#3{% |
| 1668 |
\@ifundefined{c@#3}% |
| 1669 |
{\caption@Error{No float type '#3' defined}}% |
| 1670 |
{\caption@@@declaresubtype{#1}{#2}{#3}{sub#3}}} |
| 1671 |
\@onlypreamble\caption@@declaresubtype |
| 1672 |
\newcommand*\caption@@@declaresubtype[4]{% |
| 1673 |
\caption@ifsubtype{#4}% |
| 1674 |
{\caption@Debug{Modify subtype `#4'}}% |
| 1675 |
{\caption@Debug{New subtype `#4'}% |
| 1676 |
\newcounter{#4}[{#3}]% |
| 1677 |
\@namedef{ext@#4}{\csname ext@#3\endcsname}% |
| 1678 |
\caption@declaresublistentry{#3}% |
| 1679 |
\caption@l@addto@list\caption@subtypelist{#4}% |
| 1680 |
\caption@subtype@hook{#4}% |
| 1681 |
\caption@ifdefined\contentsuse{% |
| 1682 |
\contentsuse{#4}{\csname ext@#4\endcsname}}{}% |
| 1683 |
\@namedef{#4name}{}% |
| 1684 |
\@namedef{#4autorefname}{\csname #3autorefname\endcsname}}% |
| 1685 |
#1% is \@firstoftwo in star form, and \@secondoftwo otherwise |
| 1686 |
{\@namedef{p@#4}{}% |
| 1687 |
\@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}% |
| 1688 |
{\@namedef{p@#4}{\csname the#3\endcsname}% |
| 1689 |
\@namedef{the#4}{\@nameuse{#2}{#4}}}% |
| 1690 |
\@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}} |
| 1691 |
\@onlypreamble\caption@@@declaresubtype |
| 1692 |
\newcommand*\caption@declaresublistentry{% |
| 1693 |
\caption@ifdefined\l@chapter |
| 1694 |
{\caption@@declaresublistentry\l@subsection}% |
| 1695 |
{\caption@@declaresublistentry\l@subsubsection}} |
| 1696 |
\@onlypreamble\caption@declaresublistentry |
| 1697 |
\newcommand*\caption@@declaresublistentry[2]{% |
| 1698 |
\ifx#1\@undefined |
| 1699 |
\caption@@@declaresublistentry\relax\@dottedtocline\caption@nil{#2}% |
| 1700 |
\else |
| 1701 |
\expandafter\caption@@@declaresublistentry#1{}{}\@dottedtocline\caption@nil{#2}% |
| 1702 |
\fi} |
| 1703 |
\@onlypreamble\caption@@declaresublistentry |
| 1704 |
\long\def\caption@@@declaresublistentry#1\@dottedtocline#2\caption@nil#3{% |
| 1705 |
\def\@tempa{#1}% |
| 1706 |
\ifx\@tempa\@empty |
| 1707 |
\caption@@@@declaresublistentry{#3}#2\caption@nil |
| 1708 |
\else |
| 1709 |
\caption@@@@declaresublistentry{#3}@{3.8em}{3.2em}\caption@nil |
| 1710 |
\fi} |
| 1711 |
\@onlypreamble\caption@@@declaresublistentry |
| 1712 |
\def\caption@@@@declaresublistentry#1#2#3#4#5\caption@nil{% |
| 1713 |
\expandafter\caption@@@@@declaresublistentry\expandafter |
| 1714 |
{\csname @dotted\csname ext@#1\endcsname line\endcsname}{#1}{#3}{#4}} |
| 1715 |
\@onlypreamble\caption@@@@declaresublistentry |
| 1716 |
\newcommand*\caption@@@@@declaresublistentry[4]{% |
| 1717 |
\@namedef{l@sub#2}{#1{2}{#3}{#4}}% |
| 1718 |
\expandafter\caption@@@@@@declaresublistentry |
| 1719 |
\expandafter#1\expandafter{\csname ext@#2\endcsname depth}} |
| 1720 |
\@onlypreamble\caption@@@@@declaresublistentry |
| 1721 |
\newcommand*\caption@@@@@@declaresublistentry[2]{ |
| 1722 |
\ifx#1\relax |
| 1723 |
\def#1##1{% |
| 1724 |
\def\next{\@dottedtocline{##1}}% |
| 1725 |
\@ifundefined{c@#2}{}{% |
| 1726 |
\ifnum ##1>\@nameuse{c@#2}\relax |
| 1727 |
\let\next\@gobblefour |
| 1728 |
\else |
| 1729 |
\c@tocdepth=\@nameuse{c@#2}\relax |
| 1730 |
\fi}% |
| 1731 |
\next}% |
| 1732 |
\fi} |
| 1733 |
\@onlypreamble\caption@@@@@@declaresublistentry |
| 1734 |
\newcommand*\caption@subtypelist{} |
| 1735 |
\newcommand*\caption@ifsubtype{% |
| 1736 |
\caption@ifin@list\caption@subtypelist} |
| 1737 |
\newcommand*\ForEachCaptionSubType{% |
| 1738 |
\@ifstar |
| 1739 |
{\caption@foreach@subtype\@gobble}% |
| 1740 |
{\caption@foreach@subtype\@iden}} |
| 1741 |
\newcommand\caption@foreach@subtype[2]{% |
| 1742 |
\caption@for@list\caption@subtypelist{#2}% |
| 1743 |
#1{\caption@addto@subtype@hook{#2}}} |
| 1744 |
\providecommand\caption@addto@subtype@hook[1]{% |
| 1745 |
\toks@=\expandafter{\caption@subtype@hook{##1}#1}% |
| 1746 |
\edef\@tempa{\def\noexpand\caption@subtype@hook####1{\the\toks@}}% |
| 1747 |
\@tempa} |
| 1748 |
\providecommand*\caption@subtype@hook[1]{} |
| 1749 |
\caption@ifdefined\@memresetsubcounter |
| 1750 |
{\let\caption@memresetsubcounter\@memresetsubcounter |
| 1751 |
\renewcommand*\@memresetsubcounter[1]{% |
| 1752 |
\caption@ifsubtype{sub#1}\@gobble\caption@memresetsubcounter{#1}}}% |
| 1753 |
{} |
| 1754 |
\ifx\caption@documentclass\@empty\else |
| 1755 |
\@pushfilename |
| 1756 |
\edef\@currname{caption-\caption@documentclass} |
| 1757 |
\edef\@currext{sto} |
| 1758 |
\InputIfFileExists |
| 1759 |
{\@currname.\@currext}% |
| 1760 |
{}% |
| 1761 |
{\@missingfileerror\@currname\@currext}% |
| 1762 |
\@popfilename |
| 1763 |
\fi |
| 1764 |
\captionsetup{style=default,position=default,listformat=default} |
| 1765 |
\ProcessOptions* |
| 1766 |
\endinput |
| 1767 |
%% |
| 1768 |
%% End of file `caption3_2020-10-26.sty'. |