Debian Codegraph @

texmf-dist/tex/latex/caption/caption_2019-09-01.sty

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