Debian Codegraph @

texmf-dist/tex/latex/caption/caption_2020-07-29.sty

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