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