From 1d4a2d0e142220d907b1ce6d432b049dc433560e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 20 Feb 2022 21:12:00 +0000 Subject: caption (20feb22) git-svn-id: svn://tug.org/texlive/trunk@62097 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/caption/bicaption.sty | 232 ++- .../tex/latex/caption/caption-ams-smf.sto | 6 +- .../tex/latex/caption/caption-beamer.sto | 15 +- .../tex/latex/caption/caption-elsarticle.sto | 6 +- .../texmf-dist/tex/latex/caption/caption-koma.sto | 6 +- .../texmf-dist/tex/latex/caption/caption-light.sty | 31 +- .../tex/latex/caption/caption-memoir.sto | 18 +- .../texmf-dist/tex/latex/caption/caption-ntg.sto | 6 +- .../tex/latex/caption/caption-thesis.sto | 6 +- Master/texmf-dist/tex/latex/caption/caption.sty | 674 ++++--- Master/texmf-dist/tex/latex/caption/caption2.sty | 282 ++- .../tex/latex/caption/caption2_1995-10-09.sty | 336 ++++ .../tex/latex/caption/caption2_2005-10-03.sty | 430 +++++ Master/texmf-dist/tex/latex/caption/caption3.sty | 396 +++-- .../tex/latex/caption/caption3_2007-04-11.sty | 583 ++++++ .../tex/latex/caption/caption3_2010-01-14.sty | 1770 +++++++++++++++++++ .../tex/latex/caption/caption3_2011-11-01.sty | 1566 ++++++++++++++++ .../tex/latex/caption/caption3_2019-09-01.sty | 1839 +++++++++++++++++++ .../tex/latex/caption/caption3_2020-07-29.sty | 1727 ++++++++++++++++++ .../tex/latex/caption/caption3_2020-10-26.sty | 1768 +++++++++++++++++++ .../tex/latex/caption/caption_1995-04-05.sty | 157 ++ .../tex/latex/caption/caption_2007-04-16.sty | 455 +++++ .../tex/latex/caption/caption_2010-01-09.sty | 1645 +++++++++++++++++ .../tex/latex/caption/caption_2011-11-10.sty | 1717 ++++++++++++++++++ .../tex/latex/caption/caption_2019-09-01.sty | 1864 ++++++++++++++++++++ .../tex/latex/caption/caption_2020-07-29.sty | 1504 ++++++++++++++++ .../tex/latex/caption/caption_2020-10-26.sty | 1383 +++++++++++++++ Master/texmf-dist/tex/latex/caption/ltcaption.sty | 13 +- Master/texmf-dist/tex/latex/caption/subcaption.sty | 233 ++- 29 files changed, 19895 insertions(+), 773 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/caption/caption2_1995-10-09.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption2_2005-10-03.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption3_2007-04-11.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption3_2010-01-14.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption3_2011-11-01.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption_1995-04-05.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty create mode 100644 Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty index 4be2e5578bc..a151898ae34 100644 --- a/Master/texmf-dist/tex/latex/caption/bicaption.sty +++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty @@ -6,7 +6,7 @@ %% %% bicaption.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,13 +33,14 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{bicaption}[2020/10/25 v1.3 Bilingual Captions (AR)] -\RequirePackage{caption}[2020/08/23] % needs v3.5 or newer +\providecommand\DeclareRelease[3]{} +\providecommand\DeclareCurrentRelease[2]{} +\DeclareCurrentRelease{v1}{2011/07/13} +\ProvidesPackage{bicaption}[2021/05/02 v1.5b Bilingual Captions (AR)] +\RequirePackage{caption}[2011/11/10] % we need at least v3.2e \newcommand*\bicaption@Info[1]{% \PackageInfo{bicaption}{#1}} \newcommand*\bicaption@InfoNoLine[1]{% @@ -49,22 +50,13 @@ \newcommand*\bicaption@WarningNoLine[1]{% \PackageWarning{bicaption}{#1.^^J\bicaption@wh\@gobbletwo}} \newcommand*\bicaption@wh{% - See the bicaption package documentation for explanation.} + See the `bicaption' package documentation for explanation.} \newcommand*\bicaption@Error[1]{% - \PackageError{bicaption}{#1}\bicaption@eh} -\newcommand*\bicaption@eh{% + \PackageError{bicaption}{#1}{\caption@@eh{bicaption}}} +\providecommand*\caption@@eh[1]{% If you do not understand this error, please take a closer look\MessageBreak - at the documentation of the `bicaption' package.\MessageBreak\@ehc} -\newcommand*\bicaption@CheckCompatibility{% - \caption@ifcompatibility{% - \bicaption@Error - {This package does not work with\MessageBreak - caption option `compatibility=v1'}% - \endinput}{}} -\bicaption@CheckCompatibility -\caption@AtBeginDocument{% - \bicaption@CheckCompatibility - \let\bicaption@CheckCompatibility\@undefined} + at the documentation of the `#1' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} \newcount\bicaption@lang \DeclareCaptionOption{bi-lang}{% \caption@ifinlist{#1}{0,all,both}{% @@ -84,20 +76,29 @@ \caption@set@bool\bicaption@ifswap{#1}} \DeclareCaptionOption{bi-separator}[1]{% \caption@set{biseparator}{#1}} +\providecommand*\caption@set[2]{% + \@ifundefined{caption@#1@#2}% + {\caption@Error{Undefined #1 `#2'}}% + {\expandafter\let\csname caption@#1\expandafter\endcsname\csname caption@#1@#2\endcsname}} \newcommand\DeclareBiCaptionSeparator[2]{% \caption@decl{biseparator}{#1}{#2}} \@onlypreamble\DeclareBiCaptionSeparator +\providecommand*\caption@decl[2]{% + \global\long\expandafter\def\csname caption@#1@#2\endcsname} \DeclareBiCaptionSeparator{none}{} \DeclareBiCaptionSeparator{smallskip}{\smallskip} \DeclareBiCaptionSeparator{medskip}{\medskip} \DeclareBiCaptionSeparator{bigskip}{\bigskip} -\SetCaptionDefault{biseparator}{none} +\caption@ifundefined\SetCaptionDefault + {\def\caption@biseparator@default{\caption@biseparator@none}} + {\SetCaptionDefault{biseparator}{none}} \DeclareCaptionOption{lang}{% \caption@ifundefined\bicaption@language \bicaption@language@setupkeys \relax - \def\bicaption@language{#1}% - \let\bicaption@language@setoptions\@empty} + \edef\bicaption@language{#1}% + \let\bicaption@language@setoptions\@empty + \global\let\bicaption@language@value\bicaption@language} \let\KV@caption@language\KV@caption@lang \newcommand*\bicaption@language@keylist{} \newcommand*\DeclareCaptionLangOption[1]{% @@ -129,25 +130,34 @@ \providecommand*\selectcaptionlanguage[1]{% #1\select@language\selectlanguage} \caption@ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0,bi-separator=default} -\ifcsname captionmainlanguage\endcsname - \bicaption@InfoNoLine{% - main language is set to \captionmainlanguage} -\else\ifcsname bbl@main@language\endcsname - \bicaption@InfoNoLine{% - babel found, main language is \bbl@main@language} - \let\captionmainlanguage\bbl@main@language -\else\ifcsname xpg@main@language\endcsname - \bicaption@InfoNoLine{% - polyglossia found, main language is \xpg@main@language} - \let\captionmainlanguage\xpg@main@language -\else - \bicaption@InfoNoLine{main language is not set} -\fi\fi\fi -\ifcsname captionmainlanguage\endcsname - \edef\@tempa{% - \noexpand\captionsetup[bi-first]{lang=\captionmainlanguage}} - \@tempa -\fi +\AtBeginDocument{% + \ifcsname captionmainlanguage\endcsname + \bicaption@InfoNoLine{% + Main language is set to \captionmainlanguage}% + \else + \bicaption@setmainlanguage + \fi + \ifcsname captionmainlanguage\endcsname + \captionsetup[bi-first]{lang=\captionmainlanguage}% + \else + \ifcsname bicaption@language@value\endcsname % option "lang=" was used + \expandafter\bicaption@Warning + \else + \expandafter\bicaption@Info + \fi + {Main language is not set}% + \fi} +\newcommand*\bicaption@setmainlanguage{% + \ifcsname bbl@main@language\endcsname + \bicaption@InfoNoLine{% + babel found, main language is \bbl@main@language}% + \let\captionmainlanguage\bbl@main@language + \else\ifcsname xpg@main@language\endcsname + \bicaption@InfoNoLine{% + polyglossia found, main language is \xpg@main@language}% + \let\captionmainlanguage\xpg@main@language + \fi\fi} +\@onlypreamble\bicaption@setmainlanguage \caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}% \caption@ProcessOptions*{bicaption} \let\bicaption@addcontentsline@ORI\caption@addcontentsline @@ -181,6 +191,9 @@ \caption@ifcontentsline{#2}{% \bicaption@selectlanguage\@secondoftwo \bicaption@addcontentsline@ORI{#1}{#2}}} +\caption@ifundefined\caption@@make@ + {\let\caption@@make@\caption@@make} + {} \renewcommand\caption@@make[2]{% \caption@ifundefined\bicaption@text {\begingroup @@ -189,18 +202,17 @@ {\expandafter\bicaption@@make\expandafter {\bicaption@text}{#1}{#2}% \global\let\bicaption@text\@undefined}% - \caption@@make@epilogue} + \@nameuse{caption@@make@epilogue}} \newcommand\bicaption@@make[3]{% \caption@setoptions{bi}% \ifnum\bicaption@lang=0\relax \bicaption@ifslc - {\caption@slc{#2}{#3}{}{\caption@setsinglelinecheck0}% - \caption@slc{#2}{#1}{}{\caption@setsinglelinecheck0}}% + {\bicaption@slc{#2}{#3}{}{\caption@setsinglelinecheck0}% + \bicaption@slc{#2}{#1}{}{\caption@setsinglelinecheck0}}% {}% \fi \ifnum\bicaption@lang=2\relax \caption@thelabel - \global\let\caption@thelabel\relax \let\bicaption@tempa\relax \else \begingroup @@ -217,8 +229,13 @@ \caption@@make@{#2}{#1}% \endgroup \fi -} + \global\bicaption@clrlabel} \newcommand*\bicaption@separator{\par} +\caption@ifundefined\caption@@slc + {\newcommand\bicaption@slc{\caption@slc}} + {\newcommand\bicaption@slc[2]{\caption@@slc{#1}{#2}{\captionwidth}}} +\providecommand*\caption@setsinglelinecheck{% + \caption@set@bool\caption@ifslc} \newcommand\bicaption{\@bicaption\caption} \newcommand\bicaptionbox{\@bicaption\captionbox} \newcommand\bisubcaption{\@bicaption\subcaption} @@ -236,13 +253,94 @@ \long\def\@@@bicaption[#1]#2{% \caption@dblarg{\@@@@bicaption{#1}{#2}}} \long\def\@@@@bicaption#1#2[#3]#4{% - \caption@getlabel{#2}% + \bicaption@getlabel{#2}% \bicaption@ifswap {\bicaption@setup{#1}{#2}% \bicaption@cmd[{#3}]{#4}}% {\bicaption@setup{#3}{#4}% \bicaption@cmd[{#1}]{#2}}} \long\def\bicaption@star#1[#2]{#1*} +\@ifundefined{caption@getlabel}{% + \newcommand\bicaption@getlabel[1]{% caption3 < v1.7 + \bicaption@@getlabel#1\label{}\@nil} + \long\def\bicaption@@getlabel#1\label#2#3\@nil{% + \def\@tempa{#2}% + \ifx\@tempa\@empty + \let\caption@thelabel\relax + \else + \def\@tempb{*}% + \ifx\@tempa\@tempb + \def\caption@thelabel{\label*}% + \bicaption@@@getlabel#3\@nil + \else + \def\caption@thelabel{\label}% + \bicaption@@@getlabel{#2}#3\@nil + \fi + \fi} + \long\def\bicaption@@@getlabel#1#2\@nil{% + \def\@tempa{#1}% + \def\@tempb{[}% + \ifx\@tempa\@tempb + \bicaption@@@@getlabel#1#2\@nil + \else + \l@addto@macro\caption@thelabel{{#1}}% + \fi} + \long\def\bicaption@@@@getlabel[#1]#2\@nil{% + \l@addto@macro\caption@thelabel{[{#1}]}% + \bicaption@@@getlabel#2\@nil} +}{\@ifundefined{caption@@@@getlabel}{% + \newcommand\bicaption@getlabel[1]{% caption3 >= v1.7 + \caption@getlabel#1\label{}\@nil} +}{% + \newcommand*\bicaption@getlabel{% caption3 >= v2.0 + \caption@getlabel} +}} +\@ifundefined{caption@clrlabel}{% + \newcommand*\bicaption@clrlabel{\let\caption@thelabel\relax} % caption3 < v2.3 +}{% + \newcommand*\bicaption@clrlabel{\caption@clrlabel} % caption3 >= v2.3 +} +\newcommand\bicaption@setup[2]{% + \def\bicaption@lentry{#1}% + \def\bicaption@text{\ignorespaces #2}} +\newcommand*\bicaption@clear{% + \let\bicaption@lentry\@undefined + \let\bicaption@text\@undefined} +\AtBeginDocument{% + \ifx\caption@freeze\@undefined \else + \g@addto@macro\caption@freeze{% + \let\caption@frozen@bicaption\bicaption + \def\bicaption{% + \caption@withoptargs\caption@SC@bicaption}% + \long\def\caption@SC@bicaption#1#2{% + \@ifnextchar[%] + {\caption@SC@bi@caption{#1}{#2}}% + {\caption@SC@bi@caption@{#1}{#2}}}% + \long\def\caption@SC@bi@caption#1#2[#3]#4{% + \caption@@freeze{\bicaption#1{#2}[{#3}]{#4}}% + \ignorespaces}% + \long\def\caption@SC@bi@caption@#1#2#3{% + \caption@@freeze{\bicaption#1{#2}{#3}}% + \ignorespaces}% + \l@addto@macro\caption@warmup{% + \let\bicaption\caption@frozen@bicaption}}% + \fi} +\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% + \lst@Key{caption1}\relax{% + \lstKV@OptArg[{#1}]{#1}{% + \bicaption@ifswap + {\bicaption@setup{##1}{##2}}% + {\def\lst@@caption{##1}\def\lst@caption{##2}}}% + \let\lst@title\@empty}% + \lst@Key{caption2}\relax{% + \lstKV@OptArg[{#1}]{#1}{% + \bicaption@ifswap + {\def\lst@@caption{##1}\def\lst@caption{##2}}% + {\bicaption@setup{##1}{##2}}}% + \let\lst@title\@empty}% + \lst@AddToHookExe{TextStyle}{% + \bicaption@clear}% +}{} \newcommand\LT@bicaption{% \noalign\bgroup \@ifstar @@ -256,7 +354,7 @@ \caption@dblarg{\LT@@@@bicaption{#1}{#2}}} \long\def\LT@@@@bicaption#1#2[#3]#4{% \gdef\bicaption@LTsetup{% - \caption@getlabel{#2}% + \bicaption@getlabel{#2}% \bicaption@LT@setup}% \gdef\bicaption@LT@setup{% \bicaption@ifswap @@ -267,31 +365,17 @@ {\egroup\bicaption@cmd[{#1}]{#2}}} \let\bicaption@LTsetup\relax \let\bicaption@LT@setup\relax -\g@addto@macro\caption@LT@setup{% - \bicaption@LTsetup - \global\let\bicaption@LTsetup\relax} -\newcommand\bicaption@setup[2]{% - \def\bicaption@lentry{#1}% - \def\bicaption@text{\ignorespaces#2}} -\AtBeginDocument{% - \ifx\caption@freeze\@undefined \else - \g@addto@macro\caption@freeze{% - \let\caption@frozen@bicaption\bicaption - \def\bicaption{% - \caption@withoptargs\caption@SC@bicaption}% - \long\def\caption@SC@bicaption#1#2{% - \@ifnextchar[%] - {\caption@SC@bi@caption{#1}{#2}}% - {\caption@SC@bi@caption@{#1}{#2}}}% - \long\def\caption@SC@bi@caption#1#2[#3]#4{% - \caption@@freeze{\bicaption#1{#2}[{#3}]{#4}}% - \ignorespaces}% - \long\def\caption@SC@bi@caption@#1#2#3{% - \caption@@freeze{\bicaption#1{#2}{#3}}% - \ignorespaces}% - \l@addto@macro\caption@warmup{% - \let\bicaption\caption@frozen@bicaption}}% - \fi} +\caption@ifundefined\caption@LT@setup{% + % Fallback code for caption v3.2 + \captionsetup*[longtable]{bicaption-lt-setup} + \DeclareCaptionOptionNoValue{bicaption-lt-setup}{% + \bicaption@LTsetup + \global\let\bicaption@LTsetup\relax} +}{% + \g@addto@macro\caption@LT@setup{% + \bicaption@LTsetup + \global\let\bicaption@LTsetup\relax} +} \endinput %% %% End of file `bicaption.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption-ams-smf.sto b/Master/texmf-dist/tex/latex/caption/caption-ams-smf.sto index 1c999f0862c..7c95ffafc48 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-ams-smf.sto +++ b/Master/texmf-dist/tex/latex/caption/caption-ams-smf.sto @@ -6,7 +6,7 @@ %% %% caption-ams-smf.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,9 +33,7 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesFile{caption-ams-smf.sto}[2020/08/22 v2.0 Adaption of the caption package to the AMS and SMF document classes (AR)] diff --git a/Master/texmf-dist/tex/latex/caption/caption-beamer.sto b/Master/texmf-dist/tex/latex/caption/caption-beamer.sto index 3adb4194fa8..da6f4eff011 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-beamer.sto +++ b/Master/texmf-dist/tex/latex/caption/caption-beamer.sto @@ -6,7 +6,7 @@ %% %% caption-beamer.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,12 +33,10 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption-beamer.sto}[2020/08/22 v2.0 Adaption of the caption package to the beamer document classes (AR)] +\ProvidesFile{caption-beamer.sto}[2022/01/06 v2.0c Adaption of the caption package to the beamer document classes (AR)] \newcommand*\caption@ifbeamertemplate[1]{% \begingroup \let\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption @@ -52,7 +50,9 @@ \caption@ifbeamertemplate{caption name own line}% \@secondoftwo % \@secondoftwo -> singlelinecheck=off \@firstoftwo} % \@firstoftwo -> singlelinecheck=on -\g@addto@macro\caption@prepareslc{% +\providecommand*\AtCaptionSingleLineCheck{\g@addto@macro\caption@prepareslc} % for caption v3.5 +\let\caption@footnote@ORI\footnote +\AtCaptionSingleLineCheck{% \def\footnote{% \begingroup \let\stepcounter\caption@l@stepcounter @@ -90,7 +90,7 @@ \SetCaptionDefault{textfont}{beamer@textfont} \SetCaptionDefault{justification}{raggedright} \captionsetup{list=off} -\AtCaptionPackage{% +\AfterCaptionPackage{% \expandafter\let\expandafter\caption@beamer@figure \csname\string\figure\endcsname \@namedef{\string\figure}[#1]{% @@ -101,6 +101,7 @@ \@namedef{\string\table}[#1]{% \caption@beamer@table[#1]% use original beamer code first \caption@settype{table}} % set "type=table" afterwards + \def\caption@nobreak{\nobreak} } \endinput %% diff --git a/Master/texmf-dist/tex/latex/caption/caption-elsarticle.sto b/Master/texmf-dist/tex/latex/caption/caption-elsarticle.sto index 8274efbd6d2..8573bb3d265 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-elsarticle.sto +++ b/Master/texmf-dist/tex/latex/caption/caption-elsarticle.sto @@ -6,7 +6,7 @@ %% %% caption-elsarticle.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,9 +33,7 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesFile{caption-elsarticle.sto}[2020/08/22 v2.0 Adaption of the caption package to the elsarticle document class (AR)] diff --git a/Master/texmf-dist/tex/latex/caption/caption-koma.sto b/Master/texmf-dist/tex/latex/caption/caption-koma.sto index 38b3c5ef297..2b76e5edc47 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-koma.sto +++ b/Master/texmf-dist/tex/latex/caption/caption-koma.sto @@ -6,7 +6,7 @@ %% %% caption-koma.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,9 +33,7 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesFile{caption-koma.sto}[2020/09/21 v2.0b Adaption of the caption package to the KOMA-Script document classes (AR)] diff --git a/Master/texmf-dist/tex/latex/caption/caption-light.sty b/Master/texmf-dist/tex/latex/caption/caption-light.sty index bf5300291a9..37ae13bc75e 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-light.sty +++ b/Master/texmf-dist/tex/latex/caption/caption-light.sty @@ -6,7 +6,7 @@ %% %% caption-light.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,13 +33,11 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption-light}[2020/08/24 v1.0 Customizing captions (AR)] -\RequirePackage{caption3}[2020/08/23] % needs v2.0 or newer +\ProvidesPackage{caption-light}[2021/03/21 v1.0a Customizing captions (AR)] +\RequirePackage{caption3}[2020/08/30] % needs v2.0 or newer \caption@ifbool{documentclass}{}{% \caption@WarningNoLine{% Unknown document class (or package),\MessageBreak @@ -67,13 +65,24 @@ \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi - \caption@iftop\caption@aboveskip\caption@belowskip} + \caption@iftop\caption@aboveskip\caption@belowskip + \caption@@make@epilogue} \newcommand\caption@@makecaption[2]{% \caption@applyfont - {\captionlabelfont #1}% - {\caption@iflabelfont\captionlabelfont - \relax\caption@labelsep}% - {\captiontextfont #2}} + \ifcaption@star\else + \begingroup + \captionlabelfont #1\relax\relax + \endgroup + \fi + \ifcaption@star\else + \begingroup + \caption@iflabelfont\captionlabelfont + \relax\caption@labelsep + \endgroup + \fi + \begingroup + \captiontextfont #2% + \endgroup} \let\@makecaption\caption@makecaption \caption@AtBeginDocument{% \DeclareCaptionOption{type}{\setcaptiontype{#1}}% diff --git a/Master/texmf-dist/tex/latex/caption/caption-memoir.sto b/Master/texmf-dist/tex/latex/caption/caption-memoir.sto index d74cdddae99..74655d949d6 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-memoir.sto +++ b/Master/texmf-dist/tex/latex/caption/caption-memoir.sto @@ -6,7 +6,7 @@ %% %% caption-memoir.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,13 +33,12 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption-memoir.sto}[2020/10/10 v2.1 Adaption of the caption package to the memoir document class (AR)] -\g@addto@macro\caption@prepareslc{% +\ProvidesFile{caption-memoir.sto}[2021/06/30 v2.2 Adaption of the caption package to the memoir document class (AR)] +\providecommand*\AtCaptionSingleLineCheck{\g@addto@macro\caption@prepareslc} % for caption v3.5 +\AtCaptionSingleLineCheck{% \let\pagenote\caption@gobble} \DeclareCaptionLabelSeparator{@contdelim}{\@contdelim} \SetCaptionDefault{labelseparator}{@contdelim} @@ -60,7 +59,12 @@ \renewcommand\captiontitlefont{% \captionsetup{textfont=@conttfont}% \caption@memoir@titlefont} -\AtCaptionPackage{\setlength\belowcaptionskip{0pt}} +\AtCaptionPackage{% + + \setlength\belowcaptionskip{0pt}% + \@ifundefined{DeclareCaptionAutoPosition}{}{% + \DeclareCaptionAutoPosition{\ifdim\prevdepth>-99\p@#2\else#1\fi}}% +} \endinput %% %% End of file `caption-memoir.sto'. diff --git a/Master/texmf-dist/tex/latex/caption/caption-ntg.sto b/Master/texmf-dist/tex/latex/caption/caption-ntg.sto index 3ddfedc954f..061b6c64cce 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-ntg.sto +++ b/Master/texmf-dist/tex/latex/caption/caption-ntg.sto @@ -6,7 +6,7 @@ %% %% caption-ntg.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,9 +33,7 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesFile{caption-ntg.sto}[2020/08/22 v2.0 Adaption of the caption package to the NTG document classes (AR)] diff --git a/Master/texmf-dist/tex/latex/caption/caption-thesis.sto b/Master/texmf-dist/tex/latex/caption/caption-thesis.sto index fb367ab2172..195fffc291b 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-thesis.sto +++ b/Master/texmf-dist/tex/latex/caption/caption-thesis.sto @@ -6,7 +6,7 @@ %% %% caption-thesis.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,9 +33,7 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesFile{caption-thesis.sto}[2020/08/22 v2.0 Adaption of the caption package to the thesis document class (AR)] diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index ea101edc13e..74909ecde1d 100644 --- a/Master/texmf-dist/tex/latex/caption/caption.sty +++ b/Master/texmf-dist/tex/latex/caption/caption.sty @@ -6,7 +6,7 @@ %% %% caption.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,13 +33,21 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2020/10/26 v3.5g Customizing captions (AR)] -\RequirePackage{caption3}[2020/10/06] % needs v2.2b or newer +\providecommand\DeclareRelease[3]{} +\providecommand\DeclareCurrentRelease[2]{} +\DeclareRelease{v1}{1994-10-27}{caption_1995-04-05.sty} +\DeclareRelease{v3.0}{2003-12-20}{caption_2007-04-16.sty} +\DeclareRelease{v3.1}{2007-09-01}{caption_2010-01-09.sty} +\DeclareRelease{v3.2}{2011-08-06}{caption_2011-11-10.sty} +\DeclareRelease{v3.3}{2013-01-10}{caption_2019-09-01.sty} +\DeclareRelease{v3.4}{2019-11-24}{caption_2020-07-29.sty} +\DeclareRelease{v3.5}{2020-08-30}{caption_2020-10-26.sty} +\DeclareCurrentRelease{v3.6}{2022-02-20} +\ProvidesPackage{caption}[2022/02/20 v3.6 Customizing captions (AR)] +\RequirePackage{caption3}[2022/01/07] % needs v2.3 or newer \caption@ifbool{documentclass}{}{% \caption@WarningNoLine{% Unknown document class (or package),\MessageBreak @@ -51,17 +59,40 @@ \endinput }{} \caption@AtBeginDocument{% - \@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}% - \@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}% - \@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}} -\newcommand*\caption@DisablePositionOption[1]{% - \caption@InfoNoLine{% - `#1' package detected; setting `position=b' for compatibility reasons}% - \caption@setposition b% - \DeclareCaptionOption{position}{% - \caption@Error{Usage of the `position' option is incompatible\MessageBreak - to the `#1' package}}} -\@onlypreamble\caption@DisablePositionOption + \caption@setincompatible{\@ifpackageloaded{captcont}}{captcont package}% + \caption@setincompatible{\@ifpackageloaded{ftcap}}{ftcap package}% + \caption@setincompatible{\@ifpackageloaded{nonfloat}}{nonfloat package}% + \caption@setincompatible{\@ifpackageloaded{topcapt}}{topcapt package}} +\newcommand*\caption@setincompatible[2]{% + #1{% + \caption@Error{% + The #2 is incompatible to the\MessageBreak + current version of the `caption' package,\MessageBreak + so try \string\usepackage{caption}[=v1] instead}% + }{}} +\@onlypreamble\caption@setincompatible +\DeclareCaptionPosition{auto}{#2}{% + \caption@ifsubcaption@above{#2}{% + \ifvmode + \caption@autoposition{#1}{#2}% + \else + #2% + \fi}} +\def\caption@position@a{\caption@position@auto} % needed by floatrow package, \flrow@cappos +\SetCaptionDefault{position}{auto} +\newcommand*\caption@setautoposition[1]{% + \renewcommand*\caption@position@auto{% + \@nameuse{caption@position@#1}}} +\newcommand*\caption@autoposition[2]{% + \edef\caption@tempa{\the\prevdepth}% + \caption@Debug{\string\prevdepth=\caption@tempa}% + \ifdim\prevdepth>-\p@ + #2% position=bottom + \else + #1% position=top + \fi} +\newcommand*\DeclareCaptionAutoPosition{% + \renewcommand*\caption@autoposition[2]}% \DeclareCaptionOption*{config}[caption]{% \InputIfFileExists{#1.cfg}% {\typeout{*** Local configuration file #1.cfg used ***}}% @@ -76,56 +107,22 @@ }}} \DeclareCaptionOption{list-entry}{\caption@selectlistentry{#1}} \captionsetup{list-entry=default} -\newcommand\caption@declparboxrestore{% - \caption@decl{parboxrestore}} -\@onlypreamble\caption@declparboxrestore -\newcommand*\caption@setparboxrestore{% - \caption@set{parboxrestore}} -\caption@declparboxrestore{full}{% - \@parboxrestore} -\caption@declparboxrestore{partial}{% - \let\if@nobreak\iffalse - \let\if@noskipsec\iffalse - \let\par\@@par - \parindent\z@ \parskip\z@skip - \everypar{}% - \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip - \parfillskip\@flushglue \lineskip\normallineskip - \baselineskip\normalbaselineskip - \sloppy - \let\\\@normalcr} -\caption@declparboxrestore{mini}{% - \let\par\@@par - \parindent\z@ \parskip\z@skip - \sloppy} -\SetCaptionDefault{parboxrestore}{full} -\DeclareCaptionOption{parboxrestore}{\caption@setparboxrestore{#1}} -\captionsetup{parboxrestore=default} \DeclareCaptionOption{@minipage}{% \caption@ifinlist{#1}{auto,default}% {\let\caption@if@minipage\@gobbletwo}% {\caption@set@bool\caption@if@minipage{#1}}} \captionsetup{@minipage=default} -\DeclareCaptionOption{compatibility}[v1]{% - \caption@ifinlist{#1}{v1,1,true,yes,on}{% - \let\caption@ifcompatibility\@firstoftwo - }{\caption@ifinlist{#1}{v3,3,0,false,no,off}{% - \let\caption@ifcompatibility\@secondoftwo +\DeclareCaptionOption{compatibility}[1]{% + \caption@ifinlist{#1}{1,true,yes,on}{% + \caption@Error{% + Obsolete compatibility value `#1',\MessageBreak + please use either \string\usepackage{caption}[=v1]\MessageBreak + or \string\usepackage{caption-light} instead}% + }{\caption@ifinlist{#1}{0,false,no,off}{% + % nothing to do }{% \caption@Error{Undefined compatibility value `#1'}% }}} -\@onlypreamble@key{caption}{compatibility} -\caption@setbool{compatibility}{0} % default: Try not to be compatible to v1.x -\newcommand*\caption@setincompatible[2]{% - #1{% - \caption@WarningNoLine{% - #2;\MessageBreak - Setting compatibility to v1}% - \caption@setbool{compatibility}{1}% - }{}} -\caption@AtBeginDocument{\caption@ifcompatibility{}{% - \caption@setincompatible{\@ifpackageloaded{captcont}}{captcont package is loaded}% -}} \DeclareCaptionOptionNoValue*{normal}{% \caption@setup{format=plain,justification=justified}} \DeclareCaptionOptionNoValue*{isu}{% @@ -186,6 +183,16 @@ \caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}} \caption@ProcessOptions*{caption} \newcounter{caption@flags} +\newcommand*\caption@clrflags{% + \setcounter{caption@flags}{0}} +\newcommand*\caption@ifflags{% + \ifcase\c@caption@flags + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi} +\newcommand*\caption@setflag[1]{% + \caption@ifflag{#1}{}{\addtocounter{caption@flags}{#1}}} \newcommand*\caption@ifflag[1]{% \@tempcnta\c@caption@flags \divide\@tempcnta #1\relax @@ -194,22 +201,24 @@ \else \expandafter\@secondoftwo \fi} -\newcommand*\caption@clrflags{% - \setcounter{caption@flags}\z@} -\newcommand*\caption@clrflag[1]{% - \caption@ifflag{#1}{\caption@addtoflags{-#1}}{}} -\newcommand*\caption@setflag[1]{% - \caption@ifflag{#1}{}{\caption@addtoflags{#1}}} -\newcommand*\caption@addtoflags{% - \addtocounter{caption@flags}} +\newcommand*\caption@setcontinued{\caption@setflag1} +\newcommand*\caption@ifcontinued{\caption@ifflag1} +\newcommand*\caption@setcaption{\caption@setflag2} +\newcommand*\caption@ifcaption{\caption@ifflag2} +\newcommand*\caption@setsubcaption{% + \caption@ifcaption{\caption@setflag8}{\caption@setflag4}} +\newcommand*\caption@ifsubcaption@above{\caption@ifflag4} +\newcommand*\caption@ifsubcaption@below{\caption@ifflag8} \def\caption@caption{% \caption@iftype {\caption@checkgrouplevel\@empty\caption \caption@star {\caption@refstepcounter\@captype}% {\caption@dblarg{\@caption\@captype}}}% - {\caption@Error{\noexpand\caption outside float}% - \caption@gobble}} + {\caption@OutsideFloat\caption + \caption@withoptargs\@gobbletwo}} +\newcommand*\caption@OutsideFloat[1]{% + \caption@Error{\string#1 outside float}} \newcommand*\caption@star[2]{% \@ifstar{\caption@startrue#2[]}{#1#2}} \long\def\caption@@caption#1[#2]#3{% @@ -219,6 +228,7 @@ \@nameuse{nag@hascaptiontrue}% \fi \par + \caption@nobreak \caption@beginex{#1}{#2}{#3}% \caption@setfloatcapt{% \caption@parboxrestore @@ -231,6 +241,7 @@ \fi \@makecaption{\csname fnum@#1\endcsname}% {\ignorespaces\caption@makeanchor{#3}}\par + \caption@nobreak \caption@if@minipage\@minipagetrue\@minipagefalse}% \caption@end} \providecommand\memcaptioninfo[4]{} @@ -239,10 +250,22 @@ \caption@ifhypcap\caption@@start\relax \M@gettitle{#2}} \providecommand\M@gettitle[1]{} +\newcommand*\caption@nobreak{} +\newcommand*\caption@parboxrestore{% + \caption@before@parboxrestore + \caption@@parboxrestore + \caption@after@parboxrestore} +\newcommand*\caption@before@parboxrestore{} +\newcommand*\caption@@parboxrestore{\@parboxrestore} +\newcommand*\caption@after@parboxrestore{} \long\def\caption@makecaption#1#2{% + \caption@nobreak \caption@make@above + \caption@nobreak \caption@@make{#1}{#2}% - \caption@make@below} + \caption@nobreak + \caption@make@below + \caption@nobreak} \newcommand*\caption@make@above{% \caption@iftop \caption@belowskip @@ -251,49 +274,28 @@ \caption@iftop {\caption@aboveskip\caption@rule}% \caption@belowskip} -\newcommand*\caption@redefine{} -\g@addto@macro\caption@redefine{% - \caption@ifcompatibility{% - \caption@InfoNoLine{ - \noexpand\caption will not be redefined since `compatibility' is set to v1}% - \renewcommand*\caption@redefine{}% - \renewcommand*\caption@continuedfloat[1]{% - \caption@Error{Not available with option `compatibility=v1'}}% - \caption@AtBeginDocument*{% - \let\caption@start\relax - \caption@ifdefined\caption@ORI@capstart{% - \caption@Debug{% - Restore hypcap definition of \string\capstart\@gobble}% - \let\capstart\caption@ORI@capstart}{}% - }% - \renewcommand*\caption@star[2]{#1#2}% - }{% - \renewcommand*\caption@redefine{% - \let\caption\caption@caption - \let\@caption\caption@@caption}% - }% - \caption@redefine - \caption@AtBeginDocument*{% - \let\caption@ORI@capstart\@undefined}% +\newcommand*\caption@redefine{% + \let\caption\caption@caption + \let\@caption\caption@@caption \let\caption@ORI@xfloat\@xfloat - \def\@xfloat#1[#2]{% - \caption@ORI@xfloat{#1}[#2]% - \caption@settype{#1}% - \caption@xfloat@hook}% - \newcommand*\caption@xfloat@hook{}% + \let\@xfloat\caption@xfloat \let\caption@ORI@xdblfloat\@xdblfloat - \def\@xdblfloat#1[#2]{% - \caption@ORI@xdblfloat{#1}[#2]% expands to \@xfloat{#1}[#2] + extra stuff - \caption@setoptions{#1*}% - \caption@xdblfloat@hook}% - \newcommand*\caption@xdblfloat@hook{}% + \let\@xdblfloat\caption@xdblfloat } -\caption@AtBeginDocument{\caption@redefine} +\caption@AtBeginDocument{% + \caption@redefine + \let\caption@redefine\relax} \let\@makecaption\caption@makecaption -\newcommand\phantomcaption{% - \caption@iftype - {\caption@refstepcounter\@captype}% - {\caption@Error{\noexpand\phantomcaption outside float}}}% +\def\caption@xfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}% + \caption@xfloat@hook} +\newcommand*\caption@xfloat@hook{} +\def\caption@xdblfloat#1[#2]{% + \caption@ORI@xdblfloat{#1}[#2]% expands to \@xfloat{#1}[#2] + extra stuff + \caption@setoptions{#1*}% + \caption@xdblfloat@hook} +\newcommand*\caption@xdblfloat@hook{} \caption@AtBeginDocument{% \DeclareCaptionOption{type}{\setcaptiontype{#1}}% \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}% @@ -301,25 +303,34 @@ \DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}% } \def\setcaptiontype{% - \caption@parboxrestore@mini + \caption@parboxrestore@light \caption@settype} -\newcommand\setcaptionsubtype{% - \caption@iftype - \caption@setsubtype - {\caption@Error{\noexpand\setcaptionsubtype outside float}}}% -\newcommand\caption@setsubtype{% - \caption@teststar\caption@@setsubtype\@firstoftwo\@secondoftwo} -\newcommand*\caption@@setsubtype[1]{% - \caption@@@settype{sub}{#1}{sub\@captype}} \newcommand*\caption@settype{% + \caption@initposition \caption@clrflags - \caption@set@type} -\newcommand*\caption@set@type{% - \caption@teststar\caption@@settype\@firstoftwo\@secondoftwo} + \aftergroup\flushsubcaptionlistentries + \caption@@settype} \newcommand*\caption@@settype{% - \caption@@@settype{}} + \caption@teststar\caption@@settype@\@firstoftwo\@secondoftwo} +\newcommand*\caption@@settype@[1]{% + \@ifnextchar[%] + {\caption@@settype@@{#1}}% + {\caption@@@settype{}{#1}}} +\def\caption@@settype@@#1[#2]#3{% + \caption@@@settype{}{#1}{#3}% + \caption@setoptions{#2}} +\newcommand*\setcaptionsubtype{% + \caption@setsubtype} +\newcommand*\caption@setsubtype{% used by the floatrow package + \caption@teststar\caption@@setsubtype\@firstoftwo\@secondoftwo} +\newcommand*\caption@@setsubtype[1]{% + \caption@iftype + {\caption@ifsubtype + {\caption@Debug{subtype=\@subcaptype}}% + {\caption@@@settype{sub}{#1}{sub\@captype}}}% + {\caption@OutsideFloat\setcaptionsubtype}} \newcommand*\caption@@@settype[3]{% - \caption@Debug{#1type=#3}% + \caption@Debug{#1type:=#3}% \@nameuse{caption@check#1type}{#3}% {\caption@checkgrouplevel{#1}{% \captionsetup{#1type#2*\@empty=...}#2{ or @@ -338,21 +349,26 @@ The #1type was already set to `\csname @#1captype\endcsname'\MessageBreak}}% \fi - #2{}{% - \let\@currentlabel\caption@undefinedlabel - \ifx\caption@x@label\@undefined - \let\caption@x@label\label - \let\label\caption@xlabel - \fi - \caption@start}}} + #2{}{\caption@reset@currentlabel\caption@start}}} +\newcommand*\caption@parboxrestore@light{% + \let\par\@@par + \parindent\z@ \parskip\z@skip + \sloppy} +\newcommand*\caption@reset@currentlabel{% + \let\@currentlabel\caption@undefinedlabel + \ifx\caption@x@label\@undefined + \let\caption@x@label\label + \let\label\caption@xlabel + \fi} \newcommand*\caption@iftype{\caption@ifdefined\@captype} +\newcommand*\caption@ifsubtype{\caption@ifdefined\@subcaptype} \newcommand*\caption@checktype[1]{% - \caption@ifsubtype{#1}\@firstoftwo{\caption@ifin@list\sf@counterlist{#1}}% + \caption@ifdefined@subtype{#1}\@firstoftwo{\caption@ifin@list\sf@counterlist{#1}}% {\caption@Error{Should not be used with subtype `#1'}% \@gobble}% \@firstofone} \newcommand*\caption@checksubtype[1]{% - \caption@ifsubtype{#1}% + \caption@ifdefined@subtype{#1}% \@firstofone {\caption@ifin@list\sf@counterlist{#1}% {\caption@Warning{% @@ -395,17 +411,68 @@ \caption@AtBeginDocument{% \def\captionof{\caption@teststar\caption@of{\caption*}\caption}} \providecommand*\caption@of[2]{\setcaptiontype*{#2}#1} +\newcommand*\phantomcaption{% + \caption@iftype + {\caption@refstepcounter\@captype}% + {\caption@OutsideFloat\phantomcaption}} \newcommand*\captionlistentry{% - \caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo} -\newcommand*\@captionlistentry[1]{% - \@testopt{\caption@listentry{#1}}\@captype} -\def\caption@listentry#1[#2]#3{% + \caption@teststar\caption@listentry\@firstoftwo\@secondoftwo} +\newcommand*\caption@listentry[1]{% + \@ifnextchar[%] + {\caption@listentry@{#1}}% + {\caption@@listentry{#1}}} +\def\caption@listentry@#1[#2]{% + \caption@@@listentry{#1}{#2}{\caption@refstepcounter@}} +\newcommand*\caption@@listentry[1]{% + \caption@iftype + {\caption@@@listentry{#1}{\@captype}{\caption@refstepcounter}}% + {\caption@OutsideFloat\captionlistentry + \@gobble}} +\newcommand*\caption@@@listentry[4]{% \@bsphack - #1{\caption@gettitle{#3}}% - {\caption@refstepcounter{#2}% - \caption@makecurrent{#2}{#3}}% - \caption@addcontentsline{#2}{#3}% + #1{\caption@gettitle{#4}}% + {#3{#2}\caption@makecurrent{#2}{#4}}% + \caption@addcontentsline{#2}{#4}% \@esphack} +\newcommand*\captiontext{% + \caption@iftype + {\caption@text\@captype}% + {\caption@OutsideFloat\captiontext + \caption@withoptargs\@gobbletwo}} +\newcommand*\caption@text[1]{% + \caption@teststar{\caption@@text{#1}}\caption@@@make\caption@@make} +\newcommand*\caption@@text[2]{% + \kernel@ifnextchar[%] + {\caption@@@text{#1}#2\@iden}% + {\caption@@@text{#1}#2\@gobble[0]}} +\long\def\caption@@@text#1#2#3[#4]#5{% + \begingroup + #3{\csname c@#1\endcsname #4\relax}% + #2{\caption@fnum{#1}}{#5}% + \endgroup} +\newenvironment{captiongroup}{\setcaptiontype}{} +\newenvironment{captiongroup*}{\setcaptiontype*}{} +\newcommand*\caption@minipage{% + \@testopt\caption@iminipage b} +\def\caption@iminipage[#1]{% + \caption@withoptargs{\caption@iiminipage{#1}}} +\newcommand*\caption@iiminipage[3]{% + \let\caption@endminipage@hook\@empty + \if#1B% + \minipage[b]#2{#3}% + \def\caption@endminipage@hook{\vspace{0pt}}% + \else\if#1T% + \minipage[t]#2{#3}% + \vspace{0pt}% + \else + \minipage[#1]#2{#3}% + \fi\fi + \@floatboxreset + \setcaptiontype} +\newcommand*\caption@endminipage{% + \caption@endminipage@hook + \endminipage} +\newenvironment{captionblock}{\caption@minipage}{\caption@endminipage} \newcommand*\captionbox{% \caption@withoptargs{\caption@ibox\@gobble}} \newcommand\caption@ibox[3]{% @@ -420,56 +487,64 @@ \long\def\caption@iiibox#1{% \caption@iiiibox{#1}\vbox\vtop} \long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{% - \begingroup - #1*% set \caption@position - \caption@iftop{% - \endgroup - \parbox[t]{#6}{% - #1\relax - \caption@setposition t% - #2{\caption#4{#5}}% - \captionbox@hrule - \csname caption@justification@#7\endcsname - #8}% - }{% - \endgroup - \parbox[b]{#6}{% - #1\relax - \caption@setposition b% - \csname caption@justification@#7\endcsname - #8% - \captionbox@hrule - #3{\caption#4{#5}}}% - }} + \caption@checkdecl{justification}{#7}{% + \begingroup + #1*% set \caption@position + \caption@iftop{% + \endgroup + \parbox[t]{#6}{% + #1\relax + \caption@setposition t% + #2{\caption#4{#5}}% + \captionbox@hrule + \csname caption@justification@#7\endcsname + #8}% + }{% + \endgroup + \parbox[b]{#6}{% + #1\relax + \caption@setposition b% + \csname caption@justification@#7\endcsname + #8% + \captionbox@hrule + #3{\caption#4{#5}}}% + }}} \newcommand*\captionbox@innerpos@default{c} \newcommand*\captionbox@hrule{\hrule\@height\z@\relax} \providecommand*\caption@justification@c{\centering} \providecommand*\caption@justification@l{\raggedright} \providecommand*\caption@justification@r{\raggedleft} \providecommand*\caption@justification@s{} -\def\continuedfloat{% - \caption@iftype - {\caption@continuedfloat\@captype}% - {\caption@Error{\noexpand\continuedfloat outside float}}} -\newcommand*\caption@continuedfloat[1]{% - \@ifstar - {\caption@@refstepcounter\@captype - \caption@@continuedfloat{#1}}% - {\caption@continued@float{#1}}} -\newcommand*\caption@continued@float[1]{% - \edef\caption@tempa{#1}% - \ifx\caption@tempa\caption@CFtype - \caption@@continuedfloat{#1}% +\newcounter{continuedfloat} +\let\c@ContinuedFloat\c@continuedfloat % defined for compatibility reasons +\def\thecontinuedfloat{\theContinuedFloat} +\let\theContinuedFloat\@empty % defined for compatibility reasons +\newcommand*\continuedfloat@captype{??} +\newcommand*\caption@reset@continuedfloat[1]{% + \xdef\continuedfloat@captype{#1}% + \@stpelt{continuedfloat}} +\newcommand*\caption@set@continuedfloat{% + \ifx\@captype\continuedfloat@captype + \stepcounter{continuedfloat}% + \expandafter\@firstoftwo \else - \caption@Error{Continued `#1' after `\caption@CFtype'}% + \caption@Error{Continued `\@captype' after `\continuedfloat@captype'}% + \expandafter\@secondoftwo \fi} +\def\continuedfloat{% + \caption@teststar\caption@continuedfloat\@firstoftwo\@secondoftwo} +\newcommand*\caption@continuedfloat[1]{% + \caption@iftype + {#1{\caption@@refstepcounter\@captype}{}% + \caption@@continuedfloat\@captype}% + {\caption@OutsideFloat\continuedfloat}} \newcommand*\caption@@continuedfloat{% - \caption@setflag1% continued float - \caption@@@continuedfloat} -\newcommand*\caption@@@continuedfloat{% - \stepcounter{continuedfloat}% - \caption@@@@continuedfloat} -\newcommand*\caption@@@@continuedfloat[1]{% + \caption@clrflags + \caption@set@continuedfloat + {\caption@setcontinued + \caption@@@continuedfloat}% + {\@gobble}} +\newcommand*\caption@@@continuedfloat[1]{% \caption@setoptions{ContinuedFloat}% for compatibility reasons \caption@setoptions{continuedfloat}% \caption@setoptions{continued#1}% @@ -477,65 +552,78 @@ \@ifundefined{theH#1}{}{% \expandafter\l@addto@macro\csname theH#1\endcsname{% \@alph\c@continuedfloat}}% - \let\caption@@@@continuedfloat\@gobble} -\newcommand*\caption@CFtype{??} -\newcounter{continuedfloat} -\let\c@ContinuedFloat\c@continuedfloat % defined for compatibility reasons -\def\thecontinuedfloat{\theContinuedFloat} -\let\theContinuedFloat\@empty % defined for compatibility reasons -\newcommand*\caption@reset@continuedfloat[1]{% - \xdef\caption@CFtype{#1}% - \@stpelt{continuedfloat}} + \let\caption@@@continuedfloat\@gobble} \def\ContinuedFloat{\continuedfloat} % defined for compatibility reasons \def\caption@ContinuedFloat{% - \let\caption@reset@continuedfloat\@gobble - \caption@@@continuedfloat} -\newcommand*\caption@refstepcounter[1]{% - \@ifundefined{c@#1}% - {\caption@Error{No float type '#1' defined}}% - {\caption@ref@stepcounter{#1}% - \caption@fixposition % TODO: Make this independant on the "position" setting - \caption@iftop\caption@setflag\caption@clrflag2% caption - \caption@clrflag4% subcaption - \@nameuse{donemaincaptiontrue}}} -\newcommand*\caption@ref@stepcounter{% - \caption@ifflag1{% continued float - \let\caption@tempa\caption@@refcounter - \caption@clrflag1% continued float - }{% - \let\caption@tempa\caption@@refstepcounter - \caption@ifflag2{}{% caption - \caption@ifflag4{% subcaption - % Counter was already incremented by content, so we suppress \stepcounter{#1} here - \let\caption@tempa\caption@@refcounter - }{}% - }% - }% - \caption@tempa} + \caption@set@continuedfloat\caption@@@continuedfloat\@gobble} +\providecommand*\nextfloat{% + \caption@teststar\caption@nextfloat\@firstoftwo\@secondoftwo} +\newcommand*\caption@nextfloat[1]{% + \caption@iftype + {\caption@@nextfloat\@captype + #1{}{\caption@reset@currentlabel\caption@start}}% + {\caption@OutsideFloat\nextfloat}} +\newcommand*\caption@@nextfloat[1]{% + \flushsubcaptionlistentries + \caption@clrflags + \ifx\caption@@@continuedfloat\@gobble + % next continued float + \caption@set@continuedfloat\caption@setcontinued\relax + \fi} +\newcommand*\caption@refstepcounter{% + \@nameuse{donemaincaptiontrue}% Support of the memoir document class + \caption@ifrefstepcounter\caption@@refstepcounter\caption@@refcounter} +\newcommand*\caption@@refstepcounter[1]{% + \caption@prepare@stepcounter{#1}% + \caption@refstepcounter@{#1}} \newcommand*\caption@@refcounter[1]{% \let\caption@stepcounter@ORI\stepcounter \def\stepcounter##1{% \edef\caption@tempa{#1}% \edef\caption@tempb{##1}% - \ifx\caption@tempa\caption@tempb \else + \ifx\caption@tempa\caption@tempb + % Suppress incrementation of counter + \else \caption@stepcounter@ORI{##1}% \fi}% - \caption@@@refstepcounter{#1}% - \let\stepcounter\caption@stepcounter@ORI} -\newcommand*\caption@@refstepcounter[1]{% - \caption@prepare@stepcounter{#1}{ref}% - \caption@@@refstepcounter{#1}} + \caption@refstepcounter@{#1}% + \let\stepcounter\caption@stepcounter@ORI} +\newcommand*\caption@refstepcounter@{\refstepcounter} +\newcommand*\caption@stepcounter{% + \caption@ifstepcounter\caption@@stepcounter\caption@@counter} \newcommand*\caption@@stepcounter[1]{% - \caption@prepare@stepcounter{#1}{}% - \caption@@@stepcounter{#1}} -\newcommand*\caption@prepare@stepcounter[2]{% - \caption@addsubcontentslines{#2stepcounter}% - \caption@reset@continuedfloat{#1}} -\newcommand*\caption@@@refstepcounter{\refstepcounter} -\newcommand*\caption@@@stepcounter{\stepcounter} + \caption@prepare@stepcounter{#1}% + \caption@stepcounter@{#1}} +\newcommand*\caption@@counter[1]{} % nothing to do +\newcommand*\caption@stepcounter@{\stepcounter} +\newcommand*\caption@prepare@stepcounter{% + \caption@addsubcontentslines\relax + \caption@reset@continuedfloat} +\newcommand*\caption@ifrefstepcounter{% + \caption@ifcounter + {\caption@ifcaption}% + {\caption@ifsubcaption@below{\caption@iftop\@secondoftwo\@firstoftwo}{\@secondoftwo}}% + {\caption@setcaption}} +\newcommand*\caption@ifstepcounter{% + \caption@ifcounter + {\caption@ifcaption\caption@ifsubcaption@above\@secondoftwo}% + {\caption@iftop}% + {\caption@setsubcaption}} +\newcommand*\caption@ifcounter[3]{% + \caption@ifflags + {#1% + {#2\caption@Warning\@gobble{Ambiguous sub-caption(s), use \string\nextfloat}% + \caption@clrflags + \let\caption@next\@firstoftwo}% + {\let\caption@next\@secondoftwo}}% + {\let\caption@next\@firstoftwo}% + #3% + \caption@next} \@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{} \newcommand\caption@dblarg[1]{% - \kernel@ifnextchar[{\caption@ydblarg{#1}}{\caption@xdblarg{#1}}} + \kernel@ifnextchar[%] + {\caption@ydblarg{#1}}% + {\caption@xdblarg{#1}}} \newcommand\caption@xdblarg[2]{% #1[{#2\relax}]{#2}} \long\def\caption@ydblarg#1[#2]#3{% @@ -551,11 +639,6 @@ \caption@ifempty{#3}{}} \newcommand*\caption@end{% \endgroup} -\newcommand*\caption@setfnum[1]{% - \@ifundefined{caption@fnum@#1}% - {\expandafter\let\csname caption@fnum@#1\expandafter\endcsname\csname fnum@#1\endcsname - \@namedef{fnum@#1}{\caption@fnum{#1}}}% - {}} \newcommand*\caption@normalsize{% \caption@font@normal\@unused} \let\caption@setfloatcapt\@firstofone @@ -572,18 +655,11 @@ \newcommand*\caption@subtypehook{% \ifx\caption\caption@subcaption \else \caption@warmup - \caption@ifflag2{}{% caption - \let\caption@add@contentsline\caption@addsubcontentsline - \let\caption@addsubcontentslines\@gobble - \caption@ifflag4{}{% subcaption - \caption@ifflag1{% continued float - \caption@clrflag1% - }{% - \caption@@stepcounter\@captype - }% - \caption@setflag4% subcaption - }% - }% + \caption@stepcounter\@captype + \caption@ifcaption + {}% + {\let\caption@add@contentsline\caption@addsubcontentsline + \let\caption@addsubcontentslines\@gobble}% \c@continuedfloat=0\relax \let\caption@setfloatcapt\@firstofone \let\caption@chkfloat\@gobbletwo @@ -604,7 +680,8 @@ \let\@caption\caption@@caption \let\phantomcaption\caption@subphantom \let\captionlistentry\caption@sublistentry - \let\caption@refstepcounter\caption@@@refstepcounter + \let\captiontext\caption@subtext + \let\caption@refstepcounter\caption@refstepcounter@ \if@subfloatrow \caption@Debug{Keeping \string\@makecaption}% \else @@ -632,7 +709,9 @@ \newcommand*\caption@sublistentry{% \caption@teststar\@subcaptionlistentry\@firstoftwo\@secondoftwo} \newcommand*\@subcaptionlistentry[1]{% - \@testopt{\caption@listentry{#1}}\@subcaptype} + \@testopt{\caption@listentry{#1}}{\@subcaptype}} +\newcommand*\caption@subtext{% + \caption@text\@subcaptype} \newcommand*\caption@clearsubcontentslines{% \global\let\caption@subcontentslines\@empty} \caption@clearsubcontentslines @@ -651,24 +730,13 @@ \noexpand\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}% \@tempa} \newcommand*\flushsubcaptionlistentries{% - \caption@addsubcontentslines{user}} + \caption@addsubcontentslines\relax} \renewcommand*\caption@addsubcontentslines[1]{% - \caption@Debug{\string\flushsubcaptionlistentries (#1)}% + \caption@Debug{\string\flushsubcaptionlistentries}% \begingroup \caption@subcontentslines \endgroup \caption@clearsubcontentslines} -\AtBeginDocument{% - \caption@ifdefined\chapter{% - \let\caption@chapter@ORI\chapter - \def\chapter{% - \caption@addsubcontentslines{chapter}\caption@chapter@ORI}}{}% - \caption@ifdefined\appendix{% - \let\caption@appendix@ORI\appendix - \def\appendix{% - \caption@addsubcontentslines{appendix}\caption@appendix@ORI}}{}% - \caption@addsubcontentslines{AtEndDocument}% -} \caption@IfBabelArabi{% \let\@makecaption\caption@makecaption \def\fnum@figure{\figurename\nobreakspace\thefigure}% @@ -719,7 +787,7 @@ }{\@secondoftwo}} \@onlypreamble\caption@If@Package@Loaded \newcommand*\caption@clearmargin{% - \setcaptionmargin\z@ + \caption@setmargin\z@ \let\caption@minmargin\@undefined} \caption@setbool{needfreeze}{0} \caption@AtBeginDocument*{% @@ -731,22 +799,21 @@ \newcommand*\caption@freeze{% \let\caption@frozen@continuedfloat\continuedfloat \def\continuedfloat{% - \caption@@freeze{\caption@@@@continuedfloat\@captype}% + \caption@@freeze{\caption@@@continuedfloat\@captype}% \caption@frozen@continuedfloat}% + \let\caption@frozen@nextfloat\nextfloat + \def\nextfloat{\caption@freeze@error}% \let\caption@frozen@setup\caption@setup \def\caption@setup##1{% \caption@@freeze{\caption@setup{##1}}% \caption@frozen@setup{##1}}% \let\caption@frozen@caption\caption \def\caption{% - \def\caption{% - \caption@Error{% - Only one \noexpand\caption can be placed in this environment}% - \caption@gobble}% + \def\caption{\caption@freeze@error\caption@gobble}% \@ifstar - {\caption@SC@caption*}% - {\let\@currentlabel\caption@SClabel - \caption@withoptargs\caption@SC@caption}}% + {\caption@SC@caption*}% + {\let\@currentlabel\caption@SClabel + \caption@withoptargs\caption@SC@caption}}% \long\def\caption@SC@caption##1##2{% \caption@@freeze{\caption##1{##2}}% \ignorespaces}% @@ -769,11 +836,14 @@ \g@addto@macro\caption@frozen@content}% \def\caption@warmup{% \let\continuedfloat\caption@frozen@continuedfloat + \let\nextfloat\caption@frozen@nextfloat \let\caption@setup\caption@frozen@setup \let\caption\caption@frozen@caption \let\label\caption@frozen@label}}% + \newcommand*\caption@freeze@error{% + \caption@Error{Only one \noexpand\caption can be placed in this environment}} \newcommand*\caption@prepare@defrost{% - \let\caption@settype\caption@set@type} + \let\caption@settype\caption@@settype} \newcommand*\caption@defrost{% \ifx\caption@frozen@caption\@undefined \caption@frozen@content @@ -789,7 +859,8 @@ \newdimen\caption@adjustwidth@linewidth \providecommand*\caption@set@adjustwidth{% \caption@adjustwidth@hsize\hsize - \caption@adjustwidth@linewidth\linewidth}% + \caption@adjustwidth@linewidth\linewidth + \l@addto@macro\caption@before@parboxrestore\caption@test@adjustwidth}% \providecommand*\caption@patch@changepage[1]{% \expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname \expandafter\renewcommand\csname #1\endcsname[2]{% @@ -804,7 +875,6 @@ \hsize=\linewidth \fi \fi}% - \AtBeginCaption{\caption@test@adjustwidth}% }{}% \caption@IfPackageLoaded{chkfloat}[2012/08/19 v0.1]{% \caption@ifdefined\chkfloat@addcontentsline{% @@ -835,13 +905,13 @@ \caption@float@setname{#1}% \caption@freezeHref % will be defrosted in \float@makebox \caption@ORI@float@setevery{#1}}% - \caption@AtBeginDocument{\caption@ifcompatibility{}{% + \caption@AtBeginDocument{% \caption@ifdefined\HyOrg@float@makebox {\let\caption@ORI@float@makebox\HyOrg@float@makebox}% {\let\caption@ORI@float@makebox\float@makebox}% \renewcommand\float@makebox[1]{% \caption@ORI@float@makebox{#1\relax \caption@defrostHref}}% - }}% + }% \newcommand*\caption@float@setname[1]{% \expandafter\ifx\csname #1name\endcsname\relax \expandafter\let\csname #1name\expandafter\endcsname\csname fname@#1\endcsname @@ -883,7 +953,6 @@ \newcommand*\caption@floatflt[1]{% \caption@settype{#1}% \caption@clearmargin - \caption@setparboxrestore{full}% \caption@setoptions{floating#1}}% }{} \caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% @@ -952,8 +1021,8 @@ Hyperref support is turned off\MessageBreak because hyperref has stopped early}% }{% - \g@addto@macro\caption@prepareslc{\measuring@true}% - \renewcommand*\caption@@@refstepcounter{\H@refstepcounter}% + \AtCaptionSingleLineCheck{\measuring@true}% + \renewcommand*\caption@refstepcounter@{\H@refstepcounter}% \renewcommand*\caption@makecurrent[2]{% \caption@makecurrentHref{#1}% \caption@Debug{hyperref current=\@currentHref}% @@ -969,7 +1038,7 @@ \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% }#1% \fi}% - \g@addto@macro\caption@prepareslc{\let\caption@makeanchor\@firstofone}% + \AtCaptionSingleLineCheck{\let\caption@makeanchor\@firstofone}% \newif\if@capstart \def\caption@start{\caption@ifhypcap\caption@start@\relax}% \def\caption@start@{% @@ -1034,7 +1103,6 @@ }}{} \caption@IfPackageLoaded{hypcap}{% v1.0 \ifx\caption@start\relax \else % hyperref hasn't stopped early - \let\caption@ORI@capstart\capstart % save for compatibility mode \caption@ifundefined\capstarttrue % check for v1.10 of hypcap package {\def\capstart{\caption@start@}}% {\def\capstart{\ifcapstart\caption@start@\fi}}% @@ -1047,7 +1115,7 @@ \caption@setbool{lst@Init}{0}% \lst@AddToHook{Init}{\caption@setbool{lst@Init}{1}}% \let\caption@ORI@lst@MakeCaption\lst@MakeCaption - \def\lst@MakeCaption#1{% #1 is `t' or `b' + \renewcommand*\lst@MakeCaption[1]{% #1 is `t' or `b' \begingroup \caption@iflst@Init{}{% \edef\caption@lst@leftskip{\noexpand\hskip-\the\@totalleftmargin\noexpand\relax}% @@ -1060,6 +1128,12 @@ \caption@setup{rule=0}% \caption@setoptions{lstlisting}% \caption@setautoposition{#1}% + \ifx\lst@@caption\@empty \else + \let\caption@ORI@addcontentsline\addcontentsline + \renewcommand*\addcontentsline[3]{% + \let\addcontentsline\caption@ORI@addcontentsline + \caption@addcontentsline{lstlisting}{\lst@@caption}}% + \fi \caption@begin{lstlisting}% \caption@ORI@lst@MakeCaption{#1}% \caption@end @@ -1096,7 +1170,7 @@ %% \let\Hy@LT@currentHlabel\@currentHlabel %% \let\@currentHlabel\Hy@LT@currentHlabel \def\continuedfloat{\noalign{% - \caption@Error{\noexpand\continuedfloat outside float}}}% + \caption@OutsideFloat\continuedfloat}}% \let\bicaption\LT@bicaption }% \def\LT@capti@n{% @@ -1109,7 +1183,7 @@ \caption@LT@setup \caption@setautoposition{\ifcase\LT@rows t\else b\fi}% \caption@startrue#1\caption@starfalse - \caption@prepare@stepcounter\LTcaptype{LT}% + \caption@prepare@stepcounter\LTcaptype \caption@begin\LTcaptype \caption@normalsize \vskip-\ht\strutbox @@ -1127,7 +1201,7 @@ \newcommand*\caption@LT@settype[1]{% \caption@settype*{#1}% \ifdim\LTcapwidth=4in \else - \setcaptionwidth\LTcapwidth + \caption@setwidth\LTcapwidth \fi \caption@setoptions{longtable}% \caption@setoptions{@longtable}}% @@ -1160,15 +1234,16 @@ \let\@makecaption\caption@@make \caption@setautoposition b% \caption@settype{#1}% - \caption@clearmargin - \caption@setparboxrestore{full}}% + \caption@clearmargin}% \newcommand\caption@wincaption[1]{% \ifdim\picwd=\z@ \let\caption@makecurrent\@gobbletwo \let\caption@@start\relax \caption@prepareslc \else - \caption@setflag1% + % don't increment the figure or table counter again + \caption@clrflags + \caption@setcontinued \fi \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% \if\@tempa*% @@ -1197,8 +1272,7 @@ \long\def\caption[##1]##2{% \caption@freezeHref % will be defrosted in \ivparpic \caption@settype\@piccaptype - \caption@clearmargin - \caption@setparboxrestore{full}% + \caption@clearmargin \caption@setoptions{parpic}% \caption@setautoposition b% \expandafter\expandafter\expandafter\caption@ORI @@ -1226,8 +1300,8 @@ \caption@teststar\caption@of{\rotcaption*}\rotcaption}% \long\def\@makerotcaption#1#2{% \rotatebox{90}{% - \ifdim\captionwidth=\z@ - \setcaptionwidth{.8\vsize}% + \ifdim\caption@width=\z@ + \caption@setwidth{.8\vsize}% \l@addto@macro\caption@singleline{% \caption@setup{parbox=none}}% \fi @@ -1361,7 +1435,7 @@ \@nameuse{fst@#1}% \def\WF@floatstyhook{\let\@currbox\WF@box \global\setbox\WF@box\float@makebox{\wd\WF@box}}}% - \@ifnextchar[\WF@wr{\WF@wr[]}} + \@testopt\WF@wr{}} \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, \gdef\WF@ovh{#1}% hold overhang for later, when \width is known \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% @@ -1374,9 +1448,25 @@ \@ifundefined{fst@#1}{}{\@float@setevery{#1}}% \caption@settype{#1}% \caption@clearmargin -%%% \caption@setoptions{wrap}% +%%% \caption@setoptions{wrap}% \caption@setoptions{wrap#1}}% }{} +\newcommand*\caption@checkcounter[1]{% + \caption@check{\the#1}{\@nameuse{the#1}}} +\newcommand*\caption@check[3]{% + \edef\caption@tempa{#2}% + \edef\caption@tempb{#3}% + \ifx\caption@tempa\caption@tempb + \caption@Info{\string#1 = \caption@tempa}% + \else + \caption@Error{\string#1 = \caption@tempa\space <> \caption@tempb}% + \fi} +\newcommand*\caption@checkref[2]{% + \@ifundefined{r@#1}{}% + {\expandafter\expandafter\expandafter + \caption@@checkref\csname r@#1\endcsname\@nil{#1}{#2}}} +\def\caption@@checkref#1#2\@nil#3#4{% + \caption@check{\ref{#3}}{#1}{#4}} \caption@endtitles@code \let\caption@endtitles@code\@undefined \let\AfterCaptionPackage\@firstofone diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty index 3cd97c1ee5e..16bb991e0bc 100644 --- a/Master/texmf-dist/tex/latex/caption/caption2.sty +++ b/Master/texmf-dist/tex/latex/caption/caption2.sty @@ -6,7 +6,7 @@ %% %% caption2.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,29 +33,22 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption2}[2020/09/28 v2.2f Customising captions (AR)] -\PackageWarning{caption2}{% - ****************************************************\MessageBreak - THIS PACKAGE IS OBSOLETE:\MessageBreak - This package attempts to provide an `caption2'\MessageBreak - package v2.0/2.1 author environment so that OLD\MessageBreak - documents can be successfully processed. It should\MessageBreak - NOT be used for NEW documents! New documents should\MessageBreak - use the regular `caption' package v3.x instead.\MessageBreak - ****************************************************\@gobbletwo}% -\RequirePackage{caption3}[2020/09/28] % needs v2.2a or newer -\let\captionsetup\@undefined -\let\clearcaptionsetup\@undefined -\let\showcaptionsetup\@undefined -\let\DeclareCaptionType\@undefined -\let\DeclareCaptionSubType\@undefined +\providecommand\DeclareRelease[3]{} +\providecommand\DeclareCurrentRelease[2]{} +\DeclareRelease{v2.0}{1995-10-09}{caption2_1995-10-09.sty} +\DeclareRelease{v2.1}{2002-08-03}{caption2_2005-10-03.sty} +\DeclareCurrentRelease{v2.2}{2007-04-09} % 1st version using caption3 +\ProvidesPackage{caption2}[2021/01/20 v2.2i Customising captions (AR)] +\RequirePackage{caption3}[2007/03/04] \newcommand*\captiontwo@Error[2][]{% \PackageError{caption2}{#2}{#1\caption@@eh{caption2}}} +\providecommand*\caption@@eh[1]{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `#1' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} \@ifpackageloaded{caption}{% \captiontwo@Error{% You can't use both, the (current) caption *and*\MessageBreak @@ -64,8 +57,13 @@ }{} \newcommand*\captionlabeldelim{} \newcommand*\captionlabelsep{} +\@ifundefined{captionwidth} + {\let\captionwidth\caption@width} + {} \newcommand*\ifcaptionwidth{\ifdim\captionwidth>\z@} -\let\captionindent\caption@indent +\@ifundefined{captionindent} + {\let\captionindent\caption@indent} + {} \def\ifcaptionlabel{% \ifcaption@star \@tempswafalse @@ -81,6 +79,12 @@ \def\onelinecaptionstrue{\caption@setbool{slc}{1}} \def\onelinecaptionsfalse{\caption@setbool{slc}{0}} \newif\ifignoreLTcapwidth +\providecommand*\setcaptionmargin{% + \setlength\captionwidth\z@ + \setlength\captionmargin} +\providecommand*\setcaptionwidth{% + \setlength\captionmargin\z@ + \setlength\captionwidth} \newcommand*\normalcaptionparams{% \let\captionsize\@empty \renewcommand*\captionfont{\captionsize}% @@ -202,13 +206,15 @@ \DeclareOption{oneline}{\onelinecaptionstrue} \DeclareOption{nooneline}{\onelinecaptionsfalse} \newcommand*\caption@setpackage[1]{\@namedef{caption@pkt@#1}} +\@onlypreamble\caption@setpackage \DeclareOption{float}{% \caption@twozerofalse\caption@setpackage{float}{1}} \DeclareOption{longtable}{% \caption@twozerofalse\caption@setpackage{longtable}{1}} \DeclareOption{subfigure}{% \caption@twozerofalse\caption@setpackage{subfigure}{1}} -\DeclareOption{none}{\caption@twozerofalse +\DeclareOption{none}{% + \caption@twozerofalse \caption@setpackage{float}{0}\caption@setpackage{longtable}{0}% \caption@setpackage{subfigure}{0}} \DeclareOption{all}{\ExecuteOptions{float,longtable,subfigure}} @@ -216,7 +222,6 @@ \DeclareOption{ruled}{\caption@ruledtrue} \DeclareOption{boxed}{} \DeclareOption{ignoreLTcapwidth}{\ignoreLTcapwidthtrue} -\DeclareOption{debug}{\caption@setup{debug}} \newif\ifcaption@twozero \normalcaptionparams \ExecuteOptions{none,normal} @@ -227,9 +232,9 @@ \fi \def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}} \newcommand*\caption@of[2]{\def\@captype{#2}#1} -\caption@ifundefined\abovecaptionskip{% +\@ifundefined{abovecaptionskip}{% \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} -\caption@ifundefined\belowcaptionskip{% +\@ifundefined{belowcaptionskip}{% \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} \newdimen\captionlinewidth \newdimen\realcaptionwidth @@ -256,7 +261,7 @@ \fi \fi\next} \newcommand*\usecaptionstyle[1]{% - \caption@ifundefined\captiontext{% + \@ifundefined{captiontext}{% \captiontwo@Error [The usage of \protect#1 is only allowed inside code declared with\MessageBreak \protect\defcaptionstyle, @@ -276,88 +281,76 @@ \def\captiontext{#2}% \usecaptionstyle\caption@style \vskip\belowcaptionskip} -\newcommand*\caption@ifpackage[3]{% - \if1\@nameuse{caption@pkt@#1}% - \@ifundefined{#2}% - {\let\next\AtBeginDocument}% - {\let\next\@firstofone}% - \else\ifcaption@twozero - \@ifundefined{#2}% - {#3\let\next\@gobble}% - {\let\next\@firstofone}% +\newcommand\caption@ifpackage[3]{% + \ifcaption@twozero + \let\next\@firstofone + \else\if1\@nameuse{caption@pkt@#1}% + \def\next{\@ifpackageloaded{#1}\@firstofone\AtBeginDocument}% \else - #3\let\next\@gobble + \PackageInfo{caption2}{#1 package is disabled}% + #3% + \let\next\@gobble \fi\fi - \expandafter\let\csname caption@pkt@#1\endcsname\undefined - \caption@ifdebug{% - \ifx\next\@gobble\PackageInfo{caption2}{#1 => gobble}% - \else\ifx\next\@firstofone\PackageInfo{caption2}{#1 => firstofone}% - \else\ifx\next\AtBeginDocument\PackageInfo{caption2}{#1 => AtBeginDocument}% - \fi\fi\fi}{}% - \next} -\caption@ifpackage{float}{floatc@plain}{}{% - \ifx\floatc@plain\relax - \PackageWarning{caption2}{% - Option `float' was set but there is no float package loaded} + \@nameundef{caption@pkt@#1}% + \next{% + \@ifpackageloaded{#1}{% + \PackageInfo{caption2}{#1 package is loaded}% + #2}{% + \PackageInfo{caption2}{#1 package is not loaded}% + #3}}} +\@onlypreamble\caption@ifpackage +\caption@ifpackage{float}{% + \newcommand\caption@floatc[3]{% + \ifx\captionlabelfont\@empty + \let\captionlabelfont\@fs@cfont + \fi + \captionlinewidth\hsize + \realcaptionwidth\hsize + \def\captionlabel{#2}% + \def\captiontext{#3}% + \usecaptionstyle{#1}}% + \renewcommand*\floatc@plain{\caption@floatc{\caption@style}}% + \ifcaption@ruled + \dummycaptionstyle{ruled}{\onelinecaptionsfalse\setcaptionmargin{\z@}}% \else - \PackageInfo{caption2}{float package v1.2 (or newer) detected} - \newcommand\caption@floatc[3]{% - \ifx\captionlabelfont\@empty - \let\captionlabelfont\@fs@cfont + \newcaptionstyle{ruled}{% + \ifcaptionlabel + {\@fs@cfont\captionlabel}\space% + \fi\captiontext\par}% + \fi + \renewcommand*\floatc@ruled{\caption@floatc{ruled}}% + \renewcommand*\caption@of[2]{% + \def\@captype{#2}% + \@ifundefined{fst@#2}{}{% + \@nameuse{fst@#2}% + \@ifundefined{@float@setevery}{}{\@float@setevery{#2}}% + \let\caption@fs@capt\@fs@capt + \let\@fs@capt\caption@of@float}% + #1}% + \newcommand\caption@of@float[2]{\egroup + \vskip\abovecaptionskip + \normalsize\caption@fs@capt{#1}{#2}% + \vskip\belowcaptionskip + \bgroup}% +}{} +\caption@ifpackage{longtable}{% + \dummycaptionstyle{longtable}{}% + \renewcommand\LT@makecaption[3]{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{% + \ifignoreLTcapwidth + \else + \setcaptionwidth\LTcapwidth \fi \captionlinewidth\hsize \realcaptionwidth\hsize + \captionlabelfalse#1\captionlabeltrue \def\captionlabel{#2}% \def\captiontext{#3}% - \usecaptionstyle{#1}} - \renewcommand*\floatc@plain{\caption@floatc{\caption@style}} - \ifcaption@ruled - \dummycaptionstyle{ruled}{\onelinecaptionsfalse\setcaptionmargin{\z@}}% - \else - \newcaptionstyle{ruled}{% - \ifcaptionlabel - {\@fs@cfont\captionlabel}\space% - \fi\captiontext\par}% - \fi - \renewcommand*\floatc@ruled{\caption@floatc{ruled}} - \renewcommand*\caption@of[2]{\def\@captype{#2}% - \@ifundefined{fst@#2}{}{% - \@nameuse{fst@#2}% - \caption@ifundefined\@float@setevery{}{\@float@setevery{#2}}% - \let\caption@fs@capt\@fs@capt - \let\@fs@capt\caption@of@float}% - #1} - \newcommand\caption@of@float[2]{\egroup - \vskip\abovecaptionskip - \normalsize\caption@fs@capt{#1}{#2}% - \vskip\belowcaptionskip - \bgroup}% - \fi} -\caption@ifpackage{longtable}{LT@makecaption}{}{% - \ifx\LT@makecaption\relax - \PackageWarning{caption2}{% - Option `longtable' was set but there is no longtable package loaded} - \else - \PackageInfo{caption2}{longtable package v3.15 (or newer) detected} - \dummycaptionstyle{longtable}{} - \renewcommand\LT@makecaption[3]{% - \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{% - \ifignoreLTcapwidth - \else - \setcaptionwidth\LTcapwidth - \fi - \captionlinewidth\hsize - \realcaptionwidth\hsize - \captionlabelfalse#1\captionlabeltrue - \def\captionlabel{#2}% - \def\captiontext{#3}% - \usecaptionstyle{longtable}% - \endgraf\vskip\baselineskip}% - \hss}}} - \fi} + \usecaptionstyle{longtable}% + \endgraf\vskip\baselineskip}% + \hss}}}% +}{} \newcommand*\setsubcapstyle{% - \caption@ifundefined\subcapraggedrightfalse{% - \newif\ifsubcapraggedright}{}% \ifsubcaphang \ifsubcapcenter \subcapstyle{hang+center}% @@ -377,6 +370,9 @@ \else \subcapstyle{normal}% \fi\fi\fi\fi} +\AtBeginDocument{% + \@ifundefined{subcapraggedrightfalse}{% + \newif\ifsubcapraggedright}{}} \newcommand\caption@makesubcaption[2]{% \renewcommand*\captionfont{\subcapsize\subcapfont}% \renewcommand*\captionlabelfont{\normalfont\subcapsize\subcaplabelfont}% @@ -404,55 +400,49 @@ \def\captiontext{\ignorespaces #2}% \usecaptionstyle\caption@substyle}% \caption@subfig@hss}} -\caption@ifpackage{subfigure}{@makesubfigurecaption}{% - \let\setsubcapstyle\undefined - \let\caption@makesubcaption\undefined}{% - \ifx\@makesubfigurecaption\relax - \PackageWarning{caption2}{% - Option `subfigure' was set but there is no subfigure package loaded} - \let\setsubcapstyle\undefined - \let\caption@makesubcaption\undefined +\caption@ifpackage{subfigure}{% + \ifx\subcapfont\@undefined + \PackageInfo{caption2}{subfigure package v2.0 detected}% + \let\subcapfont\@empty + \newcommand*\subfigcapwidth{\z@}% + \newcommand*\setsubcapmargin{% + \subfigcapwidthfalse + \renewcommand*\subfigcapmargin}% + \newcommand*\setsubcapwidth{% + \subfigcapwidthtrue + \renewcommand*\subfigcapwidth}% + \newcommand*\subcaplabelsep{\space}% + \let\caption@subfig@hss\hfil \else - \ifx\subcapfont\undefined - \PackageInfo{caption2}{subfigure package v2.0 detected} - \let\subcapfont\@empty - \newcommand*\subfigcapwidth{\z@} - \newcommand*\setsubcapmargin{% - \subfigcapwidthfalse - \renewcommand*\subfigcapmargin} - \newcommand*\setsubcapwidth{% - \subfigcapwidthtrue - \renewcommand*\subfigcapwidth} - \newcommand*\subcaplabelsep{\space} - \let\caption@subfig@hss\hfil + \PackageInfo{caption2}{subfigure package v2.1 (or newer) detected}% + \newdimen\subfigcapwidth + \newcommand*\setsubcapmargin{% + \subfigcapwidthfalse + \setlength\subfigcapmargin}% + \newcommand*\setsubcapwidth{% + \subfigcapwidthtrue + \setlength\subfigcapwidth}% + \newcommand*\subcaplabelsep{\hskip\subfiglabelskip}% + \let\caption@subfig@hss\hss + \fi + \newif\ifsubfigcapwidth + \newdimen\subcapindent + \newcommand*\subcaplabeldelim{}% + \newcommand*\subcapstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \captiontwo@Error{Undefined caption style `#1'}% \else - \PackageInfo{caption2}{subfigure package v2.1 (or newer) detected} - \newdimen\subfigcapwidth - \newcommand*\setsubcapmargin{% - \subfigcapwidthfalse - \setlength\subfigcapmargin} - \newcommand*\setsubcapwidth{% - \subfigcapwidthtrue - \setlength\subfigcapwidth} - \newcommand*\subcaplabelsep{\hskip\subfiglabelskip} - \let\caption@subfig@hss\hss - \fi - \newif\ifsubfigcapwidth - \newdimen\subcapindent - \newcommand*\subcaplabeldelim{} - \newcommand*\subcapstyle[1]{% - \expandafter\ifx\csname caption@@#1\endcsname\relax - \captiontwo@Error{Undefined caption style `#1'}% - \else - \def\caption@substyle{#1}% - \fi} - \setsubcapstyle - \renewcommand*\@thesubfigure{\thesubfigure} - \renewcommand*\@thesubtable{\thesubtable} - \let\@makesubfigurecaption\caption@makesubcaption - \let\@makesubtablecaption\caption@makesubcaption - \fi} -\let\caption@ifpackage\undefined + \def\caption@substyle{#1}% + \fi}% + \setsubcapstyle + \renewcommand*\@thesubfigure{\thesubfigure}% + \renewcommand*\@thesubtable{\thesubtable}% + \let\@makesubfigurecaption\caption@makesubcaption + \let\@makesubtablecaption\caption@makesubcaption +}{% + \let\setsubcapstyle\@undefined + \let\caption@makesubcaption\@undefined +} \endinput %% %% End of file `caption2.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption2_1995-10-09.sty b/Master/texmf-dist/tex/latex/caption/caption2_1995-10-09.sty new file mode 100644 index 00000000000..cdcb07bde7a --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption2_1995-10-09.sty @@ -0,0 +1,336 @@ +%% +%% This is file `caption2_1995-10-09.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v2.0/caption2.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption2}[1995/10/09 v2.0 caption package (AS)] +\let\caption@message\undefined +\newcommand*\caption@package[1]{% + \ifx\caption@message\undefined + \message{\space\space\space\space\space\space\space\space\space + packages detected:} + \let\caption@message\empty + \fi + \message{#1}} +\newlength\realcaptionwidth +\newsavebox\captionbox +\newcommand*\captionsize{} +\newcommand*\captionfont{\captionsize} +\newcommand*\captionlabelfont{} +\newcommand*\captionlabeldelim{:} +\newdimen\captionlabelsep + \sbox\captionbox{ } + \setlength\captionlabelsep{\wd\captionbox} +\newdimen\captionmargin +\newdimen\captionwidth +\newdimen\captionindent +\newif\ifonelinecaptions +\newif\iftakecaptionwidth +\newcommand*\setcaptionmargin[1]{% + \setlength\captionmargin{#1}% + \takecaptionwidthfalse} +\newcommand*\setcaptionwidth[1]{% + \setlength\captionwidth{#1}% + \takecaptionwidthtrue} +\newcommand\newcaptionstyle[2]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \defcaptionstyle{#1}{#2}% + \else + \PackageError{caption}{Caption style `#1' already defined}{}% + \fi} +\newcommand\renewcaptionstyle[2]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \PackageError{caption}{Caption style `#1' undefined}{}% + \else + \defcaptionstyle{#1}{#2}% + \fi} +\newcommand\defcaptionstyle[2]{% + \@namedef{caption@@#1}{#2}} +\newcommand*\dummycaptionstyle[2]{% + \defcaptionstyle{#1}{% + \expandafter\ifx\csname caption@@\caption@style\expandafter\endcsname% + \csname caption@@#1\endcsname + \PackageError{caption}{You can't use the caption style `#1' directy}{% + The caption style `#1' is only a dummy and does not really exists.% + \MessageBreak You have to redefine it (with \protect\renewcaptionstyle) + before you can select\MessageBreak it with \protect\captionstyle.}% + \else + #2\usecaptionstyle{\caption@style}% + \fi}} +\newcaptionstyle{normal}{\caption@make{normal}} +\newcaptionstyle{center}{\caption@make{center}} +\newcaptionstyle{flushleft}{\caption@make{flushleft}} +\newcaptionstyle{flushright}{\caption@make{flushright}} +\newcaptionstyle{centerlast}{\caption@make{centerlast}} +\newcaptionstyle{hang}{\caption@make{hang}} +\newcaptionstyle{indent}{\caption@make{indent}} +\newcommand*\captionstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \PackageError{caption}{Undefined caption style `#1'}{}% + \else + \def\caption@style{#1}% + \fi} +\DeclareOption{normal}{\captionstyle{normal}} +\DeclareOption{center}{\captionstyle{center}} +\DeclareOption{flushleft}{\captionstyle{flushleft}} +\DeclareOption{flushright}{\captionstyle{flushright}} +\DeclareOption{centerlast}{\captionstyle{centerlast}} +\DeclareOption{anne}{\ExecuteOptions{centerlast}} +\DeclareOption{hang}{\captionstyle{hang}} +\DeclareOption{isu}{\ExecuteOptions{hang}} +\DeclareOption{indent}{\captionstyle{indent}} +\DeclareOption{oneline}{\onelinecaptionstrue} +\DeclareOption{nooneline}{\onelinecaptionsfalse} +\DeclareOption{scriptsize}{\renewcommand*\captionsize{\scriptsize}} +\DeclareOption{footnotesize}{\renewcommand*\captionsize{\footnotesize}} +\DeclareOption{small}{\renewcommand*\captionsize{\small}} +\DeclareOption{normalsize}{\renewcommand*\captionsize{\normalsize}} +\DeclareOption{large}{\renewcommand*\captionsize{\large}} +\DeclareOption{Large}{\renewcommand*\captionsize{\Large}} +\DeclareOption{up}{\renewcommand*\captionlabelfont{\upshape}} +\DeclareOption{it}{\renewcommand*\captionlabelfont{\itshape}} +\DeclareOption{sl}{\renewcommand*\captionlabelfont{\slshape}} +\DeclareOption{sc}{\renewcommand*\captionlabelfont{\scshape}} +\DeclareOption{md}{\renewcommand*\captionlabelfont{\mdseries}} +\DeclareOption{bf}{\renewcommand*\captionlabelfont{\bfseries}} +\DeclareOption{rm}{\renewcommand*\captionlabelfont{\rmfamily}} +\DeclareOption{sf}{\renewcommand*\captionlabelfont{\sffamily}} +\DeclareOption{tt}{\renewcommand*\captionlabelfont{\ttfamily}} +\DeclareOption{boxed}{\AtEndOfPackage{% + \ifx\caption@@ruled\undefined + \PackageWarningNoLine{caption}{% + Option `boxed' is set but there is no `float' package\MessageBreak + around here, so this option will be totally ignored} + \else + \dummycaptionstyle{boxed}{}% + \fi}} +\DeclareOption{ruled}{\AtEndOfPackage{% + \ifx\caption@@ruled\undefined + \PackageWarningNoLine{caption}{% + Option `ruled' is set but there is no `float' package\MessageBreak + around here, so this option will be totally ignored} + \else + \dummycaptionstyle{ruled}{\onelinecaptionsfalse\setcaptionmargin{0pt}}% + \fi}} +\DeclareOption{longtable}{\AtEndOfPackage{% + \ifx\caption@@longtable\undefined + \PackageWarningNoLine{caption}{% + Option `longtable' is set but there is no `longtable' package\MessageBreak + around here, so this option will be totally ignored} + \else + \dummycaptionstyle{longtable}{}% + \fi}} +\DeclareOption*{\AtEndOfPackage{% + \InputIfFileExists{\CurrentOption.caption}{}{% + \PackageError{caption}{File `\CurrentOption.caption' not found}{% + You selected the unknown package option `\CurrentOption', so I + thought you want to\MessageBreak + input the definition file `\CurrentOption.caption' here + -- but there is no one!}}}} +\ExecuteOptions{normal,oneline} +\ProcessOptions +\renewcommand\@makecaption[2]{% + \vskip\abovecaptionskip + \realcaptionwidth\linewidth + \def\captionlabel{#1}% + \def\captiontext{#2}% + \usecaptionstyle{\caption@style}% + \vskip\belowcaptionskip} +\newcommand*\caption@canterr[1]{% + \PackageError{caption}{You can't use \protect#1 + in normal text}{The usage of \protect#1 is only + allowed inside code declared with\MessageBreak \protect\defcaptionstyle, + \protect\newcaptionstyle \space or \protect\renewcaptionstyle.}} +\newcommand\onelinecaption[2]{% + \ifx\captiontext\undefined + \caption@canterr{\onelinecaption}% + \else + \def\caption@temp{#2}% + \ifonelinecaptions + \sbox\captionbox{#1}% + \ifdim\wd\captionbox >\realcaptionwidth + \caption@temp + \else + {\centering\usebox{\captionbox}\par}% + \fi + \else + \caption@temp + \fi + \let\caption@temp\undefined + \fi} +\newcommand*\usecaptionmargin{% + \ifx\captiontext\undefined + \caption@canterr{\usecaptionmargin}% + \else + \iftakecaptionwidth + \leftskip\realcaptionwidth + \advance\leftskip by -\captionwidth + \divide\leftskip by 2 + \rightskip\leftskip + \realcaptionwidth\captionwidth + \else + \leftskip\captionmargin + \rightskip\captionmargin + \advance\realcaptionwidth by -2\captionmargin + \fi + \fi} +\newcommand*\usecaptionstyle[1]{% + \ifx\captiontext\undefined + \caption@canterr{\usecaptionstyle}% + \else + \@ifundefined{caption@@#1}% + {\PackageError{caption}{Caption style `#1' undefined}{}}% + {\@nameuse{caption@@#1}} + \fi} +\newcommand*\caption@make[1]{% + \usecaptionmargin\captionfont + \def\caption@label{% + {\captionlabelfont\captionlabel\captionlabeldelim}% + \hskip\captionlabelsep}% + \onelinecaption{\caption@label\captiontext}% + {\@nameuse{caption@@@#1}}} +\newcommand*\caption@@@normal{% + \caption@label\captiontext\par} +\newcommand*\caption@@@center{% + \parbox[t]{\realcaptionwidth}{\centering + \caption@label\captiontext\par}}% +\newcommand*\caption@@@flushleft{% + \parbox[t]{\realcaptionwidth}{\raggedright + \caption@label\captiontext\par}}% +\newcommand*\caption@@@flushright{% + \parbox[t]{\realcaptionwidth}{\raggedleft + \caption@label\captiontext\par}}% +\newcommand*\caption@@@centerlast{% + \advance\leftskip by 0pt plus 1fil% + \advance\rightskip by 0pt plus -1fil% + \parfillskip0pt plus 2fil% + \caption@label\captiontext\par} +\newcommand*\caption@@@hang{% + \sbox\captionbox{\caption@label}% + \hangindent\wd\captionbox\noindent + \usebox\captionbox\captiontext\par} +\newcommand*\caption@@@indent{% + \hangindent\captionindent\noindent + \caption@label\captiontext\par} +\ifx\floatc@plain\undefined +\else + \caption@package{float} + \newcommand\caption@floatc[3]{% + \realcaptionwidth\linewidth + \def\captionlabel{#2}% + \def\captiontext{#3}% + \usecaptionstyle{#1}} + \renewcommand\floatc@plain{\caption@floatc{\caption@style}} + \dummycaptionstyle{boxed}{\def\captionlabelfont{\bfseries}} + \newcommand\floatc@boxed{\caption@floatc{boxed}} + \let\caption@boxed\fs@boxed + \renewcommand\fs@boxed{\let\floatc@plain\floatc@boxed\caption@boxed} + \newcaptionstyle{ruled}{{\bfseries\captionlabel} \captiontext\par} + \renewcommand*\floatc@ruled{\caption@floatc{ruled}} +\fi +\ifx\LT@makecaption\undefined +\else + \caption@package{longtable} + \dummycaptionstyle{longtable}{\setcaptionwidth\LTcapwidth} + \renewcommand\LT@makecaption[3]{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\linewidth{% + \realcaptionwidth\linewidth + \ifx#1\@gobble + \def\captionlabel{}% + \def\captionlabeldelim{}% + \captionlabelsep\z@ + \else + \def\captionlabel{#2}% + \fi + \def\captiontext{#3}% + \usecaptionstyle{longtable}% + \endgraf\vskip\baselineskip}% + \hss}}} +\fi +\newcommand*\addtosubcaption[1]{} +\@ifundefined{@makesubfigurecaption}{}{% + \caption@package{subfigure} + \newcommand*\subcapstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \PackageError{caption}{Undefined caption style `#1'}{}% + \else + \def\caption@substyle{#1}% + \fi} + \subcapstyle{normal} + \ifsubcaphang + \subcapstyle{hang} + \fi + \ifsubcapcenter + \subcapstyle{center} + \fi + \ifsubcapcenterlast + \subcapstyle{centerlast} + \fi + \newif\iftakesubfigcapwidth + \newcommand*\subfigcapwidth{0pt} + \newlength\subcapindent + \newcommand*\setsubcapmargin[1]{% + \renewcommand*\subcapfigmargin{#1}% + \takesubfigcapwidthfalse} + \newcommand*\setsubcapwidth[1]{% + \renewcommand*\subcapfigwidth{#1}% + \takesubfigcapwidthtrue} + \renewcommand\@makesubfigurecaption[2]{% + \realcaptionwidth\@tempdima + \def\captionlabel{#1}% + \def\captiontext{#2}% + \let\captionfont\subcapsize + \let\captionlabelfont\relax + \let\captionlabeldelim\empty + \captionlabelsep0pt + \ifsubcapnooneline\onelinecaptionsfalse\else\onelinecaptionstrue\fi + \iftakesubfigcapwidth\takecaptionwidthtrue\else\takecaptionwidthfalse\fi + \setlength\captionmargin{\subfigcapmargin}% + \setlength\captionwidth{\subfigcapwidth}% + \captionindent\subcapindent + \hbox{\parbox[t]\@tempdima{\strut\usecaptionstyle{\caption@substyle}}}} + \renewcommand*\addtosubcaption[1]{% + \let\caption@makesubfigurecaption\@makesubfigurecaption + \renewcommand\@makesubfigurecaption[2]{% + #1\caption@makesubfigurecaption} + \let\@makesubtablecaption\@makesubfigurecaption}} +\ifx\caption@message\undefined +\else\message{^^J}\let\caption@message\undefined\fi +\let\caption@package\undefined +\let\caption@subcapsize\undefined +\endinput +%% +%% End of file `caption2_1995-10-09.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption2_2005-10-03.sty b/Master/texmf-dist/tex/latex/caption/caption2_2005-10-03.sty new file mode 100644 index 00000000000..833f0c6bcdf --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption2_2005-10-03.sty @@ -0,0 +1,430 @@ +%% +%% This is file `caption2_2005-10-03.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v2.1/caption2.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption2}[2005/10/03 v2.1d Customising captions (AS)] +\newcommand*\captionfont{} +\newcommand*\captionlabelfont{} +\newcommand*\captionlabeldelim{} +\newcommand*\captionlabelsep{} +\newcommand*\captionsize{} +\newdimen\captionmargin +\newdimen\captionwidth +\newif\ifcaptionwidth +\newdimen\captionindent +\newif\ifcaptionlabel\captionlabeltrue +\newif\ifonelinecaptions +\newif\ifignoreLTcapwidth +\newcommand*\setcaptionmargin{% + \captionwidthfalse + \setlength\captionmargin} +\newcommand*\setcaptionwidth{% + \captionwidthtrue + \setlength\captionwidth} +\newcommand*\normalcaptionparams{% + \let\captionsize\@empty + \renewcommand*\captionfont{\captionsize}% + \let\captionlabelfont\@empty + \renewcommand*\captionlabeldelim{:}% + \renewcommand*\captionlabelsep{\space}% + \setcaptionmargin\z@\setlength\captionindent\z@ + \onelinecaptionstrue} +\newcommand*\caption@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `caption2' package.\MessageBreak + \@ehc} +\newcommand*\defcaptionstyle[1]{% + \@namedef{caption@@#1}} +\newcommand*\newcaptionstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \expandafter\defcaptionstyle + \else + \PackageError{caption2}{Caption style `#1' already defined}{\caption@eh}% + \expandafter\@gobbletwo + \fi + {#1}} +\newcommand*\renewcaptionstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}% + \expandafter\@gobbletwo + \else + \expandafter\defcaptionstyle + \fi + {#1}} +\newcommand*\dummycaptionstyle[2]{% + \defcaptionstyle{#1}{% + \expandafter\ifx\csname caption@@\caption@style\expandafter\endcsname% + \csname caption@@#1\endcsname + \PackageError{caption2}{You can't use the caption style `#1' directy}{% + The caption style `#1' is only a dummy and does not really exists.% + \MessageBreak You have to redefine it (with \protect\renewcaptionstyle) + before you can select\MessageBreak it with \protect\captionstyle. + \space\caption@eh}% + \else + #2\usecaptionstyle\caption@style + \fi}} +\newcommand*\captionstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \PackageError{caption2}{Undefined caption style `#1'}{\caption@eh}% + \else + \def\caption@style{#1}% + \fi} +\newcaptionstyle{normal}{\caption@make{normal}} +\newcaptionstyle{center}{\caption@make{center}} +\newcaptionstyle{centerlast}{\caption@make{centerlast}} +\newcaptionstyle{flushleft}{\caption@make{flushleft}} +\newcaptionstyle{flushright}{\caption@make{flushright}} +\newcaptionstyle{hang}{\caption@make{hang}} +\newcaptionstyle{hang+center}{\caption@make{hang@center}} +\newcaptionstyle{hang+centerlast}{\caption@make{hang@centerlast}} +\newcaptionstyle{hang+flushleft}{\caption@make{hang@flushleft}} +\newcaptionstyle{indent}{\caption@make{indent}} +\newcommand*\caption@makecaption[1]{% + \usecaptionmargin + \ifcaptionlabel + \def\caption@label{% + {\captionlabelfont\captionlabel\captionlabeldelim}\captionlabelsep}% + \else + \let\caption@label\@empty + \fi + \captionfont + \onelinecaption + {\caption@label\captiontext}% + {\parbox[b]\captionlinewidth{\strut\@nameuse{caption@@@#1}\par}\par}} +\newcommand*\caption@make{\caption@makecaption} +\newcommand*\caption@@@normal{% + \caption@label\captiontext} +\newcommand*\caption@@@center{% + \centering\caption@label\captiontext}% +\newcommand*\caption@centerlast{% + \advance\leftskip by 0pt plus 1fil% + \advance\rightskip by 0pt plus -1fil% + \parfillskip0pt plus 2fil\relax} +\newcommand*\caption@@@centerlast{% + \caption@centerlast\caption@label\captiontext} +\newcommand*\caption@@@flushleft{% + \raggedright\caption@label\captiontext}% +\newcommand*\caption@@@flushright{% + \raggedleft\caption@label\captiontext}% +\newcommand*\caption@@@hang{% + \sbox\@tempboxa{\caption@label}% + \hangindent\wd\@tempboxa\noindent + \usebox\@tempboxa\caption@hangplus\captiontext} +\newcommand*\caption@hangplus{} +\newcommand*\caption@@@hang@center{% + \let\caption@hangplus\centering\caption@@@hang} +\newcommand*\caption@@@hang@centerlast{% + \let\caption@hangplus\caption@centerlast\caption@@@hang} +\newcommand*\caption@@@hang@flushleft{% + \let\caption@hangplus\raggedright\caption@@@hang} +\newcommand*\caption@@@indent{% + \hangindent\captionindent\noindent + \caption@label\captiontext} +\DeclareOption{normal}{\captionstyle{normal}} +\DeclareOption{center}{\captionstyle{center}} +\DeclareOption{centerlast}{\captionstyle{centerlast}} +\DeclareOption{flushleft}{\captionstyle{flushleft}} +\DeclareOption{flushright}{\captionstyle{flushright}} +\DeclareOption{anne}{\ExecuteOptions{centerlast}} +\DeclareOption{hang}{\captionstyle{hang}} +\DeclareOption{hang+center}{\captionstyle{hang+center}} +\DeclareOption{hang+centerlast}{\captionstyle{hang+centerlast}} +\DeclareOption{hang+flushleft}{\captionstyle{hang+flushleft}} +\DeclareOption{isu}{\ExecuteOptions{hang}} +\DeclareOption{indent}{\captionstyle{indent}} +\DeclareOption{scriptsize}{\g@addto@macro\captionsize\scriptsize} +\DeclareOption{footnotesize}{\g@addto@macro\captionsize\footnotesize} +\DeclareOption{small}{\g@addto@macro\captionsize\small} +\DeclareOption{normalsize}{\g@addto@macro\captionsize\normalsize} +\DeclareOption{large}{\g@addto@macro\captionsize\large} +\DeclareOption{Large}{\g@addto@macro\captionsize\Large} +\DeclareOption{up}{\g@addto@macro\captionlabelfont\upshape} +\DeclareOption{it}{\g@addto@macro\captionlabelfont\itshape} +\DeclareOption{sl}{\g@addto@macro\captionlabelfont\slshape} +\DeclareOption{sc}{\g@addto@macro\captionlabelfont\scshape} +\DeclareOption{md}{\g@addto@macro\captionlabelfont\mdseries} +\DeclareOption{bf}{\g@addto@macro\captionlabelfont\bfseries} +\DeclareOption{rm}{\g@addto@macro\captionlabelfont\rmfamily} +\DeclareOption{sf}{\g@addto@macro\captionlabelfont\sffamily} +\DeclareOption{tt}{\g@addto@macro\captionlabelfont\ttfamily} +\DeclareOption{oneline}{\onelinecaptionstrue} +\DeclareOption{nooneline}{\onelinecaptionsfalse} +\newcommand*\caption@package[1]{\@namedef{caption@pkt@#1}} +\DeclareOption{float}{\caption@twozerofalse\caption@package{float}{1}} +\DeclareOption{longtable}{\caption@twozerofalse\caption@package{longtable}{1}} +\DeclareOption{subfigure}{\caption@twozerofalse\caption@package{subfigure}{1}} +\DeclareOption{none}{\caption@twozerofalse + \caption@package{float}{0}\caption@package{longtable}{0}% + \caption@package{subfigure}{0}} +\DeclareOption{all}{\ExecuteOptions{float,longtable,subfigure}} +\newif\ifcaption@ruled +\DeclareOption{ruled}{\caption@ruledtrue} +\DeclareOption{boxed}{} +\DeclareOption{ignoreLTcapwidth}{\ignoreLTcapwidthtrue} +\DeclareOption{debug}{\caption@debugtrue} +\newif\ifcaption@debug +\newif\ifcaption@twozero +\normalcaptionparams +\ExecuteOptions{none,normal} +\caption@twozerotrue +\ProcessOptions* +\ifcaption@twozero + \PackageInfo{caption2}{Running in caption2 v2.0 compatibility mode} +\fi +\def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}} +\newcommand*\caption@of[2]{\def\@captype{#2}#1} +\@ifundefined{abovecaptionskip}{% + \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} +\@ifundefined{belowcaptionskip}{% + \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} +\newdimen\captionlinewidth +\newdimen\realcaptionwidth +\newcommand*\usecaptionmargin{% + \ifcaptionwidth + \leftskip\captionlinewidth + \advance\leftskip by -\captionwidth + \divide\leftskip by 2 + \rightskip\leftskip + \captionlinewidth\captionwidth + \else + \leftskip\captionmargin + \rightskip\captionmargin + \advance\captionlinewidth by -2\captionmargin + \fi + \realcaptionwidth\captionlinewidth} +\newcommand\onelinecaption[1]{% + \let\next\@firstofone + \ifonelinecaptions + \sbox\@tempboxa{#1}% + \ifdim\wd\@tempboxa >\captionlinewidth + \else + \def\next{{\centering\usebox\@tempboxa\par}\@gobble}% + \fi + \fi\next} +\newcommand*\usecaptionstyle[1]{% + \@ifundefined{captiontext}{% + \PackageError{caption2}{You can't use \protect#1 + in normal text}{The usage of \protect#1 is only + allowed inside code declared with\MessageBreak \protect\defcaptionstyle, + \protect\newcaptionstyle \space or \protect\renewcaptionstyle. + \space\caption@eh} + }{% + \@ifundefined{caption@@#1}% + {\PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}}% + {\@nameuse{caption@@#1}}% + }} +\renewcommand\@makecaption[2]{% + \vskip\abovecaptionskip + \captionlinewidth\hsize + \realcaptionwidth\hsize + \def\captionlabel{#1}% + \def\captiontext{#2}% + \usecaptionstyle\caption@style + \vskip\belowcaptionskip} +\renewcommand*\caption@package[3]{% + \if1\@nameuse{caption@pkt@#1}% + \@ifundefined{#2}% + {\let\next\AtBeginDocument}% + {\let\next\@firstofone}% + \else\ifcaption@twozero + \@ifundefined{#2}% + {#3\let\next\@gobble}% + {\let\next\@firstofone}% + \else + #3\let\next\@gobble + \fi\fi + \expandafter\let\csname caption@pkt@#1\endcsname\undefined + \ifcaption@debug + \ifx\next\@gobble\PackageInfo{caption2}{#1 => gobble}% + \else\ifx\next\@firstofone\PackageInfo{caption2}{#1 => firstofone}% + \else\ifx\next\AtBeginDocument\PackageInfo{caption2}{#1 => AtBeginDocument}% + \fi\fi\fi + \fi + \next} +\caption@package{float}{floatc@plain}{}{% + \ifx\floatc@plain\relax + \PackageWarning{caption2}{% + Option `float' was set but there is no float package loaded} + \else + \PackageInfo{caption2}{float package v1.2 (or newer) detected} + \newcommand\caption@floatc[3]{% + \ifx\captionlabelfont\@empty + \let\captionlabelfont\@fs@cfont + \fi + \captionlinewidth\hsize + \realcaptionwidth\hsize + \def\captionlabel{#2}% + \def\captiontext{#3}% + \usecaptionstyle{#1}} + \renewcommand*\floatc@plain{\caption@floatc{\caption@style}} + \ifcaption@ruled + \dummycaptionstyle{ruled}{\onelinecaptionsfalse\setcaptionmargin{\z@}}% + \else + \newcaptionstyle{ruled}{% + \ifcaptionlabel + {\@fs@cfont\captionlabel}\space% + \fi\captiontext\par}% + \fi + \renewcommand*\floatc@ruled{\caption@floatc{ruled}} + \renewcommand*\caption@of[2]{\def\@captype{#2}% + \@ifundefined{fst@#2}{}{% + \@nameuse{fst@#2}% + \@ifundefined{@float@setevery}{}{\@float@setevery{#2}}% + \let\caption@fs@capt\@fs@capt + \let\@fs@capt\caption@of@float}% + #1} + \newcommand\caption@of@float[2]{\egroup + \vskip\abovecaptionskip + \normalsize\caption@fs@capt{#1}{#2}% + \vskip\belowcaptionskip + \bgroup}% + \fi} +\caption@package{longtable}{LT@makecaption}{}{% + \ifx\LT@makecaption\relax + \PackageWarning{caption2}{% + Option `longtable' was set but there is no longtable package loaded} + \else + \PackageInfo{caption2}{longtable package v3.15 (or newer) detected} + \dummycaptionstyle{longtable}{} + \renewcommand\LT@makecaption[3]{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{% + \ifignoreLTcapwidth + \else + \setcaptionwidth\LTcapwidth + \fi + \captionlinewidth\hsize + \realcaptionwidth\hsize + \captionlabelfalse#1\captionlabeltrue + \def\captionlabel{#2}% + \def\captiontext{#3}% + \usecaptionstyle{longtable}% + \endgraf\vskip\baselineskip}% + \hss}}} + \fi} +\newcommand*\setsubcapstyle{% + \@ifundefined{subcapraggedrightfalse}{% + \newif\ifsubcapraggedright}{}% + \ifsubcaphang + \ifsubcapcenter + \subcapstyle{hang+center}% + \else\ifsubcapcenterlast + \subcapstyle{hang+centerlast}% + \else\ifsubcapraggedright + \subcapstyle{hang+flushleft}% + \else + \subcapstyle{hang}% + \fi\fi\fi + \else\ifsubcapcenter + \subcapstyle{center}% + \else\ifsubcapcenterlast + \subcapstyle{centerlast}% + \else\ifsubcapraggedright + \subcapstyle{flushleft}% + \else + \subcapstyle{normal}% + \fi\fi\fi\fi} +\newcommand\caption@makesubcaption[2]{% + \renewcommand*\captionfont{\subcapsize\subcapfont}% + \renewcommand*\captionlabelfont{\normalfont\subcapsize\subcaplabelfont}% + \let\captionlabeldelim\subcaplabeldelim + \let\captionlabelsep\subcaplabelsep + \ifsubfigcapwidth\captionwidthtrue\else\captionwidthfalse\fi + \setlength\captionmargin\subfigcapmargin + \setlength\captionwidth\subfigcapwidth + \captionindent\subcapindent + \ifsubcapnooneline\onelinecaptionsfalse\else\onelinecaptionstrue\fi + \hbox to\@tempdima{% + \caption@subfig@hss\parbox[t]\@tempdima{% + \captionlinewidth\@tempdima + \realcaptionwidth\@tempdima + \captionlabeltrue + \def\captionlabel{#1}% + \def\captiontext{\ignorespaces #2}% + \usecaptionstyle\caption@substyle}% + \caption@subfig@hss}} +\caption@package{subfigure}{@makesubfigurecaption}{% + \let\setsubcapstyle\undefined + \let\caption@makesubcaption\undefined}{% + \ifx\@makesubfigurecaption\relax + \PackageWarning{caption2}{% + Option `subfigure' was set but there is no subfigure package loaded} + \let\setsubcapstyle\undefined + \let\caption@makesubcaption\undefined + \else + \ifx\subcapfont\undefined + \PackageInfo{caption2}{subfigure package v2.0 detected} + \let\subcapfont\@empty + \newcommand*\subfigcapwidth{\z@} + \newcommand*\setsubcapmargin{% + \subfigcapwidthfalse + \renewcommand*\subfigcapmargin} + \newcommand*\setsubcapwidth{% + \subfigcapwidthtrue + \renewcommand*\subfigcapwidth} + \newcommand*\subcaplabelsep{\space} + \let\caption@subfig@hss\hfil + \else + \PackageInfo{caption2}{subfigure package v2.1 (or newer) detected} + \newdimen\subfigcapwidth + \newcommand*\setsubcapmargin{% + \subfigcapwidthfalse + \setlength\subfigcapmargin} + \newcommand*\setsubcapwidth{% + \subfigcapwidthtrue + \setlength\subfigcapwidth} + \newcommand*\subcaplabelsep{\hskip\subfiglabelskip} + \let\caption@subfig@hss\hss + \fi + \newif\ifsubfigcapwidth + \newdimen\subcapindent + \newcommand*\subcaplabeldelim{} + \newcommand*\subcapstyle[1]{% + \expandafter\ifx\csname caption@@#1\endcsname\relax + \PackageError{caption2}{Undefined caption style `#1'}{\caption@eh}% + \else + \def\caption@substyle{#1}% + \fi} + \setsubcapstyle + \renewcommand*\@thesubfigure{\thesubfigure} + \renewcommand*\@thesubtable{\thesubtable} + \let\@makesubfigurecaption\caption@makesubcaption + \let\@makesubtablecaption\caption@makesubcaption + \fi} +\let\caption@package\undefined +\endinput +%% +%% End of file `caption2_2005-10-03.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index adb7324f1a1..eb930511d63 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -6,7 +6,7 @@ %% %% caption3.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,12 +33,19 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2020/10/21 v2.2e caption3 kernel (AR)] +\providecommand\DeclareRelease[3]{} +\providecommand\DeclareCurrentRelease[2]{} +\DeclareRelease{v1.0} {2003-12-20}{caption3_2007-04-11.sty} % for caption v3.0 +\DeclareRelease{v1.1} {2007-09-01}{caption3_2010-01-14.sty} % for caption v3.1 +\DeclareRelease{v1.3} {2011-08-06}{caption3_2011-11-01.sty} % for caption v3.2 +\DeclareRelease{v1.8} {2013-01-10}{caption3_2019-09-01.sty} % for caption v3.3 +\DeclareRelease{v1.13}{2019-11-24}{caption3_2020-07-29.sty} % for caption v3.4 +\DeclareRelease{v2.0} {2020-08-30}{caption3_2020-10-26.sty} % for caption v3.5 +\DeclareCurrentRelease{v2.3}{2022-02-20} % for caption v3.6 +\ProvidesPackage{caption3}[2022/01/07 v2.3 caption3 kernel (AR)] \providecommand*\@nameundef[1]{% \expandafter\let\csname #1\endcsname\@undefined} \providecommand\l@addto@macro[2]{% @@ -491,26 +498,31 @@ {\caption@requirepackage\caption@tempa{#1=#2}}% {}} \newcommand*\DeclareCaptionLength[1]{% - \expandafter\newdimen\csname caption#1\endcsname - \@namedef{caption@setdefault@#1}##1{% - \caption@setdefault@length{##1}}% + \expandafter\newdimen\csname caption@#1\endcsname + \@namedef{caption@setdefault@#1}{\caption@setdefault@length}% \SetCaptionDefault*{#1}} \@onlypreamble\DeclareCaptionLength \newcommand*\caption@setdefault@length[3]{% - \expandafter#1\csname caption#2@default\endcsname{#3}} + \expandafter#1\csname caption@#2@default\endcsname{#3}} \newcommand*\caption@setlength[2]{% \caption@ifdefault{#2}% - {\expandafter\let\expandafter\caption@tempa\csname caption#1@default\endcsname}% + {\expandafter\let\expandafter\caption@tempa\csname caption@#1@default\endcsname}% {\def\caption@tempa{#2}}% - \expandafter\setlength\csname caption#1\endcsname\caption@tempa} -\DeclareCaptionLength{margin}{0pt} -\DeclareCaptionLength{margin@}{\the\captionmargin} -\DeclareCaptionLength{width}{0pt} + \expandafter\setlength\csname caption@#1\endcsname\caption@tempa} \newdimen\caption@tempdima -\DeclareCaptionOption{margin}{\setcaptionmargin{#1}} -\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}} -\DeclareCaptionOption{width}{\setcaptionwidth{#1}} -\DeclareCaptionOption{width*}{\setcaptionwidth*{#1}} +\newdimen\captionmargin +\setlength\captionmargin{0pt} +\newcommand\caption@setdefault@margin[3]{% + \caption@setdefault@length{#1}{left#2}{#3}% + \caption@setdefault@length{#1}{right#2}{#3}} +\DeclareCaptionLength{leftmargin}{0pt} +\DeclareCaptionLength{rightmargin}{0pt} +\newdimen\caption@width +\setlength\caption@width{0pt} +\DeclareCaptionOption{margin}{\caption@setmargin{#1}} +\DeclareCaptionOption{margin*}{\caption@setmargin*{#1}} +\DeclareCaptionOption{width}{\caption@setwidth{#1}} +\DeclareCaptionOption{width*}{\caption@setwidth*{#1}} \DeclareCaptionOption{calcmargin}{\caption@setcalcmargin{#1}} \DeclareCaptionOption{calcmargin*}{\caption@setcalcmargin*{#1}} \DeclareCaptionOption{calcwidth}{\caption@setcalcwidth{#1}} @@ -520,28 +532,37 @@ \caption@set@bool\caption@iftwoside{\if@twoside 1\else 0\fi} \DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}} \DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}} -\newcommand*\setcaptionmargin{% - \caption@resetcalcmargin - \caption@setmargin} \newcommand*\caption@setmargin{% - \caption@teststar\caption@@setmargin\@gobble\@firstofone} -\newcommand*\caption@@setmargin[2]{% - #1{\captionwidth\z@}% - \caption@@@setmargin#2,#2,\@nil} -\def\caption@@@setmargin#1,#2,#3\@nil{% - \caption@setlength{margin}{#1}% - \caption@setlength{margin@}{#2}% - \addtolength\captionmargin@{-\captionmargin}} -\newcommand*\setcaptionwidth{% \caption@resetcalcmargin - \caption@setwidth} + \caption@@setmargin} +\newcommand*\caption@@setmargin{% + \caption@teststar\caption@@@setmargin\@gobble\@firstofone} +\newcommand*\caption@@@setmargin[2]{% + #1{\caption@width\z@}% + \caption@@@@setmargin#2,#2,\@nil} +\def\caption@@@@setmargin#1,#2,#3\@nil{% + \def\caption@tempa{#1#2}% + \ifx\caption@tempa\@empty + \caption@Error{Missing number}% + \else + \caption@@@@@setmargin{left}{#1}% + \caption@@@@@setmargin{right}{#2}% + \fi} +\newcommand*\caption@@@@@setmargin[2]{% + \def\caption@tempa{#2}% + \ifx\caption@tempa\@empty \else + \caption@setlength{#1margin}{#2}% + \fi} \newcommand*\caption@setwidth{% - \caption@teststar\caption@@setwidth\@gobble\@firstofone} -\newcommand*\caption@@setwidth[2]{% - #1{\captionmargin\z@\captionmargin@\z@}% - \caption@setlength{width}{#2}}% + \caption@resetcalcmargin + \caption@@setwidth} +\newcommand*\caption@@setwidth{% + \caption@teststar\caption@@@setwidth\@gobble\@firstofone} +\newcommand*\caption@@@setwidth[2]{% + #1{\caption@leftmargin\z@\caption@rightmargin\z@}% + \setlength\caption@width{#2}} \newcommand*\caption@setcalcmargin{% - \caption@teststar{\caption@@setcalcmargin\caption@setmargin}% + \caption@teststar{\caption@@setcalcmargin\caption@@setmargin}% \@secondoftwo\@firstoftwo} \newcommand*\caption@@setcalcmargin[3]{% #2{\caption@resetcalcmargin @@ -550,7 +571,7 @@ \newcommand*\caption@resetcalcmargin{% \let\caption@calcmargin@hook\@empty} \newcommand*\caption@setcalcwidth{% - \caption@teststar{\caption@@setcalcmargin\caption@setwidth}% + \caption@teststar{\caption@@setcalcmargin\caption@@setwidth}% \@secondoftwo\@firstoftwo} \newcommand*\caption@thecounter{0} \newcommand*\caption@stepthecounter{% @@ -587,17 +608,17 @@ \caption@ifoddpage} \newcommand*\caption@setoptcmd[2]{% \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}} -\DeclareCaptionLength{@indent}{0pt} -\DeclareCaptionLength{@parindent}{0pt} -\DeclareCaptionLength{@hangindent}{0pt} +\DeclareCaptionLength{indent}{0pt} +\DeclareCaptionLength{parindent}{0pt} +\DeclareCaptionLength{hangindent}{0pt} \DeclareCaptionOption{indent}[\leftmargini]{% obsolete - \caption@setlength{@indent}{#1}} + \caption@setlength{indent}{#1}} \DeclareCaptionOption{indention}[\leftmargini]{% - \caption@setlength{@indent}{#1}} + \caption@setlength{indent}{#1}} \DeclareCaptionOption{parindent}{% - \caption@setlength{@parindent}{#1}} + \caption@setlength{parindent}{#1}} \DeclareCaptionOption{hangindent}{% - \caption@setlength{@hangindent}{#1}} + \caption@setlength{hangindent}{#1}} \DeclareCaptionOption{parskip}{% \l@addto@macro\caption@@par{\setlength\parskip{#1}}} \newcommand*\DeclareCaptionStyle[1]{% @@ -653,7 +674,7 @@ \caption@ifdecl{singlelinecheck}{#1}% {\caption@set{singlelinecheck}{#1}}% {\caption@set@bool\caption@singlelinecheck{#1}}} -\newcommand*\DeclareCaptionBox[2]{% +\newcommand\DeclareCaptionBox[2]{% \caption@decl{box}{#1}##1##2{#2}} \@onlypreamble\DeclareCaptionBox \DeclareCaptionOption{box}{\caption@set{box}{#1}} @@ -759,14 +780,13 @@ \DeclareCaptionLabelSeparator{gobbletwo}{} \newcommand*\captionnewline{\\\relax} \SetCaptionDefault{labelseparator}{colon} -\newcommand*\DeclareCaptionTextFormat[2]{% +\newcommand\DeclareCaptionTextFormat[2]{% \caption@decl{textformat}{#1}##1{#2}} \@onlypreamble\DeclareCaptionTextFormat \DeclareCaptionOption{textformat}{\caption@set{textformat}{#1}} \DeclareCaptionTextFormat{empty}{% \caption@get@label#1\caption@makeanchor{}\@nil - \caption@thelabel - \global\let\caption@thelabel\relax} + \caption@thelabel\caption@clrlabel} \long\def\caption@get@label#1\caption@makeanchor#2#3\@nil{% \def\caption@tempa{#2}% \ifx\caption@tempa\@empty @@ -804,7 +824,8 @@ \long\def\caption@@@@getlabel[#1]#2\@nil{% \l@addto@macro\caption@thelabel{[{#1}]}% \caption@@@getlabel#2\@nil} -\let\caption@thelabel\relax +\newcommand*\caption@clrlabel{\let\caption@thelabel\relax} +\caption@clrlabel \DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}} \newcommand*\DeclareCaptionFont{% \caption@decl@package{font}{\caption@declarefont}} @@ -973,41 +994,38 @@ \newcommand*\caption@rule{\caption@ifrule\caption@hrule\relax} \newcommand*\caption@hrule{\hrule\@height\z@} \DeclareCaptionOption{rule}[1]{\caption@set@bool\caption@ifrule{#1}} -\newcommand*\caption@declare@position[2]{% - \caption@decl{position}{#1}{#2}} -\@onlypreamble\caption@declare@position +\newcommand*\DeclareCaptionPosition[3]{% + \caption@decl[\edef]{position}{#1}{% + \unexpanded{\def\caption@fallback@position}####1####2\unexpanded{{#2}}% + \unexpanded{\def\caption@regular@position}####1####2\unexpanded{{#3}}}} +\@onlypreamble\DeclareCaptionPosition \DeclareCaptionOption{position}{\caption@setposition{#1}} \DeclareCaptionOption{figureposition}{\captionsetup*[figure]{position=#1}} \@onlypreamble@key{caption}{figureposition} \DeclareCaptionOption{tableposition}{\captionsetup*[table]{position=#1}} \@onlypreamble@key{caption}{tableposition} -\newcommand*\caption@setposition{\caption@set{position}} -\caption@declare@position{t}{\@firstoftwo} -\caption@declare@position{top}{\@firstoftwo} -\caption@declare@position{above}{\@firstoftwo} -\caption@declare@position{b}{\@secondoftwo} -\caption@declare@position{bottom}{\@secondoftwo} -\caption@declare@position{below}{\@secondoftwo} -\caption@declare@position{a}{\caption@autoposition}% needed by floatrow package, \flrow@cappos -\caption@declare@position{auto}{\caption@autoposition} -\SetCaptionDefault{position}{auto} -\let\caption@autoposition\@secondoftwo -\newcommand*\caption@iftop{\caption@position} +\newcommand*\caption@setposition{% + \caption@initposition + \caption@set{position}} +\DeclareCaptionPosition{top}{#1}{#1} +\def\caption@position@t{\caption@position@top} +\def\caption@position@above{\caption@position@top} +\DeclareCaptionPosition{bottom}{#2}{#2} +\def\caption@position@b{\caption@position@bottom} +\def\caption@position@below{\caption@position@bottom} +\SetCaptionDefault{position}{bottom} +\newcommand*\caption@initposition{% + \let\caption@@iftop\@undefined} +\newcommand*\caption@iftop{% + \caption@@fixposition\caption@fallback@position + \caption@@iftop} \newcommand*\caption@fixposition{% - \ifvmode - \edef\caption@tempa{\the\prevdepth}% - \caption@Debug{\protect\prevdepth=\caption@tempa}% - \ifdim\prevdepth>-\p@ - \let\caption@autoposition\@secondoftwo % position=below - \else - \let\caption@autoposition\@firstoftwo % position=above - \fi - \else - \caption@Debug{no \protect\prevdepth}% - \let\caption@autoposition\@secondoftwo % position=below + \caption@@fixposition\caption@regular@position} +\newcommand*\caption@@fixposition[1]{% + \ifx\caption@@iftop\@undefined + \caption@position % defines \caption@fallback@position and \caption@regular@position + #1{\let\caption@@iftop\@firstoftwo}{\let\caption@@iftop\@secondoftwo}% \fi} -\newcommand*\caption@setautoposition[1]{% - \def\caption@fixposition{\caption@@set{position}{autoposition}{#1}}} \newcommand*\caption@beginhook{} \newcommand*\caption@endhook{} \newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook} @@ -1319,11 +1337,15 @@ \DeclareCaptionJustification[ragged2e]{RaggedRight}{\RaggedRight} \DeclareCaptionFont[sansmath]{sansmath}{\sansmath} \DeclareCaptionFont{singlespacing}{% - \caption@ifdefined\setspace@singlespace{% - \setstretch\setspace@singlespace}{}}% normally 1 + \caption@ifdefined\setspace@singlespace + {\setstretch\setspace@singlespace}% usually 1, could be changed by \SetSinglespace + {}} +\DeclareCaptionFont{stretch}{% + \caption@ifdefined\setstretch + {\setstretch{#1}}% + {\def\baselinestretch{#1}\selectfont}} \DeclareCaptionFont[setspace]{onehalfspacing}{\onehalfspacing} \DeclareCaptionFont[setspace]{doublespacing}{\doublespacing} -\DeclareCaptionFont[setspace]{stretch}{\setstretch{#1}} \caption@AtBeginDocument{% \def\@tempa{2005/06/28 ver: 1.3 subfig package}% \expandafter\ifx\csname ver@subfig.sty\endcsname\@tempa @@ -1332,7 +1354,7 @@ \let\caption@setfloattype\@gobble \let\@dottedxxxline\sf@NEW@dottedxxxline \let\sf@subfloat\sf@NEW@subfloat - \let\sf@ifpositiontop\caption@iftop + \def\sf@ifpositiontop{\caption@iftop}% \fi \let\sf@NEW@dottedxxxline\@undefined \let\sf@NEW@subfloat\@undefined} @@ -1381,7 +1403,7 @@ {}% \@tempa {\caption@Debug{addcontentsline: #1 => \caption@listtype}% - \@namedef{the\caption@listtype}{\@nameuse{the#1}}}% + \@namedef{the\caption@listtype}{\caption@the{#1}}}% \expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}% \endgroup}% \caption@addsubcontentslines{#1}} @@ -1393,7 +1415,7 @@ \caption@add@contentsline {\csname ext@#1\endcsname}% {#1}% - {\caption@listformat{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + {\caption@listformat{\caption@p{#1}}{\caption@the{#1}}}% {\ignorespaces #2}% \caption@chkfloat{#1}{#2}}}} \newcommand*\caption@add@contentsline{% @@ -1417,9 +1439,25 @@ \newcommand*\caption@belowskip{% \vskip\belowcaptionskip} \newcommand*\caption@fnum[1]{% + \caption@@fnum{#1}{\@nameuse{#1name}}{\caption@the{#1}}} +\newcommand*\caption@@fnum[1]{% \expandafter\let\expandafter\caption@original@fnum\csname caption@fnum@#1\endcsname % for label format `original' - \caption@labelformat{\@nameuse{#1name}}{\@nameuse{the#1}}} -\newcommand\caption@make[2]{\caption@@make{\caption@labelformat{#1}{#2}}} + \caption@labelformat} +\newcommand*\caption@setfnum[1]{% + \@ifundefined{caption@fnum@#1}% + {\expandafter\let\csname caption@fnum@#1\expandafter\endcsname\csname fnum@#1\endcsname + \@namedef{fnum@#1}{\caption@fnum{#1}}}% + {}} +\newcommand*\caption@p[1]{\@nameuse{p@#1}} +\newcommand*\caption@the[1]{\@nameuse{the#1}} +\newcommand*\caption@make{% + \kernel@ifnextchar[%] + \caption@make@ + {\caption@make@@\caption@labelformat}} +\def\caption@make@[#1]{% + \caption@make@@{\caption@@fnum{#1}}} +\newcommand\caption@make@@[3]{% + \caption@@make{#1{#2}{#3}}} \newcommand\caption@@make[2]{% \begingroup \caption@@make@{#1}{#2}% @@ -1431,69 +1469,85 @@ \caption@box\hsize{% \caption@singlelinecheck{\caption@slc{#1}{#2}\caption@singleline\caption@multiline}{\caption@multiline}% \caption@calcmargin - \caption@tempdima\captionmargin - \ifdim\captionmargin@=\z@ \else - \caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@\relax}% - \fi - \caption@ifhmode{\advance\caption@tempdima\caption@indent\relax}% - \hspace\caption@tempdima - \caption@tempdima\captionwidth - \caption@ifhmode{\advance\caption@tempdima-\caption@indent\relax}% - \caption@parbox\caption@tempdima{% - \caption@ifhmode{% - \ifdim\caption@indent=\z@ - \leavevmode - \else - \hskip-\caption@indent - \fi}% + \caption@make@leftmargin + \caption@make@parbox{% + \caption@make@indention \caption@@@make{#1}{#2}}% - \caption@tempdima\captionmargin - \ifdim\captionmargin@=\z@ \else - \caption@ifoddpage{\advance\caption@tempdima\captionmargin@\relax}{}% - \fi - \hspace\caption@tempdima + \caption@make@rightmargin }% \caption@endhook} -\newcommand\caption@@make@epilogue{% +\newcommand*\caption@make@leftmargin{% + \caption@tempdima\caption@leftmargin + \caption@ifhmode{\advance\caption@tempdima\caption@indent\relax}% + \hspace\caption@tempdima} +\newcommand*\caption@make@parbox{% + \caption@tempdima\caption@width + \caption@ifhmode{\advance\caption@tempdima-\caption@indent\relax}% + \caption@parbox\caption@tempdima} +\newcommand*\caption@make@indention{% + \caption@ifhmode{% + \ifdim\caption@indent=\z@ + \leavevmode + \else + \hskip-\caption@indent + \fi}} +\newcommand*\caption@make@rightmargin{% + \hspace\caption@rightmargin} +\newcommand*\caption@@make@epilogue{% \global\caption@starfalse} \newcommand*\caption@calcmargin{% \caption@calcmargin@hook - \ifx\caption@maxmargin\@undefined \else - \ifdim\captionmargin>\caption@maxmargin\relax - \captionmargin\caption@maxmargin\relax + \ifdim\caption@width=\z@ + \ifdim\captionmargin=\z@ \else + \caption@leftmargin\captionmargin + \caption@rightmargin\captionmargin \fi - \fi - \ifx\caption@minmargin\@undefined \else - \ifdim\captionmargin<\caption@minmargin\relax - \captionmargin\caption@minmargin\relax + \ifx\caption@maxmargin\@undefined \else + \ifdim\caption@leftmargin>\caption@maxmargin + \caption@leftmargin\caption@maxmargin + \fi + \ifdim\caption@rightmargin>\caption@maxmargin + \caption@rightmargin\caption@maxmargin + \fi \fi - \fi - \ifdim\captionwidth=\z@ - \captionwidth\hsize\relax - \advance\captionwidth by -2\captionmargin\relax - \advance\captionwidth by -\captionmargin@\relax + \ifx\caption@minmargin\@undefined \else + \ifdim\caption@leftmargin<\caption@minmargin + \caption@leftmargin\caption@minmargin + \fi + \ifdim\caption@rightmargin<\caption@minmargin + \caption@rightmargin\caption@minmargin + \fi + \fi + \ifdim\caption@leftmargin=\caption@rightmargin \else + \caption@ifoddpage{}{% + \caption@tempdima\caption@leftmargin + \caption@leftmargin\caption@rightmargin + \caption@rightmargin\caption@tempdima}% + \fi + \caption@width\hsize + \advance\caption@width by -\caption@leftmargin\relax + \advance\caption@width by -\caption@rightmargin\relax \else - \captionmargin\hsize\relax - \advance\captionmargin by -\captionwidth\relax - \divide\captionmargin by 2\relax - \captionmargin@\z@\relax + \caption@leftmargin\hsize + \advance\caption@leftmargin by -\caption@width\relax + \divide\caption@leftmargin by 2\relax + \caption@rightmargin\caption@leftmargin \fi \caption@Debug{% - \string\hsize=\the\hsize, - \string\captionwidth=\the\captionwidth,\MessageBreak - \string\captionmargin=\the\captionmargin, - \string\captionmargin@=\the\captionmargin@}% -} + hsize=\the\hsize, + width=\the\caption@width,\MessageBreak + leftmargin=\the\caption@leftmargin, + rightmargin=\the\caption@rightmargin}} \newcommand\caption@slc[4]{% \caption@Debug{Begin SLC}% \singlelinecaptiontrue \begingroup \caption@singleline \let\caption@justification\relax - \caption@calcmargin % calculate \captionwidth + \caption@calcmargin % calculate \caption@width \caption@prepareslc \sbox\@tempboxa{\caption@@@make{#1}{#2}}% - \ifdim\wd\@tempboxa>\captionwidth + \ifdim\wd\@tempboxa>\caption@width \endgroup \singlelinecaptionfalse #4% @@ -1509,40 +1563,64 @@ \let\caption@fmt\caption@slfmt} \newcommand*\caption@multiline{% \caption@format} % defines \caption@ifhmode, \caption@slfmt, and \caption@fmt +\newcommand*\AtCaptionSingleLineCheck{% + \g@addto@macro\caption@prepareslc} \providecommand*\caption@prepareslc{} -\g@addto@macro\caption@prepareslc{% +\AtCaptionSingleLineCheck{% \let\label\caption@gobble \let\hypertarget\@gobbletwo - \let\caption@footnote@ORI\footnote - \def\footnote{\caption@withoptargs\caption@footnote}% - \let\caption@footnotemark@ORI\footnotemark - \def\footnotemark{\caption@withoptargs\caption@footnotemark}% - \let\caption@footnotetext@ORI\@footnotetext - \let\@footnotetext\caption@gobble - \let\caption@endnote@ORI\endnote - \def\endnote{\caption@withoptargs\caption@endnote}% - \let\caption@endnotemark@ORI\endnotemark - \def\endnotemark{\caption@withoptargs\caption@endnotemark}% - \let\caption@endnotetext@ORI\@endnotetext - \let\@endnotetext\caption@gobble + \let\footnote\caption@footnote + \let\footnotemark\caption@footnotemark + \let\footnotetext\caption@footnotetext + \let\@footnotetext\@gobble + \let\H@@footnotetext\@gobble + \let\H@@mpfootnotetext\@gobble + \caption@ifdefined\H@@footnotemark + {\let\@footnotemark\H@@footnotemark}% + {}% + \let\tablefootnote\caption@footnote + \let\endnote\caption@endnote + \let\endnotemark\caption@endnotemark + \let\endnotetext\caption@endnotetext + \let\@endnotetext\@gobble \let\acused\@gobble \let\AC@placelabel\@gobble \let\glsunset\@gobble } -\newcommand\caption@footnote[2]{% - \caption@footnotemark{#1}} -\newcommand\caption@footnotemark[1]{% - \begingroup - \let\stepcounter\caption@l@stepcounter - \caption@footnotemark@ORI#1\relax - \endgroup} -\newcommand\caption@endnote[2]{% - \caption@endnotemark{#1}} -\newcommand\caption@endnotemark[1]{% - \begingroup - \let\stepcounter\caption@l@stepcounter - \caption@endnotemark@ORI#1\relax - \endgroup} +\newcommand*\caption@footnote{% + \@ifnextchar[%] + \@xfootnote + {\caption@l@stepcounter\@mpfn + \protected@xdef\@thefnmark{\thempfn}% + \@footnotemark\@footnotetext}} +\newcommand*\caption@footnotemark{% + \@ifnextchar[%] + \@xfootnotemark + {\caption@l@stepcounter{footnote}% + \protected@xdef\@thefnmark{\thefootnote}% + \@footnotemark}} +\newcommand*\caption@footnotetext{% + \@ifnextchar[%] + \@xfootnotenext + {\protected@xdef\@thefnmark{\thempfn}% + \@footnotetext}} +\newcommand*\caption@endnote{% + \@ifnextchar[%] + \@xendnote + {\caption@l@stepcounter{endnote}% + \protected@xdef\@theenmark{\theendnote}% + \@endnotemark\@endnotetext}} +\newcommand*\caption@endnotemark{% + \@ifnextchar[%] + \@xendnotemark + {\caption@l@stepcounter{endnote}% + \protected@xdef\@theenmark{\theendnote}% + \@endnotemark}} +\newcommand*\caption@endnotetext{% + \@ifnextchar[%] + \@xendnotenext + {\protected@xdef\@theenmark{\theendnote}% + \@endnotetext}} \newcommand*\caption@l@stepcounter[1]{% \advance\csname c@#1\endcsname\@ne\relax} \newcommand*\caption@applyfont{% @@ -1672,7 +1750,7 @@ {\caption@@@declaresubtype{#1}{#2}{#3}{sub#3}}} \@onlypreamble\caption@@declaresubtype \newcommand*\caption@@@declaresubtype[4]{% - \caption@ifsubtype{#4}% + \caption@ifdefined@subtype{#4}% {\caption@Debug{Modify subtype `#4'}}% {\caption@Debug{New subtype `#4'}% \newcounter{#4}[{#3}]% @@ -1734,7 +1812,7 @@ \fi} \@onlypreamble\caption@@@@@@declaresublistentry \newcommand*\caption@subtypelist{} -\newcommand*\caption@ifsubtype{% +\newcommand*\caption@ifdefined@subtype{% \caption@ifin@list\caption@subtypelist} \newcommand*\ForEachCaptionSubType{% \@ifstar @@ -1751,7 +1829,7 @@ \caption@ifdefined\@memresetsubcounter {\let\caption@memresetsubcounter\@memresetsubcounter \renewcommand*\@memresetsubcounter[1]{% - \caption@ifsubtype{sub#1}\@gobble\caption@memresetsubcounter{#1}}}% + \caption@ifdefined@subtype{sub#1}\@gobble\caption@memresetsubcounter{#1}}}% {} \ifx\caption@documentclass\@empty\else \@pushfilename diff --git a/Master/texmf-dist/tex/latex/caption/caption3_2007-04-11.sty b/Master/texmf-dist/tex/latex/caption/caption3_2007-04-11.sty new file mode 100644 index 00000000000..350d3ad5a0e --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption3_2007-04-11.sty @@ -0,0 +1,583 @@ +%% +%% This is file `caption3_2007-04-11.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.0/caption.dtx (with options: `kernel') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption3}[2007/04/11 v1.0q caption3 kernel (AR)] +\providecommand*\@nameundef[1]{% + \expandafter\let\csname #1\endcsname\@undefined} +\providecommand{\l@addto@macro}[2]{% + \begingroup + \toks@\expandafter{#1#2}% + \edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}% + \@tempa} +\def\bothIfFirst#1#2{% + \protected@edef\caption@tempa{#1}% + \ifx\caption@tempa\@empty\else + #1#2% + \fi} +\def\bothIfSecond#1#2{% + \protected@edef\caption@tempa{#2}% + \ifx\caption@tempa\@empty\else + #1#2% + \fi} +\def\caption@ifinlist#1#2{% + \let\next\@secondoftwo + \edef\caption@tempa{#1}% + \@for\caption@tempb:={#2}\do{% + \ifx\caption@tempa\caption@tempb + \let\next\@firstoftwo + \fi}% + \next} +\def\caption@setbool#1#2{% + \caption@ifinlist{#2}{1,true,yes,on}{% + \expandafter\let\csname caption@if#1\endcsname\@firstoftwo + }{\caption@ifinlist{#2}{0,false,no,off}{% + \expandafter\let\csname caption@if#1\endcsname\@secondoftwo + }{% + \caption@Error{Undefined boolean value `#2'}% + }}} +\def\caption@ifbool#1{\@nameuse{caption@if#1}} +\def\caption@undefbool#1{\@nameundef{caption@if#1}} +\def\caption@newcounter#1{\gdef#1{0}} +\def\caption@setcounter#1#2{\xdef#1{#2}} +\def\caption@addtocounter#1#2{% + \begingroup + \@tempcnta#1% + \advance\@tempcnta#2% + \xdef#1{\the\@tempcnta}% + \endgroup} +\def\caption@stepcounter#1{\caption@addtocounter#1\@ne} +\newcommand\caption@Package{caption} +\newcommand*\caption@Error[1]{% + \PackageError\caption@Package{#1}\caption@eh} +\newcommand\caption@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `\caption@Package' package.\MessageBreak + \@ehc} +\RequirePackage{keyval}[1997/11/10] +\providecommand*\undefine@key[2]{% + \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} +\newcommand\DeclareCaptionOption{% + \@ifstar{\caption@declareoption\AtEndOfPackage}% + {\caption@declareoption\@gobble}} +\newcommand*\caption@declareoption[2]{% + #1{\undefine@key{caption}{#2}}\define@key{caption}{#2}} +\@onlypreamble\DeclareCaptionOption +\@onlypreamble\caption@declareoption +\newcommand\captionsetup{\@ifnextchar[\caption@setuptype\caption@setup} +\newcommand\caption@typ@{caption@typ@} % This saves 74 words of TeX memory +\def\caption@setuptype[#1]#2{% + \@ifundefined{\caption@typ@#1}% + {\@namedef{\caption@typ@#1}{#2}}% + {\expandafter\l@addto@macro\csname\caption@typ@#1\endcsname{,#2}}} +\newcommand\caption@setup{\caption@setkeys{caption}} +\newcommand*\caption@setkeys{% + \@dblarg\caption@@setkeys} +\long\def\caption@@setkeys[#1]#2#3{% + \ifnum\caption@keydepth=0\relax + \let\caption@KV@errx\KV@errx + \let\caption@KV@err\KV@err + \let\KV@errx\caption@Error + \let\KV@err\caption@Error + \fi + \caption@stepcounter\caption@keydepth + \def\caption@Package{#1}% + \caption@Debug{\protect\setkeys{#2}{#3}}% + \setkeys{#2}{#3}% + \def\caption@Package{caption}% + \caption@addtocounter\caption@keydepth\m@ne + \ifnum\caption@keydepth=0\relax + \let\KV@errx\caption@KV@errx + \let\KV@err\caption@KV@err + \fi} +\caption@newcounter\caption@keydepth +\newcommand*\caption@settype[1]{% + \@ifundefined{\caption@typ@#1}{}{% + \caption@esetup{\csname\caption@typ@#1\endcsname}}} +\newcommand*\caption@esetup[1]{% + \edef\caption@tempa{\noexpand\caption@setup{#1}}% + \caption@tempa} +\newcommand*\clearcaptionsetup[1]{\@nameundef{\caption@typ@#1}} +\newcommand*\showcaptionsetup[2][\@firstofone]{% + \GenericWarning{}{% + #1 Caption Info: KV list on `#2'\MessageBreak + #1 Caption Data: (% + \@ifundefined{\caption@typ@#2}{% + % empty -- print nothing + }{% + \@nameuse{\caption@typ@#2}% + }% + )}} +\newcommand*\caption@ProcessOptions[1]{% + \let\@tempc\relax + \let\caption@tempa\@empty + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#1@\CurrentOption}{% + }{% + \@ifundefined{KV@#1@\CurrentOption @default}{% + \PackageInfo{#1}{Global option `\CurrentOption' ignored}% + }{% + \PackageInfo{#1}{Global option `\CurrentOption' processed}% + \edef\caption@tempa{\caption@tempa,\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + }% + \edef\caption@tempa{% + \noexpand\caption@setkeys{#1}{% + \caption@tempa\@ptionlist{\@currname.\@currext}% + }% + }% + \caption@tempa + \let\CurrentOption\@empty + \AtEndOfPackage{\let\@unprocessedoptions\relax}} +\@onlypreamble\caption@ProcessOptions +\newdimen\captionmargin +\newdimen\captionmargin@ +\newdimen\captionwidth +\DeclareCaptionOption{margin}{\setcaptionmargin{#1}} +\DeclareCaptionOption{width}{\setcaptionwidth{#1}} +\DeclareCaptionOption{twoside}[1]{\caption@setbool{twoside}{#1}} +\newcommand*\setcaptionmargin[1]{% + \captionwidth\z@ + \caption@@setmargin#1,#1,\@nil\@@} +\def\caption@@setmargin#1,#2,#3\@@{% + \setlength\captionmargin{#1}% + \setlength\captionmargin@{#2}% + \advance\captionmargin@ by -\captionmargin} +\newcommand\setcaptionwidth{% + \setlength\captionwidth} +\caption@newcounter\caption@count +\newcommand*\caption@newlabel{\@newl@bel{caption}} +\newcommand*\caption@thepage{\the\c@page} +\def\caption@ifoddpage{% + \caption@iftwoside{% + \caption@stepcounter\caption@count + \protected@write\@auxout{\let\caption@thepage\relax}% + {\string\caption@newlabel{\caption@count}{\caption@thepage}}% + \expandafter\ifx\csname caption@\caption@count\endcsname\relax + \G@refundefinedtrue % => 'There are undefined references.' + \PackageWarning{caption3}{Reference on page \thepage \space undefined}% + \else + \expandafter\let\expandafter\caption@thepage + \csname caption@\caption@count\endcsname + \fi + \ifodd\caption@thepage + \let\caption@ifoddpage\@firstoftwo + \else + \let\caption@ifoddpage\@secondoftwo + \fi + }{\let\caption@ifoddpage\@firstoftwo}% + \caption@ifoddpage} +\newdimen\captionindent +\newdimen\captionparindent +\newdimen\captionhangindent +\DeclareCaptionOption{indent}[\leftmargini]{\setlength\captionindent{#1}}% obsolete! +\DeclareCaptionOption{indention}[\leftmargini]{\setlength\captionindent{#1}} +\DeclareCaptionOption{hangindent}{\setlength\captionhangindent{#1}} +\DeclareCaptionOption{parindent}{\setlength\captionparindent{#1}} +\DeclareCaptionOption{parskip}{\l@addto@macro\caption@@par{\setlength\parskip{#1}}} +\@ifundefined{scr@caption}{}{% + \let\caption@KV@parindent\KV@caption@parindent + \DeclareCaptionOption{parindent}[]{% + \def\caption@tempa{#1}% + \ifx\caption@tempa\@empty + \PackageInfo{caption3}{Option `parindent' ignored}% + \else + \caption@KV@parindent{#1}% + \fi}% + \let\caption@KV@parskip\KV@caption@parskip + \DeclareCaptionOption{parskip}[]{% + \def\caption@tempa{#1}% + \ifx\caption@tempa\@empty + \PackageInfo{caption3}{Option `parskip' ignored}% + \else + \caption@KV@parskip{#1}% + \fi}% +} +\newcommand*\DeclareCaptionStyle[1]{% + \@ifnextchar[{\caption@declarestyle{#1}}{\caption@declarestyle{#1}[]}} +\def\caption@declarestyle#1[#2]#3{% + \global\@namedef{caption@sls@#1}{#2}% + \global\@namedef{caption@sty@#1}{#3}} +\@onlypreamble\DeclareCaptionStyle +\@onlypreamble\caption@declarestyle +\DeclareCaptionOption{style}{\caption@setstyle{#1}} +\newcommand\caption@setstyle{% + \@ifstar{\caption@@setstyle\@gobble}{\caption@@setstyle\@firstofone}} +\newcommand*\caption@@setstyle[2]{% + \@ifundefined{caption@sty@#2}% + {#1{\caption@Error{Undefined caption style `#2'}}}% + {\expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname + \caption@setdefault\caption@esetup{\csname caption@sty@#2\endcsname}}} +\newcommand\caption@setdefault{\captionsetup{% + format=default,labelformat=default,labelsep=default,textformat=default,% + justification=default,font=default,labelfont=default,textfont=default,% + margin=0pt,indent=0pt,parindent=0pt,hangindent=0pt,% + singlelinecheck=1,strut=1}} +\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{} +\newcommand\DeclareCaptionFormat{% + \@ifstar{\caption@declareformat\@gobble}% + {\caption@declareformat\@firstofone}} +\newcommand\caption@declareformat[3]{% + \global\expandafter\let\csname caption@ifh@#2\endcsname#1% + \global\long\@namedef{caption@fmt@#2}##1##2##3{#3}} +\@onlypreamble\DeclareCaptionFormat +\@onlypreamble\caption@declareformat +\DeclareCaptionOption{format}{\caption@setformat{#1}} +\newcommand*\caption@setformat[1]{% + \@ifundefined{caption@fmt@#1}% + {\caption@Error{Undefined caption format `#1'}}% + {\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname + \expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}} +\DeclareCaptionFormat{plain}{#1#2#3\par} +\DeclareCaptionFormat{hang}{% + \@hangfrom{#1#2}% + \advance\captionparindent\hangindent + \advance\captionhangindent\hangindent + \caption@@par + #3\par} +\def\caption@fmt@default{\caption@fmt@plain} +\def\caption@ifh@default{\caption@ifh@plain} +\newcommand*\DeclareCaptionLabelFormat[2]{% + \global\@namedef{caption@lfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionLabelFormat +\DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}} +\newcommand*\caption@setlabelformat[1]{% + \@ifundefined{caption@lfmt@#1}% + {\caption@Error{Undefined caption label format `#1'}}% + {\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}} +\DeclareCaptionLabelFormat{empty}{} +\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} +\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} +\def\caption@lfmt@default{\caption@lfmt@simple} +\newcommand\DeclareCaptionLabelSeparator{% + \@ifstar{\caption@declarelabelseparator\@gobble}% + {\caption@declarelabelseparator\@firstofone}} +\newcommand\caption@declarelabelseparator[3]{% + \global\expandafter\let\csname caption@iflf@#2\endcsname#1% + \global\long\@namedef{caption@lsep@#2}{#3}} +\@onlypreamble\DeclareCaptionLabelSeparator +\@onlypreamble\caption@declarelabelseparator +\DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}} +\DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}} +\newcommand*\caption@setlabelseparator[1]{% + \@ifundefined{caption@lsep@#1}% + {\caption@Error{Undefined caption label separator `#1'}}% + {\expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname + \expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}} +\DeclareCaptionLabelSeparator{none}{} +\DeclareCaptionLabelSeparator{colon}{: } +\DeclareCaptionLabelSeparator{period}{. } +\DeclareCaptionLabelSeparator{space}{ } +\DeclareCaptionLabelSeparator*{quad}{\quad} +\DeclareCaptionLabelSeparator*{newline}{\\} +\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space} +\def\caption@lsep@default{\caption@lsep@colon} +\def\caption@iflf@default{\caption@iflf@colon} +\newcommand*\DeclareCaptionTextFormat[2]{% + \global\long\@namedef{caption@tfmt@#1}##1{#2}} +\@onlypreamble\DeclareCaptionTextFormat +\DeclareCaptionOption{textformat}{\caption@settextformat{#1}} +\newcommand*\caption@settextformat[1]{% + \@ifundefined{caption@tfmt@#1}% + {\caption@Error{Undefined caption text format `#1'}}% + {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}} +\DeclareCaptionTextFormat{simple}{#1} +\DeclareCaptionTextFormat{period}{#1.} +\def\caption@tfmt@default{\caption@tfmt@simple} +\newcommand*\DeclareCaptionJustification[2]{% + \global\@namedef{caption@hj@#1}{#2}} +\@onlypreamble\DeclareCaptionJustification +\DeclareCaptionOption{justification}{\caption@setjustification{#1}} +\newcommand*\caption@setjustification[1]{% + \@ifundefined{caption@hj@#1}% + {\caption@Error{Undefined caption justification `#1'}}% + {\expandafter\let\expandafter\caption@hj\csname caption@hj@#1\endcsname}} +\DeclareCaptionJustification{justified}{} +\DeclareCaptionJustification{centering}{\centering} +\DeclareCaptionJustification{centerfirst}{\centerfirst} +\DeclareCaptionJustification{centerlast}{\centerlast} +\DeclareCaptionJustification{raggedleft}{\raggedleft} +\DeclareCaptionJustification{raggedright}{\raggedright} +\def\caption@hj@default{\caption@hj@justified} +\providecommand\centerfirst{% + \let\\\@centercr + \edef\caption@normaladjust{% + \leftskip\the\leftskip + \rightskip\the\rightskip + \parfillskip\the\parfillskip\relax}% + \leftskip\z@\@plus -1fil% + \rightskip\z@\@plus 1fil% + \parfillskip\z@skip + \noindent\hskip\z@\@plus 2fil% + \@setpar{\@@par\@restorepar\caption@normaladjust}} +\providecommand\centerlast{% + \let\\\@centercr + \leftskip\z@\@plus 1fil% + \rightskip\z@\@plus -1fil% + \parfillskip\z@\@plus 2fil\relax} +\DeclareCaptionJustification{Centering}{% + \caption@ragged\Centering\centering} +\DeclareCaptionJustification{RaggedLeft}{% + \caption@ragged\RaggedLeft\raggedleft} +\DeclareCaptionJustification{RaggedRight}{% + \caption@ragged\RaggedRight\raggedright} +\newcommand*\caption@ragged{% + \caption@Debug{We need ragged2e}% + \protected@write\@auxout{}{\string\caption@newlabel{ragged2e}{}}% + \global\let\caption@ragged\caption@@ragged + \caption@@ragged} +\newcommand*\caption@@ragged[2]{% + \@ifundefined{caption\string#1}{% + \PackageWarning{caption3}{% + `ragged2e' package not loaded, therefore\MessageBreak + substituting \string#2 for \string#1\MessageBreak}% + \global\@namedef{caption\string#1}}{}% + #2} +\AtBeginDocument{% + \@ifundefined{caption@ragged2e}{% + \let\caption@@ragged\@secondoftwo % suppress warning above + }{% + \caption@Debug{We load ragged2e}% + \IfFileExists{ragged2e.sty}{% + \RequirePackage{ragged2e}\let\caption@@ragged\@firstoftwo}{}% + }} +\newcommand\DeclareCaptionFont[2]{% + \define@key{caption@fnt}{#1}[]{\g@addto@macro\caption@tempa{#2}}} +\@onlypreamble\DeclareCaptionFont +\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} +\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} +\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} +\newcommand*\caption@setfont[2]{% + \let\caption@tempa\@empty + \begingroup + \caption@setkeys[caption]{caption@fnt}{#2}% + \endgroup + \expandafter\let\csname caption#1\endcsname\caption@tempa} +\DeclareCaptionFont{default}{} +\DeclareCaptionFont{scriptsize}{\scriptsize} +\DeclareCaptionFont{footnotesize}{\footnotesize} +\DeclareCaptionFont{small}{\small} +\DeclareCaptionFont{normalsize}{\normalsize} +\DeclareCaptionFont{large}{\large} +\DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{up}{\upshape} +\DeclareCaptionFont{it}{\itshape} +\DeclareCaptionFont{sl}{\slshape} +\DeclareCaptionFont{sc}{\scshape} +\DeclareCaptionFont{md}{\mdseries} +\DeclareCaptionFont{bf}{\bfseries} +\DeclareCaptionFont{rm}{\rmfamily} +\DeclareCaptionFont{sf}{\sffamily} +\DeclareCaptionFont{tt}{\ttfamily} +\DeclareCaptionFont{singlespacing}{\setstretch{\setspace@singlespace}}% normally 1 +\DeclareCaptionFont{onehalfspacing}{\onehalfspacing} +\DeclareCaptionFont{doublespacing}{\doublespacing} +\providecommand\captionsize{} +\DeclareCaptionOption{size}{\caption@setfont{size}{#1}} +\@ifundefined{abovecaptionskip}{% + \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} +\@ifundefined{belowcaptionskip}{% + \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} +\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}} +\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}} +\DeclareCaptionOption{skip}{\setlength\abovecaptionskip{#1}} +\DeclareCaptionOption{position}{\caption@setposition{#1}} +\newcommand*\caption@setposition[1]{% + \caption@ifinlist{#1}{d,default}{% + \def\caption@position{\caption@defaultpos}% + }{\caption@ifinlist{#1}{t,top,above}{% + \let\caption@position\@firstoftwo + }{\caption@ifinlist{#1}{b,bottom,below}{% + \let\caption@position\@secondoftwo + }{\caption@ifinlist{#1}{a,auto}{% + \let\caption@position\@undefined + }{% + \caption@Error{Undefined caption position `#1'}% + }}}}} +\let\caption@defaultpos\@secondoftwo +\newcommand\caption@iftop{% + \ifx\caption@position\@undefined + \expandafter\@secondoftwo + \else + \expandafter\caption@position + \fi} +\newcommand\caption@fixposition{% + \ifx\caption@position\@undefined + \caption@autoposition + \fi} +\newcommand\caption@autoposition{% + \ifvmode + \edef\caption@tempa{\the\prevdepth}% + \caption@Debug{\protect\prevdepth=\caption@tempa}% + \ifdim\prevdepth>-\p@ + \let\caption@position\@secondoftwo + \else + \let\caption@position\@firstoftwo + \fi + \else + \caption@Debug{no \protect\prevdepth}% + \let\caption@position\@secondoftwo + \fi} +\newcommand\caption@beginhook{} +\newcommand\caption@endhook{} +\newcommand\AtBeginCaption{\l@addto@macro\caption@beginhook} +\newcommand\AtEndCaption{\l@addto@macro\caption@endhook} +\DeclareCaptionOption{listof}{\caption@setbool{lof}{#1}} +\DeclareCaptionOption{singlelinecheck}{\caption@setbool{slc}{#1}} +\DeclareCaptionOption{strut}{\caption@setbool{strut}{#1}} +\DeclareCaptionOption{debug}[1]{% + \caption@setbool{debug}{#1}% + \caption@ifdebug{% + \def\caption@Debug{\PackageInfo{caption3}}% + }{% + \let\caption@Debug\@gobble + }} +\setkeys{caption}{debug=0} +\captionsetup{style=default,position=default,listof=1,% + twoside=\if@twoside 1\else 0\fi} +\newif\ifcaption@star +\newcommand\caption@make[2]{% + \caption@@make{\caption@lfmt{#1}{#2}}} +\newcommand\caption@@make[2]{% + \begingroup + \caption@beginhook + \caption@calcmargin + \caption@ifslc{\ifx\caption@sls\@empty\else + \caption@slc{#1}{#2}\captionwidth\relax + \fi}{}% + \@tempdima\captionmargin + \ifdim\captionmargin@=\z@\else + \caption@ifoddpage{}{\advance\@tempdima\captionmargin@}% + \fi + \caption@ifh{\advance\@tempdima\captionindent}% + \hskip\@tempdima + \@tempdima\captionwidth + \caption@ifh{\advance\@tempdima by -\captionindent}% + \captionbox\@tempdima{% + \caption@ifh{% + \ifdim\captionindent=\z@ + \leavevmode + \else + \hskip-\captionindent + \fi}% + \caption@@@make{#1}{#2}}% + \@tempdima\captionmargin + \ifdim\captionmargin@=\z@\else + \caption@ifoddpage{\advance\@tempdima\captionmargin@}{}% + \fi + \hskip\@tempdima + \caption@endhook + \endgroup + \global\caption@starfalse} +\newcommand\caption@calcmargin{% + \@tempdima\hsize + \ifnum\@listdepth>0\relax + \advance\@tempdima by -\leftmargin + \advance\@tempdima by -\rightmargin + \fi + \ifdim\captionwidth=\z@ + \captionwidth\@tempdima + \advance\captionwidth by -2\captionmargin + \advance\captionwidth by -\captionmargin@ + \else + \captionmargin\@tempdima + \advance\captionmargin by -\captionwidth + \divide\captionmargin by 2 + \captionmargin@\z@ + \fi + \caption@Debug{% + \protect\hsize=\the\hsize, + \protect\margin=\the\captionmargin, + \protect\marginx=\the\captionmargin@, + \protect\width=\the\captionwidth}% +} +\newcommand\caption@slc[4]{% + \caption@startslc + \sbox\@tempboxa{\caption@@@make{#1}{#2}}% + \ifdim\wd\@tempboxa >#3% + \caption@endslc + \else + \caption@endslc + \caption@esetup\caption@sls + #4% + \fi} +\newcommand\caption@startslc{% + \begingroup + \let\label\@gobble + \let\@footnotetext\@gobble\let\@endnotetext\@gobble + \def\stepcounter##1{\advance\csname c@##1\endcsname\@ne\relax}% + \let\caption@hj\relax} +\newcommand\caption@endslc{% + \endgroup} +\newcommand\captionbox{\parbox[b]} +\newcommand\caption@@@make[2]{% + \sbox\@tempboxa{#1}% + \ifdim\wd\@tempboxa=\z@ + \let\caption@lsep\relax + \fi + \caption@ifempty{#2}{% + \let\caption@lsep\relax + }% + \@setpar{\@@par\caption@@par}\caption@@par + \caption@hj\captionsize\captionfont\caption@fmt + {\ifcaption@star\else{\captionlabelfont#1}\fi}% + {\ifcaption@star\else{\caption@iflf\captionlabelfont\caption@lsep}\fi}% + {{\captiontextfont + \caption@ifstrut{\vrule\@height\ht\strutbox\@width\z@}{}% + \nobreak\hskip\z@skip + \caption@tfmt{#2}% + \caption@ifstrut{\@finalstrut\strutbox}{}% + \par}}} +\newcommand\caption@ifempty[1]{% + \def\caption@tempa{#1}% + \def\caption@tempb{\ignorespaces}% + \ifx\caption@tempa\caption@tempb + \let\caption@tempa\@empty + \fi + \ifx\caption@tempa\@empty + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi} +\newcommand*\caption@@par{% + \parindent\captionparindent\hangindent\captionhangindent}% +\endinput +%% +%% End of file `caption3_2007-04-11.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption3_2010-01-14.sty b/Master/texmf-dist/tex/latex/caption/caption3_2010-01-14.sty new file mode 100644 index 00000000000..3079d27f628 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption3_2010-01-14.sty @@ -0,0 +1,1770 @@ +%% +%% This is file `caption3_2010-01-14.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.1/caption.dtx (with options: `kernel') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption3}[2010/01/14 v1.1m caption3 kernel (AR)] +\providecommand*\@nameundef[1]{% + \expandafter\let\csname #1\endcsname\@undefined} +\providecommand\l@addto@macro[2]{% + \begingroup + \toks@\expandafter{#1#2}% + \edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}% + \@tempa} +\def\bothIfFirst#1#2{% + \protected@edef\caption@tempa{#1}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +\def\bothIfSecond#1#2{% + \protected@edef\caption@tempa{#2}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +\newcommand*\caption@ifinlist{% + \@expandtwoargs\caption@@ifinlist} +\newcommand*\caption@@ifinlist[2]{% + \begingroup + \def\@tempa##1,#1,##2\@nil{% + \endgroup + \ifx\relax##2\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \@tempa,#2,#1,\@nil}% +\newcommand*\caption@ifin@list[2]{% + \caption@ifempty@list#1% + {\@secondoftwo}% + {\@expandtwoargs\caption@@ifinlist{#2}{#1}}} +\newcommand*\caption@g@addto@list[2]{% + \caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}} +\newcommand*\caption@l@addto@list[2]{% + \caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}} +\newcommand*\caption@g@removefrom@list[2]{% + \caption@l@removefrom@list#1{#2}% + \global\let#1#1} +\newcommand*\caption@l@removefrom@list[2]{% + \caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}} +\newcommand*\caption@for@list[2]{% + \caption@ifempty@list#1{}{% + \def\caption@tempb##1{#2}% + \@for\caption@tempa:=#1\do{% + \expandafter\caption@tempb\expandafter{\caption@tempa}}}} +\newcommand*\caption@ifempty@list[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else\ifx#1\@empty + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi\fi} +\newcommand*\caption@setbool[1]{% + \expandafter\caption@set@bool\csname caption@if#1\endcsname} +\newcommand*\caption@set@bool[2]{% + \caption@ifinlist{#2}{1,true,yes,on}{% + \let#1\@firstoftwo + }{\caption@ifinlist{#2}{0,false,no,off}{% + \let#1\@secondoftwo + }{% + \caption@Error{Undefined boolean value `#2'}% + }}} +\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}} +\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}} +\newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}} +\newcommand*\caption@teststar@[3]{% + \@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}} +\AtBeginDocument{\let\caption@teststar@\caption@teststar} +\newcommand*\caption@ifatletter{% + \ifnum\the\catcode`\@=11 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\AtBeginDocument{\let\caption@ifatletter\@secondoftwo} +\newcommand*\caption@withoptargs[1]{% + \@ifstar + {\def\caption@tempa{*}\caption@@withoptargs#1}% + {\def\caption@tempa{}\caption@@withoptargs#1}} +\def\caption@@withoptargs#1{% + \@ifnextchar[%] + {\caption@@@withoptargs#1}% + {\caption@@@@withoptargs#1}} +\def\caption@@@withoptargs#1[#2]{% + \l@addto@macro\caption@tempa{[{#2}]}% + \caption@@withoptargs#1} +\def\caption@@@@withoptargs#1{% + \expandafter#1\expandafter{\caption@tempa}} +\newcommand\caption@DoCheckCommand[2]{% + \begingroup + \let\@tempa#1% + #2% + \ifx\@tempa#1% + \endgroup + \let\caption@CheckCommand\@gobbletwo + \else + \endgroup + \fi} +\@onlypreamble\caption@DoCheckCommand +\let\caption@CheckCommand\caption@DoCheckCommand +\@onlypreamble\caption@CheckCommand +\newcommand*\caption@IfCheckCommand{% + \ifx\caption@CheckCommand\@gobbletwo + \let\caption@CheckCommand\caption@DoCheckCommand + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\@onlypreamble\caption@IfCheckCommand +\let\caption@begindocumenthook\@empty +\let\caption@@begindocumenthook\@empty +\def\caption@AtBeginDocument{% + \caption@teststar\g@addto@macro + \caption@@begindocumenthook\caption@begindocumenthook} +\AtBeginDocument{% + \PackageInfo{caption}{Begin \noexpand\AtBeginDocument code\@gobble}% + \def\caption@AtBeginDocument{% + \@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}% + \caption@begindocumenthook + \let\caption@begindocumenthook\relax + \def\caption@AtBeginDocument{% + \@ifstar\@firstofone\@firstofone}% + \caption@@begindocumenthook + \let\caption@@begindocumenthook\relax + \PackageInfo{caption}{End \noexpand\AtBeginDocument code\@gobble}} +\newcommand*\caption@Warning[1]{% + \caption@WarningNoLine{#1\on@line}} +\newcommand*\caption@WarningNoLine[1]{% + \PackageWarning{caption}{#1.^^J\caption@wh\@gobbletwo}} +\newcommand*\caption@Error[1]{% + \PackageError{caption}{#1}\caption@eh} +\let\caption@KV@err\caption@Error +\newcommand*\caption@wh{% + See the caption package documentation for explanation.} +\newcommand*\caption@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `caption' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} +\RequirePackage{keyval}[1997/11/10] +\providecommand*\undefine@key[2]{% + \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} +\providecommand*\@preamble@keys{} +\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}} +\@onlypreamble\@onlypreamble@key +\@onlypreamble\@preamble@keys +\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}} +\caption@AtBeginDocument*{% + \def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}% + \@preamble@keys + \let\@elt\relax} +\newcommand*\DeclareCaptionOption{% + \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOption +\newcommand*\caption@declareoption[2]{% + #1{\undefine@key{caption}{#2}}\define@key{caption}{#2}} +\@onlypreamble\caption@declareoption +\newcommand*\DeclareCaptionOptionNoValue{% + \caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOptionNoValue +\newcommand\caption@declareoption@novalue[3]{% + \caption@declareoption{#1}{#2}[\KV@err]{% + \caption@option@novalue{#2}{##1}{#3}}} +\@onlypreamble\caption@declareoption@novalue +\newcommand*\caption@option@novalue[2]{% + \ifx\KV@err#2% + \expandafter\@firstofone + \else + \KV@err{No value allowed for #1}% + \expandafter\@gobble + \fi} +\newif\ifcaptionsetup@star +\newcommand*\captionsetup{% + \caption@teststar@\@captionsetup\@gobble\@firstofone} +\newcommand*\@captionsetup[1]{% + \captionsetup@startrue#1\captionsetup@starfalse + \@ifnextchar[\caption@setup@options\caption@setup} +\newcommand*\caption@setup{\caption@setkeys{caption}} +\def\caption@setup@options[#1]#2{% + \@bsphack + \ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi + \expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}% + \@esphack} +\newcommand*\clearcaptionsetup{% + \caption@teststar@\@clearcaptionsetup\@gobble\@firstofone} +\newcommand*\@clearcaptionsetup[1]{% + \let\caption@tempa#1% + \@testopt\@@clearcaptionsetup{}} +\def\@@clearcaptionsetup[#1]#2{% + \@bsphack + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@tempa{\caption@Warning{Option list `#2' undefined}}}% + {\ifx,#1,% + \caption@clearsetup{#2}% + \else + \caption@@removefromsetup{#1}{#2}% + \fi}% + \@esphack} +\newcommand*\caption@clearsetup[1]{% + \caption@removefromoptlist{#1}% + \@nameundef{caption@opt@#1}} +\newcommand*\caption@removefromsetup{% + \let\caption@tempa\@gobble + \caption@@removefromsetup} +\newcommand*\caption@@removefromsetup[2]{% + \expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname + \expandafter\let\csname caption@opt@#2\endcsname\@undefined + \def\@tempb##1=##2\@nil{##1}% + \edef\@tempc{#1}% + \@for\@tempa:=\@tempa\do{% + \edef\@tempd{\expandafter\@tempb\@tempa=\@nil}% + \ifx\@tempd\@tempc + \let\caption@tempa\@gobble + \else + \expandafter\expandafter\expandafter\caption@l@addto@list + \expandafter\csname caption@opt@#2\expandafter\endcsname + \expandafter{\@tempa}% + \fi}% + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@removefromoptlist{#2}}{}% + \caption@tempa{\caption@Warning{% + Option `#1' was not in list `#2'\MessageBreak}}} +\newcommand*\showcaptionsetup[2][\@firstofone]{% + \@bsphack + \GenericWarning{}{% + #1 Caption Info: Option list on `#2'\MessageBreak + #1 Caption Data: \@ifundefined{caption@opt@#2}{% + -none-% + }{% + {\expandafter\expandafter\expandafter\strip@prefix + \expandafter\meaning\csname caption@opt@#2\endcsname}% + }}% + \@esphack} +\DeclareCaptionOption{options}{\caption@setoptions{#1}} +\newcommand*\caption@setoptions[1]{% + \caption@Debug{options=#1}% + \expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname + \ifx\caption@opt\relax \else + \caption@xsetup\caption@opt + \caption@clearsetup{#1}% + \fi} +\newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}} +\newcommand*\caption@addtooptlist[1]{% + \@ifundefined{caption@opt@#1@lineno}{% + \caption@dooptlist\caption@g@addto@list{#1}% + \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}% + }{}} +\newcommand*\caption@removefromoptlist[1]{% + \caption@dooptlist\caption@g@removefrom@list{#1}% + \global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined} +\newcommand*\caption@dooptlist[2]{% + \begingroup + \edef\@tempa{#2}\@onelevel@sanitize\@tempa + \expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}% + \endgroup} +\AtEndDocument{% + \caption@for@list\caption@optlist{% + \caption@WarningNoLine{% + Unused \string\captionsetup[#1] + on input line \csname caption@opt@#1@lineno\endcsname}}} +\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys} +\long\def\caption@@setkeys[#1]#2#3{% + \@bsphack + \expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err + \expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx + \expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname + \ifx\KV@err\relax + \def\KV@err##1{\PackageError{#1}{##1}{% + See the #1 package documentation for explanation.}}% + \fi + \let\KV@errx\KV@err + \edef\caption@keydepth{\caption@keydepth i}% + \caption@Debug{\protect\setkeys{#2}{#3}}% + \setkeys{#2}{#3}% + \edef\caption@keydepth{\expandafter\@gobble\caption@keydepth}% + \expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname + \expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname + \ifx\caption@keydepth\@empty \captionsetup@starfalse \fi + \@esphack} +\let\caption@keydepth\@empty +\newcommand*\caption@ExecuteOptions[2]{% + \@expandtwoargs\caption@setkeys{#1}{#2}}% +\@onlypreamble\caption@ExecuteOptions +\newcommand*\caption@ProcessOptions{% + \caption@teststar\caption@@ProcessOptions\@gobble\@firstofone} +\@onlypreamble\caption@ProcessOptions +\newcommand*\caption@@ProcessOptions[2]{% + \let\@tempc\relax + \let\caption@tempa\@empty + #1{% \@firstofone -or- \@gobble + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#2@\CurrentOption}{}{% + \@ifundefined{KV@#2@\CurrentOption @default}{% + \PackageInfo{#2}{Global option `\CurrentOption' ignored}% + }{% + \PackageInfo{#2}{Global option `\CurrentOption' processed}% + \edef\caption@tempa{\caption@tempa,\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + }% + \let\CurrentOption\@empty + }% + \caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}% + \AtEndOfPackage{\let\@unprocessedoptions\relax}} +\@onlypreamble\caption@@ProcessOptions +\newdimen\captionmargin +\newdimen\captionmargin@ +\newdimen\captionwidth +\DeclareCaptionOption{margin}{\setcaptionmargin{#1}} +\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}} +\DeclareCaptionOption{width}{\setcaptionwidth{#1}} +\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}} +\DeclareCaptionOptionNoValue{oneside}{\caption@set@bool\caption@iftwoside0} +\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}} +\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}} +\newcommand*\setcaptionmargin{% + \caption@teststar\caption@setmargin\@gobble\@firstofone} +\newcommand*\caption@setmargin[2]{% + #1{\captionwidth\z@}% + \caption@@setmargin#2,#2,\@nil} +\def\caption@@setmargin#1,#2,#3\@nil{% + \setlength\captionmargin@{#2}% + \setlength\captionmargin{#1}% + \addtolength\captionmargin@{-\captionmargin}} +\newcommand*\setcaptionwidth{% + \captionmargin\z@ + \captionmargin@\z@ + \setlength\captionwidth} +\newcommand*\caption@thecounter{0} +\newcommand*\caption@stepcounter{% + \@tempcnta\caption@thecounter + \advance\@tempcnta\@ne + \xdef\caption@thecounter{\the\@tempcnta}} +\newcommand*\caption@newlabel{\@newl@bel{caption@r}} +\newcommand*\caption@thepage{\the\c@page} +\newcommand*\caption@label[1]{% + \caption@@label + \protected@write\@auxout{\let\caption@thepage\relax}% + {\string\caption@newlabel{#1}{\caption@thepage}}} +\newcommand*\caption@@label{% + \global\let\caption@@label\relax + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@newlabel[2]{}}} +\newcommand*\caption@pageref[1]{% + \expandafter\ifx\csname caption@r@#1\endcsname\relax + \G@refundefinedtrue % => 'There are undefined references.' + \@latex@warning{Reference `#1' on page \thepage \space undefined}% + \else + \expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname + \fi} +\newcommand*\caption@ifoddpage{% + \caption@iftwoside{% + \caption@label\caption@thecounter + \caption@pageref\caption@thecounter + \ifodd\caption@thepage + \let\caption@ifoddpage\@firstoftwo + \else + \let\caption@ifoddpage\@secondoftwo + \fi + }{\let\caption@ifoddpage\@firstoftwo}% + \caption@ifoddpage} +\newcommand*\caption@setoptcmd[2]{% + \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}} +\newdimen\caption@indent +\newdimen\caption@parindent +\newdimen\caption@hangindent +\DeclareCaptionOption{indent}[\leftmargini]{% obsolete! + \setlength\caption@indent{#1}} +\DeclareCaptionOption{indention}[\leftmargini]{% + \setlength\caption@indent{#1}} +\DeclareCaptionOption{parindent}{% + \setlength\caption@parindent{#1}} +\DeclareCaptionOption{hangindent}{% + \setlength\caption@hangindent{#1}} +\DeclareCaptionOption{parskip}{% + \l@addto@macro\caption@@par{\setlength\parskip{#1}}} +\providecommand*\caption@ifkomaclass{% + \@ifundefined{scr@caption}\@gobble\@firstofone} +\@onlypreamble\caption@ifkomaclass +\caption@ifkomaclass{% + \let\caption@KV@parindent\KV@caption@parindent + \DeclareCaptionOption{parindent}[]{% + \ifx,#1,% + \caption@Debug{Option `parindent' ignored}% + \else + \caption@KV@parindent{#1}% + \fi}% + \let\caption@KV@parskip\KV@caption@parskip + \DeclareCaptionOption{parskip}[]{% + \ifx,#1,% + \caption@Debug{Option `parskip' ignored}% + \else + \caption@KV@parskip{#1}% + \fi}% +} +\newcommand*\DeclareCaptionStyle[1]{% + \@testopt{\caption@declarestyle{#1}}{}} +\@onlypreamble\DeclareCaptionStyle +\def\caption@declarestyle#1[#2]#3{% + \global\@namedef{caption@sls@#1}{#2}% + \global\@namedef{caption@sty@#1}{#3}} +\@onlypreamble\caption@declarestyle +\DeclareCaptionOption{style}{\caption@setstyle{#1}} +\DeclareCaptionOption{style*}{\caption@setstyle*{#1}} +\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}} +\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}} +\newcommand*\caption@setstyle{% + \caption@teststar\caption@@setstyle\@gobble\@firstofone} +\newcommand*\caption@@setstyle[2]{% + \@ifundefined{caption@sty@#2}% + {#1{\caption@Error{Undefined style `#2'}}}% + {\expandafter\let\expandafter\caption@sty\csname caption@sty@#2\endcsname + \ifx\caption@setstyle@flag\@undefined + \let\caption@setstyle@flag\relax + \caption@resetstyle + \caption@xsetup\caption@sty + \let\caption@setstyle@flag\@undefined + \else + \caption@xsetup\caption@sty + \fi + \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname + \expandafter\caption@l@addto@list\expandafter\caption@opt@singleline + \expandafter{\caption@sls}}} +\newcommand*\caption@resetstyle{% + \caption@setup{% + format=plain,labelformat=default,labelsep=colon,textformat=simple,% + justification=justified,font=,size=,labelfont=,textfont=,% + margin=0pt,minmargin=0,maxmargin=0,% + indent=0pt,parindent=0pt,hangindent=0pt,% + slc,rule,strut}% + \caption@clearsetup{singleline}} +\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{} +\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{% + format=default,labelsep=default,textformat=default,% + justification=default,font=default,labelfont=default,textfont=default} +\newcommand*\DeclareCaptionFormat{% + \caption@teststar\caption@declareformat\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionFormat +\newcommand*\caption@declareformat[2]{% + \@dblarg{\caption@@declareformat#1{#2}}} +\@onlypreamble\caption@declareformat +\long\def\caption@@declareformat#1#2[#3]#4{% + \global\expandafter\let\csname caption@ifh@#2\endcsname#1% + \global\long\@namedef{caption@slfmt@#2}##1##2##3{#3}% + \global\long\@namedef{caption@fmt@#2}##1##2##3{#4}} +\@onlypreamble\caption@@declareformat +\DeclareCaptionOption{format}{\caption@setformat{#1}} +\newcommand*\caption@setformat[1]{% + \@ifundefined{caption@fmt@#1}% + {\caption@Error{Undefined format `#1'}}% + {\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname + \expandafter\let\expandafter\caption@slfmt\csname caption@slfmt@#1\endcsname + \expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}} +\newcommand*\DeclareCaptionDefaultFormat[1]{% + \expandafter\def\expandafter\caption@fmt@default\expandafter + {\csname caption@fmt@#1\endcsname}% + \expandafter\def\expandafter\caption@slfmt@default\expandafter + {\csname caption@slfmt@#1\endcsname}% + \expandafter\def\expandafter\caption@ifh@default\expandafter + {\csname caption@ifh@#1\endcsname}} +\@onlypreamble\DeclareCaptionDefaultFormat +\DeclareCaptionFormat{plain}{#1#2#3\par} +\DeclareCaptionFormat{hang}[#1#2#3\par]{% + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with `format=hang'}}% + {\@hangfrom{#1#2}% + \advance\caption@parindent\hangindent + \advance\caption@hangindent\hangindent + \caption@@par#3\par}} +\DeclareCaptionDefaultFormat{plain} +\newcommand*\DeclareCaptionLabelFormat[2]{% + \global\@namedef{caption@lfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionLabelFormat +\DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}} +\newcommand*\caption@setlabelformat[1]{% + \@ifundefined{caption@lfmt@#1}% + {\caption@Error{Undefined label format `#1'}}% + {\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}} +\DeclareCaptionLabelFormat{empty}{} +\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} +\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} +\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} +\def\caption@lfmt@default{\caption@lfmt@simple} +\newcommand\DeclareCaptionLabelSeparator{% + \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionLabelSeparator +\newcommand\caption@declarelabelseparator[3]{% + \global\expandafter\let\csname caption@iflf@#2\endcsname#1% + \global\long\@namedef{caption@lsep@#2}{#3}% + \caption@@declarelabelseparator{#2}#3\\\@nil} +\@onlypreamble\caption@declarelabelseparator +\long\def\caption@@declarelabelseparator#1#2\\#3\@nil{% + \def\@tempa{#3}\ifx\@tempa\@empty \else + \caption@g@addto@list\caption@lsepcrlist{#1}% + \fi} +\@onlypreamble\caption@@declarelabelseparator +\DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}} +\DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}} +\newcommand*\caption@setlabelseparator[1]{% + \@ifundefined{caption@lsep@#1}% + {\caption@Error{Undefined label separator `#1'}}% + {\edef\caption@lsepname{#1}% + \expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname + \expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}} +\DeclareCaptionLabelSeparator{none}{} +\DeclareCaptionLabelSeparator{colon}{: } +\DeclareCaptionLabelSeparator{period}{. } +\DeclareCaptionLabelSeparator{space}{ } +\DeclareCaptionLabelSeparator*{quad}{\quad} +\DeclareCaptionLabelSeparator*{newline}{\\} +\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space} +\newcommand*\caption@setdefaultlabelsep[1]{% + \ifx\caption@lsep\caption@lsep@default + \caption@set@default@labelsep{#1}% + \caption@setlabelseparator{default}% + \else + \caption@set@default@labelsep{#1}% + \fi} +\newcommand*\caption@set@default@labelsep[1]{% + \def\caption@lsep@default{\@nameuse{caption@lsep@#1}}% + \def\caption@iflf@default{\@nameuse{caption@iflf@#1}}} +\caption@set@default@labelsep{colon} +\newcommand*\DeclareCaptionTextFormat[2]{% + \global\long\@namedef{caption@tfmt@#1}##1{#2}} +\@onlypreamble\DeclareCaptionTextFormat +\DeclareCaptionOption{textformat}{\caption@settextformat{#1}} +\DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}} +\newcommand*\caption@settextformat[1]{% + \@ifundefined{caption@tfmt@#1}% + {\caption@Error{Undefined text format `#1'}}% + {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}} +\DeclareCaptionTextFormat{simple}{#1} +\DeclareCaptionTextFormat{period}{#1.} +\def\caption@tfmt@default{\caption@tfmt@simple} +\newcommand*\DeclareCaptionFont[2]{% + \define@key{caption@fnt}{#1}[]{\l@addto@macro\caption@fnt{#2}}} +\@onlypreamble\DeclareCaptionFont +\newcommand*\DeclareCaptionDefaultFont[2]{% + \global\@namedef{caption#1@default}{#2}} +\@onlypreamble\DeclareCaptionDefaultFont +\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} +\DeclareCaptionOption{font+}{\caption@addtofont{font}{#1}} +\DeclareCaptionDefaultFont{font}{} +\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} +\DeclareCaptionOption{labelfont+}{\caption@addtofont{labelfont}{#1}} +\DeclareCaptionDefaultFont{labelfont}{} +\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} +\DeclareCaptionOption{textfont+}{\caption@addtofont{textfont}{#1}} +\DeclareCaptionDefaultFont{textfont}{} +\newcommand*\caption@setfont[1]{% + \expandafter\let\csname caption#1\endcsname\@empty + \caption@addtofont{#1}} +\newcommand*\caption@addtofont[2]{% + \begingroup + \expandafter\let\expandafter\caption@fnt\csname caption#1\endcsname + \define@key{caption@fnt}{default}[]{% + \l@addto@macro\caption@fnt{\csname caption#1@default\endcsname}}% + \caption@setkeys[caption]{caption@fnt}{#2}% + \global\let\caption@tempa\caption@fnt + \endgroup + \expandafter\let\csname caption#1\endcsname\caption@tempa} +\newcommand*\caption@font{% + \caption@teststar\caption@@font\@firstofone + {\caption@setkeys[caption]{caption@fnt}}} +\newcommand*\caption@@font[2]{% + \begingroup + \def\caption@fnt{\endgroup}% + #1{#2}% + \caption@fnt} +\DeclareCaptionFont{normalcolor}{\normalcolor} +\DeclareCaptionFont{color}{\color{#1}} +\DeclareCaptionFont{normalfont}{\normalfont} +\DeclareCaptionFont{up}{\upshape} +\DeclareCaptionFont{it}{\itshape} +\DeclareCaptionFont{sl}{\slshape} +\DeclareCaptionFont{sc}{\scshape} +\DeclareCaptionFont{md}{\mdseries} +\DeclareCaptionFont{bf}{\bfseries} +\DeclareCaptionFont{rm}{\rmfamily} +\DeclareCaptionFont{sf}{\sffamily} +\DeclareCaptionFont{tt}{\ttfamily} +\DeclareCaptionFont{scriptsize}{\scriptsize} +\DeclareCaptionFont{footnotesize}{\footnotesize} +\DeclareCaptionFont{small}{\small} +\DeclareCaptionFont{normalsize}{\normalsize} +\DeclareCaptionFont{large}{\large} +\DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{singlespacing}{% + \@ifundefined{setspace@singlespace}{}{% + \setstretch\setspace@singlespace}}% normally 1 +\DeclareCaptionFont{onehalfspacing}{\onehalfspacing} +\DeclareCaptionFont{doublespacing}{\doublespacing} +\DeclareCaptionFont{stretch}{\setstretch{#1}} +\DeclareCaptionFont{normal}{% + \caption@font*{% + \KV@caption@fnt@normalcolor\@unused + \KV@caption@fnt@normalfont\@unused + \KV@caption@fnt@normalsize\@unused + \KV@caption@fnt@singlespacing\@unused}} +\DeclareCaptionOption{size}{\caption@setfont{size}{#1}} +\DeclareCaptionDefaultFont{size}{} +\newcommand*\DeclareCaptionJustification[2]{% + \global\@namedef{caption@hj@#1}{#2}% for compatibility to v3.0 + \DeclareCaptionFont{#1}{#2}} +\@onlypreamble\DeclareCaptionJustification +\newcommand*\DeclareCaptionDefaultJustification[1]{% + \global\@namedef{caption@hj@default}{#1}% for compatibility to v3.0 + \DeclareCaptionDefaultFont{@hj}{#1}} +\@onlypreamble\DeclareCaptionDefaultJustification +\DeclareCaptionOption{justification}{\caption@setjustification{#1}} +\DeclareCaptionDefaultJustification{} +\newcommand*\caption@setjustification{\caption@setfont{@hj}} +\DeclareCaptionJustification{justified}{} +\DeclareCaptionJustification{centering}{\centering} +\DeclareCaptionJustification{centerfirst}{\centerfirst} +\DeclareCaptionJustification{centerlast}{\centerlast} +\DeclareCaptionJustification{raggedleft}{\raggedleft} +\DeclareCaptionJustification{raggedright}{\raggedright} +\providecommand\centerfirst{% + \let\\\@centercr + \edef\caption@normaladjust{% + \leftskip\the\leftskip + \rightskip\the\rightskip + \parfillskip\the\parfillskip\relax}% + \leftskip\z@\@plus -1fil% + \rightskip\z@\@plus 1fil% + \parfillskip\z@skip + \noindent\hskip\z@\@plus 2fil% + \@setpar{\@@par\@restorepar\caption@normaladjust}} +\providecommand\centerlast{% + \let\\\@centercr + \leftskip\z@\@plus 1fil% + \rightskip\z@\@plus -1fil% + \parfillskip\z@\@plus 2fil\relax} +\DeclareCaptionJustification{Centering}{% + \caption@ragged\Centering\centering} +\DeclareCaptionJustification{RaggedLeft}{% + \caption@ragged\RaggedLeft\raggedleft} +\DeclareCaptionJustification{RaggedRight}{% + \caption@ragged\RaggedRight\raggedright} +\newcommand*\caption@ragged{% + \caption@Debug{We need ragged2e}% + \protected@write\@auxout{}{\string\caption@newlabel{ragged2e}{}}% + \global\let\caption@ragged\caption@@ragged + \caption@ragged} +\caption@AtBeginDocument{% + \@ifundefined{caption@r@ragged2e}{% + \newcommand*\caption@@ragged{% + \caption@Warning{% + `ragged2e' support has been changed.\MessageBreak + Rerun to get captions right}% + \global\let\caption@ragged\@secondoftwo % suppress further warnings + \caption@ragged}% + }{% + \caption@Debug{We load ragged2e}% + \IfFileExists{ragged2e.sty}{% + \RequirePackage{ragged2e}% + \let\caption@@ragged\@firstoftwo + }{% + \newcommand*\caption@@ragged[2]{% + \@ifundefined{caption\string#1}{% + \caption@Warning{% + `ragged2e' package not loaded, therefore\MessageBreak + substituting \string#2 for \string#1\MessageBreak}% + \global\@namedef{caption\string#1}}{}% + #2}% + }% + }} +\@ifundefined{abovecaptionskip}{% + \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} +\@ifundefined{belowcaptionskip}{% + \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} +\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}} +\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}} +\DeclareCaptionOption{skip}{\setlength\abovecaptionskip{#1}} +\newcommand*\caption@rule{\caption@ifrule\caption@hrule\relax} +\newcommand*\caption@hrule{\hrule\@height\z@} +\DeclareCaptionOption{rule}[1]{\caption@set@bool\caption@ifrule{#1}} +\DeclareCaptionOption{position}{\caption@setposition{#1}} +\newcommand*\caption@setposition[1]{% + \caption@ifinlist{#1}{d,default}{% + \let\caption@position\caption@defaultpos + }{\caption@ifinlist{#1}{t,top,above}{% + \let\caption@position\@firstoftwo + }{\caption@ifinlist{#1}{b,bottom,below}{% + \let\caption@position\@secondoftwo + }{\caption@ifinlist{#1}{a,auto}{% + \let\caption@position\@undefined + }{% + \caption@Error{Undefined position `#1'}% + }}}}} +\let\caption@defaultpos\@undefined +\newcommand*\caption@iftop{% + \ifx\caption@position\@undefined + \let\caption@position\@secondoftwo + \fi + \caption@position} +\newcommand*\caption@fixposition{% + \ifx\caption@position\@undefined + \caption@autoposition + \fi} +\newcommand*\caption@autoposition{% + \ifvmode + \edef\caption@tempa{\the\prevdepth}% + \caption@Debug{\protect\prevdepth=\caption@tempa}% + \ifdim\prevdepth>-\p@ + \let\caption@position\@secondoftwo + \else + \let\caption@position\@firstoftwo + \fi + \else + \caption@Debug{no \protect\prevdepth}% + \let\caption@position\@secondoftwo + \fi} +\newcommand*\caption@setautoposition[1]{% + \def\caption@autoposition{\caption@setposition{#1}}} +\newcommand*\caption@beginhook{} +\newcommand*\caption@endhook{} +\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook} +\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook} +\DeclareCaptionOption{list}[1]{\caption@setlist{#1}} +\DeclareCaptionOption{listof}[1]{\caption@setlist{#1}} +\newcommand*\caption@setlist{\caption@set@bool\caption@iflist} +\newcommand*\DeclareCaptionListFormat[2]{% + \global\@namedef{caption@lstfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionListFormat +\DeclareCaptionOption{listformat}{\caption@setlistformat{#1}} +\newcommand*\caption@setlistformat[1]{% + \@ifundefined{caption@lstfmt@#1}% + {\caption@Error{Undefined list format `#1'}}% + {\expandafter\let\expandafter\caption@lstfmt + \csname caption@lstfmt@#1\endcsname}} +\DeclareCaptionListFormat{empty}{} +\DeclareCaptionListFormat{simple}{#1#2} +\DeclareCaptionListFormat{parens}{#1(#2)} +\DeclareCaptionListFormat{subsimple}{#2} +\DeclareCaptionListFormat{subparens}{(#2)} +\newcommand*\caption@setdefaultlistformat[1]{% + \ifx\caption@lstfmt\caption@lstfmt@default + \caption@set@default@listformat{#1}% + \caption@setlistformat{default}% + \else + \caption@set@default@listformat{#1}% + \fi} +\newcommand*\caption@set@default@listformat[1]{% + \def\caption@lstfmt@default{\@nameuse{caption@lstfmt@#1}}} +\caption@set@default@listformat{subsimple} +\DeclareCaptionOption{debug}[1]{% + \caption@set@bool\caption@ifdebug{#1}% + \caption@ifdebug + {\def\caption@Debug{\PackageInfo{caption}}}% + {\let\caption@Debug\@gobble}} +\DeclareOption{debug}{\setkeys{caption}{debug}} +\setkeys{caption}{debug=0} +\caption@CheckCommand\@makecaption{% + % article|report|book [2005/09/16 v1.4f Standard LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +\providecommand*\caption@ifamsclass{% + \@ifundefined{@captionheadfont}\@gobble\@firstofone} +\@onlypreamble\caption@ifamsclass +\caption@ifamsclass{% + \caption@CheckCommand\@makecaption{% + % amsart|amsproc|amsbook [2004/08/06 v2.20] + \long\def\@makecaption#1#2{% + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \else % if the float IS NOT a figure... + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} + \caption@CheckCommand\@makecaption{% + % smfart|smfbook [1999/11/15 v1.2f Classe LaTeX pour les articles publies par la SMF] + \long\def\@makecaption#1#2{% + \ifdim\captionindent>.1\hsize \captionindent.1\hsize \fi + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{\@addpunct{.}\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \@tempdima\wd\@ne\advance\@tempdima-\captionindent + \wd\@ne\@tempdima + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\rightskip=0pt plus\captionindent\relax + \unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \noindent\kern\captionindent\box\@ne + \else % if the float IS NOT a figure... + \noindent\kern\captionindent\box\@ne + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} + \let\captionmargin\captionindent % set to 3pc by AMS class + \begingroup\edef\@tempa{\endgroup + \noexpand\caption@g@addto@list\noexpand\caption@sty@default + {margin=\the\captionmargin + \@ifundefined{smf@makecaption}{}{,maxmargin=.1\linewidth}}} + \@tempa + \caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin} + \DeclareCaptionLabelSeparator{default}{.\enspace} + \DeclareCaptionDefaultFont{font}{\@captionfont} + \DeclareCaptionDefaultFont{labelfont}{\@captionheadfont} + \DeclareCaptionDefaultFont{textfont}{\@captionfont\upshape} + \captionsetup[figure]{position=b} + \captionsetup[table]{position=t} +} +\providecommand*\caption@ifbeamerclass{% + \@ifclassloaded{beamer}\@firstofone\@gobble} +\@onlypreamble\caption@ifbeamerclass +\caption@ifbeamerclass{% + \caption@CheckCommand\beamer@makecaption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\beamer@makecaption#1#2{% + \def\insertcaptionname{\csname#1name\endcsname}% + \def\insertcaptionnumber{\csname the#1\endcsname}% + \def\insertcaption{#2}% + \nobreak\vskip\abovecaptionskip\nobreak + \sbox\@tempboxa{\usebeamertemplate**{caption}}% + \ifdim \wd\@tempboxa >\hsize + \usebeamertemplate**{caption}\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \nobreak\vskip\belowcaptionskip\nobreak}} + \DeclareCaptionLabelFormat{default}{#1} + \DeclareCaptionDefaultJustification{\raggedright} + \DeclareCaptionDefaultFont{font}{% + \usebeamerfont*{caption}% + \usebeamercolor[fg]{caption}} + \DeclareCaptionDefaultFont{labelfont}{% + \usebeamercolor[fg]{caption name}% + \usebeamerfont*{caption name}} + \defbeamertemplate{caption}{caption3}{% + \caption@make\insertcaptionname\insertcaptionnumber\insertcaption} + \DeclareOption{beamer}{% + % \usebeamertemplate**{caption} will set font + \DeclareCaptionDefaultFont{font}{}% + \setbeamertemplate{caption}[caption3]} +} +\providecommand*\caption@ifkomaclass{% + \@ifundefined{scr@caption}\@gobble\@firstofone} +\@onlypreamble\caption@ifkomaclass +\caption@ifkomaclass{% + \caption@CheckCommand\@makecaption{% + % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class] + \long\def\@makecaption#1#2{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + \@@makecaption\@firstofone{#1}{#2}% + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi}} + \DeclareCaptionFormat{default}[#1#2#3\par]{% + \ifdofullc@p + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with \noexpand\setcaphanging (which is set by default)}}% + {\caption@fmt@hang{#1}{#2}{#3}}% + \else + #1#2% + \ifdim\cap@indent<\z@ + \par + \noindent\hspace*{-\cap@indent}% + \else\if@capbreak + \par + \fi\fi + #3\par + \fi} + \DeclareCaptionLabelSeparator{default}{\captionformat} + \DeclareCaptionDefaultFont{font}{\scr@fnt@caption} + \DeclareCaptionDefaultFont{labelfont}{\scr@fnt@captionlabel} +} +\providecommand*\caption@ifntgclass{% + \@ifundefined{CaptionFonts}\@gobble\@firstofone} +\@onlypreamble\caption@ifntgclass +\caption@ifntgclass{% + \caption@CheckCommand\@makecaption{% + % artikel|rapport|boek [2004/06/07 v2.1a NTG LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{{\CaptionLabelFont#1:} \CaptionTextFont#2}% + \ifdim \wd\@tempboxa >\hsize + {\CaptionLabelFont#1:} \CaptionTextFont#2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \DeclareCaptionDefaultFont{labelfont}{\CaptionLabelFont} + \DeclareCaptionDefaultFont{textfont}{\CaptionTextFont} +} +\providecommand*\caption@ifthesisclass{% + \@ifundefined{cph@font}{\@gobble}{\@ifundefined{cpb@font}\@gobble\@firstofone}} +\caption@ifthesisclass{% + \caption@CheckCommand\@makecaption{% + % thesis.cls 1996/25/01 1.0g LaTeX document class (wm). + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \setbox\@tempboxa\hbox{{\cph@font #1:} {\cpb@font #2}}% + \ifdim \wd\@tempboxa >\hsize + \@hangfrom{\cph@font #1: }{\cpb@font #2\par}% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \DeclareCaptionDefaultFormat{hang} + \DeclareCaptionDefaultFont{labelfont}{\cph@font} + \DeclareCaptionDefaultFont{textfont}{\cpb@font} +} +\@ifundefined{FB@makecaption}{}{% + \caption@CheckCommand\@makecaption{% + % frenchb.ldf [2005/02/06 v1.6g French support from the babel system] + % frenchb.ldf [2007/10/05 v2.0e French support from the babel system] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1\CaptionSeparator #2}% + \ifdim \wd\@tempboxa >\hsize + #1\CaptionSeparator #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \ifx\@makecaption\STD@makecaption + \DeclareCaptionLabelSeparator{default}{\CaptionSeparator} + \def\caption@frenchb{% supress frenchb warning + \let\STD@makecaption\@makecaption + \let\FB@makecaption\@makecaption} + \else + \ifx\@makecaption\@undefined\else + \PackageInfo{caption}{% + The definition of \protect\@makecaption\space + has been changed,\MessageBreak + frenchb will NOT customize it}% + \fi + \fi +} +\@ifundefined{frenchTeXmods}{}{% + \caption@CheckCommand\@makecaption{% + % french(le).sty [2006/10/03 The french(le) package /V5,9991/] + % french(le).sty [2007/06/28 The french(le) package /V5,9994/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \def\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}} + \caption@CheckCommand\@makecaption{% + % french(le).sty [2007/02/11 The french(le) package /V5,9993/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \protected@edef\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}} + \DeclareCaptionDefaultFont{textfont}{\itshape}% + \DeclareCaptionLabelSeparator{default}{\captionseparator\space}% +} +\DeclareCaptionListFormat{subperiod}{#2.} +%%% \def\caption@tempa#1{\@ifundefined{extras#1}{}{% +%%% \expandafter\addto\csname extras#1\endcsname{% +%%% % reverse changes made by magyar.ldf +%%% \let\@makecaption\caption@makecaption +%%% \babel@save\@makecaption +%%% \caption@redefine +%%% \babel@save\@caption +%%% % change default labelsep and listformat +%%% \caption@setdefaultlabelsep{period}% +%%% \caption@setdefaultlistformat{subperiod}}% +%%% \expandafter\addto\csname noextras#1\endcsname{% +%%% % change default labelsep and listformat +%%% \caption@setdefaultlabelsep{colon}% +%%% \caption@setdefaultlistformat{subsimple}}% +%%% }} +%%% \caption@tempa{hungarian} +%%% \caption@tempa{magyar} +\captionsetup{style=default,position=default,% + list,listformat=default,twoside=\if@twoside 1\else 0\fi} +\ProcessOptions* +\caption@IfCheckCommand{% + \caption@setbool{documentclass}{1}% +}{% + \caption@setbool{documentclass}{0}% + \PackageInfo{caption}{% + Unknown document class (or package),\MessageBreak + standard defaults will be used}% + \caption@Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}% +} +\newcommand*\caption@addcontentsline[2]{% + \caption@iflist + {\def\@tempa{#2}}% + {\let\@tempa\@empty}% + \ifx\@tempa\@empty \else + {\let\\\space + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline + {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + {\ignorespaces #2}}}% + \fi} +\newif\ifcaption@star +\newcommand*\caption@fnum[1]{\caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}} +\newcommand\caption@make[2]{\caption@@make{\caption@lfmt{#1}{#2}}} +\newcommand\caption@@make[2]{% + \begingroup + \caption@stepcounter + \caption@beginhook + \ifx\caption@maxmargin\@undefined \else + \ifdim\captionmargin>\caption@maxmargin\relax + \captionmargin\caption@maxmargin\relax + \fi + \fi + \ifx\caption@minmargin\@undefined \else + \ifdim\captionmargin<\caption@minmargin\relax + \captionmargin\caption@minmargin\relax + \fi + \fi + \caption@ifslc{\caption@slc{#1}{#2}\captionwidth\relax}{}% + \caption@calcmargin + \@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{}{\advance\@tempdima\captionmargin@}% + \fi + \caption@ifh{\advance\@tempdima\caption@indent}% + \hspace\@tempdima + \@tempdima\captionwidth + \caption@ifh{\advance\@tempdima-\caption@indent}% + \caption@parbox\@tempdima{% + \caption@ifh{% + \ifdim\caption@indent=\z@ + \leavevmode + \else + \hskip-\caption@indent + \fi}% + \caption@@@make{#1}{#2}}% + \@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{\advance\@tempdima\captionmargin@}{}% + \fi + \hspace\@tempdima + \caption@endhook + \endgroup + \global\caption@starfalse} +\newcommand*\caption@calcmargin{% + \ifdim\captionwidth=\z@ + \captionwidth\linewidth + \advance\captionwidth by -2\captionmargin + \advance\captionwidth by -\captionmargin@ + \else + \captionmargin\linewidth + \advance\captionmargin by -\captionwidth + \divide\captionmargin by 2 + \captionmargin@\z@ + \fi + \caption@Debug{% + \string\hsize=\the\hsize, + \string\linewidth=\the\linewidth,\MessageBreak + \string\leftmargin=\the\leftmargin, + \string\rightmargin=\the\rightmargin,\MessageBreak + \string\margin=\the\captionmargin, + \string\margin@=\the\captionmargin@, + \string\width=\the\captionwidth}% +} +\newcommand\caption@slc[4]{% + \caption@Debug{Begin SLC}% + \begingroup + \caption@singleline + \let\caption@hj\@empty + \caption@calcmargin % calculate #3 if necessary + \caption@prepareslc + \sbox\@tempboxa{\caption@@@make{#1}{#2}}% + \ifdim\wd\@tempboxa>#3% + \endgroup + \else + \endgroup + \caption@singleline + #4% + \fi + \caption@Debug{End SLC}} +\newcommand*\caption@singleline{% + \caption@xsetup\caption@opt@singleline + \let\caption@fmt\caption@slfmt} +\newcommand*\caption@prepareslc{% + \let\@footnotetext\@gobble\let\@endnotetext\@gobble + \def\label{\caption@withoptargs\@gobbletwo}% + \let\stepcounter\caption@l@stepcounter + \let\refstepcounter\stepcounter\let\H@refstepcounter\stepcounter} +\newcommand*\caption@l@stepcounter[1]{\advance\csname c@#1\endcsname\@ne\relax} +\newcommand*\caption@parbox{\parbox[b]} +\newcommand\caption@@@make[2]{% + \sbox\@tempboxa{#1}% + \ifdim\wd\@tempboxa=\z@ + \let\caption@lsep\relax + \fi + \caption@ifempty{#2}{% + \let\caption@lsep\relax + }% + \@setpar{\@@par\caption@@par}\caption@@par + \caption@hj\captionfont\captionsize\caption@fmt + {\ifcaption@star\else{\captionlabelfont#1}\fi}% + {\ifcaption@star\else{\caption@iflf\captionlabelfont\caption@lsep}\fi}% + {{\captiontextfont + \caption@ifstrut{\vrule\@height\ht\strutbox\@width\z@}{}% + \nobreak\hskip\z@skip % enable hyphenation + \caption@tfmt{#2}% + \caption@ifstrut{\ifhmode\@finalstrut\strutbox\fi}{}% + \par}}} +\newcommand\caption@ifempty[1]{% + \caption@if@empty{#1}% + \caption@ifempty\@unused} +\newcommand\caption@if@empty[1]{% + \def\caption@tempa{#1}% + \ifx\caption@tempa\@empty + \let\caption@ifempty\@secondoftwo + \else + \expandafter\def\expandafter\caption@tempa\expandafter{% + \caption@car#1\caption@if@empty\caption@nil}% + \def\caption@tempb{\caption@if@empty}% + \ifx\caption@tempa\caption@tempb + \let\caption@ifempty\@secondoftwo + \else + \def\caption@tempb{\ignorespaces}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobble#1}% + \else + \def\caption@tempb{\label}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\index}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\glossary}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \let\caption@ifempty\@gobbletwo + \fi + \fi + \fi + \fi + \fi + \fi} +\long\def\caption@car#1#2\caption@nil{#1}% same as \@car, but \long +\newcommand*\caption@@par{% + \parindent\caption@parindent\hangindent\caption@hangindent}% +\newcommand*\DeclareCaptionType{% + \@testopt\@DeclareCaptionType{}} +\@onlypreamble\DeclareCaptionType +\def\@DeclareCaptionType[#1]#2{% + \def\caption@type{#2}% + \caption@Debug{New type `#2'}% + \newcounter{#2}\@namedef{theH#2}{}% + \KV@caption@DCT@within\caption@within@default + \caption@DeclareWithinOption{#2}% + \KV@caption@DCT@placement{tbp}% + \@ifundefined{c@float@type}% + {\newcounter{float@type}% + \setcounter{float@type}{\@ifundefined{c@figure}14}}% + {}% + \caption@Debug{float type `#2'=\the\value{float@type}}% + \expandafter\xdef\csname ftype@#2\endcsname{\the\value{float@type}}% + \addtocounter{float@type}{\value{float@type}}% + \KV@caption@DCT@fileext{lo#2}% + \@namedef{fnum@#2}{\@nameuse{#2name}\nobreakspace\@nameuse{the#2}}% + \newenvironment{#2}{\@float{#2}}{\end@float}% + \newenvironment{#2*}{\@dblfloat{#2}}{\end@dblfloat}% + \expandafter\newcommand\csname listof#2s\endcsname{\caption@listof{#2}}% + \@ifundefined{l@figure}% + {\@namedef{l@#2}{\@dottedtocline{1}{1.5em}{2.3em}}}% + {\expandafter\let\csname l@#2\endcsname\l@figure}% + \expandafter\newcommand\csname #2name\endcsname{}% + \edef\@tempa{\def\noexpand\@tempa{\@car#2\@nil}}% + \uppercase\expandafter{\@tempa}% + \edef\@tempb{\noexpand\g@addto@macro\noexpand\@tempa{\@cdr#2\@nil}}% + \@tempb + \expandafter\let\csname #2name\endcsname\@tempa + \expandafter\newcommand\csname list#2name\endcsname{}% + \expandafter\xdef\csname list#2name\endcsname{List of \@tempa s}% + \@cons\caption@typelist{{#2}}% + \caption@setkeys[caption]{caption@DCT}{#1}% + \@ifundefined{float@exts}{\newtoks\float@exts}{}% + \let\float@do=\relax + \edef\@tempa{\noexpand\float@exts{\the\float@exts\float@do{\@nameuse{ext@#2}}}}% + \@tempa + \@ifundefined{float@addtolists}{% + \newcommand\float@addtolists[1]{% + \def\float@do####1{\addtocontents{####1}{##1}}\the\float@exts}% + \@ifundefined{@chapter}{}{\caption@PatchChapter}}{}% + \@ifnextchar[\@@DeclareCaptionType\relax} +\@onlypreamble\@DeclareCaptionType +\def\@@DeclareCaptionType[#1]{% + \KV@caption@DCT@name{#1}% + \@ifnextchar[\@@@DeclareCaptionType\relax} +\@onlypreamble\@@DeclareCaptionType +\def\@@@DeclareCaptionType[#1]{% + \KV@caption@DCT@listname{#1}} +\@onlypreamble\@@@DeclareCaptionType +\let\DeclareFloatingEnvironment\DeclareCaptionType % old command name +\@onlypreamble\DeclareFloatingEnvironment +\newcommand*\caption@within@default{\@ifundefined{c@chapter}{none}{chapter}} +\@onlypreamble\caption@within@default +\newcommand*\caption@listof[1]{% + \begingroup + \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname + \expandafter\let\expandafter\ext@figure\csname ext@#1\endcsname + \let\caption@ORI@starttoc\@starttoc + \renewcommand*\@starttoc[1]{% + \expandafter\caption@ORI@starttoc\expandafter{\ext@figure}}% + \listoffigures + \endgroup} +\newcommand*\caption@typelist{} +\define@key{caption@DCT}{fileext}{\@namedef{ext@\caption@type}{#1}} +\@onlypreamble@key{caption@DCT}{fileext} +\define@key{caption@DCT}{listname}{\@namedef{list\caption@type name}{#1}} +\@onlypreamble@key{caption@DCT}{listname} +\define@key{caption@DCT}{name}{\@namedef{\caption@type name}{#1}} +\@onlypreamble@key{caption@DCT}{name} +\define@key{caption@DCT}{placement}{\@namedef{fps@\caption@type}{#1}} +\@onlypreamble@key{caption@DCT}{placement} +\define@key{caption@DCT}{within}{% + \@ifundefined{c@chapter}{}{\@removefromreset\caption@type{chapter}}% + \@removefromreset\caption@type{section}% + \begingroup + \caption@setkeys[caption]{caption@within}{#1}% + \endgroup} +\define@key{caption@DCT}{without}{\KV@caption@DCT@within{none}} +\define@key{caption@within}{none}[]{% + \caption@within{}{}} +\define@key{caption@within}{section}[]{% + \@addtoreset\caption@type{section}% + \caption@within{\ifnum\c@section>\z@ \thesection.\fi}{\theHsection.}} +\@ifundefined{c@chapter}{}{% + \define@key{caption@within}{chapter}[]{% + \@addtoreset\caption@type{chapter}% + \caption@within{\ifnum\c@chapter>\z@ \thechapter.\fi}{\theHchapter.}} +}% \@onlypreamble@key{caption@within}{chapter}} +\newcommand*\caption@within{% + \expandafter\caption@within@\expandafter{\caption@type}} +\newcommand*\caption@within@[3]{% + \global\@namedef{the#1}{#2\arabic{#1}}% + \@ifundefined{theH#1}\caption@AtBeginDocument\@firstofone + {\global\@namedef{theH#1}{#3\arabic{#1}}}} +\providecommand*\@removefromreset[2]{{% + \expandafter\let\csname c@#1\endcsname\@removefromreset + \def\@elt##1{% + \expandafter\ifx\csname c@##1\endcsname\@removefromreset + \else + \noexpand\@elt{##1}% + \fi}% + \expandafter\xdef\csname cl@#2\endcsname{% + \csname cl@#2\endcsname}}} +\newcommand*\caption@PatchChapter{% + \providecommand*\@chapterlistsgap{10\p@}% + % report.cls [2005/09/16 v1.4f Standard LaTeX document class] + \caption@patch@chapter{report}{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}##1}% + \else + \addcontentsline{toc}{chapter}{##1}% + \fi + \chaptermark{##1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}]% + \else + \@makechapterhead{##2}% + \@afterheading + \fi + }{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}##1}% + \else + \addcontentsline{toc}{chapter}{##1}% + \fi + \chaptermark{##1}% + \ifdim \@chapterlistsgap>\z@ + \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% + \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% + \float@addtolists{\protect\addvspace{\@chapterlistsgap}}% + \fi + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}]% + \else + \@makechapterhead{##2}% + \@afterheading + \fi}% + % book.cls [2005/09/16 v1.4f Standard LaTeX document class] + \caption@patch@chapter{book}{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}##1}% + \else + \addcontentsline{toc}{chapter}{##1}% + \fi + \else + \addcontentsline{toc}{chapter}{##1}% + \fi + \chaptermark{##1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}]% + \else + \@makechapterhead{##2}% + \@afterheading + \fi + }{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}##1}% + \else + \addcontentsline{toc}{chapter}{##1}% + \fi + \else + \addcontentsline{toc}{chapter}{##1}% + \fi + \chaptermark{##1}% + \ifdim \@chapterlistsgap>\z@ + \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% + \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% + \float@addtolists{\protect\addvspace{\@chapterlistsgap}}% + \fi + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}]% + \else + \@makechapterhead{##2}% + \@afterheading + \fi}% + % amsbook.cls [2004/08/06 v2.20] + % smfbook.cls [1999/11/15 v1.2f Classe LaTeX pour les monographies editees par la SMF] + \caption@patch@chapter{ams/smfbook}{% + \refstepcounter{chapter}% + \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty + \else \let\@secnumber\thechapter \fi + \typeout{\chaptername\space\@secnumber}% + \def\@toclevel{0}% + \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{##2}% + \else \@tocwriteb\tocchapter{chapter}{##2}\fi + \chaptermark{##1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \@makechapterhead{##2}\@afterheading + }{% + \refstepcounter{chapter}% + \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty + \else \let\@secnumber\thechapter \fi + \typeout{\chaptername\space\@secnumber}% + \def\@toclevel{0}% + \ifx\chaptername\appendixname \@tocwriteb\tocappendix{chapter}{##2}% + \else \@tocwriteb\tocchapter{chapter}{##2}\fi + \chaptermark{##1}% + \ifdim \@chapterlistsgap>\z@ + \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% + \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% + \float@addtolists{\protect\addvspace{\@chapterlistsgap}}% + \fi + \@makechapterhead{##2}\@afterheading}% + % scrreprt/scrbook.cls + \@ifundefined{KOMAClassName}{}{% + \caption@Debug{document class `\KOMAClassName' detected}% + \let\caption@patch@chapter\@gobblethree}% + % rapport1/3.cls [2004/06/07 v2.1a NTG LaTeX document class] + \caption@patch@chapter{rapport}{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}\toc@font0 ##1}% + \else + \addcontentsline{toc}{chapter}{\toc@font0 ##1}% + \fi + \chaptermark{##1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}]% + \else + \@makechapterhead{##2}% + \@afterheading + \fi + }{% + \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}\toc@font0 ##1}% + \else + \addcontentsline{toc}{chapter}{\toc@font0 ##1}% + \fi + \chaptermark{##1}% + \ifdim \@chapterlistsgap>\z@ + \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% + \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% + \float@addtolists{\protect\addvspace{\@chapterlistsgap}}% + \fi + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}]% + \else + \@makechapterhead{##2}% + \@afterheading + \fi}% + % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class] + \caption@patch@chapter{boek}{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}\toc@font0 ##1}% + \else + \addcontentsline{toc}{chapter}{\toc@font0 ##1}% + \fi + \else + \addcontentsline{toc}{chapter}{\toc@font0 ##1}% + \fi + \chaptermark{##1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}]% + \else + \@makechapterhead{##2}% + \@afterheading + \fi + }{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}\toc@font0 ##1}% + \else + \addcontentsline{toc}{chapter}{\toc@font0 ##1}% + \fi + \else + \addcontentsline{toc}{chapter}{\toc@font0 ##1}% + \fi + \chaptermark{##1}% + \ifdim \@chapterlistsgap>\z@ + \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% + \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% + \float@addtolists{\protect\addvspace{\@chapterlistsgap}}% + \fi + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}]% + \else + \@makechapterhead{##2}% + \@afterheading + \fi}% + % thesis.cls [1996/25/01 1.0g LaTeX document class (wm).] + \caption@patch@chapter{thesis}{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\chaptername\space\thechapter.} + \if@thema + \ifx\@shortauthor\@empty + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}##1}% + \else + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}% + \@shortauthor\hfill\mbox{}\vskip\normallineskip ##1}% + \fi + \else + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}##1}% + \fi + \else + \addcontentsline{toc}{chapter}{##1} + \fi + \else + \addcontentsline{toc}{chapter}{##1} + \fi + \chaptermark{##1} + \addtocontents{lof}{\protect\addvspace{10pt}} + \addtocontents{lot}{\protect\addvspace{10pt}} + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}] + \else + \@makechapterhead{##2} + \@afterheading + \fi + }{% + \ifnum \c@secnumdepth >\m@ne + \if@mainmatter + \refstepcounter{chapter}% + \typeout{\chaptername\space\thechapter.}% + \if@thema + \ifx\@shortauthor\@empty + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}##1}% + \else + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}% + \@shortauthor\hfill\mbox{}\vskip\normallineskip ##1}% + \fi + \else + \addcontentsline{toc}{chapter}{% + \protect\numberline{\thechapter.}##1}% + \fi + \else + \addcontentsline{toc}{chapter}{##1}% + \fi + \else + \addcontentsline{toc}{chapter}{##1}% + \fi + \chaptermark{##1}% + \ifdim \@chapterlistsgap>\z@ + \addtocontents{lof}{\protect\addvspace{\@chapterlistsgap}}% + \addtocontents{lot}{\protect\addvspace{\@chapterlistsgap}}% + \float@addtolists{\protect\addvspace{\@chapterlistsgap}}% + \fi + \if@twocolumn + \@topnewpage[\@makechapterhead{##2}]% + \else + \@makechapterhead{##2}% + \@afterheading + \fi}% + \ifx\caption@patch@chapter\@gobblethree \else + \caption@Debug{% + Unsupported document class detected,\MessageBreak + or \noexpand\@chapter was redefined by another package}% + \fi + \let\caption@PatchChapter\@undefined} +\newcommand\caption@patch@chapter[3]{% + \begingroup + \let\if@mainmatter\iffalse + \let\if@thema\iffalse + \def\@tempa[##1]##2{#2}% + \ifx\@tempa\@chapter + \caption@Debug{document class `#1' detected}% + \gdef\@chapter[##1]##2{#3}% + \global\let\caption@patch@chapter\@gobblethree + \fi + \endgroup} +\long\def \@gobblethree #1#2#3{} +\newcommand*\caption@patch@stpelt{% + \let\caption@stpelt\@stpelt + \def\@stpelt##1{% + \caption@stpelt{##1}% + \begingroup + \let\@elt\caption@stpelt + \csname caption@cl@##1\endcsname + \endgroup}% + \let\caption@patch@stpelt\relax} +\@onlypreamble\caption@patch@stpelt +\newcommand*\caption@addtoreset[2]{% + \caption@patch@stpelt + \@ifundefined{caption@cl@#2}{\@namedef{caption@cl@#2}{}}{}% + \expandafter\@cons\csname caption@cl@#2\endcsname{{#1}}} +\@onlypreamble\caption@addtoreset +\newcommand*\caption@removefromreset[2]{% + \begingroup + \expandafter\let\csname c@#1\endcsname\caption@removefromreset + \def\@elt##1{% + \expandafter\ifx\csname c@##1\endcsname\caption@removefromreset + \else + \noexpand\@elt{##1}% + \fi}% + \expandafter\xdef\csname caption@cl@#2\endcsname{% + \csname caption@cl@#2\endcsname}% + \endgroup} +\@onlypreamble\caption@removefromreset +\newcommand*\DeclareCaptionSubType{% + \caption@teststar\@DeclareCaptionSubType\@firstoftwo\@secondoftwo} +\@onlypreamble\DeclareCaptionSubType +\newcommand*\@DeclareCaptionSubType[1]{% + \@testopt{\@@DeclareCaptionSubType{#1}}{alph}} +\@onlypreamble\@DeclareCaptionSubType +\def\@@DeclareCaptionSubType#1[#2]#3{% + \@ifundefined{c@#3}% + {\caption@Error{No float type '#3' defined}}% + {\@ifundefined{c@sub#3}% + {\caption@Debug{New subtype `sub#3'}% + \newcounter{sub#3}% + \caption@addtoreset{sub#3}{#3}% + \@namedef{ext@sub#3}{\csname ext@#3\endcsname}% + \@ifundefined{l@chapter}% + {\edef\@tempa{\expandafter\expandafter\expandafter\noexpand + \expandafter\@car\l@subsubsection\@nil}% + \def\@tempb{\@dottedtocline}% + \ifx\@tempa\@tempb % \l@subsubsection starts with \@dottedtocline + \expandafter\edef\csname l@sub#3\endcsname{% + \noexpand\@dottedtocline{2}% + \expandafter\expandafter\expandafter\noexpand + \expandafter\@gobbletwo\l@subsubsection}% + \else + \@namedef{l@sub#3}{\@dottedtocline{2}{3.8em}{3.2em}}% + \fi}% + {\expandafter\let\csname l@sub#3\endcsname\l@subsection}% + \@cons\caption@subtypelist{{#3}}}% + {\caption@Debug{Modify caption `sub#3'}}% + \@namedef{sub#3name}{}% + \@namedef{sub#3autorefname}{\csname #3name\endcsname}% + #1% is \@firstoftwo in star form, and \@secondoftwo otherwise + {\@namedef{p@sub#3}{}% + \@namedef{thesub#3}{\csname the#3\endcsname.\@nameuse{#2}{sub#3}}}% + {\@namedef{p@sub#3}{\csname the#3\endcsname}% + \@namedef{thesub#3}{\@nameuse{#2}{sub#3}}}% + \@namedef{theHsub#3}{\csname theH#3\endcsname.\arabic{sub#3}}% + }} +\@onlypreamble\@@DeclareCaptionSubType +\newcommand*\caption@subtypelist{} +\newcommand*\caption@For{\caption@withoptargs\caption@@For} +\newcommand\caption@@For[3]{% + \caption@AtBeginDocument#1{% + \def\@elt##1{#3}% + \@nameuse{caption@#2}% + \let\@elt\relax}}% +\caption@AtBeginDocument{% + \def\@tempa{\@ifstar\sf@@subref\sf@subref}% + \ifx\subref\@tempa + \PackageInfo{caption3}{subfig package 1.2 or 1.3 is loaded\@gobble}% + \let\caption@setfloattype\@gobble + \let\@dottedxxxline\sf@NEW@dottedxxxline + \let\sf@subfloat\sf@NEW@subfloat + \fi + \let\sf@NEW@dottedxxxline\@undefined + \let\sf@NEW@subfloat\@undefined} +\def\sf@NEW@dottedxxxline#1#2#3#4#5#6#7{% + \begingroup + \caption@setfloattype{#1}% + \caption@setoptions{subfloat}% + \caption@setoptions{sub#1}% + \ifnum #3>\@nameuse{c@#2depth}\else + \@dottedtocline{\z@}{#4}{#5}{#6}{#7}% + \fi + \endgroup} +\def\sf@NEW@subfloat{% + \begingroup + \caption@setfloattype\@captype + \sf@ifpositiontop{% + \maincaptiontoptrue + }{% + \maincaptiontopfalse + }% + \caption@setoptions{subfloat}% + \caption@setoptions{sub\@captype}% + \let\sf@oldlabel=\label + \let\label=\subfloat@label + \ifmaincaptiontop\else + \advance\@nameuse{c@\@captype}\@ne + \fi + \refstepcounter{sub\@captype}% + \setcounter{sub\@captype @save}{\value{sub\@captype}}% + \@ifnextchar [% %] match left bracket + {\sf@@subfloat}% + {\sf@@subfloat[\@empty]}} +\endinput +%% +%% End of file `caption3_2010-01-14.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption3_2011-11-01.sty b/Master/texmf-dist/tex/latex/caption/caption3_2011-11-01.sty new file mode 100644 index 00000000000..96db68f342b --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption3_2011-11-01.sty @@ -0,0 +1,1566 @@ +%% +%% This is file `caption3_2011-11-01.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.2/caption3.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption3}[2011/11/01 v1.4a caption3 kernel (AR)] +\providecommand*\@nameundef[1]{% + \expandafter\let\csname #1\endcsname\@undefined} +\providecommand\l@addto@macro[2]{% + \begingroup + \toks@\expandafter{#1#2}% + \edef\@tempa{\endgroup\def\noexpand#1{\the\toks@}}% + \@tempa} +\def\bothIfFirst#1#2{% + \protected@edef\caption@tempa{#1}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +\def\bothIfSecond#1#2{% + \protected@edef\caption@tempa{#2}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +\newcommand*\caption@ifundefined[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi} +\newcommand*\caption@ifinlist{% + \@expandtwoargs\caption@@ifinlist} +\newcommand*\caption@@ifinlist[2]{% + \begingroup + \def\@tempa##1,#1,##2\@nil{% + \endgroup + \ifx\relax##2\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \@tempa,#2,#1,\@nil}% +\newcommand*\caption@ifin@list[2]{% + \caption@ifempty@list#1% + {\@secondoftwo}% + {\@expandtwoargs\caption@@ifinlist{#2}{#1}}} +\newcommand*\caption@g@addto@list[2]{% + \caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}} +\newcommand*\caption@l@addto@list[2]{% + \caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}} +\newcommand*\caption@g@removefrom@list[2]{% + \caption@l@removefrom@list#1{#2}% + \global\let#1#1} +\newcommand*\caption@l@removefrom@list[2]{% + \caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}} +\newcommand*\caption@for@list[2]{% + \caption@ifempty@list#1{}{% + \def\caption@tempb##1{#2}% + \@for\caption@tempa:=#1\do{% + \expandafter\caption@tempb\expandafter{\caption@tempa}}}} +\newcommand*\caption@ifempty@list[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else\ifx#1\@empty + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi\fi} +\newcommand*\caption@setbool[1]{% + \expandafter\caption@set@bool\csname caption@if#1\endcsname} +\newcommand*\caption@set@bool[2]{% + \caption@ifinlist{#2}{1,true,yes,on}{% + \let#1\@firstoftwo + }{\caption@ifinlist{#2}{0,false,no,off}{% + \let#1\@secondoftwo + }{% + \caption@Error{Undefined boolean value `#2'}% + }}} +\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}} +\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}} +\newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}} +\newcommand*\caption@teststar@[3]{% + \@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}} +\AtBeginDocument{\let\caption@teststar@\caption@teststar} +\newcommand*\caption@ifatletter{% + \ifnum\the\catcode`\@=11 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\AtBeginDocument{\let\caption@ifatletter\@secondoftwo} +\newcommand*\caption@withoptargs[1]{% + \@ifstar + {\def\caption@tempa{*}\caption@@withoptargs#1}% + {\def\caption@tempa{}\caption@@withoptargs#1}} +\def\caption@@withoptargs#1{% + \@ifnextchar[%] + {\caption@@@withoptargs#1}% + {\caption@@@@withoptargs#1}} +\def\caption@@@withoptargs#1[#2]{% + \l@addto@macro\caption@tempa{[{#2}]}% + \caption@@withoptargs#1} +\def\caption@@@@withoptargs#1{% + \expandafter#1\expandafter{\caption@tempa}} +\DeclareRobustCommand*\caption@gobble{% + \caption@withoptargs\@gobbletwo} +\newcommand\caption@DoCheckCommand[2]{% + \begingroup + \let\@tempa#1% + #2% + \ifx\@tempa#1% + \endgroup + \let\caption@CheckCommand\@gobbletwo + \else + \endgroup + \fi} +\@onlypreamble\caption@DoCheckCommand +\let\caption@CheckCommand\caption@DoCheckCommand +\@onlypreamble\caption@CheckCommand +\newcommand*\caption@IfCheckCommand{% + \ifx\caption@CheckCommand\@gobbletwo + \let\caption@CheckCommand\caption@DoCheckCommand + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\@onlypreamble\caption@IfCheckCommand +\let\caption@begindocumenthook\@empty +\let\caption@@begindocumenthook\@empty +\def\caption@AtBeginDocument{% + \caption@teststar\g@addto@macro + \caption@@begindocumenthook\caption@begindocumenthook} +\AtBeginDocument{% + \caption@InfoNoLine{Begin \noexpand\AtBeginDocument code}% + \def\caption@AtBeginDocument{% + \@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}% + \caption@begindocumenthook + \let\caption@begindocumenthook\relax + \def\caption@AtBeginDocument{% + \@ifstar\@firstofone\@firstofone}% + \caption@@begindocumenthook + \let\caption@@begindocumenthook\relax + \caption@InfoNoLine{End \noexpand\AtBeginDocument code}} +\newcommand*\caption@Info[1]{% + \PackageInfo{caption}{#1}} +\newcommand*\caption@InfoNoLine[1]{% + \PackageInfo{caption}{#1\@gobble}} +\newcommand*\caption@Warning[1]{% + \caption@WarningNoLine{#1\on@line}} +\newcommand*\caption@WarningNoLine[1]{% + \PackageWarning{caption}{#1.^^J\caption@wh\@gobbletwo}} +\newcommand*\caption@wh{% + See the caption package documentation for explanation.} +\newcommand*\caption@Error[1]{% + \PackageError{caption}{#1}\caption@eh} +\newcommand*\caption@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `caption' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} +\let\caption@KV@err\caption@Error +\RequirePackage{keyval}[1997/11/10] +\providecommand*\undefine@key[2]{% + \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} +\providecommand*\@preamble@keys{} +\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}} +\@onlypreamble\@onlypreamble@key +\@onlypreamble\@preamble@keys +\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}} +\caption@AtBeginDocument*{% + \def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}% + \@preamble@keys + \let\@elt\relax} +\newcommand*\DeclareCaptionOption{% + \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOption +\newcommand*\caption@declareoption[2]{% + #1{\undefine@key{caption}{#2}}\define@key{caption}{#2}} +\@onlypreamble\caption@declareoption +\newcommand*\DeclareCaptionOptionNoValue{% + \caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOptionNoValue +\newcommand\caption@declareoption@novalue[3]{% + \caption@declareoption{#1}{#2}[\KV@err]{% + \caption@option@novalue{#2}{##1}{#3}}} +\@onlypreamble\caption@declareoption@novalue +\newcommand*\caption@option@novalue[2]{% + \ifx\KV@err#2% + \expandafter\@firstofone + \else + \KV@err{No value allowed for #1}% + \expandafter\@gobble + \fi} +\newif\ifcaptionsetup@star +\newcommand*\captionsetup{% + \caption@teststar@\@captionsetup\@gobble\@firstofone} +\newcommand*\@captionsetup[1]{% + \captionsetup@startrue#1\captionsetup@starfalse + \@ifnextchar[\caption@setup@options\caption@setup} +\newcommand*\caption@setup{\caption@setkeys{caption}} +\def\caption@setup@options[#1]#2{% + \@bsphack + \ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi + \expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}% + \@esphack} +\newcommand*\clearcaptionsetup{% + \caption@teststar@\@clearcaptionsetup\@gobble\@firstofone} +\newcommand*\@clearcaptionsetup[1]{% + \let\caption@tempa#1% + \@testopt\@@clearcaptionsetup{}} +\def\@@clearcaptionsetup[#1]#2{% + \@bsphack + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@tempa{\caption@Warning{Option list `#2' undefined}}}% + {\ifx,#1,% + \caption@clearsetup{#2}% + \else + \caption@@removefromsetup{#1}{#2}% + \fi}% + \@esphack} +\newcommand*\caption@clearsetup[1]{% + \caption@removefromoptlist{#1}% + \@nameundef{caption@opt@#1}} +\newcommand*\caption@removefromsetup{% + \let\caption@tempa\@gobble + \caption@@removefromsetup} +\newcommand*\caption@@removefromsetup[2]{% + \expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname + \expandafter\let\csname caption@opt@#2\endcsname\@undefined + \def\@tempb##1=##2\@nil{##1}% + \edef\@tempc{#1}% + \@for\@tempa:=\@tempa\do{% + \edef\@tempd{\expandafter\@tempb\@tempa=\@nil}% + \ifx\@tempd\@tempc + \let\caption@tempa\@gobble + \else + \expandafter\expandafter\expandafter\caption@l@addto@list + \expandafter\csname caption@opt@#2\expandafter\endcsname + \expandafter{\@tempa}% + \fi}% + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@removefromoptlist{#2}}{}% + \caption@tempa{\caption@Warning{% + Option `#1' was not in list `#2'\MessageBreak}}} +\newcommand*\showcaptionsetup[2][\@firstofone]{% + \@bsphack + \GenericWarning{}{% + #1 Caption Info: Option list on `#2'\MessageBreak + #1 Caption Data: \@ifundefined{caption@opt@#2}{% + -none-% + }{% + {\expandafter\expandafter\expandafter\strip@prefix + \expandafter\meaning\csname caption@opt@#2\endcsname}% + }}% + \@esphack} +\DeclareCaptionOption{options}{\caption@setoptions{#1}} +\DeclareCaptionOption{options*}{\caption@setoptions*{#1}} +\newcommand*\caption@setoptions{% + \caption@teststar\caption@set@options\@gobble\@firstofone} +\newcommand*\caption@set@options[2]{% + \caption@Debug{options=#2}% + \expandafter\let\expandafter\caption@opt\csname caption@opt@#2\endcsname + \ifx\caption@opt\relax \else + \caption@xsetup\caption@opt + #1{\caption@clearsetup{#2}}% #1 = \@firstofone -or- \@gobble + \fi} +\newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}} +\newcommand*\caption@addtooptlist[1]{% + \@ifundefined{caption@opt@#1@lineno}{% + \caption@dooptlist\caption@g@addto@list{#1}% + \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}% + }{}} +\newcommand*\caption@removefromoptlist[1]{% + \caption@dooptlist\caption@g@removefrom@list{#1}% + \global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined} +\newcommand*\caption@dooptlist[2]{% + \begingroup + \edef\@tempa{#2}\@onelevel@sanitize\@tempa + \expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}% + \endgroup} +\AtEndDocument{% + \caption@for@list\caption@optlist{% + \caption@WarningNoLine{% + Unused \string\captionsetup[#1] + on input line \csname caption@opt@#1@lineno\endcsname}}} +\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys} +\long\def\caption@@setkeys[#1]#2#3{% + \@bsphack + \expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err + \expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx + \expandafter\let\csname ORI@XKV@err\caption@keydepth\endcsname\XKV@err + \edef\caption@keydepth{\caption@keydepth i}% + \expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname + \ifx\KV@err\relax + \def\KV@err##1{\PackageError{#1}{##1}{% + See the #1 package documentation for explanation.}}% + \fi + \def\KV@errx{\KV@err}% + \def\XKV@err{\let\@tempa\XKV@tkey\KV@err}% + \caption@Debug{\protect\setkeys{#2}{#3}}% + \setkeys{#2}{#3}% + \edef\caption@keydepth{\expandafter\@gobble\caption@keydepth}% + \expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname + \expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname + \expandafter\let\expandafter\XKV@err\csname ORI@XKV@err\caption@keydepth\endcsname + \ifx\caption@keydepth\@empty \captionsetup@starfalse \fi + \@esphack} +\let\caption@keydepth\@empty +\newcommand*\caption@ExecuteOptions[2]{% + \expandafter\@expandtwoargs\csname caption@setkeys@#1\endcsname{#1}{#2}}% +\@onlypreamble\caption@ExecuteOptions +\newcommand*\caption@ProcessOptions{% + \caption@teststar\caption@@ProcessOptions\@gobble\@firstofone} +\@onlypreamble\caption@ProcessOptions +\newcommand\caption@@ProcessOptions[2]{% + \let\@tempc\relax + \let\caption@tempa\@empty + #1{% \@firstofone -or- \@gobble + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#2@\CurrentOption}{}{% + \@ifundefined{KV@#2@\CurrentOption @default}{% + \PackageInfo{#2}{Global option `\CurrentOption' ignored}% + }{% + \PackageInfo{#2}{Global option `\CurrentOption' processed}% + \edef\caption@tempa{\caption@tempa\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + }% + \let\CurrentOption\@empty + }% + \caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}% + \AtEndOfPackage{\let\@unprocessedoptions\relax}} +\@onlypreamble\caption@@ProcessOptions +\newcommand*\caption@packagelist{} +\@onlypreamble\caption@packagelist +\newcommand\caption@SetupOptions[2]{% + \@namedef{caption@setkeys@#1}##1##2{#2}% + \expandafter\@onlypreamble\csname caption@setkeys@#1\endcsname + \@cons\caption@packagelist{{#1}}} +\@onlypreamble\caption@SetupOptions +\let\caption@onefilewithoptions\@onefilewithoptions +\def\@onefilewithoptions#1[#2]{% + \begingroup + \def\@tempa{% + \endgroup + \caption@onefilewithoptions{#1}[{#2}]}% + \def\@tempb{#1}% + \def\@elt##1{% + \def\@tempc{##1}% + \ifx\@tempb\@tempc + \def\@tempa{% + \endgroup + \caption@ExecuteOptions{#1}{#2}% + \caption@onefilewithoptions{#1}[]}% + \fi} + \caption@packagelist + \@tempa} +\@onlypreamble\caption@onefilewithoptions +\newdimen\captionmargin +\newdimen\captionmargin@ +\newdimen\captionwidth +\DeclareCaptionOption{margin}{\setcaptionmargin{#1}} +\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}} +\DeclareCaptionOption{width}{\setcaptionwidth{#1}} +\DeclareCaptionOption{width*}{\setcaptionwidth*{#1}} +\DeclareCaptionOption{calcmargin}{\caption@setcalcmargin{#1}} +\DeclareCaptionOption{calcmargin*}{\caption@setcalcmargin*{#1}} +\DeclareCaptionOption{calcwidth}{\caption@setcalcwidth{#1}} +\DeclareCaptionOption{calcwidth*}{\caption@setcalcwidth*{#1}} +\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}} +\DeclareCaptionOptionNoValue{oneside}{\caption@set@bool\caption@iftwoside0} +\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}} +\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}} +\newcommand*\setcaptionmargin{% + \caption@resetcalcmargin + \caption@setmargin} +\newcommand*\caption@setmargin{% + \caption@teststar\caption@@setmargin\@gobble\@firstofone} +\newcommand*\caption@@setmargin[2]{% + #1{\captionwidth\z@}% + \caption@@@setmargin#2,#2,\@nil} +\def\caption@@@setmargin#1,#2,#3\@nil{% + \setlength\captionmargin@{#2}% + \setlength\captionmargin{#1}% + \addtolength\captionmargin@{-\captionmargin}} +\newcommand*\setcaptionwidth{% + \caption@resetcalcmargin + \caption@setwidth} +\newcommand*\caption@setwidth{% + \caption@teststar\caption@@setwidth\@gobble\@firstofone} +\newcommand*\caption@@setwidth[2]{% + #1{\captionmargin\z@\captionmargin@\z@}% + \setlength\captionwidth{#2}}% +\newcommand*\caption@resetcalcmargin{% + \let\caption@calcmargin@hook\@empty} +\newcommand*\caption@setcalcmargin{% + \caption@teststar{\caption@@setcalcmargin\caption@setmargin}% + \@secondoftwo\@firstoftwo} +\newcommand*\caption@@setcalcmargin[3]{% + #2{\caption@resetcalcmargin + \l@addto@macro\caption@calcmargin@hook{#1{#3}}}% + {\l@addto@macro\caption@calcmargin@hook{#1*{#3}}}} +\newcommand*\caption@setcalcwidth{% + \caption@teststar{\caption@@setcalcmargin\caption@setwidth}% + \@secondoftwo\@firstoftwo} +\newcommand*\caption@thecounter{0} +\newcommand*\caption@stepcounter{% + \@tempcnta\caption@thecounter + \advance\@tempcnta\@ne + \xdef\caption@thecounter{\the\@tempcnta}} +\newcommand*\caption@newlabel{\@newl@bel{caption@r}} +\newcommand*\caption@thepage{\the\c@page} +\newcommand*\caption@label[1]{% + \caption@@label + \protected@write\@auxout{\let\caption@thepage\relax}% + {\string\caption@newlabel{#1}{\caption@thepage}}} +\newcommand*\caption@@label{% + \global\let\caption@@label\relax + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@newlabel[2]{}}} +\newcommand*\caption@pageref[1]{% + \expandafter\ifx\csname caption@r@#1\endcsname\relax + \G@refundefinedtrue % => 'There are undefined references.' + \@latex@warning{Reference `#1' on page \thepage \space undefined}% + \else + \expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname + \fi} +\newcommand*\caption@ifoddpage{% + \caption@iftwoside{% + \caption@label\caption@thecounter + \caption@pageref\caption@thecounter + \ifodd\caption@thepage + \let\caption@ifoddpage\@firstoftwo + \else + \let\caption@ifoddpage\@secondoftwo + \fi + }{\let\caption@ifoddpage\@firstoftwo}% + \caption@ifoddpage} +\newcommand*\caption@setoptcmd[2]{% + \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}} +\newdimen\caption@indent +\newdimen\caption@parindent +\newdimen\caption@hangindent +\DeclareCaptionOption{indent}[\leftmargini]{% obsolete! + \setlength\caption@indent{#1}} +\DeclareCaptionOption{indention}[\leftmargini]{% + \setlength\caption@indent{#1}} +\DeclareCaptionOption{parindent}{% + \setlength\caption@parindent{#1}} +\DeclareCaptionOption{hangindent}{% + \setlength\caption@hangindent{#1}} +\DeclareCaptionOption{parskip}{% + \l@addto@macro\caption@@par{\setlength\parskip{#1}}} +\providecommand*\caption@ifkomaclass{% + \caption@ifundefined\scr@caption\@gobble\@firstofone} +\@onlypreamble\caption@ifkomaclass +\caption@ifkomaclass{% + \let\caption@KV@parindent\KV@caption@parindent + \DeclareCaptionOption{parindent}[]{% + \ifx,#1,% + \caption@Debug{Option `parindent' ignored}% + \else + \caption@KV@parindent{#1}% + \fi}% + \let\caption@KV@parskip\KV@caption@parskip + \DeclareCaptionOption{parskip}[]{% + \ifx,#1,% + \caption@Debug{Option `parskip' ignored}% + \else + \caption@KV@parskip{#1}% + \fi}% +} +\newcommand*\DeclareCaptionStyle[1]{% + \@testopt{\caption@declarestyle{#1}}{}} +\@onlypreamble\DeclareCaptionStyle +\def\caption@declarestyle#1[#2]#3{% + \global\@namedef{caption@sls@#1}{#2}% + \global\@namedef{caption@sty@#1}{#3}} +\@onlypreamble\caption@declarestyle +\DeclareCaptionOption{style}{\caption@setstyle{#1}} +\DeclareCaptionOption{style*}{\caption@setstyle*{#1}} +\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}} +\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}} +\newcommand*\caption@setstyle{% + \caption@teststar\caption@@setstyle\@gobble\@firstofone} +\newcommand*\caption@@setstyle[2]{% + \@ifundefined{caption@sty@#2}% + {#1{\caption@Error{Undefined style `#2'}}}% + {\expandafter\let\expandafter\caption@sty\csname caption@sty@#2\endcsname + \ifx\caption@setstyle@flag\@undefined + \let\caption@setstyle@flag\relax + \caption@resetstyle + \caption@xsetup\caption@sty + \let\caption@setstyle@flag\@undefined + \else + \caption@xsetup\caption@sty + \fi + \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname + \expandafter\caption@l@addto@list\expandafter\caption@opt@singleline + \expandafter{\caption@sls}}} +\newcommand*\caption@resetstyle{% + \caption@setup{% + format=plain,labelformat=default,labelsep=colon,textformat=simple,% + justification=justified,font=,size=,labelfont=,textfont=,% + margin=0pt,minmargin=0,maxmargin=0,% + indent=0pt,parindent=0pt,hangindent=0pt,% + slc,rule,strut}% + \caption@clearsetup{singleline}} +\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{} +\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{% + format=default,labelsep=default,textformat=default,% + justification=default,font=default,labelfont=default,textfont=default} +\newcommand*\DeclareCaptionFormat{% + \caption@teststar\caption@declareformat\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionFormat +\newcommand*\caption@declareformat[2]{% + \@dblarg{\caption@@declareformat#1{#2}}} +\@onlypreamble\caption@declareformat +\long\def\caption@@declareformat#1#2[#3]#4{% + \global\expandafter\let\csname caption@ifh@#2\endcsname#1% + \global\long\@namedef{caption@slfmt@#2}##1##2##3{#3}% + \global\long\@namedef{caption@fmt@#2}##1##2##3{#4}} +\@onlypreamble\caption@@declareformat +\DeclareCaptionOption{format}{\caption@setformat{#1}} +\newcommand*\caption@setformat[1]{% + \@ifundefined{caption@fmt@#1}% + {\caption@Error{Undefined format `#1'}}% + {\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname + \expandafter\let\expandafter\caption@slfmt\csname caption@slfmt@#1\endcsname + \expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}} +\newcommand*\DeclareCaptionDefaultFormat[1]{% + \expandafter\def\expandafter\caption@fmt@default\expandafter + {\csname caption@fmt@#1\endcsname}% + \expandafter\def\expandafter\caption@slfmt@default\expandafter + {\csname caption@slfmt@#1\endcsname}% + \expandafter\def\expandafter\caption@ifh@default\expandafter + {\csname caption@ifh@#1\endcsname}} +\@onlypreamble\DeclareCaptionDefaultFormat +\DeclareCaptionFormat{plain}{#1#2#3\par} +\DeclareCaptionFormat{hang}[#1#2#3\par]{% + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with `format=hang'}}% + {\@hangfrom{#1#2}% + \advance\caption@parindent\hangindent + \advance\caption@hangindent\hangindent + \caption@@par#3\par}} +\DeclareCaptionDefaultFormat{plain} +\newcommand*\DeclareCaptionLabelFormat[2]{% + \global\@namedef{caption@lfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionLabelFormat +\DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}} +\newcommand*\caption@setlabelformat[1]{% + \@ifundefined{caption@lfmt@#1}% + {\caption@Error{Undefined label format `#1'}}% + {\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}} +\DeclareCaptionLabelFormat{empty}{} +\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} +\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} +\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} +\def\caption@lfmt@default{\caption@lfmt@simple} +\newcommand\DeclareCaptionLabelSeparator{% + \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionLabelSeparator +\newcommand\caption@declarelabelseparator[3]{% + \global\@namedef{caption@iflf@#2}{#1}% + \global\long\@namedef{caption@lsep@#2}{#3}% + \caption@@declarelabelseparator{#2}#3\\\@nil} +\@onlypreamble\caption@declarelabelseparator +\long\def\caption@@declarelabelseparator#1#2\\#3\@nil{% + \def\@tempa{#3}\ifx\@tempa\@empty \else + \caption@g@addto@list\caption@lsepcrlist{#1}% + \fi} +\@onlypreamble\caption@@declarelabelseparator +\DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}} +\DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}} +\newcommand*\caption@setlabelseparator[1]{% + \@ifundefined{caption@lsep@#1}% + {\caption@Error{Undefined label separator `#1'}}% + {\edef\caption@lsepname{#1}% + \expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname + \expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}} +\DeclareCaptionLabelSeparator{none}{} +\DeclareCaptionLabelSeparator{colon}{: } +\DeclareCaptionLabelSeparator{period}{. } +\DeclareCaptionLabelSeparator{space}{ } +\DeclareCaptionLabelSeparator*{quad}{\quad} +\DeclareCaptionLabelSeparator*{newline}{\\} +\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space} +\newcommand*\caption@setdefaultlabelsep[1]{% + \ifx\caption@lsep\caption@lsep@default + \caption@set@default@labelsep{#1}% + \caption@setlabelseparator{default}% + \else + \caption@set@default@labelsep{#1}% + \fi} +\newcommand*\caption@set@default@labelsep[1]{% + \def\caption@lsep@default{\@nameuse{caption@lsep@#1}}% + \def\caption@iflf@default{\@nameuse{caption@iflf@#1}}} +\caption@set@default@labelsep{colon} +\newcommand*\DeclareCaptionTextFormat[2]{% + \global\long\@namedef{caption@tfmt@#1}##1{#2}} +\@onlypreamble\DeclareCaptionTextFormat +\DeclareCaptionOption{textformat}{\caption@settextformat{#1}} +\DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}} +\newcommand*\caption@settextformat[1]{% + \@ifundefined{caption@tfmt@#1}% + {\caption@Error{Undefined text format `#1'}}% + {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}} +\DeclareCaptionTextFormat{empty}{} +\DeclareCaptionTextFormat{simple}{#1} +\DeclareCaptionTextFormat{period}{#1.} +\def\caption@tfmt@default{\caption@tfmt@simple} +\newcommand*\DeclareCaptionFont[2]{% + \define@key{caption@fnt}{#1}[]{\l@addto@macro\caption@fnt{#2}}} +\@onlypreamble\DeclareCaptionFont +\newcommand*\DeclareCaptionDefaultFont[2]{% + \global\@namedef{caption#1@default}{#2}} +\@onlypreamble\DeclareCaptionDefaultFont +\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} +\DeclareCaptionOption{font+}{\caption@addtofont{font}{#1}} +\DeclareCaptionDefaultFont{font}{} +\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} +\DeclareCaptionOption{labelfont+}{\caption@addtofont{labelfont}{#1}} +\DeclareCaptionDefaultFont{labelfont}{} +\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} +\DeclareCaptionOption{textfont+}{\caption@addtofont{textfont}{#1}} +\DeclareCaptionDefaultFont{textfont}{} +\newcommand*\caption@setfont[1]{% + \expandafter\let\csname caption#1\endcsname\@empty + \caption@addtofont{#1}} +\newcommand*\caption@addtofont[2]{% + \begingroup + \expandafter\let\expandafter\caption@fnt\csname caption#1\endcsname + \define@key{caption@fnt}{default}[]{% + \l@addto@macro\caption@fnt{\csname caption#1@default\endcsname}}% + \caption@setkeys[caption]{caption@fnt}{#2}% + \global\let\caption@tempa\caption@fnt + \endgroup + \expandafter\let\csname caption#1\endcsname\caption@tempa} +\newcommand*\caption@font{% + \caption@teststar\caption@@font\@firstofone + {\caption@setkeys[caption]{caption@fnt}}} +\newcommand*\caption@@font[2]{% + \begingroup + \def\caption@fnt{\endgroup}% + #1{#2}% + \caption@fnt} +\DeclareCaptionFont{normalcolor}{\normalcolor} +\DeclareCaptionFont{color}{\color{#1}} +\DeclareCaptionFont{normalfont}{\normalfont} +\DeclareCaptionFont{up}{\upshape} +\DeclareCaptionFont{it}{\itshape} +\DeclareCaptionFont{sl}{\slshape} +\DeclareCaptionFont{sc}{\scshape} +\DeclareCaptionFont{md}{\mdseries} +\DeclareCaptionFont{bf}{\bfseries} +\DeclareCaptionFont{rm}{\rmfamily} +\DeclareCaptionFont{sf}{\sffamily} +\DeclareCaptionFont{tt}{\ttfamily} +\DeclareCaptionFont{scriptsize}{\scriptsize} +\DeclareCaptionFont{footnotesize}{\footnotesize} +\DeclareCaptionFont{small}{\small} +\DeclareCaptionFont{normalsize}{\normalsize} +\DeclareCaptionFont{large}{\large} +\DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{sansmath}{\sansmath} +\DeclareCaptionFont{singlespacing}{% + \caption@ifundefined\setspace@singlespace{}{% + \setstretch\setspace@singlespace}}% normally 1 +\DeclareCaptionFont{onehalfspacing}{\onehalfspacing} +\DeclareCaptionFont{doublespacing}{\doublespacing} +\DeclareCaptionFont{stretch}{\setstretch{#1}} +\DeclareCaptionFont{normal}{% + \caption@font*{% + \KV@caption@fnt@normalcolor\@unused + \KV@caption@fnt@normalfont\@unused + \KV@caption@fnt@normalsize\@unused + \KV@caption@fnt@singlespacing\@unused}} +\DeclareCaptionOption{size}{\caption@setfont{size}{#1}} +\DeclareCaptionDefaultFont{size}{} +\newcommand*\DeclareCaptionJustification[2]{% + \global\@namedef{caption@hj@#1}{#2}% for compatibility to v1.0 + \DeclareCaptionFont{#1}{#2}} +\@onlypreamble\DeclareCaptionJustification +\newcommand*\DeclareCaptionDefaultJustification[1]{% + \global\@namedef{caption@hj@default}{#1}% for compatibility to v1.0 + \DeclareCaptionDefaultFont{@hj}{#1}} +\@onlypreamble\DeclareCaptionDefaultJustification +\DeclareCaptionOption{justification}{\caption@setjustification{#1}} +\DeclareCaptionDefaultJustification{} +\newcommand*\caption@setjustification{\caption@setfont{@hj}} +\DeclareCaptionJustification{justified}{} +\DeclareCaptionJustification{centering}{\centering} +\DeclareCaptionJustification{centerfirst}{\centerfirst} +\DeclareCaptionJustification{centerlast}{\centerlast} +\DeclareCaptionJustification{raggedleft}{\raggedleft} +\DeclareCaptionJustification{raggedright}{\raggedright} +\providecommand\centerfirst{% + \let\\\@centercr + \edef\caption@normaladjust{% + \leftskip\the\leftskip + \rightskip\the\rightskip + \parfillskip\the\parfillskip\relax}% + \leftskip\z@\@plus -1fil% + \rightskip\z@\@plus 1fil% + \parfillskip\z@skip + \noindent\hskip\z@\@plus 2fil% + \@setpar{\@@par\@restorepar\caption@normaladjust}} +\providecommand\centerlast{% + \let\\\@centercr + \leftskip\z@\@plus 1fil% + \rightskip\z@\@plus -1fil% + \parfillskip\z@\@plus 2fil\relax} +\DeclareCaptionJustification{Centering}{% + \caption@ragged\Centering\centering} +\DeclareCaptionJustification{RaggedLeft}{% + \caption@ragged\RaggedLeft\raggedleft} +\DeclareCaptionJustification{RaggedRight}{% + \caption@ragged\RaggedRight\raggedright} +\newcommand*\caption@ragged{% + \caption@Debug{We need ragged2e}% + \protected@write\@auxout{}{\string\caption@newlabel{ragged2e}{}}% + \global\let\caption@ragged\caption@@ragged + \caption@ragged} +\caption@AtBeginDocument{% + \@ifundefined{caption@r@ragged2e}{% + \newcommand*\caption@@ragged{% + \caption@Warning{% + `ragged2e' support has been changed.\MessageBreak + Rerun to get captions right}% + \global\let\caption@ragged\@secondoftwo % suppress further warnings + \caption@ragged}% + }{% + \caption@Debug{We load ragged2e}% + \IfFileExists{ragged2e.sty}{% + \RequirePackage{ragged2e}% + \let\caption@@ragged\@firstoftwo + }{% + \newcommand*\caption@@ragged[2]{% + \@ifundefined{caption\string#1}{% + \caption@Warning{% + `ragged2e' package not loaded, therefore\MessageBreak + substituting \string#2 for \string#1\MessageBreak}% + \global\@namedef{caption\string#1}}{}% + #2}% + }% + }} +\caption@ifundefined\abovecaptionskip{% + \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} +\caption@ifundefined\belowcaptionskip{% + \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} +\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}} +\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}} +\DeclareCaptionOption{skip}{\setlength\abovecaptionskip{#1}} +\newcommand*\caption@rule{\caption@ifrule\caption@hrule\relax} +\newcommand*\caption@hrule{\hrule\@height\z@} +\DeclareCaptionOption{rule}[1]{\caption@set@bool\caption@ifrule{#1}} +\DeclareCaptionOption{position}{\caption@setposition{#1}} +\newcommand*\caption@setposition[1]{% + \caption@ifinlist{#1}{d,default}{% + \let\caption@position\caption@defaultpos + }{\caption@ifinlist{#1}{t,top,above}{% + \let\caption@position\@firstoftwo + }{\caption@ifinlist{#1}{b,bottom,below}{% + \let\caption@position\@secondoftwo + }{\caption@ifinlist{#1}{a,auto}{% + \let\caption@position\@undefined + }{% + \caption@Error{Undefined position `#1'}% + }}}}} +\let\caption@defaultpos\@undefined +\newcommand*\caption@iftop{% + \ifx\caption@position\@undefined + \let\caption@position\@secondoftwo + \fi + \caption@position} +\newcommand*\caption@fixposition{% + \ifx\caption@position\@undefined + \caption@autoposition + \fi} +\newcommand*\caption@autoposition{% + \ifvmode + \edef\caption@tempa{\the\prevdepth}% + \caption@Debug{\protect\prevdepth=\caption@tempa}% + \ifdim\prevdepth>-\p@ + \let\caption@position\@secondoftwo + \else + \let\caption@position\@firstoftwo + \fi + \else + \caption@Debug{no \protect\prevdepth}% + \let\caption@position\@secondoftwo + \fi} +\newcommand*\caption@setautoposition[1]{% + \def\caption@autoposition{\caption@setposition{#1}}} +\newcommand*\caption@beginhook{} +\newcommand*\caption@endhook{} +\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook} +\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook} +\DeclareCaptionOption{list}[1]{\caption@setlist{#1}} +\DeclareCaptionOption{listof}[1]{\caption@setlist{#1}} +\newcommand*\caption@setlist{\caption@set@bool\caption@iflist} +\DeclareCaptionOption{listtype}{\caption@setlisttype{#1}} +\DeclareCaptionOption{listtype+}{\caption@setlisttype@ext{#1}} +\newcommand*\caption@setlisttype{% + \caption@setlisttype@ext{}% + \caption@@setlisttype\caption@listtype} +\newcommand*\caption@@setlisttype[2]{% + \edef#1{#2}% + \ifx#1\@empty \let#1\@undefined \fi} +\newcommand*\caption@setlisttype@ext{% + \caption@@setlisttype\caption@listtype@ext} +\newcommand*\DeclareCaptionListFormat[2]{% + \global\@namedef{caption@lstfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionListFormat +\DeclareCaptionOption{listformat}{\caption@setlistformat{#1}} +\newcommand*\caption@setlistformat[1]{% + \@ifundefined{caption@lstfmt@#1}% + {\caption@Error{Undefined list format `#1'}}% + {\expandafter\let\expandafter\caption@lstfmt + \csname caption@lstfmt@#1\endcsname}} +\DeclareCaptionListFormat{empty}{} +\DeclareCaptionListFormat{simple}{#1#2} +\DeclareCaptionListFormat{parens}{#1(#2)} +\DeclareCaptionListFormat{subsimple}{#2} +\DeclareCaptionListFormat{subparens}{(#2)} +\newcommand*\caption@setdefaultlistformat[1]{% + \ifx\caption@lstfmt\caption@lstfmt@default + \caption@set@default@listformat{#1}% + \caption@setlistformat{default}% + \else + \caption@set@default@listformat{#1}% + \fi} +\newcommand*\caption@set@default@listformat[1]{% + \def\caption@lstfmt@default{\@nameuse{caption@lstfmt@#1}}} +\caption@set@default@listformat{subsimple} +\DeclareCaptionOption{debug}[1]{% + \caption@set@bool\caption@ifdebug{#1}% + \caption@ifdebug + {\let\caption@Debug\caption@Info}% + {\let\caption@Debug\@gobble}} +\DeclareOption{debug}{\setkeys{caption}{debug}} +\setkeys{caption}{debug=0} +\caption@CheckCommand\@makecaption{% + % article|report|book [2005/09/16 v1.4f Standard LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +\providecommand*\caption@ifamsclass{% + \caption@ifundefined\@captionheadfont\@gobble\@firstofone} +\@onlypreamble\caption@ifamsclass +\caption@ifamsclass{% + \caption@CheckCommand\@makecaption{% + % amsart|amsproc|amsbook [2004/08/06 v2.20] + \long\def\@makecaption#1#2{% + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \else % if the float IS NOT a figure... + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} + \caption@CheckCommand\@makecaption{% + % smfart|smfbook [1999/11/15 v1.2f Classe LaTeX pour les articles publies par la SMF] + \long\def\@makecaption#1#2{% + \ifdim\captionindent>.1\hsize \captionindent.1\hsize \fi + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{\@addpunct{.}\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \@tempdima\wd\@ne\advance\@tempdima-\captionindent + \wd\@ne\@tempdima + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\rightskip=0pt plus\captionindent\relax + \unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \noindent\kern\captionindent\box\@ne + \else % if the float IS NOT a figure... + \noindent\kern\captionindent\box\@ne + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} + \let\captionmargin\captionindent % set to 3pc by AMS class + \begingroup\edef\@tempa{\endgroup + \noexpand\caption@g@addto@list\noexpand\caption@sty@default + {margin=\the\captionmargin + \caption@ifundefined\smf@makecaption{}{,maxmargin=.1\linewidth}}} + \@tempa + \caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin} + \DeclareCaptionLabelSeparator{default}{.\enspace} + \DeclareCaptionDefaultFont{font}{\@captionfont} + \DeclareCaptionDefaultFont{labelfont}{\@captionheadfont} + \DeclareCaptionDefaultFont{textfont}{\@captionfont\upshape} + \captionsetup[figure]{position=b} + \captionsetup[table]{position=t} +} +\providecommand*\caption@ifbeamerclass{% + \@ifclassloaded{beamer}\@firstofone\@gobble} +\@onlypreamble\caption@ifbeamerclass +\caption@ifbeamerclass{% + \caption@CheckCommand\beamer@makecaption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\beamer@makecaption#1#2{% + \def\insertcaptionname{\csname#1name\endcsname}% + \def\insertcaptionnumber{\csname the#1\endcsname}% + \def\insertcaption{#2}% + \nobreak\vskip\abovecaptionskip\nobreak + \sbox\@tempboxa{\usebeamertemplate**{caption}}% + \ifdim \wd\@tempboxa >\hsize + \usebeamertemplate**{caption}\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \nobreak\vskip\belowcaptionskip\nobreak}} +\newcommand*\caption@ifbeamertemplate[1]{% + \begingroup + \let\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption + \@nameuse{beamer@@tmpop@caption@#1}% + \ifx\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi} + \DeclareCaptionLabelFormat{default}{% + #1\caption@ifbeamertemplate{numbered}{~#2}{}} + \caption@declarelabelseparator + {\caption@ifbeamertemplate{caption name own line}\@gobble\@firstofone} + {default} + {\caption@ifbeamertemplate{caption name own line}{\\}{: }} + \DeclareCaptionDefaultFont{font}{% + \usebeamerfont*{caption}% + \usebeamercolor[fg]{caption}} + \DeclareCaptionDefaultFont{labelfont}{% + \usebeamercolor[fg]{caption name}% + \usebeamerfont*{caption name}} + \DeclareCaptionDefaultJustification{\raggedright} + \DeclareOption{beamerclass}{% + \renewcommand\caption@ifslc{% + \caption@ifbeamertemplate{caption name own line}\@secondoftwo\@firstoftwo} + % Since the beamer class do not offer a `list of figures' we switch this support off. + \captionsetup{list=0}} + \PassOptionsToPackage{beamerclass}{caption3} + \defbeamertemplate{caption}{caption3}{% + \caption@make\insertcaptionname\insertcaptionnumber\insertcaption} + \DeclareOption{beamer}{% + % \usebeamertemplate**{caption} will set font + \DeclareCaptionDefaultFont{font}{}% + \setbeamertemplate{caption}[caption3]} +} +\providecommand*\caption@ifkomaclass{% + \caption@ifundefined\scr@caption\@gobble\@firstofone} +\@onlypreamble\caption@ifkomaclass +\caption@ifkomaclass{% + \caption@CheckCommand\@makecaption{% + % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class] + \long\def\@makecaption#1#2{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + \@@makecaption\@firstofone{#1}{#2}% + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi}} + \DeclareCaptionFormat{default}[#1#2#3\par]{% + \ifdofullc@p + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with \noexpand\setcaphanging (which is set by default)}}% + {\caption@fmt@hang{#1}{#2}{#3}}% + \else + #1#2% + \ifdim\cap@indent<\z@ + \par + \noindent\hspace*{-\cap@indent}% + \else\if@capbreak + \par + \fi\fi + #3\par + \fi} + \DeclareCaptionLabelSeparator{default}{\captionformat} + \DeclareCaptionDefaultFont{font}{\scr@fnt@caption} + \DeclareCaptionDefaultFont{labelfont}{\scr@fnt@captionlabel} +} +\providecommand*\caption@ifntgclass{% + \caption@ifundefined\CaptionFonts\@gobble\@firstofone} +\@onlypreamble\caption@ifntgclass +\caption@ifntgclass{% + \caption@CheckCommand\@makecaption{% + % artikel|rapport|boek [2004/06/07 v2.1a NTG LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{{\CaptionLabelFont#1:} \CaptionTextFont#2}% + \ifdim \wd\@tempboxa >\hsize + {\CaptionLabelFont#1:} \CaptionTextFont#2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \DeclareCaptionDefaultFont{labelfont}{\CaptionLabelFont} + \DeclareCaptionDefaultFont{textfont}{\CaptionTextFont} +} +\providecommand*\caption@ifthesisclass{% + \caption@ifundefined\cph@font + {\@gobble}% + {\caption@ifundefined\cpb@font\@gobble\@firstofone}} +\caption@ifthesisclass{% + \caption@CheckCommand\@makecaption{% + % thesis.cls 1996/25/01 1.0g LaTeX document class (wm). + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \setbox\@tempboxa\hbox{{\cph@font #1:} {\cpb@font #2}}% + \ifdim \wd\@tempboxa >\hsize + \@hangfrom{\cph@font #1: }{\cpb@font #2\par}% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \DeclareCaptionDefaultFormat{hang} + \DeclareCaptionDefaultFont{labelfont}{\cph@font} + \DeclareCaptionDefaultFont{textfont}{\cpb@font} +} +\caption@ifundefined\FB@makecaption{}{% + \caption@CheckCommand\@makecaption{% + % frenchb.ldf [2005/02/06 v1.6g French support from the babel system] + % frenchb.ldf [2007/10/05 v2.0e French support from the babel system] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1\CaptionSeparator #2}% + \ifdim \wd\@tempboxa >\hsize + #1\CaptionSeparator #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \ifx\@makecaption\STD@makecaption + \DeclareCaptionLabelSeparator{default}{\CaptionSeparator} + \def\caption@frenchb{% supress frenchb warning + \let\STD@makecaption\@makecaption + \let\FB@makecaption\@makecaption} + \else + \ifx\@makecaption\@undefined\else + \caption@InfoNoLine{% + The definition of \protect\@makecaption\space + has been changed,\MessageBreak + frenchb will NOT customize it}% + \fi + \fi +} +\caption@ifundefined\frenchTeXmods{}{% + \caption@CheckCommand\@makecaption{% + % french(le).sty [2006/10/03 The french(le) package /V5,9991/] + % french(le).sty [2007/06/28 The french(le) package /V5,9994/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \def\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}}% + \caption@CheckCommand\@makecaption{% + % french(le).sty [2007/02/11 The french(le) package /V5,9993/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \protected@edef\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}}% + \DeclareCaptionDefaultFont{textfont}{\itshape}% + \DeclareCaptionLabelSeparator{default}{\captionseparator\space}% +} +\DeclareCaptionListFormat{subperiod}{#2.} +\caption@ifundefined\hunnewlabel{}{% + \caption@CheckCommand\@makecaption{% + % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system] + \def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1. #2}% + \ifdim \wd\@tempboxa >\hsize + {#1. #2\csname par\endcsname} + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}}} +\def\caption@tempa#1{\@ifundefined{extras#1}{}{% + \expandafter\addto\csname extras#1\endcsname{% + % change default labelsep and listformat + \caption@setdefaultlabelsep{period}% + \caption@setdefaultlistformat{subperiod}}% + \expandafter\addto\csname noextras#1\endcsname{% + % change default labelsep and listformat + \caption@setdefaultlabelsep{colon}% + \caption@setdefaultlistformat{subsimple}}% +}} +\caption@tempa{hungarian} +\caption@tempa{magyar} +\caption@IfCheckCommand{% + \caption@setbool{documentclass}{1}% +}{% + \caption@setbool{documentclass}{0}% + \caption@InfoNoLine{% + Unknown document class (or package),\MessageBreak + standard defaults will be used}% + \caption@Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}% +} +\captionsetup{style=default,position=default,% + list,listformat=default,twoside=\if@twoside 1\else 0\fi} +\ProcessOptions* +\newcommand\caption@addcontentsline[2]{% + \caption@ifcontentsline{#2}{% + \begingroup + \let\@tempa\@gobble + \caption@ifundefined\caption@listtype + {\edef\caption@listtype{#1}}% + {\let\@tempa\@firstofone}% + \caption@ifundefined\caption@listtype@ext + {}% + {\edef\caption@listtype{\caption@listtype\caption@listtype@ext}% + \let\@tempa\@firstofone}% + \@tempa + {\caption@Debug{addcontentsline: #1 => \caption@listtype}% + \@namedef{the\caption@listtype}{\@nameuse{the#1}}}% + \expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}% + \endgroup}} +\newcommand\caption@@addcontentsline[2]{% + {\let\\\space + \@ifundefined{ext@#1}% + {\caption@Error{No float type '#1' defined}}% + {\caption@@@addcontentsline + {\csname ext@#1\endcsname}% + {#1}% + {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + {\ignorespaces #2}}}} +\newcommand*\caption@@@addcontentsline[4]{% + \addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}} +\newcommand\caption@ifcontentsline[1]{% + \caption@iflist + {\def\@tempa{#1}}% + {\let\@tempa\@empty}% + \ifx\@tempa\@empty + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi} +\newif\ifcaption@star +\newcommand*\caption@fnum[1]{\caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}} +\newcommand\caption@make[2]{\caption@@make{\caption@lfmt{#1}{#2}}} +\newcommand\caption@@make[2]{% + \begingroup + \caption@stepcounter + \caption@beginhook + \ifx\caption@maxmargin\@undefined \else + \ifdim\captionmargin>\caption@maxmargin\relax + \captionmargin\caption@maxmargin\relax + \fi + \fi + \ifx\caption@minmargin\@undefined \else + \ifdim\captionmargin<\caption@minmargin\relax + \captionmargin\caption@minmargin\relax + \fi + \fi + \caption@ifslc{\caption@slc{#1}{#2}\captionwidth\relax}{}% + \caption@calcmargin + \@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{}{\advance\@tempdima\captionmargin@}% + \fi + \caption@ifh{\advance\@tempdima\caption@indent}% + \hspace\@tempdima + \@tempdima\captionwidth + \caption@ifh{\advance\@tempdima-\caption@indent}% + \caption@parbox\@tempdima{% + \caption@ifh{% + \ifdim\caption@indent=\z@ + \leavevmode + \else + \hskip-\caption@indent + \fi}% + \caption@@@make{#1}{#2}}% + \@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{\advance\@tempdima\captionmargin@}{}% + \fi + \hspace\@tempdima + \caption@endhook + \endgroup + \global\caption@starfalse} +\newcommand*\caption@calcmargin{% + \caption@calcmargin@hook + \ifdim\captionwidth=\z@ + \captionwidth\linewidth + \advance\captionwidth by -2\captionmargin + \advance\captionwidth by -\captionmargin@ + \else + \captionmargin\linewidth + \advance\captionmargin by -\captionwidth + \divide\captionmargin by 2 + \captionmargin@\z@ + \fi + \caption@Debug{% + \string\hsize=\the\hsize, + \string\linewidth=\the\linewidth,\MessageBreak + \string\leftmargin=\the\leftmargin, + \string\rightmargin=\the\rightmargin,\MessageBreak + \string\margin=\the\captionmargin, + \string\margin@=\the\captionmargin@, + \string\width=\the\captionwidth}% +} +\newcommand\caption@slc[4]{% + \caption@@slc{#1}{#2}{#3}{\caption@singleline#4}{}} +\newcommand\caption@@slc[5]{% + \caption@Debug{Begin SLC}% + \begingroup + \caption@singleline + \let\caption@hj\@empty + \caption@calcmargin % calculate #3 if necessary + \caption@prepareslc + \sbox\@tempboxa{\caption@@@make{#1}{#2}}% + \ifdim\wd\@tempboxa>#3% + \endgroup + #5% + \else + \endgroup + #4% + \fi + \caption@Debug{End SLC}} +\newcommand*\caption@singleline{% + \caption@xsetup\caption@opt@singleline + \let\caption@fmt\caption@slfmt} +\newcommand*\caption@prepareslc{% + \let\label\caption@gobble + \let\caption@footnotemark@ORI\footnotemark + \def\footnote{\caption@withoptargs\caption@footnote}% + \def\footnotemark{\caption@withoptargs\caption@footnotemark}% + \let\@footnotetext\caption@gobble + \let\@endnotetext\caption@gobble + \let\pagenote\caption@gobble +} +\newcommand\caption@footnote[2]{% + \caption@footnotemark{#1}} +\newcommand\caption@footnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@footnotemark@ORI#1% + \endgroup} +\newcommand*\caption@l@stepcounter[1]{% + \advance\csname c@#1\endcsname\@ne\relax} +\newcommand*\caption@parbox{\parbox[b]} +\newcommand*\caption@applyfont{% + \caption@hj\captionfont\captionsize} +\newcommand\caption@@@make[2]{% + \sbox\@tempboxa{#1}% + \ifdim\wd\@tempboxa=\z@ + \let\caption@lsep\relax + \fi + \caption@ifempty{#2}{% + \let\caption@lsep\@empty + \let\caption@tfmt\@firstofone + }% + \@setpar{\@@par\caption@@par}\caption@@par + \caption@applyfont + \caption@fmt + {\ifcaption@star\else{\captionlabelfont#1}\fi}% + {\ifcaption@star\else{\caption@iflf\captionlabelfont\caption@lsep}\fi}% + {{\captiontextfont + \caption@ifstrut{\vrule\@height\ht\strutbox\@width\z@}{}% + \nobreak\hskip\z@skip % enable hyphenation + \caption@tfmt{#2}% + \caption@ifstrut{\ifhmode\@finalstrut\strutbox\fi}{}% + \par}}} +\newcommand\caption@ifempty[1]{% + \caption@if@empty{#1}% + \caption@ifempty\@unused} +\newcommand\caption@if@empty[1]{% + \def\caption@tempa{#1}% + \ifx\caption@tempa\@empty + \let\caption@ifempty\@secondoftwo + \else + \expandafter\def\expandafter\caption@tempa\expandafter{% + \caption@car#1\caption@if@empty\caption@nil}% + \def\caption@tempb{\caption@if@empty}% + \ifx\caption@tempa\caption@tempb + \let\caption@ifempty\@secondoftwo + \else + \def\caption@tempb{\ignorespaces}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobble#1}% + \else + \def\caption@tempb{\label}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\index}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\glossary}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \let\caption@ifempty\@gobbletwo + \fi + \fi + \fi + \fi + \fi + \fi} +\long\def\caption@car#1#2\caption@nil{#1}% same as \@car, but \long +\newcommand*\caption@@par{% + \parindent\caption@parindent\hangindent\caption@hangindent}% +\newcommand*\DeclareCaptionType{% + \RequirePackage{newfloat}% + \DeclareFloatingEnvironment} +\@onlypreamble\DeclareCaptionType +\newcommand\caption@ForEachType[1]{% + \caption@ifundefined\ForEachFloatingEnvironment + {\def\@elt##1{#1}% + \caption@ifundefined\c@figure\@gobble\@elt{figure}% + \caption@ifundefined\c@table\@gobble\@elt{table}% + \let\@elt\relax + \newfloat@addtohook{#1}}% + {\ForEachFloatingEnvironment{#1}}} +\providecommand\newfloat@addtohook[1]{% + \toks@=\expandafter{\newfloat@hook{##1}#1}% + \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}% + \@tempa} +\providecommand*\newfloat@hook[1]{} +\newcommand*\caption@patch@stpelt{% + \let\caption@stpelt\@stpelt + \def\@stpelt##1{% + \caption@stpelt{##1}% + \begingroup + \let\@elt\caption@stpelt + \csname caption@cl@##1\endcsname + \endgroup}% + \let\caption@patch@stpelt\relax} +\@onlypreamble\caption@patch@stpelt +\newcommand*\caption@addtoreset[2]{% + \caption@patch@stpelt + \@ifundefined{caption@cl@#2}{\@namedef{caption@cl@#2}{}}{}% + \expandafter\@cons\csname caption@cl@#2\endcsname{{#1}}} +\@onlypreamble\caption@addtoreset +\newcommand*\caption@removefromreset[2]{% + \begingroup + \expandafter\let\csname c@#1\endcsname\caption@removefromreset + \def\@elt##1{% + \expandafter\ifx\csname c@##1\endcsname\caption@removefromreset + \else + \noexpand\@elt{##1}% + \fi}% + \expandafter\xdef\csname caption@cl@#2\endcsname{% + \csname caption@cl@#2\endcsname}% + \endgroup} +\@onlypreamble\caption@removefromreset +\newcommand*\DeclareCaptionSubType{% + \caption@teststar\caption@declaresubtype\@firstoftwo\@secondoftwo} +\@onlypreamble\DeclareCaptionSubType +\newcommand*\caption@declaresubtype[1]{% + \@testopt{\caption@@declaresubtype{#1}}{alph}} +\@onlypreamble\caption@declaresubtype +\def\caption@@declaresubtype#1[#2]#3{% + \@ifundefined{c@#3}% + {\caption@Error{No float type '#3' defined}}% + {\@ifundefined{c@sub#3}% + {\caption@Debug{New subtype `sub#3'}% + \newcounter{sub#3}% + \caption@addtoreset{sub#3}{#3}% + \@namedef{ext@sub#3}{\csname ext@#3\endcsname}% + \caption@declaresublistentry{#3}% + \@cons\caption@subtypelist{{#3}}}% + {\caption@Debug{Modify caption `sub#3'}}% + \caption@ifundefined\contentsuse{}{% + \contentsuse{sub#3}{\csname ext@sub#3\endcsname}}% + \@namedef{sub#3name}{}% + \@namedef{sub#3autorefname}{\csname #3name\endcsname}% + #1% is \@firstoftwo in star form, and \@secondoftwo otherwise + {\@namedef{p@sub#3}{}% + \@namedef{thesub#3}{\csname the#3\endcsname.\@nameuse{#2}{sub#3}}}% + {\@namedef{p@sub#3}{\csname the#3\endcsname}% + \@namedef{thesub#3}{\@nameuse{#2}{sub#3}}}% + \@namedef{theHsub#3}{\csname theH#3\endcsname.\arabic{sub#3}}% + }} +\@onlypreamble\caption@@declaresubtype +\newcommand*\caption@declaresublistentry{% + \caption@ifundefined\l@chapter + {\caption@@declaresublistentry\l@subsubsection}% + {\caption@@declaresublistentry\l@subsection}} +\@onlypreamble\caption@declaresublistentry +\newcommand*\caption@@declaresublistentry[2]{% + \ifx#1\@undefined + \caption@@@declaresublistentry\relax\@dottedtocline\caption@nil{#2}% + \else + \expandafter\caption@@@declaresublistentry#1{}{}\@dottedtocline\caption@nil{#2}% + \fi} +\@onlypreamble\caption@@declaresublistentry +\long\def\caption@@@declaresublistentry#1\@dottedtocline#2\caption@nil#3{% + \def\@tempa{#1}% + \ifx\@tempa\@empty + \caption@@@@declaresublistentry{#3}#2\caption@nil + \else + \caption@@@@declaresublistentry{#3}@{3.8em}{3.2em}\caption@nil + \fi} +\@onlypreamble\caption@@@declaresublistentry +\def\caption@@@@declaresublistentry#1#2#3#4#5\caption@nil{% + \expandafter\caption@@@@@declaresublistentry\expandafter + {\csname @dotted\csname ext@#1\endcsname line\endcsname}{#1}{#3}{#4}} +\@onlypreamble\caption@@@@declaresublistentry +\newcommand*\caption@@@@@declaresublistentry[4]{% + \@namedef{l@sub#2}{#1{2}{#3}{#4}}% + \caption@@@@@@declaresublistentry#1{c@\csname ext@#2\endcsname depth}} +\@onlypreamble\caption@@@@@declaresublistentry +\newcommand*\caption@@@@@@declaresublistentry[2]{ + \ifx#1\relax + \def#1##1{% + \def\next{\@dottedtocline{##1}}% + \@ifundefined{#2}{}{% + \ifnum ##1>\@nameuse{#2}\relax + \let\next\@gobblefour + \fi}% + \next}% + \fi} +\@onlypreamble\caption@@@@@@declaresublistentry +\newcommand*\caption@subtypelist{} +\newcommand*\caption@For{\caption@withoptargs\caption@@For} +\newcommand\caption@@For[3]{% + \caption@AtBeginDocument#1{% + \def\@elt##1{#3}% + \@nameuse{caption@#2}% + \let\@elt\relax}}% +\caption@AtBeginDocument{% + \def\@tempa{2005/06/28 ver: 1.3 subfig package}% + \expandafter\ifx\csname ver@subfig.sty\endcsname\@tempa + \caption@InfoNoLine{subfig package v1.3 is loaded}% + \let\caption@setfloattype\@gobble + \let\@dottedxxxline\sf@NEW@dottedxxxline + \let\sf@subfloat\sf@NEW@subfloat + \fi + \let\sf@NEW@dottedxxxline\@undefined + \let\sf@NEW@subfloat\@undefined} +\def\sf@NEW@dottedxxxline#1#2#3#4#5#6#7{% + \begingroup + \caption@setfloattype{#1}% + \caption@setoptions{subfloat}% + \caption@setoptions{sub#1}% + \ifnum #3>\@nameuse{c@#2depth}\else + \@dottedtocline{\z@}{#4}{#5}{#6}{#7}% + \fi + \endgroup} +\def\sf@NEW@subfloat{% + \begingroup + \caption@setfloattype\@captype + \sf@ifpositiontop{% + \maincaptiontoptrue + }{% + \maincaptiontopfalse + }% + \caption@setoptions{subfloat}% + \caption@setoptions{sub\@captype}% + \let\sf@oldlabel=\label + \let\label=\subfloat@label + \ifmaincaptiontop\else + \advance\@nameuse{c@\@captype}\@ne + \fi + \refstepcounter{sub\@captype}% + \setcounter{sub\@captype @save}{\value{sub\@captype}}% + \@ifnextchar [% %] match left bracket + {\sf@@subfloat}% + {\sf@@subfloat[\@empty]}} +\endinput +%% +%% End of file `caption3_2011-11-01.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty b/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty new file mode 100644 index 00000000000..bbdd12811b4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption3_2019-09-01.sty @@ -0,0 +1,1839 @@ +%% +%% This is file `caption3_2019-09-01.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.3/caption3.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption3}[2019/09/01 v1.8d caption3 kernel (AR)] +\providecommand\caption@FixArabTeX{% + \def\caption@tempa##1{}% + \ifx\caption@tempa\@gobble + \PackageInfo{caption3}{Fixing ArabTeX}% + \long\def\@gobble##1{}% + \fi} +\caption@FixArabTeX +\AtBeginDocument{% + \caption@FixArabTeX + \let\caption@FixArabTeX\@undefined} +\providecommand*\@nameundef[1]{% + \expandafter\let\csname #1\endcsname\@undefined} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname currentgrouplevel\endcsname\relax + \PackageInfo{caption3}{TeX engine: TeX} + \let\caption@ifeTeX\@secondoftwo + \providecommand\l@addto@macro[2]{% + \begingroup + \toks@\expandafter{#1#2}% + \xdef\caption@addto@temp{\the\toks@}% + \endgroup + \let#1\caption@addto@temp} +\else + \PackageInfo{caption3}{TeX engine: e-TeX} + \let\caption@ifeTeX\@firstoftwo + \providecommand\l@addto@macro[2]{% + \edef#1{\unexpanded\expandafter{#1#2}}} +\fi +\def\bothIfFirst#1#2{% + \protected@edef\caption@tempa{#1}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +\def\bothIfSecond#1#2{% + \protected@edef\caption@tempa{#2}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +\newcommand*\caption@ifundefined[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi} +\newcommand*\caption@ifinlist{% + \@expandtwoargs\caption@@ifinlist} +\newcommand*\caption@@ifinlist[2]{% + \begingroup + \def\@tempa##1,#1,##2\@nil{% + \endgroup + \ifx\relax##2\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \@tempa,#2,#1,\@nil}% +\newcommand*\caption@ifin@list[2]{% + \caption@ifempty@list#1% + {\@secondoftwo}% + {\@expandtwoargs\caption@@ifinlist{#2}{#1}}} +\newcommand*\caption@g@addto@list[2]{% + \caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}} +\newcommand*\caption@l@addto@list[2]{% + \caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}} +\newcommand*\caption@g@removefrom@list[2]{% + \caption@l@removefrom@list#1{#2}% + \global\let#1#1} +\newcommand*\caption@l@removefrom@list[2]{% + \caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}} +\newcommand*\caption@for@list[2]{% + \caption@ifempty@list#1{}{% + \def\caption@tempb##1{#2}% + \@for\caption@tempa:=#1\do{% + \expandafter\caption@tempb\expandafter{\caption@tempa}}}} +\newcommand*\caption@ifempty@list[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else\ifx#1\@empty + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi\fi} +\newcommand*\caption@setbool[1]{% + \expandafter\caption@set@bool\csname caption@if#1\endcsname} +\newcommand*\caption@set@bool[2]{% + \caption@ifinlist{#2}{1,true,yes,on}{% + \let#1\@firstoftwo + }{\caption@ifinlist{#2}{0,false,no,off}{% + \let#1\@secondoftwo + }{% + \caption@Error{Undefined boolean value `#2'}% + }}} +\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}} +\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}} +\newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}} +\newcommand*\caption@teststar@[3]{% + \@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}} +\AtBeginDocument{\let\caption@teststar@\caption@teststar} +\newcommand*\caption@ifatletter{% + \ifnum\the\catcode`\@=11 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\AtBeginDocument{\let\caption@ifatletter\@secondoftwo} +\newcommand*\caption@withoptargs[1]{% + \@ifstar + {\def\caption@tempa{*}\caption@@withoptargs{#1}}% + {\def\caption@tempa{}\caption@@withoptargs{#1}}} +\def\caption@@withoptargs#1{% + \@ifnextchar[%] + {\caption@@@withoptargs{#1}}% + {\caption@@@@withoptargs{#1}}} +\def\caption@@@withoptargs#1[#2]{% + \l@addto@macro\caption@tempa{[{#2}]}% + \caption@@withoptargs{#1}} +\def\caption@@@@withoptargs#1{% + \def\caption@tempb{#1}% + \expandafter\caption@tempb\expandafter{\caption@tempa}} +\DeclareRobustCommand*\caption@gobble{% + \caption@withoptargs\@gobbletwo} +\newcommand\caption@DoCheckCommand[2]{% + \begingroup + \let\caption@tempa#1% + #2% + \ifx\caption@tempa#1% + \endgroup + \let\caption@CheckCommand\@gobbletwo + \else + \endgroup + \fi} +\@onlypreamble\caption@DoCheckCommand +\let\caption@CheckCommand\caption@DoCheckCommand +\@onlypreamble\caption@CheckCommand +\newcommand*\caption@IfCheckCommand{% + \ifx\caption@CheckCommand\@gobbletwo + \let\caption@CheckCommand\caption@DoCheckCommand + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\@onlypreamble\caption@IfCheckCommand +\let\caption@begindocumenthook\@empty +\let\caption@@begindocumenthook\@empty +\def\caption@AtBeginDocument{% + \caption@teststar\g@addto@macro + \caption@@begindocumenthook\caption@begindocumenthook} +\AtBeginDocument{% + \caption@InfoNoLine{Begin \noexpand\AtBeginDocument code}% + \def\caption@AtBeginDocument{% + \@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}% + \caption@begindocumenthook + \let\caption@begindocumenthook\relax + \def\caption@AtBeginDocument{% + \@ifstar\@firstofone\@firstofone}% + \caption@@begindocumenthook + \let\caption@@begindocumenthook\relax + \caption@InfoNoLine{End \noexpand\AtBeginDocument code}} +\newcommand*\caption@Info[1]{% + \PackageInfo{caption}{#1}} +\newcommand*\caption@InfoNoLine[1]{% + \caption@Info{#1\@gobble}} +\newcommand*\caption@Warning[1]{% + \caption@WarningNoLine{#1\on@line}} +\newcommand*\caption@WarningNoLine[1]{% + \PackageWarning{caption}{#1.^^J\caption@wh\@gobbletwo}} +\newcommand*\caption@wh{% + See the caption package documentation for explanation.} +\newcommand*\caption@Error[1]{% + \PackageError{caption}{#1}\caption@eh} +\newcommand*\caption@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `caption' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} +\let\caption@KV@err\caption@Error +\RequirePackage{keyval}[1997/11/10] +\providecommand*\undefine@key[2]{% + \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} +\providecommand*\@preamble@keys{} +\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}} +\@onlypreamble\@onlypreamble@key +\@onlypreamble\@preamble@keys +\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}} +\caption@AtBeginDocument*{% + \def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}% + \@preamble@keys + \let\@elt\relax} +\newcommand*\DeclareCaptionOption{% + \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOption +\newcommand*\caption@declareoption[2]{% + #1{\undefine@key{caption}{#2}}\caption@declare@option{#2}} +\@onlypreamble\caption@declareoption +\newcommand*\caption@declare@option{% + \define@key{caption}} +%% no \@onlypreamble\caption@declare@option, will be used by \captionsetup +\newcommand*\DeclareCaptionOptionNoValue{% + \caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOptionNoValue +\newcommand\caption@declareoption@novalue[3]{% + \caption@declareoption{#1}{#2}[\KV@err]{% + \caption@option@novalue{#2}{##1}{#3}}} +\@onlypreamble\caption@declareoption@novalue +\newcommand*\caption@option@novalue[2]{% + \ifx\KV@err#2% + \expandafter\@firstofone + \else + \KV@err{No value allowed for #1}% + \expandafter\@gobble + \fi} +\newif\ifcaptionsetup@star +\newcommand*\captionsetup{% + \caption@teststar@\@captionsetup\@gobble\@firstofone} +\newcommand*\@captionsetup[1]{% + \captionsetup@startrue#1\captionsetup@starfalse + \@ifnextchar[\caption@setup@options\caption@setup} +\newcommand*\caption@setup{\caption@setkeys{caption}} +\def\caption@setup@options[#1]{% + \@ifnextchar[% + {\caption@stepthecounter + \caption@withoptargs{\@expandtwoargs + \caption@setup@options@i{#1}{@\caption@thecounter}}}% + {\caption@setup@options@{#1}}} +\newcommand*\caption@setup@options@i[4]{% + \caption@setup@options@{#1}{#2}% + \caption@declare@option{#2}[]{\captionsetup#3{#4}}} +\newcommand*\caption@setup@options@[2]{% + \@bsphack + \ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi + \expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}% + \@esphack} +\newcommand*\clearcaptionsetup{% + \caption@teststar@\@clearcaptionsetup\@gobble\@firstofone} +\newcommand*\@clearcaptionsetup[1]{% + \let\caption@tempa#1% + \@testopt\@@clearcaptionsetup{}} +\def\@@clearcaptionsetup[#1]#2{% + \@bsphack + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@tempa{\caption@Warning{Option list `#2' undefined}}}% + {\ifx,#1,% + \caption@clearsetup{#2}% + \else + \caption@@removefromsetup{#1}{#2}% + \fi}% + \@esphack} +\newcommand*\caption@clearsetup[1]{% + \caption@removefromoptlist{#1}% + \@nameundef{caption@opt@#1}} +\newcommand*\caption@removefromsetup{% + \let\caption@tempa\@gobble + \caption@@removefromsetup} +\newcommand*\caption@@removefromsetup[2]{% + \expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname + \expandafter\let\csname caption@opt@#2\endcsname\@undefined + \def\@tempb##1=##2\@nil{##1}% + \edef\@tempc{#1}% + \@for\@tempa:=\@tempa\do{% + \edef\@tempd{\expandafter\@tempb\@tempa=\@nil}% + \ifx\@tempd\@tempc + \let\caption@tempa\@gobble + \else + \expandafter\expandafter\expandafter\caption@l@addto@list + \expandafter\csname caption@opt@#2\expandafter\endcsname + \expandafter{\@tempa}% + \fi}% + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@removefromoptlist{#2}}{}% + \caption@tempa{\caption@Warning{% + Option `#1' was not in list `#2'}}} +\newcommand*\showcaptionsetup[2][\@firstofone]{% + \@bsphack + \GenericWarning{}{% + #1 Caption Info: Option list on `#2'\MessageBreak + #1 Caption Data: \@ifundefined{caption@opt@#2}{% + -none-% + }{% + {\expandafter\expandafter\expandafter\strip@prefix + \expandafter\meaning\csname caption@opt@#2\endcsname}% + }}% + \@esphack} +\DeclareCaptionOption{options}{\caption@setoptions{#1}} +\newcommand*\caption@setoptions[1]{% + \caption@Debug{options=#1}% + \expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname + \ifx\caption@opt\relax \else + \caption@xsetup\caption@opt + \caption@clearsetup{#1}% + \fi} +\newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}} +\newcommand*\caption@addtooptlist[1]{% + \@ifundefined{caption@opt@#1@lineno}{% + \caption@dooptlist\caption@g@addto@list{#1}% + \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}% + }{}} +\newcommand*\caption@removefromoptlist[1]{% + \caption@dooptlist\caption@g@removefrom@list{#1}% + \global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined} +\newcommand*\caption@dooptlist[2]{% + \begingroup + \edef\@tempa{#2}\@onelevel@sanitize\@tempa + \expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}% + \endgroup} +\AtEndDocument{% + \caption@for@list\caption@optlist{% + \caption@WarningNoLine{% + Unused \string\captionsetup[#1] + on input line \csname caption@opt@#1@lineno\endcsname}}} +\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys} +\long\def\caption@@setkeys[#1]#2#3{% + \@bsphack + \expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err + \expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx + \expandafter\let\csname ORI@XKV@err\caption@keydepth\endcsname\XKV@err + \edef\caption@keydepth{\caption@keydepth i}% + \expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname + \ifx\KV@err\relax + \def\KV@err##1{\PackageError{#1}{##1}{% + See the #1 package documentation for explanation.}}% + \fi + \def\KV@errx{\KV@err}% + \def\XKV@err{\let\@tempa\XKV@tkey\KV@err}% + \caption@Debug{\protect\setkeys{#2}{#3}}% + \setkeys{#2}{#3}% + \edef\caption@keydepth{\expandafter\@gobble\caption@keydepth}% + \expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname + \expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname + \expandafter\let\expandafter\XKV@err\csname ORI@XKV@err\caption@keydepth\endcsname + \ifx\caption@keydepth\@empty \captionsetup@starfalse \fi + \@esphack} +\let\caption@keydepth\@empty +\newcommand*\caption@ExecuteOptions[2]{% + \expandafter\@expandtwoargs\csname caption@setkeys@#1\endcsname{#1}{#2}}% +\@onlypreamble\caption@ExecuteOptions +\newcommand*\caption@ProcessOptions{% + \caption@teststar\caption@@ProcessOptions\@gobble\@firstofone} +\@onlypreamble\caption@ProcessOptions +\newcommand\caption@@ProcessOptions[2]{% + \let\@tempc\relax + \let\caption@tempa\@empty + #1{% \@firstofone -or- \@gobble + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#2@\CurrentOption}{}{% + \@ifundefined{KV@#2@\CurrentOption @default}{% + \PackageInfo{#2}{Global option `\CurrentOption' ignored}% + }{% + \PackageInfo{#2}{Global option `\CurrentOption' processed}% + \edef\caption@tempa{\caption@tempa\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + }% + \let\CurrentOption\@empty + }% + \caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}% + \AtEndOfPackage{\let\@unprocessedoptions\relax}} +\@onlypreamble\caption@@ProcessOptions +\newcommand*\caption@packagelist{} +\@onlypreamble\caption@packagelist +\newcommand\caption@SetupOptions[2]{% + \@namedef{caption@setkeys@#1}##1##2{#2}% + \expandafter\@onlypreamble\csname caption@setkeys@#1\endcsname + \@cons\caption@packagelist{{#1}}} +\@onlypreamble\caption@SetupOptions +\let\caption@onefilewithoptions\@onefilewithoptions +\def\@onefilewithoptions#1[#2]{% + \begingroup + \def\@tempa{% + \endgroup + \caption@onefilewithoptions{#1}[{#2}]}% + \def\@tempb{#1}% + \def\@elt##1{% + \def\@tempc{##1}% + \ifx\@tempb\@tempc + \def\@tempa{% + \endgroup + \caption@ExecuteOptions{#1}{#2}% + \caption@onefilewithoptions{#1}[]}% + \fi} + \caption@packagelist + \@tempa} +\@onlypreamble\caption@onefilewithoptions +\newdimen\captionmargin +\newdimen\captionmargin@ +\newdimen\captionwidth +\newdimen\caption@tempdima +\DeclareCaptionOption{margin}{\setcaptionmargin{#1}} +\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}} +\DeclareCaptionOption{width}{\setcaptionwidth{#1}} +\DeclareCaptionOption{width*}{\setcaptionwidth*{#1}} +\DeclareCaptionOption{calcmargin}{\caption@setcalcmargin{#1}} +\DeclareCaptionOption{calcmargin*}{\caption@setcalcmargin*{#1}} +\DeclareCaptionOption{calcwidth}{\caption@setcalcwidth{#1}} +\DeclareCaptionOption{calcwidth*}{\caption@setcalcwidth*{#1}} +\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}} +\DeclareCaptionOptionNoValue{oneside}{\caption@set@bool\caption@iftwoside0} +\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}} +\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}} +\newcommand*\setcaptionmargin{% + \caption@resetcalcmargin + \caption@setmargin} +\newcommand*\caption@setmargin{% + \caption@teststar\caption@@setmargin\@gobble\@firstofone} +\newcommand*\caption@@setmargin[2]{% + #1{\captionwidth\z@}% + \caption@@@setmargin#2,#2,\@nil} +\def\caption@@@setmargin#1,#2,#3\@nil{% + \setlength\captionmargin@{#2}% + \setlength\captionmargin{#1}% + \addtolength\captionmargin@{-\captionmargin}} +\newcommand*\setcaptionwidth{% + \caption@resetcalcmargin + \caption@setwidth} +\newcommand*\caption@setwidth{% + \caption@teststar\caption@@setwidth\@gobble\@firstofone} +\newcommand*\caption@@setwidth[2]{% + #1{\captionmargin\z@\captionmargin@\z@}% + \setlength\captionwidth{#2}}% +\newcommand*\caption@resetcalcmargin{% + \let\caption@calcmargin@hook\@empty} +\newcommand*\caption@setcalcmargin{% + \caption@teststar{\caption@@setcalcmargin\caption@setmargin}% + \@secondoftwo\@firstoftwo} +\newcommand*\caption@@setcalcmargin[3]{% + #2{\caption@resetcalcmargin + \l@addto@macro\caption@calcmargin@hook{#1{#3}}}% + {\l@addto@macro\caption@calcmargin@hook{#1*{#3}}}} +\newcommand*\caption@setcalcwidth{% + \caption@teststar{\caption@@setcalcmargin\caption@setwidth}% + \@secondoftwo\@firstoftwo} +\newcommand*\caption@thecounter{0} +\newcommand*\caption@stepthecounter{% + \@tempcnta\caption@thecounter + \advance\@tempcnta\@ne + \xdef\caption@thecounter{\the\@tempcnta}} +\newcommand*\caption@newlabel{\@newl@bel{caption@r}} +\newcommand*\caption@thepage{\the\c@page} +\newcommand*\caption@label[1]{% + \caption@@label + \protected@write\@auxout{\let\caption@thepage\relax}% + {\string\caption@newlabel{#1}{\caption@thepage}}} +\newcommand*\caption@@label{% + \global\let\caption@@label\relax + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@newlabel[2]{}}} +\newcommand*\caption@pageref[1]{% + \expandafter\ifx\csname caption@r@#1\endcsname\relax + \G@refundefinedtrue % => 'There are undefined references.' + \@latex@warning{Reference `#1' on page \thepage \space undefined}% + \else + \expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname + \fi} +\newcommand*\caption@ifoddpage{% + \caption@iftwoside{% + \caption@label\caption@thecounter + \caption@pageref\caption@thecounter + \ifodd\caption@thepage + \let\caption@ifoddpage\@firstoftwo + \else + \let\caption@ifoddpage\@secondoftwo + \fi + }{\let\caption@ifoddpage\@firstoftwo}% + \caption@ifoddpage} +\newcommand*\caption@setoptcmd[2]{% + \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}} +\newdimen\caption@indent +\newdimen\caption@parindent +\newdimen\caption@hangindent +\DeclareCaptionOption{indent}[\leftmargini]{% obsolete! + \setlength\caption@indent{#1}} +\DeclareCaptionOption{indention}[\leftmargini]{% + \setlength\caption@indent{#1}} +\DeclareCaptionOption{parindent}{% + \setlength\caption@parindent{#1}} +\DeclareCaptionOption{hangindent}{% + \setlength\caption@hangindent{#1}} +\DeclareCaptionOption{parskip}{% + \l@addto@macro\caption@@par{\setlength\parskip{#1}}} +\providecommand*\caption@ifkomaclass{% + \caption@ifundefined\scr@caption\@gobble\@firstofone} +\@onlypreamble\caption@ifkomaclass +\caption@ifkomaclass{% + \let\caption@KV@parindent\KV@caption@parindent + \DeclareCaptionOption{parindent}[]{% + \ifx,#1,% + \caption@Debug{Option `parindent' ignored}% + \else + \caption@KV@parindent{#1}% + \fi}% + \let\caption@KV@parskip\KV@caption@parskip + \DeclareCaptionOption{parskip}[]{% + \ifx,#1,% + \caption@Debug{Option `parskip' ignored}% + \else + \caption@KV@parskip{#1}% + \fi}% +} +\newcommand*\DeclareCaptionStyle[1]{% + \@testopt{\caption@declarestyle{#1}}{}} +\@onlypreamble\DeclareCaptionStyle +\def\caption@declarestyle#1[#2]#3{% + \global\@namedef{caption@sls@#1}{#2}% + \global\@namedef{caption@sty@#1}{#3}} +\@onlypreamble\caption@declarestyle +\DeclareCaptionOption{style}{\caption@setstyle{#1}} +\DeclareCaptionOption{style*}{\caption@setstyle*{#1}} +\newcommand*\caption@setstyle{% + \caption@teststar\caption@@setstyle\@gobble\@firstofone} +\newcommand*\caption@@setstyle[2]{% + \@ifundefined{caption@sty@#2}% + {#1{\caption@Error{Undefined style `#2'}}}% + {\expandafter\let\expandafter\caption@sty\csname caption@sty@#2\endcsname + \ifx\caption@setstyle@flag\@undefined + \let\caption@setstyle@flag\relax + \caption@resetstyle + \caption@xsetup\caption@sty + \let\caption@setstyle@flag\@undefined + \else + \caption@xsetup\caption@sty + \fi + \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname + \expandafter\caption@l@addto@list\expandafter\caption@opt@singleline + \expandafter{\caption@sls}}} +\newcommand*\caption@resetstyle{% + \caption@setup{% + box=none,boxcolor=white,parbox=parbox,% + format=plain,labelformat=default,labelsep=colon,textformat=simple,% + justification=justified,font=,size=,labelfont=,textfont=,% + margin=0pt,minmargin=0,maxmargin=0,% + indent=0pt,parindent=0pt,hangindent=0pt,% + slc,rule,strut}% + \caption@clearsetup{singleline}} +\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{} +\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{% + box=default,format=default,labelsep=default,textformat=default,% + justification=default,font=default,labelfont=default,textfont=default} +\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}} +\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}} +\newcommand*\DeclareCaptionBox[2]{% + \global\long\@namedef{caption@box@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionBox +\DeclareCaptionOption{box}{\caption@setbox{#1}} +\DeclareCaptionOption{parbox}{\caption@set@box\caption@parbox{#1}} +\newcommand*\caption@setbox{% + \caption@set@box\caption@box} +\newcommand*\caption@set@box[2]{% + \@ifundefined{caption@box@#2}% + {\caption@Error{Undefined box `#2'}}% + {\expandafter\let\expandafter#1\csname caption@box@#2\endcsname}} +\DeclareCaptionBox{empty}{} +\DeclareCaptionBox{none}{#2} +\DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}} +\DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{% + \setlength\caption@tempdima{#1}% + \addtolength\caption@tempdima{-2\fboxsep}% + \linewidth=\caption@tempdima\hsize=\caption@tempdima + #2}} +\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}} +\DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}} +\def\caption@box@default{\caption@box@none} +\newcommand*\DeclareCaptionFormat{% + \caption@teststar\caption@declareformat\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionFormat +\newcommand*\caption@declareformat[2]{% + \@dblarg{\caption@@declareformat#1{#2}}} +\@onlypreamble\caption@declareformat +\long\def\caption@@declareformat#1#2[#3]#4{% + \global\expandafter\let\csname caption@ifh@#2\endcsname#1% + \global\long\@namedef{caption@slfmt@#2}##1##2##3{#3}% + \global\long\@namedef{caption@fmt@#2}##1##2##3{#4}} +\@onlypreamble\caption@@declareformat +\DeclareCaptionOption{format}{\caption@setformat{#1}} +\newcommand*\caption@setformat[1]{% + \@ifundefined{caption@fmt@#1}% + {\caption@Error{Undefined format `#1'}}% + {\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname + \expandafter\let\expandafter\caption@slfmt\csname caption@slfmt@#1\endcsname + \expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}} +\newcommand*\DeclareCaptionDefaultFormat[1]{% + \expandafter\def\expandafter\caption@fmt@default\expandafter + {\csname caption@fmt@#1\endcsname}% + \expandafter\def\expandafter\caption@slfmt@default\expandafter + {\csname caption@slfmt@#1\endcsname}% + \expandafter\def\expandafter\caption@ifh@default\expandafter + {\csname caption@ifh@#1\endcsname}} +\@onlypreamble\DeclareCaptionDefaultFormat +\DeclareCaptionFormat{plain}{#1#2#3\par} +\DeclareCaptionFormat{hang}[#1#2#3\par]{% + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with `format=hang'}}% + {\@hangfrom{#1#2}% + \advance\caption@parindent\hangindent + \advance\caption@hangindent\hangindent + \caption@@par#3\par}} +\DeclareCaptionDefaultFormat{plain} +\newcommand*\DeclareCaptionLabelFormat[2]{% + \global\@namedef{caption@lfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionLabelFormat +\DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}} +\newcommand*\caption@setlabelformat[1]{% + \@ifundefined{caption@lfmt@#1}% + {\caption@Error{Undefined label format `#1'}}% + {\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}} +\DeclareCaptionLabelFormat{empty}{} +\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} +\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} +\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} +\DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}#2\autodot} +\DeclareCaptionLabelFormat{unnumbered}{#1} +\def\caption@lfmt@default{\caption@lfmt@simple} +\newcommand\DeclareCaptionLabelSeparator{% + \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionLabelSeparator +\newcommand\caption@declarelabelseparator[3]{% + \global\@namedef{caption@iflf@#2}{#1}% + \global\long\@namedef{caption@lsep@#2}{#3}% + \caption@@declarelabelseparator{#2}#3\\\@nil} +\@onlypreamble\caption@declarelabelseparator +\long\def\caption@@declarelabelseparator#1#2\\#3\@nil{% + \def\@tempa{#3}\ifx\@tempa\@empty \else + \caption@g@addto@list\caption@lsepcrlist{#1}% + \fi} +\@onlypreamble\caption@@declarelabelseparator +\DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}} +\DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}} +\newcommand*\caption@setlabelseparator[1]{% + \@ifundefined{caption@lsep@#1}% + {\caption@Error{Undefined label separator `#1'}}% + {\edef\caption@lsepname{#1}% + \expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname + \expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}} +\DeclareCaptionLabelSeparator{none}{} +\DeclareCaptionLabelSeparator{colon}{: } +\DeclareCaptionLabelSeparator{period}{. } +\DeclareCaptionLabelSeparator{space}{ } +\DeclareCaptionLabelSeparator*{quad}{\quad} +\DeclareCaptionLabelSeparator*{newline}{\\} +\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space} +\newcommand*\caption@setdefaultlabelsep[1]{% + \ifx\caption@lsep\caption@lsep@default + \caption@set@default@labelsep{#1}% + \caption@setlabelseparator{default}% + \else + \caption@set@default@labelsep{#1}% + \fi} +\newcommand*\caption@set@default@labelsep[1]{% + \def\caption@lsep@default{\@nameuse{caption@lsep@#1}}% + \def\caption@iflf@default{\@nameuse{caption@iflf@#1}}} +\caption@set@default@labelsep{colon} +\newcommand*\DeclareCaptionTextFormat[2]{% + \global\long\@namedef{caption@tfmt@#1}##1{#2}} +\@onlypreamble\DeclareCaptionTextFormat +\DeclareCaptionOption{textformat}{\caption@settextformat{#1}} +\DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}} +\newcommand*\caption@settextformat[1]{% + \@ifundefined{caption@tfmt@#1}% + {\caption@Error{Undefined text format `#1'}}% + {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}} +\DeclareCaptionTextFormat{empty}{% + \caption@get@label#1\caption@makeanchor{}\@nil + \caption@thelabel + \global\let\caption@thelabel\relax} +\long\def\caption@get@label#1\caption@makeanchor#2#3\@nil{% + \def\caption@tempa{#2}% + \ifx\caption@tempa\@empty + \caption@getlabel#1\label{}\@nil + \else + \caption@getlabel#2\label{}\@nil + \fi} +\DeclareCaptionTextFormat{simple}{#1} +\DeclareCaptionTextFormat{period}{#1.} +\def\caption@tfmt@default{\caption@tfmt@simple} +\long\def\caption@getlabel#1\label#2#3\@nil{% + \def\@tempa{#2}% + \ifx\@tempa\@empty + \let\caption@thelabel\relax + \else + \def\@tempb{*}% + \ifx\@tempa\@tempb + \def\caption@thelabel{\label*}% + \caption@@getlabel#3\@nil + \else + \def\caption@thelabel{\label}% + \caption@@getlabel{#2}#3\@nil + \fi + \fi} +\long\def\caption@@getlabel#1#2\@nil{% + \def\@tempa{#1}% + \def\@tempb{[}% + \ifx\@tempa\@tempb + \caption@@@getlabel#1#2\@nil + \else + \l@addto@macro\caption@thelabel{{#1}}% + \fi} +\long\def\caption@@@getlabel[#1]#2\@nil{% + \l@addto@macro\caption@thelabel{[{#1}]}% + \caption@@getlabel#2\@nil} +\let\caption@thelabel\relax +\newcommand*\DeclareCaptionFont[2]{% + \define@key{caption@fnt}{#1}[]{\l@addto@macro\caption@fnt{#2}}} +\@onlypreamble\DeclareCaptionFont +\newcommand*\DeclareCaptionDefaultFont[2]{% + \global\@namedef{caption#1@default}{#2}} +\@onlypreamble\DeclareCaptionDefaultFont +\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} +\DeclareCaptionOption{font+}{\caption@addtofont{font}{#1}} +\DeclareCaptionDefaultFont{font}{} +\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} +\DeclareCaptionOption{labelfont+}{\caption@addtofont{labelfont}{#1}} +\DeclareCaptionDefaultFont{labelfont}{} +\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} +\DeclareCaptionOption{textfont+}{\caption@addtofont{textfont}{#1}} +\DeclareCaptionDefaultFont{textfont}{} +\newcommand*\caption@setfont[1]{% + \expandafter\let\csname caption#1\endcsname\@empty + \caption@addtofont{#1}} +\newcommand*\caption@addtofont[2]{% + \begingroup + \expandafter\let\expandafter\caption@fnt\csname caption#1\endcsname + \define@key{caption@fnt}{default}[]{% + \l@addto@macro\caption@fnt{\csname caption#1@default\endcsname}}% + \caption@setkeys[caption]{caption@fnt}{#2}% + \global\let\caption@tempa\caption@fnt + \endgroup + \expandafter\let\csname caption#1\endcsname\caption@tempa} +\newcommand*\caption@font{% + \caption@teststar\caption@@font\@firstofone + {\caption@setkeys[caption]{caption@fnt}}} +\newcommand*\caption@@font[2]{% + \begingroup + \def\caption@fnt{\endgroup}% + #1{#2}% + \caption@fnt} +\DeclareCaptionFont{normalcolor}{\normalcolor} +\DeclareCaptionFont{color}{\color{#1}} +\DeclareCaptionFont{normalfont}{\normalfont} +\DeclareCaptionFont{up}{\upshape} +\DeclareCaptionFont{it}{\itshape} +\DeclareCaptionFont{sl}{\slshape} +\DeclareCaptionFont{sc}{\scshape} +\DeclareCaptionFont{md}{\mdseries} +\DeclareCaptionFont{bf}{\bfseries} +\DeclareCaptionFont{rm}{\rmfamily} +\DeclareCaptionFont{sf}{\sffamily} +\DeclareCaptionFont{tt}{\ttfamily} +\DeclareCaptionFont{tiny}{\tiny} +\DeclareCaptionFont{scriptsize}{\scriptsize} +\DeclareCaptionFont{footnotesize}{\footnotesize} +\DeclareCaptionFont{small}{\small} +\DeclareCaptionFont{normalsize}{\normalsize} +\DeclareCaptionFont{large}{\large} +\DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{LARGE}{\LARGE} +\DeclareCaptionFont{huge}{\huge} +\DeclareCaptionFont{Huge}{\Huge} +\newcommand\caption@smaller{% + \ifx\@currsize\tiny + \relax + \else\ifx\@currsize\scriptsize + \tiny + \else\ifx\@currsize\footnotesize + \scriptsize + \else\ifx\@currsize\small + \footnotesize + \else\ifx\@currsize\normalsize + \small + \else\ifx\@currsize\large + \normalsize + \else\ifx\@currsize\Large + \large + \else\ifx\@currsize\LARGE + \Large + \else\ifx\@currsize\huge + \LARGE + \else\ifx\@currsize\Huge + \huge + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{smaller}{\caption@smaller} +\newcommand\caption@larger{% + \ifx\@currsize\tiny + \scriptsize + \else\ifx\@currsize\scriptsize + \footnotesize + \else\ifx\@currsize\footnotesize + \small + \else\ifx\@currsize\small + \normalsize + \else\ifx\@currsize\normalsize + \large + \else\ifx\@currsize\large + \Large + \else\ifx\@currsize\Large + \LARGE + \else\ifx\@currsize\LARGE + \huge + \else\ifx\@currsize\huge + \Huge + \else\ifx\@currsize\Huge + \relax + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{larger}{\caption@larger} +\DeclareCaptionFont{sansmath}{\sansmath} +\DeclareCaptionFont{singlespacing}{% + \caption@ifundefined\setspace@singlespace{}{% + \setstretch\setspace@singlespace}}% normally 1 +\DeclareCaptionFont{onehalfspacing}{\onehalfspacing} +\DeclareCaptionFont{doublespacing}{\doublespacing} +\DeclareCaptionFont{stretch}{\setstretch{#1}} +\DeclareCaptionFont{normal}{% + \caption@font*{% + \KV@caption@fnt@normalcolor\@unused + \KV@caption@fnt@normalfont\@unused + \KV@caption@fnt@normalsize\@unused + \KV@caption@fnt@singlespacing\@unused}} +\DeclareCaptionOption{size}{\caption@setfont{size}{#1}} +\DeclareCaptionDefaultFont{size}{} +\newcommand*\DeclareCaptionJustification[2]{% + \global\@namedef{caption@hj@#1}{#2}% for compatibility to v1.0 + \DeclareCaptionFont{#1}{#2}} +\@onlypreamble\DeclareCaptionJustification +\newcommand*\DeclareCaptionDefaultJustification[1]{% + \global\@namedef{caption@hj@default}{#1}% for compatibility to v1.0 + \DeclareCaptionDefaultFont{@hj}{#1}} +\@onlypreamble\DeclareCaptionDefaultJustification +\DeclareCaptionOption{justification}{\caption@setjustification{#1}} +\DeclareCaptionDefaultJustification{} +\newcommand*\caption@setjustification{\caption@setfont{@hj}} +\DeclareCaptionJustification{justified}{} +\DeclareCaptionJustification{centering}{\centering} +\DeclareCaptionJustification{centerfirst}{\centerfirst} +\DeclareCaptionJustification{centerlast}{\centerlast} +\DeclareCaptionJustification{raggedleft}{\raggedleft} +\DeclareCaptionJustification{raggedright}{\raggedright} +\providecommand\centerfirst{% + \let\\\@centercr + \edef\caption@normaladjust{% + \leftskip\the\leftskip + \rightskip\the\rightskip + \parfillskip\the\parfillskip\relax}% + \leftskip\z@\@plus -1fil% + \rightskip\z@\@plus 1fil% + \parfillskip\z@skip + \noindent\hskip\z@\@plus 2fil% + \@setpar{\@@par\@restorepar\caption@normaladjust}} +\providecommand\centerlast{% + \let\\\@centercr + \leftskip\z@\@plus 1fil% + \rightskip\z@\@plus -1fil% + \parfillskip\z@\@plus 2fil\relax} +\DeclareCaptionJustification{Centering}{% + \caption@ragged\Centering\centering} +\DeclareCaptionJustification{RaggedLeft}{% + \caption@ragged\RaggedLeft\raggedleft} +\DeclareCaptionJustification{RaggedRight}{% + \caption@ragged\RaggedRight\raggedright} +\newcommand*\caption@ragged{\caption@ifpackageloaded{ragged2e}} +\newcommand*\caption@ifpackageloaded[1]{% + \@ifundefined{caption@ifpkg@#1}% + {\caption@RequirePackage{#1}% + \caption@pkg@true{#1}}% + {}% + \caption@ifpkg{#1}} +\AtBeginDocument{\renewcommand*\caption@ifpackageloaded[1]{% + \@ifundefined{caption@ifpkg@#1}% + {\caption@addto@pkg@list{#1}% + \caption@pkg@false{#1}% + \caption@Warning{% + `#1' support has been changed.\MessageBreak + Rerun to get captions right}}% + {}% + \caption@ifpkg{#1}}} +\newcommand*\caption@ifpkg[1]{% + \csname caption@ifpkg@#1\endcsname} +\newcommand*\caption@pkg@true[1]{% + \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@firstoftwo} +\newcommand*\caption@pkg@false[1]{% + \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@secondoftwo} +\newcommand*\caption@pkg@list{} +\newcommand*\caption@addto@pkg@list[1]{% + \protected@write\@auxout{}{% + \string\@cons\string\caption@pkg@list{{#1}}}} +\AtBeginDocument{% + \def\caption@tempa{\endgroup}% + \begingroup + \def\@elt#1{% + \g@addto@macro\caption@tempa{% + \caption@RequirePackage{#1}% + \@namedef{caption@ifpkg@#1}{% + \caption@addto@pkg@list{#1}% + \caption@pkg@true{#1}% + \caption@ifpkg{#1}}}}% + \caption@pkg@list + \caption@tempa} +\newcommand*\caption@RequirePackage[1]{% + \caption@Info{We need package `#1'}% + \RequirePackage{#1}} +\@onlypreamble\caption@RequirePackage +\caption@ifundefined\abovecaptionskip{% + \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} +\caption@ifundefined\belowcaptionskip{% + \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} +\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}} +\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}} +\DeclareCaptionOption{skip}{\setlength\abovecaptionskip{#1}} +\newcommand*\caption@rule{\caption@ifrule\caption@hrule\relax} +\newcommand*\caption@hrule{\hrule\@height\z@} +\DeclareCaptionOption{rule}[1]{\caption@set@bool\caption@ifrule{#1}} +\DeclareCaptionOption{position}{\caption@setposition{#1}} +\newcommand*\caption@setposition[1]{% + \caption@ifinlist{#1}{d,default}{% + \let\caption@position\caption@defaultpos + }{\caption@ifinlist{#1}{t,top,above}{% + \let\caption@position\@firstoftwo + }{\caption@ifinlist{#1}{b,bottom,below}{% + \let\caption@position\@secondoftwo + }{\caption@ifinlist{#1}{a,auto}{% + \let\caption@position\@undefined + }{% + \caption@Error{Undefined position `#1'}% + }}}}} +\let\caption@defaultpos\@undefined +\newcommand*\caption@iftop{% + \ifx\caption@position\@undefined + \let\caption@position\@secondoftwo + \fi + \caption@position} +\newcommand*\caption@fixposition{% + \ifx\caption@position\@undefined + \caption@autoposition + \fi} +\newcommand*\caption@autoposition{% + \ifvmode + \edef\caption@tempa{\the\prevdepth}% + \caption@Debug{\protect\prevdepth=\caption@tempa}% + \ifdim\prevdepth>-\p@ + \let\caption@position\@secondoftwo + \else + \let\caption@position\@firstoftwo + \fi + \else + \caption@Debug{no \protect\prevdepth}% + \let\caption@position\@secondoftwo + \fi} +\newcommand*\caption@setautoposition[1]{% + \def\caption@autoposition{\caption@setposition{#1}}} +\newcommand*\caption@beginhook{} +\newcommand*\caption@endhook{} +\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook} +\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook} +\DeclareCaptionOption{list}[1]{\caption@setlist{#1}} +\DeclareCaptionOption{listof}[1]{\caption@setlist{#1}} +\newcommand*\caption@setlist{\caption@set@bool\caption@iflist} +\DeclareCaptionOption{listtype}{\caption@setlisttype{#1}} +\DeclareCaptionOption{listtype+}{\caption@setlisttype@ext{#1}} +\newcommand*\caption@setlisttype{% + \caption@setlisttype@ext{}% + \caption@@setlisttype\caption@listtype} +\newcommand*\caption@@setlisttype[2]{% + \edef#1{#2}% + \ifx#1\@empty \let#1\@undefined \fi} +\newcommand*\caption@setlisttype@ext{% + \caption@@setlisttype\caption@listtype@ext} +\newcommand*\DeclareCaptionListFormat[2]{% + \global\@namedef{caption@lstfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionListFormat +\DeclareCaptionOption{listformat}{\caption@setlistformat{#1}} +\newcommand*\caption@setlistformat[1]{% + \@ifundefined{caption@lstfmt@#1}% + {\caption@Error{Undefined list format `#1'}}% + {\expandafter\let\expandafter\caption@lstfmt + \csname caption@lstfmt@#1\endcsname}} +\DeclareCaptionListFormat{empty}{} +\DeclareCaptionListFormat{simple}{#1#2} +\DeclareCaptionListFormat{parens}{#1(#2)} +\DeclareCaptionListFormat{subsimple}{#2} +\DeclareCaptionListFormat{subparens}{(#2)} +\newcommand*\caption@setdefaultlistformat[1]{% + \ifx\caption@lstfmt\caption@lstfmt@default + \caption@set@default@listformat{#1}% + \caption@setlistformat{default}% + \else + \caption@set@default@listformat{#1}% + \fi} +\newcommand*\caption@set@default@listformat[1]{% + \def\caption@lstfmt@default{\@nameuse{caption@lstfmt@#1}}} +\caption@set@default@listformat{subsimple} +\DeclareCaptionOption{debug}[1]{% + \caption@set@bool\caption@ifdebug{#1}% + \caption@ifdebug + {\let\caption@Debug\caption@Info}% + {\let\caption@Debug\@gobble}} +\DeclareOption{debug}{\setkeys{caption}{debug}} +\setkeys{caption}{debug=0} +\caption@CheckCommand\@makecaption{% + % article|report|book [2005/09/16 v1.4f Standard LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} +\providecommand*\caption@ifelsarticleclass{% + \@ifclassloaded{elsarticle}\@firstofone\@gobble} +\@onlypreamble\caption@ifelsarticleclass +\caption@ifelsarticleclass{% + \caption@CheckCommand\@makecaption{% + % elsarticle.cls,v 1.20 2008-10-13 04:24:12 cvr Exp + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip\footnotesize + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \DeclareCaptionDefaultFont{font}{\footnotesize} +} +\providecommand*\caption@ifamsclass{% + \caption@ifundefined\@captionheadfont\@gobble\@firstofone} +\@onlypreamble\caption@ifamsclass +\caption@ifamsclass{% + \caption@CheckCommand\@makecaption{% + % amsart|amsproc|amsbook [2004/08/06 v2.20] + \long\def\@makecaption#1#2{% + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{.\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \else % if the float IS NOT a figure... + \hbox to\hsize{\kern\captionindent\box\@ne\hss}% + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} + \caption@CheckCommand\@makecaption{% + % smfart|smfbook [1999/11/15 v1.2f Classe LaTeX pour les articles publies par la SMF] + \long\def\@makecaption#1#2{% + \ifdim\captionindent>.1\hsize \captionindent.1\hsize \fi + \setbox\@tempboxa\vbox{\color@setgroup + \advance\hsize-2\captionindent\noindent + \@captionfont\@captionheadfont#1\@xp\@ifnotempty\@xp + {\@cdr#2\@nil}{\@addpunct{.}\@captionfont\upshape\enspace#2}% + \unskip\kern-2\captionindent\par + \global\setbox\@ne\lastbox\color@endgroup}% + \ifhbox\@ne % the normal case + \setbox\@ne\hbox{\unhbox\@ne\unskip\unskip\unpenalty\unkern}% + \fi + \ifdim\wd\@tempboxa=\z@ % this means caption will fit on one line + \setbox\@ne\hbox to\columnwidth{\hss\kern-2\captionindent\box\@ne\hss}% + \@tempdima\wd\@ne\advance\@tempdima-\captionindent + \wd\@ne\@tempdima + \else % tempboxa contained more than one line + \setbox\@ne\vbox{\rightskip=0pt plus\captionindent\relax + \unvbox\@tempboxa\parskip\z@skip + \noindent\unhbox\@ne\advance\hsize-2\captionindent\par}% + \fi + \ifnum\@tempcnta<64 % if the float IS a figure... + \addvspace\abovecaptionskip + \noindent\kern\captionindent\box\@ne + \else % if the float IS NOT a figure... + \noindent\kern\captionindent\box\@ne + \nobreak + \vskip\belowcaptionskip + \fi + \relax + }} + \let\captionmargin\captionindent % set to 3pc by AMS class + \begingroup\edef\@tempa{\endgroup + \noexpand\caption@g@addto@list\noexpand\caption@sty@default + {margin=\the\captionmargin + \caption@ifundefined\smf@makecaption{}{,maxmargin=.1\linewidth}}} + \@tempa + \caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin} + \DeclareCaptionLabelSeparator{default}{.\enspace} + \DeclareCaptionDefaultFont{font}{\@captionfont} + \DeclareCaptionDefaultFont{labelfont}{\@captionheadfont} + \DeclareCaptionDefaultFont{textfont}{\@captionfont\upshape} + \captionsetup[figure]{position=b} + \captionsetup[table]{position=t} +} +\providecommand*\caption@ifbeamerclass{% + \@ifclassloaded{beamer}\@firstofone\@gobble} +\@onlypreamble\caption@ifbeamerclass +\caption@ifbeamerclass{% + \caption@CheckCommand\beamer@makecaption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\beamer@makecaption#1#2{% + \def\insertcaptionname{\csname#1name\endcsname}% + \def\insertcaptionnumber{\csname the#1\endcsname}% + \def\insertcaption{#2}% + \nobreak\vskip\abovecaptionskip\nobreak + \sbox\@tempboxa{\usebeamertemplate**{caption}}% + \ifdim \wd\@tempboxa >\hsize + \usebeamertemplate**{caption}\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \nobreak\vskip\belowcaptionskip\nobreak}} + \newcommand*\caption@ifbeamertemplate[1]{% + \begingroup + \let\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption + \@nameuse{beamer@@tmpop@caption@#1}% + \ifx\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi} + \DeclareCaptionLabelFormat{default}{% + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple + \caption@lfmt@unnumbered + {#1}{#2}} + \DeclareCaptionLabelFormat{default@magyar}{% + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple@magyar + \caption@lfmt@unnumbered + {#1}{#2}} + \@ifundefined{@@magyar@captionfix}\AtBeginDocument\@firstofone{% + \@ifundefined{@@magyar@captionfix}{}{% + \g@addto@macro\@@magyar@captionfix{% + \let\caption@lfmt@simple@magyar\caption@lfmt@simpleMagyar + \let\caption@lfmt@simpleMagyar\caption@lfmt@default@magyar}}} + \caption@declarelabelseparator + {\caption@ifbeamertemplate{caption name own line}\@gobble\@firstofone} + {default} + {\caption@ifbeamertemplate{caption name own line}{\\}% + {\usebeamertemplate{caption label separator}}} + \DeclareCaptionDefaultFont{font}{% + \usebeamerfont*{caption}% + \usebeamercolor[fg]{caption}} + \DeclareCaptionDefaultFont{labelfont}{% + \setbeamercolor*{caption}{}% avoid setting "caption" color additionally + \usebeamercolor[fg]{caption name}% + \setbeamerfont*{caption}{}% avoid setting "caption" font additionally + \usebeamerfont{caption name}} + \DeclareCaptionDefaultJustification{\raggedright} + \DeclareOption{beamerclass}{% + \renewcommand\caption@ifslc{% + \caption@ifbeamertemplate{caption name own line}\@secondoftwo\@firstoftwo} + % Since the beamer class do not offer a `list of figures' we switch this support off. + \captionsetup{list=0}} + \PassOptionsToPackage{beamerclass}{caption3} + \defbeamertemplate{caption}{caption3}{% + \caption@make\insertcaptionname\insertcaptionnumber\insertcaption} + \DeclareOption{beamer}{% + % \usebeamertemplate**{caption} will set font + \DeclareCaptionDefaultFont{font}{}% + \setbeamertemplate{caption}[caption3]} +} +\providecommand*\caption@ifkomaclass{% + \caption@ifundefined\scr@caption\@gobble\@firstofone} +\@onlypreamble\caption@ifkomaclass +\caption@ifkomaclass{% + \caption@CheckCommand\@makecaption{% + % scrartcl|scrreprt|scrbook [2007/03/07 v2.97a KOMA-Script document class] + \long\def\@makecaption#1#2{% + \if@captionabove + \vskip\belowcaptionskip + \else + \vskip\abovecaptionskip + \fi + \@@makecaption\@firstofone{#1}{#2}% + \if@captionabove + \vskip\abovecaptionskip + \else + \vskip\belowcaptionskip + \fi}} + \DeclareCaptionFormat{default}[#1#2#3\par]{% + \ifdofullc@p + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with \noexpand\setcaphanging (which is set by default)}}% + {\caption@fmt@hang{#1}{#2}{#3}}% + \else + #1#2% + \ifdim\cap@indent<\z@ + \par + \noindent\hspace*{-\cap@indent}% + \else\if@capbreak + \par + \fi\fi + #3\par + \fi} + \DeclareCaptionLabelSeparator{default}{\captionformat} + \DeclareCaptionDefaultFont{font}{\scr@fnt@caption} + \DeclareCaptionDefaultFont{labelfont}{\scr@fnt@captionlabel} +} +\providecommand*\caption@ifntgclass{% + \caption@ifundefined\CaptionFonts\@gobble\@firstofone} +\@onlypreamble\caption@ifntgclass +\caption@ifntgclass{% + \caption@CheckCommand\@makecaption{% + % artikel|rapport|boek [2004/06/07 v2.1a NTG LaTeX document class] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{{\CaptionLabelFont#1:} \CaptionTextFont#2}% + \ifdim \wd\@tempboxa >\hsize + {\CaptionLabelFont#1:} \CaptionTextFont#2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \DeclareCaptionDefaultFont{labelfont}{\CaptionLabelFont} + \DeclareCaptionDefaultFont{textfont}{\CaptionTextFont} +} +\providecommand*\caption@ifthesisclass{% + \caption@ifundefined\cph@font + {\@gobble}% + {\caption@ifundefined\cpb@font\@gobble\@firstofone}} +\caption@ifthesisclass{% + \caption@CheckCommand\@makecaption{% + % thesis.cls 1996/25/01 1.0g LaTeX document class (wm). + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \setbox\@tempboxa\hbox{{\cph@font #1:} {\cpb@font #2}}% + \ifdim \wd\@tempboxa >\hsize + \@hangfrom{\cph@font #1: }{\cpb@font #2\par}% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \DeclareCaptionDefaultFormat{hang} + \DeclareCaptionDefaultFont{labelfont}{\cph@font} + \DeclareCaptionDefaultFont{textfont}{\cpb@font} +} +\caption@ifundefined\ArabiCoreLoaded{% + \let\caption@rl\@firstofone +}{% + \newcommand\caption@rl[1]{\if@rl\textRL{#1}\else\textLR{#1}\fi} + \def\fnum@figure{\figurename\nobreakspace\thefigure}% + \def\fnum@table{\tablename\nobreakspace\thetable}% + \DeclareCaptionLabelSeparator{arabi}{ : } + \DeclareCaptionLabelSeparator{default}{% + \if@rl\caption@lsep@arabi\else\caption@lsep@colon\fi} + \caption@CheckCommand\@makecaption{% + % arabicore.sty [2006/01/01 v1.0 Arabi Core switching commands (may still change)] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \sbox\@Arabitempboxa{\textRL{#2} : #1}% + \if@rl{ + \ifdim \wd\@Arabitempboxa >\hsize + \textRL{#2} : #1\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@Arabitempboxa\hfil}% + \fi}\else{ + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi}\fi + \vskip\belowcaptionskip}} +} +\caption@ifundefined\FB@makecaption{}{% + \caption@CheckCommand\@makecaption{% + % frenchb.ldf [2005/02/06 v1.6g French support from the babel system] + % frenchb.ldf [2007/10/05 v2.0e French support from the babel system] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1\CaptionSeparator #2}% + \ifdim \wd\@tempboxa >\hsize + #1\CaptionSeparator #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \ifx\@makecaption\STD@makecaption + \DeclareCaptionLabelSeparator{default}{\CaptionSeparator} + \def\caption@frenchb{% supress frenchb warning + \let\STD@makecaption\@makecaption + \let\FB@makecaption\@makecaption} + \else + \ifx\@makecaption\@undefined\else + \caption@InfoNoLine{% + The definition of \protect\@makecaption\space + has been changed,\MessageBreak + frenchb will NOT customize it}% + \fi + \fi +} +\caption@ifundefined\frenchTeXmods{}{% + \caption@CheckCommand\@makecaption{% + % french(le).sty [2006/10/03 The french(le) package /V5,9991/] + % french(le).sty [2007/06/28 The french(le) package /V5,9994/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \def\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}}% + \caption@CheckCommand\@makecaption{% + % french(le).sty [2007/02/11 The french(le) package /V5,9993/] + \def\@makecaption#1#2{% + \ifFTY% + \def\@secondofmany##1##2\void{##2}% + \protected@edef\@tempa{\@secondofmany#2\void}% + \ifx\@tempa\empty% + \let\captionseparator\empty% + \fi% + \@mcORI{#1}{\relax\captionfont{#2}}% + \else + \@mcORI{#1}{#2}% + \fi}}% + \DeclareCaptionDefaultFont{textfont}{\itshape}% + \DeclareCaptionLabelSeparator{default}{\captionseparator\space}% +} + \caption@CheckCommand\@makecaption{% + % rlbabel.def [2005/03/30 v2.3h Right-to-Left support from the babel system Hebrew language support from the babel system] + \long\def\@makecaption#1#2{% + \vskip\abovecaptionskip% + \begin{center}% + #1: #2% + \end{center} \par% + \vskip\belowcaptionskip}}% +\DeclareCaptionListFormat{subperiod}{#2.} +\caption@ifundefined\hunnewlabel{}{% + \caption@CheckCommand\@makecaption{% + % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system] + \def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1. #2}% + \ifdim \wd\@tempboxa >\hsize + {#1. #2\csname par\endcsname} + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}}} +\def\caption@tempa#1{% + \@ifpackagewith{babel}{#1}{% + \caption@InfoNoLine{#1 babel option is loaded}% + \expandafter\addto\csname extras#1\endcsname{% + % change default labelsep and listformat + \caption@setdefaultlabelsep{period}% + \caption@setdefaultlistformat{subperiod}}% + \expandafter\addto\csname noextras#1\endcsname{% + % change default labelsep and listformat + \caption@setdefaultlabelsep{colon}% + \caption@setdefaultlistformat{subsimple}}% + }{}} +\caption@tempa{hungarian} +\caption@tempa{magyar} +\caption@IfCheckCommand{% + \caption@setbool{documentclass}{1}% +}{% + \caption@setbool{documentclass}{0}% + \caption@InfoNoLine{% + Unknown document class (or package),\MessageBreak + standard defaults will be used}% + \caption@Debug{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}% +} +\captionsetup{style=default,position=default,% + list,listformat=default,twoside=\if@twoside 1\else 0\fi} +\ProcessOptions* +\newcommand\caption@addcontentsline[2]{% + \caption@ifcontentsline{#2}{% + \begingroup + \let\@tempa\@gobble + \caption@ifundefined\caption@listtype + {\edef\caption@listtype{#1}}% + {\let\@tempa\@firstofone}% + \caption@ifundefined\caption@listtype@ext + {}% + {\edef\caption@listtype{\caption@listtype\caption@listtype@ext}% + \let\@tempa\@firstofone}% + \@tempa + {\caption@Debug{addcontentsline: #1 => \caption@listtype}% + \@namedef{the\caption@listtype}{\@nameuse{the#1}}}% + \expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}% + \endgroup}% + \caption@addsubcontentslines{#1}} +\newcommand\caption@@addcontentsline[2]{% + {\let\\\space + \@ifundefined{ext@#1}% + {\caption@Error{No float type '#1' defined}}% + {\def\captionlisttype{#1}% + \caption@add@contentsline + {\csname ext@#1\endcsname}% + {#1}% + {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + {\ignorespaces #2}% + \caption@chkfloat{#1}{#2}}}} +\newcommand*\caption@add@contentsline{% + \caption@@@addcontentsline} +\newcommand*\caption@@@addcontentsline[4]{% + \addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}} +\let\caption@chkfloat\@gobbletwo +\newcommand\caption@ifcontentsline[1]{% + \caption@iflist + {\def\@tempa{#1}}% + {\let\@tempa\@empty}% + \ifx\@tempa\@empty + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi} +\newcommand*\caption@addsubcontentslines[1]{} +\newif\ifcaption@star +\newcommand*\caption@fnum[1]{\caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}} +\newcommand\caption@make[2]{\caption@@make{\caption@lfmt{#1}{#2}}} +\newcommand\caption@@make[2]{% + \begingroup + \caption@@make@{#1}{#2}% + \endgroup + \caption@@make@epilogue} +\newcommand\caption@@make@[2]{% + \caption@stepthecounter + \caption@beginhook + \caption@box\linewidth{% + \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}% + \caption@calcmargin + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@}% + \fi + \caption@ifh{\advance\caption@tempdima\caption@indent}% + \hspace\caption@tempdima + \caption@tempdima\captionwidth + \caption@ifh{\advance\caption@tempdima-\caption@indent}% + \caption@parbox\caption@tempdima{% + \caption@ifh{% + \ifdim\caption@indent=\z@ + \leavevmode + \else + \hskip-\caption@indent + \fi}% + \caption@@@make{#1}{#2}}% + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{\advance\caption@tempdima\captionmargin@}{}% + \fi + \hspace\caption@tempdima + }% + \caption@endhook} +\newcommand\caption@@make@epilogue{% + \global\caption@starfalse} +\newcommand*\caption@calcmargin{% + \caption@calcmargin@hook + \ifx\caption@maxmargin\@undefined \else + \ifdim\captionmargin>\caption@maxmargin\relax + \captionmargin\caption@maxmargin\relax + \fi + \fi + \ifx\caption@minmargin\@undefined \else + \ifdim\captionmargin<\caption@minmargin\relax + \captionmargin\caption@minmargin\relax + \fi + \fi + \ifdim\captionwidth=\z@ + \captionwidth\linewidth + \advance\captionwidth by -2\captionmargin + \advance\captionwidth by -\captionmargin@ + \else + \captionmargin\linewidth + \advance\captionmargin by -\captionwidth + \divide\captionmargin by 2 + \captionmargin@\z@ + \fi + \caption@Debug{% + \string\hsize=\the\hsize, + \string\linewidth=\the\linewidth,\MessageBreak + \string\leftmargin=\the\leftmargin, + \string\rightmargin=\the\rightmargin,\MessageBreak + \string\margin=\the\captionmargin, + \string\margin@=\the\captionmargin@, + \string\width=\the\captionwidth}% +} +\newcommand\caption@slc[4]{% + \caption@Debug{Begin SLC}% + \singlelinecaptiontrue + \begingroup + \caption@singleline + \let\caption@hj\@empty + \caption@calcmargin % calculate \captionwidth + \caption@prepareslc + \sbox\@tempboxa{\caption@@@make{#1}{#2}}% + \ifdim\wd\@tempboxa>\captionwidth + \endgroup + \singlelinecaptionfalse + #4% + \else + \endgroup + #3% + \fi + \caption@Debug{End SLC}} +\newif\ifsinglelinecaption +\newcommand*\caption@singleline{% + \caption@xsetup\caption@opt@singleline + \let\caption@fmt\caption@slfmt} +\@ifundefined{caption@prepareslc}\def\g@addto@macro\caption@prepareslc{% + \let\label\caption@gobble + \let\hypertarget\@gobbletwo + \let\caption@footnotemark@ORI\footnotemark + \def\footnote{\caption@withoptargs\caption@footnote}% + \def\footnotemark{\caption@withoptargs\caption@footnotemark}% + \let\@footnotetext\caption@gobble + \let\caption@endnotemark@ORI\endnotemark + \def\endnote{\caption@withoptargs\caption@endnote}% + \def\endnotemark{\caption@withoptargs\caption@endnotemark}% + \let\@endnotetext\caption@gobble + \let\pagenote\caption@gobble + \let\acused\@gobble + \let\AC@placelabel\@gobble + \let\glsunset\@gobble +} +\newcommand\caption@footnote[2]{% + \caption@footnotemark{#1}} +\newcommand\caption@footnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@footnotemark@ORI#1% + \endgroup} +\newcommand\caption@endnote[2]{% + \caption@endnotemark{#1}} +\newcommand\caption@endnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@endnotemark@ORI#1 + \endgroup} +\newcommand*\caption@l@stepcounter[1]{% + \advance\csname c@#1\endcsname\@ne\relax} +\newcommand*\caption@applyfont{% + \caption@hj\captionfont\captionsize} +\newcommand\caption@@@make[2]{% + \sbox\@tempboxa{#1}% + \ifdim\wd\@tempboxa=\z@ + \let\caption@lsep\relax + \fi + \caption@ifempty{#2}{% + \let\caption@lsep\@empty + \let\caption@tfmt\@firstofone + }% + \@setpar{\@@par\caption@@par}\caption@@par + \caption@applyfont + \caption@fmt + {\ifcaption@star\else + \begingroup + \captionlabelfont + #1% + \endgroup + \fi}% + {\ifcaption@star\else + \begingroup + \caption@iflf\captionlabelfont + \relax\caption@lsep + \endgroup + \fi}% + {{\captiontextfont + \captiontextstart + \caption@ifstrut + {\vrule\@height\ht\strutbox\@width\z@}% + {}% + \nobreak\hskip\z@skip % enable hyphenation + \caption@tfmt{#2}% + \caption@ifstrut + {\ifhmode\@finalstrut\strutbox\fi}% + {}% + \captiontextend}}} +\newcommand*\captiontextstart{} +\newcommand*\captiontextend{\par} +\newcommand\caption@ifempty[1]{% + \caption@if@empty{#1}% + \caption@ifempty\@unused} +\newcommand\caption@if@empty[1]{% + \def\caption@tempa{#1}% + \ifx\caption@tempa\@empty + \let\caption@ifempty\@secondoftwo + \else + \expandafter\def\expandafter\caption@tempa\expandafter{% + \caption@car#1\caption@if@empty\caption@nil}% + \def\caption@tempb{\caption@if@empty}% + \ifx\caption@tempa\caption@tempb + \let\caption@ifempty\@secondoftwo + \else + \def\caption@tempb{\ignorespaces}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobble#1}% + \else + \def\caption@tempb{\label}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\index}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\glossary}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \let\caption@ifempty\@gobbletwo + \fi + \fi + \fi + \fi + \fi + \fi} +\long\def\caption@car#1#2\caption@nil{#1}% same as \@car, but \long +\newcommand*\caption@@par{% + \parindent\caption@parindent\hangindent\caption@hangindent}% +\newcommand*\DeclareCaptionType{% + \RequirePackage{newfloat}% + \DeclareFloatingEnvironment} +\@onlypreamble\DeclareCaptionType +\newcommand\caption@ForEachType[1]{% + \caption@ifundefined\ForEachFloatingEnvironment + {\def\@elt##1{#1}% + \caption@ifundefined\c@figure\@gobble\@elt{figure}% + \caption@ifundefined\c@table\@gobble\@elt{table}% + \let\@elt\relax + \newfloat@addtohook{#1}}% + {\ForEachFloatingEnvironment{#1}}} +\providecommand\newfloat@addtohook[1]{% + \toks@=\expandafter{\newfloat@hook{##1}#1}% + \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}% + \@tempa} +\providecommand*\newfloat@hook[1]{} +\newcommand*\DeclareCaptionSubType{% + \caption@teststar\caption@declaresubtype\@firstoftwo\@secondoftwo} +\@onlypreamble\DeclareCaptionSubType +\newcommand*\caption@declaresubtype[1]{% + \@testopt{\caption@@declaresubtype{#1}}{alph}} +\@onlypreamble\caption@declaresubtype +\def\caption@@declaresubtype#1[#2]#3{% + \@ifundefined{c@#3}% + {\caption@Error{No float type '#3' defined}}% + {\@ifundefined{c@sub#3}% + {\caption@Debug{New subtype `sub#3'}% + \newcounter{sub#3}% + \@addtoreset{sub#3}{#3}% + \@namedef{ext@sub#3}{\csname ext@#3\endcsname}% + \caption@declaresublistentry{#3}% + \@cons\caption@subtypelist{{#3}}}% + {\caption@Debug{Modify caption `sub#3'}}% + \caption@ifundefined\contentsuse{}{% + \contentsuse{sub#3}{\csname ext@sub#3\endcsname}}% + \@namedef{sub#3name}{}% + \@namedef{sub#3autorefname}{\csname #3autorefname\endcsname}% + #1% is \@firstoftwo in star form, and \@secondoftwo otherwise + {\@namedef{p@sub#3}{}% + \@namedef{thesub#3}{\csname the#3\endcsname.\@nameuse{#2}{sub#3}}}% + {\@namedef{p@sub#3}{\csname the#3\endcsname}% + \@namedef{thesub#3}{\@nameuse{#2}{sub#3}}}% + \@namedef{theHsub#3}{\csname theH#3\endcsname.\arabic{sub#3}}% + }} +\@onlypreamble\caption@@declaresubtype +\newcommand*\caption@declaresublistentry{% + \caption@ifundefined\l@chapter + {\caption@@declaresublistentry\l@subsubsection}% + {\caption@@declaresublistentry\l@subsection}} +\@onlypreamble\caption@declaresublistentry +\newcommand*\caption@@declaresublistentry[2]{% + \ifx#1\@undefined + \caption@@@declaresublistentry\relax\@dottedtocline\caption@nil{#2}% + \else + \expandafter\caption@@@declaresublistentry#1{}{}\@dottedtocline\caption@nil{#2}% + \fi} +\@onlypreamble\caption@@declaresublistentry +\long\def\caption@@@declaresublistentry#1\@dottedtocline#2\caption@nil#3{% + \def\@tempa{#1}% + \ifx\@tempa\@empty + \caption@@@@declaresublistentry{#3}#2\caption@nil + \else + \caption@@@@declaresublistentry{#3}@{3.8em}{3.2em}\caption@nil + \fi} +\@onlypreamble\caption@@@declaresublistentry +\def\caption@@@@declaresublistentry#1#2#3#4#5\caption@nil{% + \expandafter\caption@@@@@declaresublistentry\expandafter + {\csname @dotted\csname ext@#1\endcsname line\endcsname}{#1}{#3}{#4}} +\@onlypreamble\caption@@@@declaresublistentry +\newcommand*\caption@@@@@declaresublistentry[4]{% + \@namedef{l@sub#2}{#1{2}{#3}{#4}}% + \expandafter\caption@@@@@@declaresublistentry + \expandafter#1\expandafter{\csname ext@#2\endcsname depth}} +\@onlypreamble\caption@@@@@declaresublistentry +\newcommand*\caption@@@@@@declaresublistentry[2]{ + \ifx#1\relax + \def#1##1{% + \def\next{\@dottedtocline{##1}}% + \@ifundefined{c@#2}{}{% + \ifnum ##1>\@nameuse{c@#2}\relax + \let\next\@gobblefour + \else + \c@tocdepth=\@nameuse{c@#2}\relax + \fi}% + \next}% + \fi} +\@onlypreamble\caption@@@@@@declaresublistentry +\newcommand*\caption@subtypelist{} +\newcommand*\caption@restorecounters{% + \caption@restore@counters + \global\let\caption@restore@counters\@empty} +\newcommand*\caption@restore@counters{} +\newcommand*\caption@savesubcounters{% + \def\@elt##1{\caption@savecounter{sub##1}}% + \caption@subtypelist + \let\@elt\relax}% +\newcommand*\caption@savecounter[1]{% + \edef\caption@tempa{% + \noexpand\l@addto@macro\noexpand\caption@restore@counters + {\noexpand\setcounter{#1}{\number\value{#1}}}}% + \caption@tempa} +\newcommand*\caption@For{\caption@withoptargs\caption@@For} +\newcommand\caption@@For[3]{% + \caption@AtBeginDocument#1{% + \def\@elt##1{#3}% + \@nameuse{caption@#2}% + \let\@elt\relax}}% +\caption@AtBeginDocument{% + \def\@tempa{2005/06/28 ver: 1.3 subfig package}% + \expandafter\ifx\csname ver@subfig.sty\endcsname\@tempa + \caption@InfoNoLine{subfig package v1.3 is loaded}% + \let\caption@setfloattype\@gobble + \let\@dottedxxxline\sf@NEW@dottedxxxline + \let\sf@subfloat\sf@NEW@subfloat + \fi + \let\sf@NEW@dottedxxxline\@undefined + \let\sf@NEW@subfloat\@undefined} +\def\sf@NEW@dottedxxxline#1#2#3#4#5#6#7{% + \begingroup + \caption@setfloattype{#1}% + \caption@setoptions{subfloat}% + \caption@setoptions{sub#1}% + \ifnum #3>\@nameuse{c@#2depth}\else + \@dottedtocline{\z@}{#4}{#5}{#6}{#7}% + \fi + \endgroup} +\def\sf@NEW@subfloat{% + \begingroup + \@nameuse{caption@warmup}% + \caption@setfloattype\@captype + \sf@ifpositiontop{% + \maincaptiontoptrue + }{% + \maincaptiontopfalse + }% + \caption@setoptions{subfloat}% + \caption@setoptions{sub\@captype}% + \let\sf@oldlabel=\label + \let\label=\subfloat@label + \ifmaincaptiontop\else + \advance\@nameuse{c@\@captype}\@ne + \fi + \refstepcounter{sub\@captype}% + \setcounter{sub\@captype @save}{\value{sub\@captype}}% + \@ifnextchar [% %] match left bracket + {\sf@@subfloat}% + {\sf@@subfloat[\@empty]}} +\endinput +%% +%% End of file `caption3_2019-09-01.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty b/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty new file mode 100644 index 00000000000..2ae1ed58ce7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption3_2020-07-29.sty @@ -0,0 +1,1727 @@ +%% +%% This is file `caption3_2020-07-29.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.4/caption3.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption3}[2020/07/29 v1.13 caption3 kernel (AR)] +\providecommand\caption@FixArabTeX{% + \def\caption@tempa##1{}% + \ifx\caption@tempa\@gobble + \PackageInfo{caption3}{Fixing ArabTeX}% + \long\def\@gobble##1{}% + \fi} +\caption@FixArabTeX +\AtBeginDocument{% + \caption@FixArabTeX + \let\caption@FixArabTeX\@undefined} +\providecommand*\@nameundef[1]{% + \expandafter\let\csname #1\endcsname\@undefined} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname currentgrouplevel\endcsname\relax + \PackageInfo{caption3}{TeX engine: TeX} + \let\caption@ifeTeX\@secondoftwo + \providecommand\l@addto@macro[2]{% + \begingroup + \toks@\expandafter{#1#2}% + \xdef\caption@addto@temp{\the\toks@}% + \endgroup + \let#1\caption@addto@temp} +\else + \PackageInfo{caption3}{TeX engine: e-TeX} + \let\caption@ifeTeX\@firstoftwo + \providecommand\l@addto@macro[2]{% + \edef#1{\unexpanded\expandafter{#1#2}}} +\fi +\def\bothIfFirst#1#2{% + \protected@edef\caption@tempa{#1}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +\def\bothIfSecond#1#2{% + \protected@edef\caption@tempa{#2}% + \ifx\caption@tempa\@empty \else + #1#2% + \fi} +\newcommand*\caption@ifundefined[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi} +\newcommand*\caption@ifdefined[1]{% + \ifx#1\@undefined + \expandafter\@secondoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@secondoftwo + \else + \expandafter\expandafter\expandafter\@firstoftwo + \fi\fi} +\newcommand*\caption@ifinlist{% + \@expandtwoargs\caption@@ifinlist} +\newcommand*\caption@@ifinlist[2]{% + \begingroup + \def\@tempa##1,#1,##2\@nil{% + \endgroup + \ifx\relax##2\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \@tempa,#2,#1,\@nil}% +\newcommand*\caption@ifin@list[2]{% + \caption@ifempty@list#1% + {\@secondoftwo}% + {\@expandtwoargs\caption@@ifinlist{#2}{#1}}} +\newcommand*\caption@g@addto@list[2]{% + \caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}} +\newcommand*\caption@l@addto@list[2]{% + \caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}} +\newcommand*\caption@g@removefrom@list[2]{% + \caption@l@removefrom@list#1{#2}% + \global\let#1#1} +\newcommand*\caption@l@removefrom@list[2]{% + \caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}} +\newcommand*\caption@for@list[2]{% + \caption@ifempty@list#1{}{% + \def\caption@tempb##1{#2}% + \@for\caption@tempa:=#1\do{% + \expandafter\caption@tempb\expandafter{\caption@tempa}}}} +\newcommand*\caption@ifempty@list[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else\ifx#1\@empty + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi\fi} +\newcommand*\caption@setbool[1]{% + \expandafter\caption@set@bool\csname caption@if#1\endcsname} +\newcommand*\caption@set@bool[2]{% + \caption@ifinlist{#2}{1,true,yes,on}{% + \let#1\@firstoftwo + }{\caption@ifinlist{#2}{0,false,no,off}{% + \let#1\@secondoftwo + }{% + \caption@Error{Undefined boolean value `#2'}% + }}} +\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}} +\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}} +\newcommand*\caption@teststar[3]{\@ifstar{#1{#2}}{#1{#3}}} +\newcommand*\caption@teststar@[3]{% + \@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}} +\AtBeginDocument{\let\caption@teststar@\caption@teststar} +\newcommand*\caption@ifatletter{% + \ifnum\the\catcode`\@=11 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\AtBeginDocument{\let\caption@ifatletter\@secondoftwo} +\newcommand*\caption@withoptargs[1]{% + \@ifstar + {\def\caption@tempa{*}\caption@@withoptargs{#1}}% + {\def\caption@tempa{}\caption@@withoptargs{#1}}} +\def\caption@@withoptargs#1{% + \@ifnextchar[%] + {\caption@@@withoptargs{#1}}% + {\caption@@@@withoptargs{#1}}} +\def\caption@@@withoptargs#1[#2]{% + \l@addto@macro\caption@tempa{[{#2}]}% + \caption@@withoptargs{#1}} +\def\caption@@@@withoptargs#1{% + \def\caption@tempb{#1}% + \expandafter\caption@tempb\expandafter{\caption@tempa}} +\DeclareRobustCommand*\caption@gobble{% + \caption@withoptargs\@gobbletwo} +\let\caption@begindocumenthook\@empty +\let\caption@@begindocumenthook\@empty +\def\caption@AtBeginDocument{% + \caption@teststar\g@addto@macro + \caption@@begindocumenthook\caption@begindocumenthook} +\AtBeginDocument{% + \caption@InfoNoLine{Begin \noexpand\AtBeginDocument code}% + \def\caption@AtBeginDocument{% + \@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}% + \caption@begindocumenthook + \let\caption@begindocumenthook\relax + \def\caption@AtBeginDocument{% + \@ifstar\@firstofone\@firstofone}% + \caption@@begindocumenthook + \let\caption@@begindocumenthook\relax + \caption@InfoNoLine{End \noexpand\AtBeginDocument code}} +\newcommand*\caption@Info[1]{% + \PackageInfo{caption}{#1}} +\newcommand*\caption@InfoNoLine[1]{% + \caption@Info{#1\@gobble}} +\newcommand*\caption@Warning[1]{% + \caption@WarningNoLine{#1\on@line}} +\newcommand*\caption@WarningNoLine[1]{% + \PackageWarning{caption}{#1.^^J\caption@wh\@gobbletwo}} +\newcommand*\caption@wh{% + See the caption package documentation for explanation.} +\newcommand*\caption@Error[1]{% + \PackageError{caption}{#1}\caption@eh} +\newcommand*\caption@eh{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `caption' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} +\let\caption@KV@err\caption@Error +\RequirePackage{keyval}[1997/11/10] +\providecommand*\undefine@key[2]{% + \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} +\providecommand*\@preamble@keys{} +\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}} +\@onlypreamble\@onlypreamble@key +\@onlypreamble\@preamble@keys +\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}} +\caption@AtBeginDocument*{% + \def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}% + \@preamble@keys + \let\@elt\relax} +\newcommand*\DeclareCaptionOption{% + \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOption +\newcommand*\caption@declareoption[2]{% + #1{\undefine@key{caption}{#2}}\caption@declare@option{#2}} +\@onlypreamble\caption@declareoption +\newcommand*\caption@declare@option{% + \define@key{caption}} +%% no \@onlypreamble\caption@declare@option, will be used by \captionsetup +\newcommand*\DeclareCaptionOptionNoValue{% + \caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOptionNoValue +\newcommand\caption@declareoption@novalue[3]{% + \caption@declareoption{#1}{#2}[\KV@err]{% + \caption@option@novalue{#2}{##1}{#3}}} +\@onlypreamble\caption@declareoption@novalue +\newcommand*\caption@option@novalue[2]{% + \ifx\KV@err#2% + \expandafter\@firstofone + \else + \KV@err{No value allowed for #1}% + \expandafter\@gobble + \fi} +\newif\ifcaptionsetup@star +\newcommand*\captionsetup{% + \caption@teststar@\@captionsetup\@gobble\@firstofone} +\newcommand*\@captionsetup[1]{% + \captionsetup@startrue#1\captionsetup@starfalse + \@ifnextchar[%] + \caption@setup@options\caption@setup} +\newcommand*\caption@setup{\caption@setkeys{caption}} +\def\caption@setup@options[#1]{% + \@ifnextchar[%] + {\caption@stepthecounter + \caption@withoptargs{\@expandtwoargs + \caption@setup@options@i{#1}{@\caption@thecounter}}}% + {\caption@setup@options@{#1}}} +\newcommand*\caption@setup@options@i[4]{% + \caption@declare@option{#2}[]{\captionsetup#3{#4}}% + \caption@setup@options@{#1}{#2}} +\newcommand*\caption@setup@options@[2]{% + \@bsphack + \ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi + \caption@checkoptions{#2}% + \expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}% + \@esphack} +\newcommand*\caption@checkoptions[1]{% + \begingroup + \caption@prepare@optioncheck + \caption@setup{#1}% + \endgroup} +\providecommand*\caption@prepare@optioncheck{} +\let\IfCaptionOptionCheck\@secondoftwo +\g@addto@macro\caption@prepare@optioncheck{% + \let\IfCaptionOptionCheck\@firstoftwo} +\newcommand*\clearcaptionsetup{% + \caption@teststar@\@clearcaptionsetup\@gobble\@firstofone} +\newcommand*\@clearcaptionsetup[1]{% + \let\caption@tempa#1% + \@testopt\@@clearcaptionsetup{}} +\def\@@clearcaptionsetup[#1]#2{% + \@bsphack + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@tempa{\caption@Warning{Option list `#2' undefined}}}% + {\ifx,#1,% + \caption@clearsetup{#2}% + \else + \caption@@removefromsetup{#1}{#2}% + \fi}% + \@esphack} +\newcommand*\caption@clearsetup[1]{% + \caption@removefromoptlist{#1}% + \@nameundef{caption@opt@#1}} +\newcommand*\caption@removefromsetup{% + \let\caption@tempa\@gobble + \caption@@removefromsetup} +\newcommand*\caption@@removefromsetup[2]{% + \expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname + \expandafter\let\csname caption@opt@#2\endcsname\@undefined + \def\@tempb##1=##2\@nil{##1}% + \edef\@tempc{#1}% + \@for\@tempa:=\@tempa\do{% + \edef\@tempd{\expandafter\@tempb\@tempa=\@nil}% + \ifx\@tempd\@tempc + \let\caption@tempa\@gobble + \else + \expandafter\expandafter\expandafter\caption@l@addto@list + \expandafter\csname caption@opt@#2\expandafter\endcsname + \expandafter{\@tempa}% + \fi}% + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@removefromoptlist{#2}}{}% + \caption@tempa{\caption@Warning{% + Option `#1' was not in list `#2'}}} +\newcommand*\showcaptionsetup[2][\@firstofone]{% + \@bsphack + \GenericWarning{}{% + #1 Caption Info: Option list on `#2'\MessageBreak + #1 Caption Data: \@ifundefined{caption@opt@#2}{% + -none-% + }{% + {\expandafter\expandafter\expandafter\strip@prefix + \expandafter\meaning\csname caption@opt@#2\endcsname}% + }}% + \@esphack} +\DeclareCaptionOption{options}{\caption@setoptions{#1}} +\newcommand*\caption@setoptions[1]{% + \caption@Debug{options=#1}% + \expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname + \ifx\caption@opt\relax \else + \caption@xsetup\caption@opt + \caption@clearsetup{#1}% + \fi} +\newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}} +\newcommand*\caption@addtooptlist[1]{% + \@ifundefined{caption@opt@#1@lineno}{% + \caption@dooptlist\caption@g@addto@list{#1}% + \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}% + }{}} +\newcommand*\caption@removefromoptlist[1]{% + \caption@dooptlist\caption@g@removefrom@list{#1}% + \global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined} +\newcommand*\caption@dooptlist[2]{% + \begingroup + \edef\@tempa{#2}\@onelevel@sanitize\@tempa + \expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}% + \endgroup} +\AtEndDocument{% + \caption@for@list\caption@optlist{% + \caption@WarningNoLine{% + Unused \string\captionsetup[#1] + on input line \csname caption@opt@#1@lineno\endcsname}}} +\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys} +\long\def\caption@@setkeys[#1]#2#3{% + \@bsphack + \expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err + \expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx + \expandafter\let\csname ORI@XKV@err\caption@keydepth\endcsname\XKV@err + \edef\caption@keydepth{\caption@keydepth i}% + \expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname + \ifx\KV@err\relax + \def\KV@err##1{\PackageError{#1}{##1}{% + See the #1 package documentation for explanation.}}% + \fi + \def\KV@errx{\KV@err}% + \def\XKV@err{\let\@tempa\XKV@tkey\KV@err}% + \caption@Debug{\protect\setkeys{#2}{#3}}% + \setkeys{#2}{#3}% + \edef\caption@keydepth{\expandafter\@gobble\caption@keydepth}% + \expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname + \expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname + \expandafter\let\expandafter\XKV@err\csname ORI@XKV@err\caption@keydepth\endcsname + \ifx\caption@keydepth\@empty \captionsetup@starfalse \fi + \@esphack} +\let\caption@keydepth\@empty +\newcommand*\caption@ExecuteOptions[2]{% + \expandafter\@expandtwoargs\csname caption@setkeys@#1\endcsname{#1}{#2}}% +\@onlypreamble\caption@ExecuteOptions +\newcommand*\caption@ProcessOptions{% + \caption@teststar\caption@@ProcessOptions\@gobble\@firstofone} +\@onlypreamble\caption@ProcessOptions +\newcommand\caption@@ProcessOptions[2]{% + \let\@tempc\relax + \let\caption@tempa\@empty + #1{% \@firstofone -or- \@gobble + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#2@\CurrentOption}{}{% + \@ifundefined{KV@#2@\CurrentOption @default}{% + \PackageInfo{#2}{Global option `\CurrentOption' ignored}% + }{% + \PackageInfo{#2}{Global option `\CurrentOption' processed}% + \edef\caption@tempa{\caption@tempa\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + }% + \let\CurrentOption\@empty + }% + \caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}% + \AtEndOfPackage{\let\@unprocessedoptions\relax}} +\@onlypreamble\caption@@ProcessOptions +\newcommand\caption@SetupOptions[2]{% + \@namedef{caption@setkeys@#1}##1##2{#2}% + \expandafter\@onlypreamble\csname caption@setkeys@#1\endcsname + \@cons\caption@SetupOptions@list{{#1}}} +\@onlypreamble\caption@SetupOptions +\newcommand*\caption@SetupOptions@list{} +\@onlypreamble\caption@SetupOptions@list +\let\caption@onefilewithoptions\@onefilewithoptions +\def\@onefilewithoptions#1[#2]{% + \begingroup + \def\@tempa{% + \endgroup + \caption@onefilewithoptions{#1}[{#2}]}% + \def\@tempb{#1}% + \def\@elt##1{% + \def\@tempc{##1}% + \ifx\@tempb\@tempc + \def\@tempa{% + \endgroup + \caption@ExecuteOptions{#1}{#2}% + \caption@onefilewithoptions{#1}[]}% + \fi} + \caption@SetupOptions@list + \@tempa} +\@onlypreamble\caption@onefilewithoptions +\newdimen\captionmargin +\newdimen\captionmargin@ +\newdimen\captionwidth +\newdimen\caption@tempdima +\DeclareCaptionOption{margin}{\setcaptionmargin{#1}} +\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}} +\DeclareCaptionOption{width}{\setcaptionwidth{#1}} +\DeclareCaptionOption{width*}{\setcaptionwidth*{#1}} +\DeclareCaptionOption{calcmargin}{\caption@setcalcmargin{#1}} +\DeclareCaptionOption{calcmargin*}{\caption@setcalcmargin*{#1}} +\DeclareCaptionOption{calcwidth}{\caption@setcalcwidth{#1}} +\DeclareCaptionOption{calcwidth*}{\caption@setcalcwidth*{#1}} +\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}} +\DeclareCaptionOptionNoValue{oneside}{\caption@set@bool\caption@iftwoside0} +\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}} +\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}} +\newcommand*\setcaptionmargin{% + \caption@resetcalcmargin + \caption@setmargin} +\newcommand*\caption@setmargin{% + \caption@teststar\caption@@setmargin\@gobble\@firstofone} +\newcommand*\caption@@setmargin[2]{% + #1{\captionwidth\z@}% + \caption@@@setmargin#2,#2,\@nil} +\def\caption@@@setmargin#1,#2,#3\@nil{% + \setlength\captionmargin@{#2}% + \setlength\captionmargin{#1}% + \addtolength\captionmargin@{-\captionmargin}} +\newcommand*\setcaptionwidth{% + \caption@resetcalcmargin + \caption@setwidth} +\newcommand*\caption@setwidth{% + \caption@teststar\caption@@setwidth\@gobble\@firstofone} +\newcommand*\caption@@setwidth[2]{% + #1{\captionmargin\z@\captionmargin@\z@}% + \setlength\captionwidth{#2}}% +\newcommand*\caption@resetcalcmargin{% + \let\caption@calcmargin@hook\@empty} +\newcommand*\caption@setcalcmargin{% + \caption@teststar{\caption@@setcalcmargin\caption@setmargin}% + \@secondoftwo\@firstoftwo} +\newcommand*\caption@@setcalcmargin[3]{% + #2{\caption@resetcalcmargin + \l@addto@macro\caption@calcmargin@hook{#1{#3}}}% + {\l@addto@macro\caption@calcmargin@hook{#1*{#3}}}} +\newcommand*\caption@setcalcwidth{% + \caption@teststar{\caption@@setcalcmargin\caption@setwidth}% + \@secondoftwo\@firstoftwo} +\newcommand*\caption@thecounter{0} +\newcommand*\caption@stepthecounter{% + \@tempcnta\caption@thecounter + \advance\@tempcnta\@ne + \xdef\caption@thecounter{\the\@tempcnta}} +\newcommand*\caption@newlabel{\@newl@bel{caption@r}} +\newcommand*\caption@thepage{\the\c@page} +\newcommand*\caption@label[1]{% + \caption@@label + \protected@write\@auxout{\let\caption@thepage\relax}% + {\string\caption@newlabel{#1}{\caption@thepage}}} +\newcommand*\caption@@label{% + \global\let\caption@@label\relax + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@newlabel[2]{}}} +\newcommand*\caption@pageref[1]{% + \expandafter\ifx\csname caption@r@#1\endcsname\relax + \G@refundefinedtrue % => 'There are undefined references.' + \@latex@warning{Reference `#1' on page \thepage \space undefined}% + \else + \expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname + \fi} +\newcommand*\caption@ifoddpage{% + \caption@iftwoside{% + \caption@label\caption@thecounter + \caption@pageref\caption@thecounter + \ifodd\caption@thepage + \let\caption@ifoddpage\@firstoftwo + \else + \let\caption@ifoddpage\@secondoftwo + \fi + }{\let\caption@ifoddpage\@firstoftwo}% + \caption@ifoddpage} +\newcommand*\caption@setoptcmd[2]{% + \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}} +\newdimen\caption@indent +\newdimen\caption@parindent +\newdimen\caption@hangindent +\DeclareCaptionOption{indent}[\leftmargini]{% obsolete! + \setlength\caption@indent{#1}} +\DeclareCaptionOption{indention}[\leftmargini]{% + \setlength\caption@indent{#1}} +\DeclareCaptionOption{parindent}{% + \setlength\caption@parindent{#1}} +\DeclareCaptionOption{hangindent}{% + \setlength\caption@hangindent{#1}} +\DeclareCaptionOption{parskip}{% + \l@addto@macro\caption@@par{\setlength\parskip{#1}}} +\newcommand*\DeclareCaptionStyle[1]{% + \@testopt{\caption@declarestyle{#1}}{}} +\@onlypreamble\DeclareCaptionStyle +\def\caption@declarestyle#1[#2]#3{% + \global\@namedef{caption@sls@#1}{#2}% + \global\@namedef{caption@sty@#1}{#3}} +\@onlypreamble\caption@declarestyle +\DeclareCaptionOption{style}{\caption@setstyle{#1}} +\DeclareCaptionOption{style*}{\caption@setstyle*{#1}} +\newcommand*\caption@setstyle{% + \caption@teststar\caption@@setstyle\@gobble\@firstofone} +\newcommand*\caption@@setstyle[2]{% + \@ifundefined{caption@sty@#2}% + {#1{\caption@Error{Undefined style `#2'}}}% + {\expandafter\let\expandafter\caption@sty\csname caption@sty@#2\endcsname + \ifx\caption@setstyle@flag\@undefined + \let\caption@setstyle@flag\relax + \caption@resetstyle + \caption@xsetup\caption@sty + \let\caption@setstyle@flag\@undefined + \else + \caption@xsetup\caption@sty + \fi + \expandafter\let\expandafter\caption@sls\csname caption@sls@#2\endcsname + \expandafter\caption@l@addto@list\expandafter\caption@opt@singleline + \expandafter{\caption@sls}}} +\newcommand*\caption@resetstyle{% + \caption@setup{% + box=none,boxcolor=white,parbox=parbox,% + format=plain,labelformat=default,labelsep=colon,textformat=simple,% + justification=justified,font=,size=,labelfont=,textfont=,% + margin=0pt,minmargin=0,maxmargin=0,% + indent=0pt,parindent=0pt,hangindent=0pt,% + slc,rule,strut}% + \caption@clearsetup{singleline}} +\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{} +\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{% + box=default,format=default,labelsep=default,textformat=default,% + justification=default,font=default,labelfont=default,textfont=default} +\DeclareCaptionOption{singlelinecheck}[1]{\caption@set@bool\caption@ifslc{#1}} +\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}} +\newcommand*\DeclareCaptionBox[2]{% + \global\long\@namedef{caption@box@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionBox +\DeclareCaptionOption{box}{\caption@setbox{#1}} +\DeclareCaptionOption{parbox}{\caption@set@box\caption@parbox{#1}} +\newcommand*\caption@setbox{% + \caption@set@box\caption@box} +\newcommand*\caption@set@box[2]{% + \@ifundefined{caption@box@#2}% + {\caption@Error{Undefined box `#2'}}% + {\expandafter\let\expandafter#1\csname caption@box@#2\endcsname}} +\DeclareCaptionBox{empty}{} +\DeclareCaptionBox{none}{#2} +\DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}} +\DeclareCaptionBox{colorbox}{\colorbox{\caption@boxcolor}{% + \setlength\caption@tempdima{#1}% + \addtolength\caption@tempdima{-2\fboxsep}% + \linewidth\caption@tempdima + \hsize\caption@tempdima + #2}} +\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}} +\DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}} +\def\caption@box@default{\caption@box@none} +\newcommand*\DeclareCaptionFormat{% + \caption@teststar\caption@declareformat\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionFormat +\newcommand*\caption@declareformat[2]{% + \@dblarg{\caption@@declareformat#1{#2}}} +\@onlypreamble\caption@declareformat +\long\def\caption@@declareformat#1#2[#3]#4{% + \global\expandafter\let\csname caption@ifh@#2\endcsname#1% + \global\long\@namedef{caption@slfmt@#2}##1##2##3{#3}% + \global\long\@namedef{caption@fmt@#2}##1##2##3{#4}} +\@onlypreamble\caption@@declareformat +\DeclareCaptionOption{format}{\caption@setformat{#1}} +\newcommand*\caption@setformat[1]{% + \@ifundefined{caption@fmt@#1}% + {\caption@Error{Undefined format `#1'}}% + {\expandafter\let\expandafter\caption@ifh\csname caption@ifh@#1\endcsname + \expandafter\let\expandafter\caption@slfmt\csname caption@slfmt@#1\endcsname + \expandafter\let\expandafter\caption@fmt\csname caption@fmt@#1\endcsname}} +\newcommand*\DeclareCaptionDefaultFormat[1]{% + \expandafter\def\expandafter\caption@fmt@default\expandafter + {\csname caption@fmt@#1\endcsname}% + \expandafter\def\expandafter\caption@slfmt@default\expandafter + {\csname caption@slfmt@#1\endcsname}% + \expandafter\def\expandafter\caption@ifh@default\expandafter + {\csname caption@ifh@#1\endcsname}} +\@onlypreamble\DeclareCaptionDefaultFormat +\DeclareCaptionFormat{plain}{#1#2#3\par} +\DeclareCaptionFormat{hang}[#1#2#3\par]{% + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with `format=hang'}}% + {\@hangfrom{#1#2}% + \advance\caption@parindent\hangindent + \advance\caption@hangindent\hangindent + \caption@@par#3\par}} +\DeclareCaptionDefaultFormat{plain} +\newcommand*\DeclareCaptionLabelFormat[2]{% + \global\@namedef{caption@lfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionLabelFormat +\DeclareCaptionOption{labelformat}{\caption@setlabelformat{#1}} +\newcommand*\caption@setlabelformat[1]{% + \@ifundefined{caption@lfmt@#1}% + {\caption@Error{Undefined label format `#1'}}% + {\expandafter\let\expandafter\caption@lfmt\csname caption@lfmt@#1\endcsname}} +\DeclareCaptionLabelFormat{empty}{} +\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} +\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} +\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} +\DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}#2\autodot} +\DeclareCaptionLabelFormat{unnumbered}{#1} +\def\caption@lfmt@default{\caption@lfmt@simple} +\newcommand\DeclareCaptionLabelSeparator{% + \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionLabelSeparator +\newcommand\caption@declarelabelseparator[3]{% + \global\@namedef{caption@iflf@#2}{#1}% + \global\long\@namedef{caption@lsep@#2}{#3}% + \caption@@declarelabelseparator{#2}#3\\\@nil} +\@onlypreamble\caption@declarelabelseparator +\long\def\caption@@declarelabelseparator#1#2\\#3\@nil{% + \def\@tempa{#3}\ifx\@tempa\@empty \else + \caption@g@addto@list\caption@lsepcrlist{#1}% + \fi} +\@onlypreamble\caption@@declarelabelseparator +\DeclareCaptionOption{labelsep}{\caption@setlabelseparator{#1}} +\DeclareCaptionOption{labelseparator}{\caption@setlabelseparator{#1}} +\newcommand*\caption@setlabelseparator[1]{% + \@ifundefined{caption@lsep@#1}% + {\caption@Error{Undefined label separator `#1'}}% + {\edef\caption@lsepname{#1}% + \expandafter\let\expandafter\caption@iflf\csname caption@iflf@#1\endcsname + \expandafter\let\expandafter\caption@lsep\csname caption@lsep@#1\endcsname}} +\DeclareCaptionLabelSeparator{none}{} +\DeclareCaptionLabelSeparator{colon}{: } +\DeclareCaptionLabelSeparator{period}{. } +\DeclareCaptionLabelSeparator{space}{ } +\DeclareCaptionLabelSeparator*{quad}{\quad} +\DeclareCaptionLabelSeparator*{newline}{\captionnewline} +\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space} +\newcommand*\captionnewline{\\} +\newcommand*\caption@setdefaultlabelsep[1]{% + \ifx\caption@lsep\caption@lsep@default + \caption@set@default@labelsep{#1}% + \caption@setlabelseparator{default}% + \else + \caption@set@default@labelsep{#1}% + \fi} +\newcommand*\caption@set@default@labelsep[1]{% + \def\caption@lsep@default{\@nameuse{caption@lsep@#1}}% + \def\caption@iflf@default{\@nameuse{caption@iflf@#1}}} +\caption@set@default@labelsep{colon} +\newcommand*\DeclareCaptionTextFormat[2]{% + \global\long\@namedef{caption@tfmt@#1}##1{#2}} +\@onlypreamble\DeclareCaptionTextFormat +\DeclareCaptionOption{textformat}{\caption@settextformat{#1}} +\DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}} +\newcommand*\caption@settextformat[1]{% + \@ifundefined{caption@tfmt@#1}% + {\caption@Error{Undefined text format `#1'}}% + {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}} +\DeclareCaptionTextFormat{empty}{% + \caption@get@label#1\caption@makeanchor{}\@nil + \caption@thelabel + \global\let\caption@thelabel\relax} +\long\def\caption@get@label#1\caption@makeanchor#2#3\@nil{% + \def\caption@tempa{#2}% + \ifx\caption@tempa\@empty + \caption@getlabel#1\label{}\@nil + \else + \caption@getlabel#2\label{}\@nil + \fi} +\DeclareCaptionTextFormat{simple}{#1} +\DeclareCaptionTextFormat{period}{#1.} +\def\caption@tfmt@default{\caption@tfmt@simple} +\long\def\caption@getlabel#1\label#2#3\@nil{% + \def\@tempa{#2}% + \ifx\@tempa\@empty + \let\caption@thelabel\relax + \else + \def\@tempb{*}% + \ifx\@tempa\@tempb + \def\caption@thelabel{\label*}% + \caption@@getlabel#3\@nil + \else + \def\caption@thelabel{\label}% + \caption@@getlabel{#2}#3\@nil + \fi + \fi} +\long\def\caption@@getlabel#1#2\@nil{% + \def\@tempa{#1}% + \def\@tempb{[}% + \ifx\@tempa\@tempb + \caption@@@getlabel#1#2\@nil + \else + \l@addto@macro\caption@thelabel{{#1}}% + \fi} +\long\def\caption@@@getlabel[#1]#2\@nil{% + \l@addto@macro\caption@thelabel{[{#1}]}% + \caption@@getlabel#2\@nil} +\let\caption@thelabel\relax +\newcommand*\DeclareCaptionFont{% + \@ifnextchar[%] + \caption@declare@font + \caption@declarefont} +\@onlypreamble\DeclareCaptionFont +\def\caption@declare@font[#1]#2{% + \global\@namedef{caption@fnt@#2@package}{#1}% + \caption@@declarefont{#2}} +\@onlypreamble\caption@declare@font +\newcommand*\caption@declarefont[1]{% + \global\@nameundef{caption@fnt@#1@package}% + \caption@@declarefont{#1}} +\@onlypreamble\caption@declarefont +\newcommand*\caption@@declarefont[2]{% + \define@key{caption@fnt}{#1}[]{\caption@addto@fnt{#1}{#2}}% + \caption@@@declarefont{#1}{#2}} +\@onlypreamble\caption@@declarefont +\newcommand*\caption@@@declarefont[2]{}% will be used by \DeclareCaptionJustification +\@onlypreamble\caption@@@declarefont +\newcommand*\caption@addto@fnt[2]{% + \expandafter\let\expandafter\caption@package\csname caption@fnt@#1@package\endcsname + \caption@ifdefined\caption@package + {\caption@requirepackage\caption@package{#1}}% load package, if necessary + {}% + \l@addto@macro\caption@fnt{#2}} +\newcommand*\DeclareCaptionDefaultFont[2]{% + \global\@namedef{caption#1@default}{#2}} +\@onlypreamble\DeclareCaptionDefaultFont +\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} +\DeclareCaptionOption{font+}{\caption@addtofont{font}{#1}} +\DeclareCaptionDefaultFont{font}{} +\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} +\DeclareCaptionOption{labelfont+}{\caption@addtofont{labelfont}{#1}} +\DeclareCaptionDefaultFont{labelfont}{} +\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} +\DeclareCaptionOption{textfont+}{\caption@addtofont{textfont}{#1}} +\DeclareCaptionDefaultFont{textfont}{} +\newcommand*\caption@setfont[1]{% + \expandafter\let\csname caption#1\endcsname\@empty + \caption@addtofont{#1}} +\newcommand*\caption@addtofont[2]{% + \begingroup + \expandafter\let\expandafter\caption@fnt\csname caption#1\endcsname + \define@key{caption@fnt}{default}[]{% + \l@addto@macro\caption@fnt{\csname caption#1@default\endcsname}}% + \caption@setkeys[caption]{caption@fnt}{#2}% + \global\let\caption@tempa\caption@fnt + \endgroup + \expandafter\let\csname caption#1\endcsname\caption@tempa} +\newcommand*\caption@font{% + \caption@teststar\caption@@font\@firstofone + {\caption@setkeys[caption]{caption@fnt}}} +\newcommand*\caption@@font[2]{% + \begingroup + \def\caption@fnt{\endgroup}% + #1{#2}% + \caption@fnt} +\DeclareCaptionFont{normalcolor}{\normalcolor} +\DeclareCaptionFont{color}{\color{#1}} +\DeclareCaptionFont{normalfont}{\normalfont} +\DeclareCaptionFont{up}{\upshape} +\DeclareCaptionFont{it}{\itshape} +\DeclareCaptionFont{sl}{\slshape} +\DeclareCaptionFont{sc}{\scshape} +\DeclareCaptionFont{md}{\mdseries} +\DeclareCaptionFont{bf}{\bfseries} +\DeclareCaptionFont{rm}{\rmfamily} +\DeclareCaptionFont{sf}{\sffamily} +\DeclareCaptionFont{tt}{\ttfamily} +\DeclareCaptionFont{tiny}{\tiny} +\DeclareCaptionFont{scriptsize}{\scriptsize} +\DeclareCaptionFont{footnotesize}{\footnotesize} +\DeclareCaptionFont{small}{\small} +\DeclareCaptionFont{normalsize}{\normalsize} +\DeclareCaptionFont{large}{\large} +\DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{LARGE}{\LARGE} +\DeclareCaptionFont{huge}{\huge} +\DeclareCaptionFont{Huge}{\Huge} +\newcommand\caption@smaller{% + \ifx\@currsize\tiny + \relax + \else\ifx\@currsize\scriptsize + \tiny + \else\ifx\@currsize\footnotesize + \scriptsize + \else\ifx\@currsize\small + \footnotesize + \else\ifx\@currsize\normalsize + \small + \else\ifx\@currsize\large + \normalsize + \else\ifx\@currsize\Large + \large + \else\ifx\@currsize\LARGE + \Large + \else\ifx\@currsize\huge + \LARGE + \else\ifx\@currsize\Huge + \huge + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{smaller}{\caption@smaller} +\newcommand\caption@larger{% + \ifx\@currsize\tiny + \scriptsize + \else\ifx\@currsize\scriptsize + \footnotesize + \else\ifx\@currsize\footnotesize + \small + \else\ifx\@currsize\small + \normalsize + \else\ifx\@currsize\normalsize + \large + \else\ifx\@currsize\large + \Large + \else\ifx\@currsize\Large + \LARGE + \else\ifx\@currsize\LARGE + \huge + \else\ifx\@currsize\huge + \Huge + \else\ifx\@currsize\Huge + \relax + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\DeclareCaptionFont{larger}{\caption@larger} +\DeclareCaptionFont{singlespacing}{} +\DeclareCaptionFont{normal}{% + \caption@font*{% + \KV@caption@fnt@normalcolor\@unused + \KV@caption@fnt@normalfont\@unused + \KV@caption@fnt@normalsize\@unused + \KV@caption@fnt@singlespacing\@unused}} +\DeclareCaptionOption{size}{\caption@setfont{size}{#1}} +\DeclareCaptionDefaultFont{size}{} +\newcommand*\DeclareCaptionJustification{% + \def\caption@@@declarefont##1##2{% + \global\@namedef{caption@hj@##1}{##2}% for compatibility to v1.0, needed by floatrow package + \let\caption@@@declarefont\@gobbletwo}% + \DeclareCaptionFont} +\@onlypreamble\DeclareCaptionJustification +\newcommand*\DeclareCaptionDefaultJustification[1]{% + \global\@namedef{caption@hj@default}{#1}% for compatibility to v1.0 + \DeclareCaptionDefaultFont{@hj}{#1}} +\@onlypreamble\DeclareCaptionDefaultJustification +\DeclareCaptionOption{justification}{\caption@setjustification{#1}} +\DeclareCaptionDefaultJustification{} +\newcommand*\caption@setjustification{\caption@setfont{@hj}} +\DeclareCaptionJustification{justified}{} +\DeclareCaptionJustification{centering}{\centering} +\DeclareCaptionJustification{centerfirst}{\centerfirst} +\DeclareCaptionJustification{centerlast}{\centerlast} +\DeclareCaptionJustification{raggedleft}{\raggedleft} +\DeclareCaptionJustification{raggedright}{\raggedright} +\providecommand\centerfirst{% + \let\\\@centercr + \edef\caption@normaladjust{% + \leftskip\the\leftskip + \rightskip\the\rightskip + \parfillskip\the\parfillskip\relax}% + \leftskip\z@\@plus -1fil% + \rightskip\z@\@plus 1fil% + \parfillskip\z@skip + \noindent\hskip\z@\@plus 2fil% + \@setpar{\@@par\@restorepar\caption@normaladjust}} +\providecommand\centerlast{% + \let\\\@centercr + \leftskip\z@\@plus 1fil% + \rightskip\z@\@plus -1fil% + \parfillskip\z@\@plus 2fil\relax} +\caption@ifundefined\abovecaptionskip{% + \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} +\caption@ifundefined\belowcaptionskip{% + \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} +\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}} +\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}} +\DeclareCaptionOption{skip}{\setlength\abovecaptionskip{#1}} +\newcommand*\caption@rule{\caption@ifrule\caption@hrule\relax} +\newcommand*\caption@hrule{\hrule\@height\z@} +\DeclareCaptionOption{rule}[1]{\caption@set@bool\caption@ifrule{#1}} +\DeclareCaptionOption{position}{\caption@setposition{#1}} +\DeclareCaptionOption{figureposition}{% + \captionsetup*[figure]{position=#1}} +\@onlypreamble@key{caption}{figureposition} +\DeclareCaptionOption{tableposition}{% + \captionsetup*[table]{position=#1}} +\@onlypreamble@key{caption}{tableposition} +\newcommand*\caption@setposition[1]{% + \caption@ifinlist{#1}{d,default}{% + \let\caption@position\caption@defaultpos + }{\caption@ifinlist{#1}{t,top,above}{% + \let\caption@position\@firstoftwo + }{\caption@ifinlist{#1}{b,bottom,below}{% + \let\caption@position\@secondoftwo + }{\caption@ifinlist{#1}{a,auto}{% + \let\caption@position\@undefined + }{% + \caption@Error{Undefined position `#1'}% + }}}}} +\let\caption@defaultpos\@undefined +\newcommand*\caption@iftop{% + \ifx\caption@position\@undefined + \let\caption@position\@secondoftwo + \fi + \caption@position} +\newcommand*\caption@fixposition{% + \ifx\caption@position\@undefined + \caption@autoposition + \fi} +\newcommand*\caption@autoposition{% + \ifvmode + \edef\caption@tempa{\the\prevdepth}% + \caption@Debug{\protect\prevdepth=\caption@tempa}% + \ifdim\prevdepth>-\p@ + \let\caption@position\@secondoftwo + \else + \let\caption@position\@firstoftwo + \fi + \else + \caption@Debug{no \protect\prevdepth}% + \let\caption@position\@secondoftwo + \fi} +\newcommand*\caption@setautoposition[1]{% + \def\caption@autoposition{\caption@setposition{#1}}} +\newcommand*\caption@beginhook{} +\newcommand*\caption@endhook{} +\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook} +\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook} +\DeclareCaptionOption{list}[1]{\caption@setlist{#1}} +\DeclareCaptionOption{listof}[1]{\caption@setlist{#1}} +\newcommand*\caption@setlist{\caption@set@bool\caption@iflist} +\DeclareCaptionOption{listtype}{\caption@setlisttype{#1}} +\DeclareCaptionOption{listtype+}{\caption@setlisttype@ext{#1}} +\newcommand*\caption@setlisttype{% + \caption@setlisttype@ext{}% + \caption@@setlisttype\caption@listtype} +\newcommand*\caption@@setlisttype[2]{% + \edef#1{#2}% + \ifx#1\@empty \let#1\@undefined \fi} +\newcommand*\caption@setlisttype@ext{% + \caption@@setlisttype\caption@listtype@ext} +\newcommand*\DeclareCaptionListFormat[2]{% + \global\@namedef{caption@lstfmt@#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionListFormat +\DeclareCaptionOption{listformat}{\caption@setlistformat{#1}} +\newcommand*\caption@setlistformat[1]{% + \@ifundefined{caption@lstfmt@#1}% + {\caption@Error{Undefined list format `#1'}}% + {\expandafter\let\expandafter\caption@lstfmt + \csname caption@lstfmt@#1\endcsname}} +\DeclareCaptionListFormat{empty}{} +\DeclareCaptionListFormat{simple}{#1#2} +\DeclareCaptionListFormat{parens}{#1(#2)} +\DeclareCaptionListFormat{subsimple}{#2} +\DeclareCaptionListFormat{subparens}{(#2)} +\newcommand*\caption@setdefaultlistformat[1]{% + \ifx\caption@lstfmt\caption@lstfmt@default + \caption@set@default@listformat{#1}% + \caption@setlistformat{default}% + \else + \caption@set@default@listformat{#1}% + \fi} +\newcommand*\caption@set@default@listformat[1]{% + \def\caption@lstfmt@default{\@nameuse{caption@lstfmt@#1}}} +\caption@set@default@listformat{subsimple} +\DeclareCaptionOption{debug}[1]{% + \caption@set@bool\caption@ifdebug{#1}% + \caption@ifdebug + {\let\caption@Debug\caption@Info}% + {\let\caption@Debug\@gobble}} +\DeclareOption{debug}{\setkeys{caption}{debug}} +\setkeys{caption}{debug=0} +\caption@setbool{documentclass}{1} +\caption@ifundefined\caption@documentclass{% + \@ifclassloaded{beamer}{% + \caption@InfoNoLine{beamer document class detected}% + \def\caption@documentclass{beamer}% + }{\@ifclassloaded{elsarticle}{% + \caption@InfoNoLine{elsarticle document class detected}% + \def\caption@documentclass{elsarticle}% + }{\@ifclassloaded{memoir}{% + \caption@InfoNoLine{memoir document class detected}% + \def\caption@documentclass{memoir}% + }{\caption@ifdefined\scr@caption{% + \caption@InfoNoLine{KOMA-Script document class detected}% + \def\caption@documentclass{koma}% + }{\caption@ifdefined\@captionheadfont{% + \caption@InfoNoLine{AMS or SMF document class detected}% + \def\caption@documentclass{ams}% + }{\caption@ifdefined\CaptionFonts{% + \caption@InfoNoLine{NTG document class detected}% + \def\caption@documentclass{ntg}% + }{\caption@ifdefined\cph@font{% + \caption@ifdefined\cpb@font\@firstoftwo\@secondoftwo + }{% + \@secondoftwo + }{% + \caption@InfoNoLine{thesis document class detected}% + \def\caption@documentclass{thesis}% + }{% + % article|report|book [2005/09/16 v1.4f Standard LaTeX document class] + \long\def\caption@tempa#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip}} + \ifx\caption@tempa\@makecaption + \caption@InfoNoLine{Standard document class detected}% + \else + \caption@InfoNoLine{% + Unknown document class (or package),\MessageBreak + standard defaults will be used}% + \caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}% + \caption@setbool{documentclass}{0}% + \fi + \def\caption@documentclass{base}% + }}}}}}% +}{} +\newcommand*\caption@ifclassloaded[1]{% + \edef\caption@tempa{#1}% + \ifx\caption@tempa\caption@documentclass + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\caption@ifclassloaded{elsarticle}{% + \DeclareCaptionDefaultFont{font}{\footnotesize} +}{} +\caption@ifclassloaded{ams}{% + \let\captionmargin\captionindent % set to 3pc by AMS class + \begingroup\edef\@tempa{\endgroup + \noexpand\caption@g@addto@list\noexpand\caption@sty@default + {margin=\the\captionmargin + \caption@ifdefined\smf@makecaption{,maxmargin=.1\linewidth}{}}} + \@tempa + \caption@g@addto@list\caption@sls@default{margin*=.5\captionmargin} + \DeclareCaptionLabelSeparator{default}{.\enspace} + \DeclareCaptionDefaultFont{font}{\@captionfont} + \DeclareCaptionDefaultFont{labelfont}{\@captionheadfont} + \DeclareCaptionDefaultFont{textfont}{\@captionfont\upshape} + \captionsetup[figure]{position=b} + \captionsetup[table]{position=t} +}{} +\caption@ifclassloaded{beamer}{% + \newcommand*\caption@ifbeamertemplate[1]{% + \begingroup + \let\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption + \@nameuse{beamer@@tmpop@caption@#1}% + \ifx\beamer@@tmpl@caption@ORI\beamer@@tmpl@caption + \endgroup\expandafter\@firstoftwo + \else + \endgroup\expandafter\@secondoftwo + \fi} + \DeclareCaptionLabelFormat{default}{% + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple + \caption@lfmt@unnumbered + {#1}{#2}} + \DeclareCaptionLabelFormat{default@magyar}{% + \caption@ifbeamertemplate{numbered}% + \caption@lfmt@simple@magyar + \caption@lfmt@unnumbered + {#1}{#2}} + \@ifundefined{@@magyar@captionfix}\AtBeginDocument\@firstofone{% + \@ifundefined{@@magyar@captionfix}{}{% + \g@addto@macro\@@magyar@captionfix{% + \let\caption@lfmt@simple@magyar\caption@lfmt@simpleMagyar + \let\caption@lfmt@simpleMagyar\caption@lfmt@default@magyar}}} + \caption@declarelabelseparator + {\caption@ifbeamertemplate{caption name own line}\@gobble\@firstofone} + {default} + {\caption@ifbeamertemplate{caption name own line}{\\}% + {\usebeamertemplate{caption label separator}}} + \DeclareCaptionDefaultFont{font}{% + \usebeamerfont*{caption}% + \usebeamercolor[fg]{caption}} + \DeclareCaptionDefaultFont{labelfont}{% + \setbeamercolor*{caption}{}% avoid setting "caption" color additionally + \usebeamercolor[fg]{caption name}% + \setbeamerfont*{caption}{}% avoid setting "caption" font additionally + \usebeamerfont{caption name}} + \DeclareCaptionDefaultJustification{\raggedright} + \DeclareOption{beamerclass}{% + \renewcommand\caption@ifslc{% + \caption@ifbeamertemplate{caption name own line}\@secondoftwo\@firstoftwo} + % Since the beamer class do not offer a `list of figures' we switch this support off. + \captionsetup{list=0}} + \PassOptionsToPackage{beamerclass}{caption3} + \defbeamertemplate{caption}{caption3}{% + \caption@make\insertcaptionname\insertcaptionnumber\insertcaption} + \DeclareOption{beamer}{% + % \usebeamertemplate**{caption} will set font + \DeclareCaptionDefaultFont{font}{}% + \setbeamertemplate{caption}[caption3]} +}{} +\caption@ifclassloaded{koma}{% + \DeclareCaptionFormat{default}[#1#2#3\par]{% + \ifdofullc@p + \caption@ifin@list\caption@lsepcrlist\caption@lsepname + {\caption@Error{% + The option `labelsep=\caption@lsepname' does not work\MessageBreak + with \noexpand\setcaphanging (which is set by default)}}% + {\caption@fmt@hang{#1}{#2}{#3}}% + \else + #1#2% + \ifdim\cap@indent<\z@ + \par + \noindent\hspace*{-\cap@indent}% + \else\if@capbreak + \par + \fi\fi + #3\par + \fi} + \DeclareCaptionLabelSeparator{default}{\captionformat} + \DeclareCaptionDefaultFont{font}{\scr@fnt@caption} + \DeclareCaptionDefaultFont{labelfont}{\scr@fnt@captionlabel} + \let\caption@KV@parindent\KV@caption@parindent + \DeclareCaptionOption{parindent}[]{% + \ifx,#1,% + \caption@Debug{Option `parindent' ignored}% + \else + \caption@KV@parindent{#1}% + \fi}% + \let\caption@KV@parskip\KV@caption@parskip + \DeclareCaptionOption{parskip}[]{% + \ifx,#1,% + \caption@Debug{Option `parskip' ignored}% + \else + \caption@KV@parskip{#1}% + \fi}% +}{} +\caption@ifclassloaded{ntg}{% + \DeclareCaptionDefaultFont{labelfont}{\CaptionLabelFont} + \DeclareCaptionDefaultFont{textfont}{\CaptionTextFont} +}{} +\caption@ifclassloaded{thesis}{% + \DeclareCaptionDefaultFormat{hang} + \DeclareCaptionDefaultFont{labelfont}{\cph@font} + \DeclareCaptionDefaultFont{textfont}{\cpb@font} +}{} +\caption@ifdefined\ArabiCoreLoaded{% + \newcommand\caption@rl[1]{\if@rl\textRL{#1}\else\textLR{#1}\fi} + \def\fnum@figure{\figurename\nobreakspace\thefigure}% + \def\fnum@table{\tablename\nobreakspace\thetable}% + \DeclareCaptionLabelSeparator{arabi}{ : } + \DeclareCaptionLabelSeparator{default}{% + \if@rl\caption@lsep@arabi\else\caption@lsep@colon\fi} +}{% + \let\caption@rl\@firstofone +} +\caption@ifdefined\FB@makecaption{% + \ifx\@makecaption\STD@makecaption + \DeclareCaptionLabelSeparator{default}{\CaptionSeparator} + \def\caption@frenchb{% supress frenchb warning + \let\STD@makecaption\@makecaption + \let\FB@makecaption\@makecaption} + \else + \ifx\@makecaption\@undefined\else + \caption@InfoNoLine{% + The definition of \protect\@makecaption\space + has been changed,\MessageBreak + frenchb will NOT customize it}% + \fi + \fi +}{} +\caption@ifdefined\frenchTeXmods{% + \DeclareCaptionDefaultFont{textfont}{\itshape}% + \DeclareCaptionLabelSeparator{default}{\captionseparator\space}% +}{} +\DeclareCaptionListFormat{subperiod}{#2.} +\def\caption@tempa#1{% + \@ifpackagewith{babel}{#1}{% + \caption@InfoNoLine{#1 babel option is loaded}% + \expandafter\addto\csname extras#1\endcsname{% + % change default labelsep and listformat + \caption@setdefaultlabelsep{period}% + \caption@setdefaultlistformat{subperiod}}% + \expandafter\addto\csname noextras#1\endcsname{% + % change default labelsep and listformat + \caption@setdefaultlabelsep{colon}% + \caption@setdefaultlistformat{subsimple}}% + }{}} +\caption@tempa{hungarian} +\caption@tempa{magyar} +\newcommand*\caption@xpackage[2]{% + \expandafter\ifx\csname ver@#2.\caption@pkgextension\endcsname\relax + \expandafter\@firstofone + \else + \expandafter\@gobbletwo + \fi + {#1{#2}}} +\let\caption@pkgextension\@pkgextension +\newcommand*\caption@loadpackage{% + \caption@xpackage\caption@@loadpackage} +\newcommand*\caption@@loadpackage[2]{% + \caption@Info{Option `#2' requires the `#1' package}% + \RequirePackage{#1}\relax} +\newcommand*\caption@requirepackage{% + \caption@xpackage\caption@@requirepackage} +\newcommand*\caption@@requirepackage[2]{% + \@cons\caption@packagelist{{#1}{#2}}}% load package later on +\newcommand*\caption@pkg@list{} +\newcommand*\caption@packagelist{} +\@onlypreamble\caption@packagelist +\caption@AtBeginDocument{% + \def\caption@tempa{\endgroup}% + \begingroup + \def\@elt#1#2{% + \g@addto@macro\caption@tempa{% + \caption@loadpackage{#1}{#2}}}% + \caption@packagelist + \caption@tempa + \renewcommand*\caption@@loadpackage[2]{% + \caption@Error{Option `#2' requires the `#1' package}}% + \let\caption@@requirepackage\caption@@loadpackage + } +\newcommand*\caption@usepackage[3]{% + \IfCaptionOptionCheck + {\caption@requirepackage{#1}{#2}}% + {\let\KV@prefix@ORI\KV@prefix + \let\@tempc@ORI\@tempc + \caption@loadpackage{#1}{#2}% + #3% + \let\@tempc\@tempc@ORI + \let\KV@prefix\KV@prefix@ORI}} +\newcommand*\caption@newfloat{\caption@usepackage{newfloat}} +\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}} +\@onlypreamble@key{caption}{figurename} +\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}} +\@onlypreamble@key{caption}{tablename} +\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}} +\@onlypreamble@key{caption}{listfigurename} +\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}} +\@onlypreamble@key{caption}{listtablename} +\newcommand*\caption@SetName[2]{% + \caption@newfloat{#1name}{\newfloat@setname{#1}{#2}}} +\@onlypreamble\caption@SetName +\DeclareCaptionOption{name}{% + \IfCaptionOptionCheck{}{\caption@setname\@captype{#1}}} +\newcommand*\caption@setname[2]{% + \@namedef{#1name}{#2}} +\DeclareCaptionOption{figurewithin}{\caption@within{figure}{#1}} +\DeclareCaptionOptionNoValue{figurewithout}{\caption@within{figure}{none}} +\DeclareCaptionOption{tablewithin}{\caption@within{table}{#1}} +\DeclareCaptionOptionNoValue{tablewithout}{\caption@within{table}{none}} +\newcommand*\caption@within[2]{% + \caption@newfloat{#1within}{\newfloat@setwithin{#1}{#2}}} +\DeclareCaptionOption{within}{% + \caption@newfloat{within}{\newfloatsetup{within=#1}}} +\DeclareCaptionOptionNoValue{without}{% + \caption@newfloat{without}{\newfloatsetup{without}}} +\DeclareCaptionJustification[ragged2e]{Justified}{\justifying} +\DeclareCaptionJustification[ragged2e]{Centering}{\Centering} +\DeclareCaptionJustification[ragged2e]{RaggedLeft}{\RaggedLeft} +\DeclareCaptionJustification[ragged2e]{RaggedRight}{\RaggedRight} +\DeclareCaptionFont[sansmath]{sansmath}{\sansmath} +\DeclareCaptionFont{singlespacing}{% + \caption@ifdefined\setspace@singlespace{% + \setstretch\setspace@singlespace}{}}% normally 1 +\DeclareCaptionFont[setspace]{onehalfspacing}{\onehalfspacing} +\DeclareCaptionFont[setspace]{doublespacing}{\doublespacing} +\DeclareCaptionFont[setspace]{stretch}{\setstretch{#1}} +\caption@AtBeginDocument{% + \def\@tempa{2005/06/28 ver: 1.3 subfig package}% + \expandafter\ifx\csname ver@subfig.sty\endcsname\@tempa + \caption@InfoNoLine{subfig package v1.3 is loaded}% + \let\caption@setfloattype\@gobble + \let\@dottedxxxline\sf@NEW@dottedxxxline + \let\sf@subfloat\sf@NEW@subfloat + \fi + \let\sf@NEW@dottedxxxline\@undefined + \let\sf@NEW@subfloat\@undefined} +\def\sf@NEW@dottedxxxline#1#2#3#4#5#6#7{% + \begingroup + \caption@setfloattype{#1}% + \caption@setoptions{subfloat}% + \caption@setoptions{sub#1}% + \ifnum #3>\@nameuse{c@#2depth}\else + \@dottedtocline{\z@}{#4}{#5}{#6}{#7}% + \fi + \endgroup} +\def\sf@NEW@subfloat{% + \begingroup + \@nameuse{caption@warmup}% + \caption@setfloattype\@captype + \sf@ifpositiontop{% + \maincaptiontoptrue + }{% + \maincaptiontopfalse + }% + \caption@setoptions{subfloat}% + \caption@setoptions{sub\@captype}% + \let\sf@oldlabel=\label + \let\label=\subfloat@label + \ifmaincaptiontop\else + \advance\@nameuse{c@\@captype}\@ne + \fi + \refstepcounter{sub\@captype}% + \setcounter{sub\@captype @save}{\value{sub\@captype}}% + \@ifnextchar [% %] match left bracket + {\sf@@subfloat}% + {\sf@@subfloat[\@empty]}} +%%\@ifl@aded{dtx}{subfig}{\caption@loadpackage{ragged2e}{}}{} % not needed +\DeclareCaptionOption{lofdepth}[2]{\caption@ifdefined\c@lofdepth{\setcounter{lofdepth}{#1}}{}} +\DeclareCaptionOption{lotdepth}[2]{\caption@ifdefined\c@lotdepth{\setcounter{lotdepth}{#1}}{}} +\captionsetup{style=default,position=default,% + list,listformat=default,twoside=\if@twoside 1\else 0\fi} +\ProcessOptions* +\newcommand\caption@addcontentsline[2]{% + \caption@ifcontentsline{#2}{% + \begingroup + \let\@tempa\@gobble + \caption@ifdefined\caption@listtype + {\let\@tempa\@firstofone}% + {\edef\caption@listtype{#1}}% + \caption@ifdefined\caption@listtype@ext + {\edef\caption@listtype{\caption@listtype\caption@listtype@ext}% + \let\@tempa\@firstofone}% + {}% + \@tempa + {\caption@Debug{addcontentsline: #1 => \caption@listtype}% + \@namedef{the\caption@listtype}{\@nameuse{the#1}}}% + \expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}% + \endgroup}% + \caption@addsubcontentslines{#1}} +\newcommand\caption@@addcontentsline[2]{% + {\let\\\space + \@ifundefined{ext@#1}% + {\caption@Error{No float type '#1' defined}}% + {\def\captionlisttype{#1}% + \caption@add@contentsline + {\csname ext@#1\endcsname}% + {#1}% + {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + {\ignorespaces #2}% + \caption@chkfloat{#1}{#2}}}} +\newcommand*\caption@add@contentsline{% + \caption@@@addcontentsline} +\newcommand*\caption@@@addcontentsline[4]{% + \addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}} +\let\caption@chkfloat\@gobbletwo +\newcommand\caption@ifcontentsline[1]{% + \caption@iflist + {\def\@tempa{#1}}% + {\let\@tempa\@empty}% + \ifx\@tempa\@empty + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi} +\newcommand*\caption@addsubcontentslines[1]{} +\newif\ifcaption@star +\newcommand*\caption@fnum[1]{\caption@lfmt{\@nameuse{#1name}}{\@nameuse{the#1}}} +\newcommand\caption@make[2]{\caption@@make{\caption@lfmt{#1}{#2}}} +\newcommand\caption@@make[2]{% + \begingroup + \caption@@make@{#1}{#2}% + \endgroup + \caption@@make@epilogue} +\newcommand\caption@@make@[2]{% + \caption@stepthecounter + \caption@beginhook + \caption@box\hsize{% + \caption@ifslc{\caption@slc{#1}{#2}\caption@singleline\relax}{}% + \caption@calcmargin + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@}% + \fi + \caption@ifh{\advance\caption@tempdima\caption@indent}% + \hspace\caption@tempdima + \caption@tempdima\captionwidth + \caption@ifh{\advance\caption@tempdima-\caption@indent}% + \caption@parbox\caption@tempdima{% + \caption@ifh{% + \ifdim\caption@indent=\z@ + \leavevmode + \else + \hskip-\caption@indent + \fi}% + \caption@@@make{#1}{#2}}% + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{\advance\caption@tempdima\captionmargin@}{}% + \fi + \hspace\caption@tempdima + }% + \caption@endhook} +\newcommand\caption@@make@epilogue{% + \global\caption@starfalse} +\newcommand*\caption@calcmargin{% + \caption@calcmargin@hook + \ifx\caption@maxmargin\@undefined \else + \ifdim\captionmargin>\caption@maxmargin\relax + \captionmargin\caption@maxmargin\relax + \fi + \fi + \ifx\caption@minmargin\@undefined \else + \ifdim\captionmargin<\caption@minmargin\relax + \captionmargin\caption@minmargin\relax + \fi + \fi + \ifdim\captionwidth=\z@ + \captionwidth\hsize + \advance\captionwidth by -2\captionmargin + \advance\captionwidth by -\captionmargin@ + \else + \captionmargin\hsize + \advance\captionmargin by -\captionwidth + \divide\captionmargin by 2 + \captionmargin@\z@ + \fi + \caption@Debug{% + \string\hsize=\the\hsize, + \string\captionwidth=\the\captionwidth,\MessageBreak + \string\captionmargin=\the\captionmargin, + \string\captionmargin@=\the\captionmargin@}% +} +\newcommand\caption@slc[4]{% + \caption@Debug{Begin SLC}% + \singlelinecaptiontrue + \begingroup + \caption@singleline + \let\caption@hj\@empty + \caption@calcmargin % calculate \captionwidth + \caption@prepareslc + \sbox\@tempboxa{\caption@@@make{#1}{#2}}% + \ifdim\wd\@tempboxa>\captionwidth + \endgroup + \singlelinecaptionfalse + #4% + \else + \endgroup + #3% + \fi + \caption@Debug{End SLC}} +\newif\ifsinglelinecaption +\newcommand*\caption@singleline{% + \caption@xsetup\caption@opt@singleline + \let\caption@fmt\caption@slfmt} +\providecommand*\caption@prepareslc{} +\g@addto@macro\caption@prepareslc{% + \let\label\caption@gobble + \let\hypertarget\@gobbletwo + \let\caption@footnote@ORI\footnote + \def\footnote{\caption@withoptargs\caption@footnote}% + \let\caption@footnotemark@ORI\footnotemark + \def\footnotemark{\caption@withoptargs\caption@footnotemark}% + \let\caption@footnotetext@ORI\@footnotetext + \let\@footnotetext\caption@gobble + \let\caption@endnote@ORI\endnote + \def\endnote{\caption@withoptargs\caption@endnote}% + \let\caption@endnotemark@ORI\endnotemark + \def\endnotemark{\caption@withoptargs\caption@endnotemark}% + \let\caption@endnotetext@ORI\@endnotetext + \let\@endnotetext\caption@gobble + \let\pagenote\caption@gobble + \let\acused\@gobble + \let\AC@placelabel\@gobble + \let\glsunset\@gobble +} +\newcommand\caption@footnote[2]{% + \caption@footnotemark{#1}} +\newcommand\caption@footnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@footnotemark@ORI#1\relax + \endgroup} +\newcommand\caption@endnote[2]{% + \caption@endnotemark{#1}} +\newcommand\caption@endnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@endnotemark@ORI#1\relax + \endgroup} +\newcommand*\caption@l@stepcounter[1]{% + \advance\csname c@#1\endcsname\@ne\relax} +\caption@ifclassloaded{beamer}{% + \g@addto@macro\caption@prepareslc{% + \def\footnote{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \renewcommand<>\beamer@framefootnotetext[1]{% + \endgroup}% + \let\@footnotetext\beamer@framefootnotetext + \caption@footnote@ORI}}}{} +\newcommand*\caption@applyfont{% + \caption@hj\captionfont\captionsize} +\newcommand\caption@@@make[2]{% + \sbox\@tempboxa{#1}% + \ifdim\wd\@tempboxa=\z@ + \let\caption@lsep\relax + \fi + \caption@ifempty{#2}{% + \let\caption@lsep\@empty + \let\caption@tfmt\@firstofone + }% + \@setpar{\@@par\caption@@par}\caption@@par + \caption@applyfont + \caption@fmt + {\ifcaption@star\else + \begingroup + \captionlabelfont + #1% + \endgroup + \fi}% + {\ifcaption@star\else + \begingroup + \caption@iflf\captionlabelfont + \relax\caption@lsep + \endgroup + \fi}% + {{\captiontextfont + \captiontextstart + \caption@ifstrut + {\vrule\@height\ht\strutbox\@width\z@}% + {}% + \nobreak\hskip\z@skip % enable hyphenation + \caption@tfmt{#2}% + \caption@ifstrut + {\ifhmode\@finalstrut\strutbox\fi}% + {}% + \captiontextend}}} +\newcommand*\captiontextstart{} +\newcommand*\captiontextend{\par} +\newcommand\caption@ifempty[1]{% + \caption@if@empty{#1}% + \caption@ifempty\@unused} +\newcommand\caption@if@empty[1]{% + \def\caption@tempa{#1}% + \ifx\caption@tempa\@empty + \let\caption@ifempty\@secondoftwo + \else + \expandafter\def\expandafter\caption@tempa\expandafter{% + \caption@car#1\caption@if@empty\caption@nil}% + \def\caption@tempb{\caption@if@empty}% + \ifx\caption@tempa\caption@tempb + \let\caption@ifempty\@secondoftwo + \else + \def\caption@tempb{\ignorespaces}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobble#1}% + \else + \def\caption@tempb{\label}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\index}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\glossary}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \let\caption@ifempty\@gobbletwo + \fi + \fi + \fi + \fi + \fi + \fi} +\long\def\caption@car#1#2\caption@nil{#1}% same as \@car, but \long +\newcommand*\caption@@par{% + \parindent\caption@parindent\hangindent\caption@hangindent}% +\newcommand*\DeclareCaptionType{% + \caption@loadpackage{newfloat}{}% + \DeclareFloatingEnvironment} +\@onlypreamble\DeclareCaptionType +\newcommand*\ForEachCaptionType{% + \@ifstar + {\caption@foreach@type\@gobble}% + {\caption@foreach@type\@iden}} +\newcommand\caption@foreach@type[2]{% + \caption@ifdefined\ForEachFloatingEnvironment + {\ForEachFloatingEnvironment*{#2}}% + {\def\@elt##1{#2}% + \caption@ifdefined\c@figure\@elt\@gobble{figure}% + \caption@ifdefined\c@table\@elt\@gobble{table}% + \let\@elt\relax}% + #1{\newfloat@addtohook{#2}}} +\providecommand\newfloat@addtohook[1]{% + \toks@=\expandafter{\newfloat@hook{##1}#1}% + \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}% + \@tempa} +\providecommand*\newfloat@hook[1]{} +\newcommand*\DeclareCaptionSubType{% + \caption@teststar\caption@declaresubtype\@firstoftwo\@secondoftwo} +\@onlypreamble\DeclareCaptionSubType +\newcommand*\caption@declaresubtype[1]{% + \@testopt{\caption@@declaresubtype{#1}}{alph}} +\@onlypreamble\caption@declaresubtype +\def\caption@@declaresubtype#1[#2]#3{% + \@ifundefined{c@#3}% + {\caption@Error{No float type '#3' defined}}% + {\caption@@@declaresubtype{#1}{#2}{#3}{sub#3}}} +\@onlypreamble\caption@@declaresubtype +\newcommand*\caption@@@declaresubtype[4]{% + \caption@ifin@list\caption@subtypelist{#4}% + {\caption@Debug{Modify subtype `#4'}}% + {\caption@Debug{New subtype `#4'}% + \newcounter{#4}[#3]% + \@namedef{ext@#4}{\csname ext@#3\endcsname}% + \caption@declaresublistentry{#3}% + \caption@l@addto@list\caption@subtypelist{#4}% + \caption@subtype@hook{#4}}% + \caption@ifdefined\contentsuse{% + \contentsuse{#4}{\csname ext@#4\endcsname}}{}% + \@namedef{#4name}{}% + \@namedef{#4autorefname}{\csname #3autorefname\endcsname}% + #1% is \@firstoftwo in star form, and \@secondoftwo otherwise + {\@namedef{p@#4}{}% + \@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}% + {\@namedef{p@#4}{\csname the#3\endcsname}% + \@namedef{the#4}{\@nameuse{#2}{#4}}}% + \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}} +\@onlypreamble\caption@@@declaresubtype +\newcommand*\caption@declaresublistentry{% + \caption@ifdefined\l@chapter + {\caption@@declaresublistentry\l@subsection}% + {\caption@@declaresublistentry\l@subsubsection}} +\@onlypreamble\caption@declaresublistentry +\newcommand*\caption@@declaresublistentry[2]{% + \ifx#1\@undefined + \caption@@@declaresublistentry\relax\@dottedtocline\caption@nil{#2}% + \else + \expandafter\caption@@@declaresublistentry#1{}{}\@dottedtocline\caption@nil{#2}% + \fi} +\@onlypreamble\caption@@declaresublistentry +\long\def\caption@@@declaresublistentry#1\@dottedtocline#2\caption@nil#3{% + \def\@tempa{#1}% + \ifx\@tempa\@empty + \caption@@@@declaresublistentry{#3}#2\caption@nil + \else + \caption@@@@declaresublistentry{#3}@{3.8em}{3.2em}\caption@nil + \fi} +\@onlypreamble\caption@@@declaresublistentry +\def\caption@@@@declaresublistentry#1#2#3#4#5\caption@nil{% + \expandafter\caption@@@@@declaresublistentry\expandafter + {\csname @dotted\csname ext@#1\endcsname line\endcsname}{#1}{#3}{#4}} +\@onlypreamble\caption@@@@declaresublistentry +\newcommand*\caption@@@@@declaresublistentry[4]{% + \@namedef{l@sub#2}{#1{2}{#3}{#4}}% + \expandafter\caption@@@@@@declaresublistentry + \expandafter#1\expandafter{\csname ext@#2\endcsname depth}} +\@onlypreamble\caption@@@@@declaresublistentry +\newcommand*\caption@@@@@@declaresublistentry[2]{ + \ifx#1\relax + \def#1##1{% + \def\next{\@dottedtocline{##1}}% + \@ifundefined{c@#2}{}{% + \ifnum ##1>\@nameuse{c@#2}\relax + \let\next\@gobblefour + \else + \c@tocdepth=\@nameuse{c@#2}\relax + \fi}% + \next}% + \fi} +\@onlypreamble\caption@@@@@@declaresublistentry +\newcommand*\caption@subtypelist{} +\newcommand*\caption@ifsubtype{% + \caption@ifin@list\caption@subtypelist} +\newcommand*\ForEachCaptionSubType{% + \@ifstar + {\caption@foreach@subtype\@gobble}% + {\caption@foreach@subtype\@iden}} +\newcommand\caption@foreach@subtype[2]{% + \caption@for@list\caption@subtypelist{#2}% + #1{\caption@addto@subtype@hook{#2}}} +\providecommand\caption@addto@subtype@hook[1]{% + \toks@=\expandafter{\caption@subtype@hook{##1}#1}% + \edef\@tempa{\def\noexpand\caption@subtype@hook####1{\the\toks@}}% + \@tempa} +\providecommand*\caption@subtype@hook[1]{} +\newcommand*\caption@savesubcounters{% + \caption@for@list\caption@subtypelist{\caption@savecounter{##1}}} +\newcommand*\caption@savecounter[1]{% + \edef\caption@tempa{% + \noexpand\l@addto@macro\noexpand\caption@restore@counters + {\noexpand\setcounter{#1}{\number\value{#1}}}}% + \caption@tempa} +\newcommand*\caption@restorecounters{% + \caption@restore@counters + \global\let\caption@restore@counters\@empty} +\newcommand*\caption@restore@counters{} +\endinput +%% +%% End of file `caption3_2020-07-29.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty b/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty new file mode 100644 index 00000000000..98d8612ca45 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption3_2020-10-26.sty @@ -0,0 +1,1768 @@ +%% +%% This is file `caption3_2020-10-26.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.5/caption3.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption3}[2020/10/26 v2.2f caption3 kernel (AR)] +\providecommand*\@nameundef[1]{% + \expandafter\let\csname #1\endcsname\@undefined} +\providecommand\l@addto@macro[2]{% + \edef#1{\unexpanded\expandafter{#1#2}}} +\def\bothIfFirst#1#2{\caption@bothif{#1}{#1#2}} +\def\bothIfSecond#1#2{\caption@bothif{#2}{#1#2}} +\newcommand*\caption@bothif[2]{% + \begingroup + \caption@prepare@bothif + \protected@xdef\caption@tempa{#1}% + \endgroup + \ifx\caption@tempa\@empty \else + #2% + \fi} +\providecommand*\caption@prepare@bothif{} +\g@addto@macro\caption@prepare@bothif{% + \let\inputencoding\@gobble} +\newcommand*\caption@ifundefined[1]{% + \ifdefined#1% + \ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\@secondoftwo + \fi + \else + \expandafter\@firstoftwo + \fi} +\newcommand*\caption@ifdefined[1]{% + \ifdefined#1% + \ifx#1\relax + \expandafter\expandafter\expandafter\@secondoftwo + \else + \expandafter\expandafter\expandafter\@firstoftwo + \fi + \else + \expandafter\@secondoftwo + \fi} +\newcommand*\caption@ifinlist{% + \@expandtwoargs\caption@@ifinlist} +\newcommand*\caption@@ifinlist[2]{% + \begingroup + \def\@tempa##1,#1,##2\@nil{% + \endgroup + \ifx\relax##2\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \@tempa,#2,#1,\@nil}% +\newcommand*\caption@ifin@list[2]{% + \caption@ifempty@list#1% + {\@secondoftwo}% + {\@expandtwoargs\caption@@ifinlist{#2}{#1}}} +\newcommand*\caption@g@addto@list[2]{% + \caption@ifempty@list#1{\gdef#1{#2}}{\g@addto@macro#1{,#2}}} +\newcommand*\caption@l@addto@list[2]{% + \caption@ifempty@list#1{\def#1{#2}}{\l@addto@macro#1{,#2}}} +\newcommand*\caption@g@removefrom@list[2]{% + \caption@l@removefrom@list#1{#2}% + \global\let#1#1} +\newcommand*\caption@l@removefrom@list[2]{% + \caption@ifempty@list#1{}{\@expandtwoargs\@removeelement{#2}#1#1}} +\newcommand*\caption@for@list[2]{% + \caption@ifempty@list#1{}% + {\def\caption@tempb##1{#2}% + \@for\caption@tempa:=#1\do{% + \expandafter\caption@tempb\expandafter{\caption@tempa}}}} +\newcommand*\caption@ifempty@list[1]{% + \ifx#1\@undefined + \expandafter\@firstoftwo + \else\ifx#1\relax + \expandafter\expandafter\expandafter\@firstoftwo + \else\ifx#1\@empty + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@firstoftwo + \else + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter\@secondoftwo + \fi\fi\fi} +\newcommand*\caption@setbool[1]{% + \expandafter\caption@set@bool\csname caption@if#1\endcsname} +\newcommand*\caption@set@bool[2]{% + \caption@if@bool{#2}{\let#1\@firstoftwo}{\let#1\@secondoftwo}} +\newcommand*\caption@if@bool[1]{% + \caption@ifinlist{#1}{1,true,yes,on}% + {\@firstoftwo}% + {\caption@ifinlist{#1}{0,false,no,off}% + {}% + {\caption@Error{Undefined boolean value `#1'}}% + \@secondoftwo}} +\newcommand*\caption@ifbool[1]{\@nameuse{caption@if#1}} +\newcommand*\caption@undefbool[1]{\@nameundef{caption@if#1}} +\newcommand*\caption@teststar[3]{% + \@ifstar{#1{#2}}{#1{#3}}} +\newcommand*\caption@teststar@[3]{% + \@ifstar{#1{#2}}{\caption@ifatletter{#1{#2}}{#1{#3}}}} +\AtBeginDocument{\let\caption@teststar@\caption@teststar} +\newcommand*\caption@ifatletter{% + \ifnum\the\catcode`\@=11 + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\AtBeginDocument{\let\caption@ifatletter\@secondoftwo} +\newcommand*\caption@withoptargs[1]{% + \@ifstar + {\def\caption@tempa{*}\caption@@withoptargs{#1}}% + {\def\caption@tempa{}\caption@@withoptargs{#1}}} +\def\caption@@withoptargs#1{% + \@ifnextchar[%] + {\caption@@@withoptargs{#1}}% + {\caption@@@@withoptargs{#1}}} +\def\caption@@@withoptargs#1[#2]{% + \l@addto@macro\caption@tempa{[{#2}]}% + \caption@@withoptargs{#1}} +\def\caption@@@@withoptargs#1{% + \def\caption@tempb{#1}% + \expandafter\caption@tempb\expandafter{\caption@tempa}} +\DeclareRobustCommand*\caption@gobble{% + \caption@withoptargs\@gobbletwo} +\let\caption@begindocumenthook\@empty +\let\caption@@begindocumenthook\@empty +\def\caption@AtBeginDocument{% + \caption@teststar\g@addto@macro + \caption@@begindocumenthook\caption@begindocumenthook} +\AtBeginDocument{% + \caption@InfoNoLine{Begin \noexpand\AtBeginDocument code}% + \def\caption@AtBeginDocument{% + \@ifstar{\g@addto@macro\caption@@begindocumenthook}\@firstofone}% + \caption@begindocumenthook + \let\caption@begindocumenthook\relax + \def\caption@AtBeginDocument{% + \@ifstar\@firstofone\@firstofone}% + \caption@@begindocumenthook + \let\caption@@begindocumenthook\relax + \caption@InfoNoLine{End \noexpand\AtBeginDocument code}} +\newcommand*\caption@Info[1]{% + \PackageInfo{caption}{#1}} +\newcommand*\caption@InfoNoLine[1]{% + \caption@Info{#1\@gobble}} +\newcommand*\caption@Warning[1]{% + \caption@WarningNoLine{#1\on@line}} +\newcommand*\caption@WarningNoLine[1]{% + \PackageWarning{caption}{#1.^^J\caption@wh\@gobbletwo}} +\newcommand*\caption@wh{% + See the caption package documentation for explanation.} +\newcommand*\caption@Error[1]{% + \PackageError{caption}{#1}{\caption@@eh{caption}}} +\newcommand*\caption@@eh[1]{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `#1' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} +\let\caption@KV@err\caption@Error +\RequirePackage{keyval}[1997/11/10] +\providecommand*\undefine@key[2]{% + \@nameundef{KV@#1@#2}\@nameundef{KV@#1@#2@default}} +\providecommand*\@preamble@keys{} +\providecommand*\@onlypreamble@key[2]{\@cons\@preamble@keys{{#1}{#2}}} +\@onlypreamble\@onlypreamble@key +\@onlypreamble\@preamble@keys +\providecommand*\@notprerr@key[1]{\KV@err{Can be used only in preamble}} +\caption@AtBeginDocument*{% + \def\@elt#1#2{\expandafter\let\csname KV@#1@#2\endcsname\@notprerr@key}% + \@preamble@keys + \let\@elt\relax} +\newcommand*\DeclareCaptionOption{% + \caption@teststar\caption@declareoption\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOption +\newcommand*\caption@declareoption[2]{% + #1{\undefine@key{caption}{#2}}\caption@declare@option{#2}} +\@onlypreamble\caption@declareoption +\newcommand*\caption@declare@option{% + \define@key{caption}} +%% no \@onlypreamble\caption@declare@option since it will be used by \captionsetup +\newcommand*\DeclareCaptionOptionNoValue{% + \caption@teststar\caption@declareoption@novalue\AtEndOfPackage\@gobble} +\@onlypreamble\DeclareCaptionOptionNoValue +\newcommand\caption@declareoption@novalue[3]{% + \caption@declareoption{#1}{#2}[\KV@err]{% + \caption@option@novalue{#2}{##1}{#3}}} +\@onlypreamble\caption@declareoption@novalue +\newcommand*\caption@option@novalue[2]{% + \ifx\KV@err#2% + \expandafter\@firstofone + \else + \KV@err{No value allowed for #1}% + \expandafter\@gobble + \fi} +\newif\ifcaptionsetup@star +\newcommand*\captionsetup{% + \caption@teststar@\@captionsetup\@gobble\@firstofone} +\newcommand*\@captionsetup[1]{% + \captionsetup@startrue#1\captionsetup@starfalse + \@ifnextchar[%] + \caption@setup@options\caption@setup} +\newcommand*\caption@setup{\caption@setkeys{caption}} +\def\caption@setup@options[#1]{% + \@ifnextchar[%] + {\caption@stepthecounter + \caption@withoptargs{\@expandtwoargs + \caption@setup@options@i{#1}{@\caption@thecounter}}}% + {\caption@setup@options@{#1}}} +\newcommand*\caption@setup@options@i[4]{% + \caption@declare@option{#2}[]{\captionsetup#3{#4}}% + \caption@setup@options@{#1}{#2}} +\newcommand*\caption@setup@options@[2]{% + \@bsphack + \ifcaptionsetup@star\captionsetup@starfalse\else\caption@addtooptlist{#1}\fi + \caption@checkoptions{#2}% + \expandafter\caption@l@addto@list\csname caption@opt@#1\endcsname{#2}% + \@esphack} +\newcommand*\caption@checkoptions[1]{% + \begingroup + \caption@prepare@optioncheck + \caption@setup{#1}% + \endgroup} +\providecommand*\caption@prepare@optioncheck{} +\let\IfCaptionOptionCheck\@secondoftwo +\g@addto@macro\caption@prepare@optioncheck{% + \let\IfCaptionOptionCheck\@firstoftwo} +\newcommand*\clearcaptionsetup{% + \caption@teststar@\@clearcaptionsetup\@gobble\@firstofone} +\newcommand*\@clearcaptionsetup[1]{% + \let\caption@tempa#1% + \@testopt\@@clearcaptionsetup{}} +\def\@@clearcaptionsetup[#1]#2{% + \@bsphack + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@tempa{\caption@Warning{Option list `#2' undefined}}}% + {\ifx,#1,% + \caption@clearsetup{#2}% + \else + \caption@@removefromsetup{#1}{#2}% + \fi}% + \@esphack} +\newcommand*\caption@clearsetup[1]{% + \caption@removefromoptlist{#1}% + \@nameundef{caption@opt@#1}} +\newcommand*\caption@removefromsetup{% + \let\caption@tempa\@gobble + \caption@@removefromsetup} +\newcommand*\caption@@removefromsetup[2]{% + \expandafter\let\expandafter\@tempa\csname caption@opt@#2\endcsname + \expandafter\let\csname caption@opt@#2\endcsname\@undefined + \def\@tempb##1=##2\@nil{##1}% + \edef\@tempc{#1}% + \@for\@tempa:=\@tempa\do{% + \edef\@tempd{\expandafter\@tempb\@tempa=\@nil}% + \ifx\@tempd\@tempc + \let\caption@tempa\@gobble + \else + \expandafter\expandafter\expandafter\caption@l@addto@list + \expandafter\csname caption@opt@#2\expandafter\endcsname + \expandafter{\@tempa}% + \fi}% + \expandafter\caption@ifempty@list\csname caption@opt@#2\endcsname + {\caption@removefromoptlist{#2}}{}% + \caption@tempa{\caption@Warning{% + Option `#1' was not in list `#2'}}} +\newcommand*\showcaptionsetup[2][\@firstofone]{% + \@bsphack + \GenericWarning{}{% + #1 Caption Info: Option list on `#2'\MessageBreak + #1 Caption Data: \@ifundefined{caption@opt@#2}{% + -none-% + }{% + {\expandafter\expandafter\expandafter\strip@prefix + \expandafter\meaning\csname caption@opt@#2\endcsname}% + }}% + \@esphack} +\DeclareCaptionOption{options}{\caption@setoptions{#1}} +\newcommand*\caption@setoptions[1]{% + \caption@Debug{options=#1}% + \expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname + \ifx\caption@opt\relax \else + \caption@xsetup\caption@opt + \caption@clearsetup{#1}% + \fi} +\newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}} +\newcommand*\caption@addtooptlist[1]{% + \@ifundefined{caption@opt@#1@lineno}% + {\caption@dooptlist\caption@g@addto@list{#1}% + \expandafter\xdef\csname caption@opt@#1@lineno\endcsname{\the\inputlineno}}% + {}} +\newcommand*\caption@removefromoptlist[1]{% + \caption@dooptlist\caption@g@removefrom@list{#1}% + \global\expandafter\let\csname caption@opt@#1@lineno\endcsname\@undefined} +\newcommand*\caption@dooptlist[2]{% + \begingroup + \edef\@tempa{#2}\@onelevel@sanitize\@tempa + \expandafter#1\expandafter\caption@optlist\expandafter{\@tempa}% + \endgroup} +\AtEndDocument{% + \caption@for@list\caption@optlist + {\caption@WarningNoLine{% + Unused \string\captionsetup[#1] + on input line \csname caption@opt@#1@lineno\endcsname}}} +\newcommand*\caption@setkeys{\@dblarg\caption@@setkeys} +\long\def\caption@@setkeys[#1]#2#3{% + \@bsphack + \expandafter\let\csname ORI@KV@err\caption@keydepth\endcsname\KV@err + \expandafter\let\csname ORI@KV@errx\caption@keydepth\endcsname\KV@errx + \expandafter\let\csname ORI@XKV@err\caption@keydepth\endcsname\XKV@err + \edef\caption@keydepth{\caption@keydepth i}% + \expandafter\let\expandafter\KV@err\csname #1@KV@err\endcsname + \ifx\KV@err\relax + \def\KV@err##1{\PackageError{#1}{##1}{% + See the #1 package documentation for explanation.}}% + \fi + \def\KV@errx{\KV@err}% + \def\XKV@err{\let\@tempa\XKV@tkey\KV@err}% + \caption@Debug{\noexpand\setkeys{#2}{#3}}% + \setkeys{#2}{#3}% + \edef\caption@keydepth{\expandafter\@gobble\caption@keydepth}% + \expandafter\let\expandafter\KV@err\csname ORI@KV@err\caption@keydepth\endcsname + \expandafter\let\expandafter\KV@errx\csname ORI@KV@errx\caption@keydepth\endcsname + \expandafter\let\expandafter\XKV@err\csname ORI@XKV@err\caption@keydepth\endcsname + \ifx\caption@keydepth\@empty \captionsetup@starfalse \fi + \@esphack} +\let\caption@keydepth\@empty +\newcommand*\caption@ExecuteOptions[2]{% + \expandafter\@expandtwoargs\csname caption@setkeys@#1\endcsname{#1}{#2}}% +\@onlypreamble\caption@ExecuteOptions +\newcommand*\caption@ProcessOptions{% + \caption@teststar\caption@@ProcessOptions\@gobble\@firstofone} +\@onlypreamble\caption@ProcessOptions +\newcommand\caption@@ProcessOptions[2]{% + \let\@tempc\relax + \let\caption@tempa\@empty + #1{% \@firstofone -or- \@gobble + \@for\CurrentOption:=\@classoptionslist\do{% + \@ifundefined{KV@#2@\CurrentOption}{}{% + \@ifundefined{KV@#2@\CurrentOption @default}{% + \PackageInfo{#2}{Global option `\CurrentOption' ignored}% + }{% + \PackageInfo{#2}{Global option `\CurrentOption' processed}% + \edef\caption@tempa{\caption@tempa\CurrentOption,}% + \@expandtwoargs\@removeelement\CurrentOption + \@unusedoptionlist\@unusedoptionlist + }% + }% + }% + \let\CurrentOption\@empty + }% + \caption@ExecuteOptions{#2}{\caption@tempa\@ptionlist{\@currname.\@currext}}% + \AtEndOfPackage{\let\@unprocessedoptions\relax}} +\@onlypreamble\caption@@ProcessOptions +\newcommand\caption@SetupOptions[2]{% + \@namedef{caption@setkeys@#1}##1##2{#2}% + \expandafter\@onlypreamble\csname caption@setkeys@#1\endcsname + \@cons\caption@SetupOptions@list{{#1}}} +\@onlypreamble\caption@SetupOptions +\newcommand*\caption@SetupOptions@list{} +\@onlypreamble\caption@SetupOptions@list +\let\caption@onefilewithoptions\@onefilewithoptions +\def\@onefilewithoptions#1[#2]{% + \begingroup + \def\@tempa{% + \endgroup + \caption@onefilewithoptions{#1}[{#2}]}% + \def\@tempb{#1}% + \def\@elt##1{% + \def\@tempc{##1}% + \ifx\@tempb\@tempc + \def\@tempa{% + \endgroup + \caption@ExecuteOptions{#1}{#2}% + \caption@onefilewithoptions{#1}[]}% + \fi} + \caption@SetupOptions@list + \@tempa} +\@onlypreamble\caption@onefilewithoptions +\newcommand*\caption@decl[3][\def]{% + \global\long\expandafter#1\csname caption@#2@#3\endcsname} +\@onlypreamble\caption@decl +\newcommand*\caption@ifdecl[2]{% + \@ifundefined{caption@#1@#2}\@secondoftwo\@firstoftwo} +\newcommand*\caption@checkdecl[2]{% + \caption@ifdecl{#1}{#2}% + \@firstofone + {\caption@Error{Undefined #1 `#2'}% + \@gobble}} +\newcommand*\caption@set{% + \caption@maparg\caption@@set}% +\newcommand*\caption@@set[3]{% + \caption@checkdecl{#1}{#3}{% + \expandafter\def\csname caption@#2\expandafter\endcsname\expandafter{\csname caption@#1@#3\endcsname}}} +\newcommand*\SetCaptionDefault{% + \caption@teststar\caption@setdefault\def\edef} +\@onlypreamble\SetCaptionDefault +\newcommand*\caption@setdefault[2]{% + \@ifundefined{caption@setdefault@#2}% + {\caption@maparg\caption@@setdefault}% + {\@nameuse{caption@setdefault@#2}{#1}}% + {#2}} +\newcommand*\caption@@setdefault[3]{% + \caption@ifdefault{#3}% + {\caption@Error{Invalid argument for \string\SetCaptionDefault: `#3'}}% would cause an infinite loop otherwise + {\caption@@set{#1}{#2@default}{#3}}} +\newcommand*\caption@ifdefault{\caption@ifequal{default}} +\newcommand*\caption@ifequal[2]{% + \edef\caption@tempa{#1}% + \edef\caption@tempb{#2}% + \ifx\caption@tempa\caption@tempb + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\newcommand*\caption@setmapping[2]{% + \@namedef{caption@map@#1}{#2}} +\@onlypreamble\caption@setmapping +\newcommand*\caption@maparg[2]{% + \@ifundefined{caption@map@#2}% + {#1{#2}}% + {#1{\csname caption@map@#2\endcsname}}% + {#2}} +\def\caption@switchdefault#1#2{% + \def\caption@tempa##1{#2}% + \expandafter\caption@tempa\csname caption@#1@default\endcsname + \caption@setdefault\def{#1}} +\def\caption@restoredefault#1#2{% + \caption@checkdecl{#1}{default}{% + \caption@ifdefined#2{% + \expandafter\let\csname caption@#1@default\endcsname#2% + \let#2\@undefined}{}}} +\newcommand*\SetCaptionFallback{% + \caption@maparg\caption@@setfallback} +\@onlypreamble\SetCaptionFallback +\newcommand*\caption@@setfallback[3]{% + \caption@ifequal{fallback}{#3}% + {\caption@Error{Invalid argument for \string\SetCaptionFallback: `#3'}}% would cause an infinite loop otherwise + {\caption@@set{#1}{#2@fallback}{#3}}} +\@onlypreamble\caption@@setfallback +\newcommand*\caption@decl@package[2]{% + \@ifnextchar[%] + {\caption@declare@package{#1}{#2}}% + {\caption@declarepackage{#1}{#2}}} +\@onlypreamble\caption@decl@package +\def\caption@declare@package#1#2[#3]#4{% + \global\@namedef{caption@#1@#4@package}{#3}% + #2{#4}} +\@onlypreamble\caption@declare@package +\newcommand*\caption@declarepackage[3]{% + \global\@nameundef{caption@#1@#3@package}% + #2{#3}} +\@onlypreamble\caption@declarepackage +\newcommand*\caption@load@package[2]{% + \expandafter\let\expandafter\caption@tempa\csname caption@#1@#2@package\endcsname + \caption@ifdefined\caption@tempa + {\caption@requirepackage\caption@tempa{#1=#2}}% + {}} +\newcommand*\DeclareCaptionLength[1]{% + \expandafter\newdimen\csname caption#1\endcsname + \@namedef{caption@setdefault@#1}##1{% + \caption@setdefault@length{##1}}% + \SetCaptionDefault*{#1}} +\@onlypreamble\DeclareCaptionLength +\newcommand*\caption@setdefault@length[3]{% + \expandafter#1\csname caption#2@default\endcsname{#3}} +\newcommand*\caption@setlength[2]{% + \caption@ifdefault{#2}% + {\expandafter\let\expandafter\caption@tempa\csname caption#1@default\endcsname}% + {\def\caption@tempa{#2}}% + \expandafter\setlength\csname caption#1\endcsname\caption@tempa} +\DeclareCaptionLength{margin}{0pt} +\DeclareCaptionLength{margin@}{\the\captionmargin} +\DeclareCaptionLength{width}{0pt} +\newdimen\caption@tempdima +\DeclareCaptionOption{margin}{\setcaptionmargin{#1}} +\DeclareCaptionOption{margin*}{\setcaptionmargin*{#1}} +\DeclareCaptionOption{width}{\setcaptionwidth{#1}} +\DeclareCaptionOption{width*}{\setcaptionwidth*{#1}} +\DeclareCaptionOption{calcmargin}{\caption@setcalcmargin{#1}} +\DeclareCaptionOption{calcmargin*}{\caption@setcalcmargin*{#1}} +\DeclareCaptionOption{calcwidth}{\caption@setcalcwidth{#1}} +\DeclareCaptionOption{calcwidth*}{\caption@setcalcwidth*{#1}} +\DeclareCaptionOption{twoside}[1]{\caption@set@bool\caption@iftwoside{#1}} +\DeclareCaptionOptionNoValue{oneside}{\caption@set@bool\caption@iftwoside0} +\caption@set@bool\caption@iftwoside{\if@twoside 1\else 0\fi} +\DeclareCaptionOption{minmargin}{\caption@setoptcmd\caption@minmargin{#1}} +\DeclareCaptionOption{maxmargin}{\caption@setoptcmd\caption@maxmargin{#1}} +\newcommand*\setcaptionmargin{% + \caption@resetcalcmargin + \caption@setmargin} +\newcommand*\caption@setmargin{% + \caption@teststar\caption@@setmargin\@gobble\@firstofone} +\newcommand*\caption@@setmargin[2]{% + #1{\captionwidth\z@}% + \caption@@@setmargin#2,#2,\@nil} +\def\caption@@@setmargin#1,#2,#3\@nil{% + \caption@setlength{margin}{#1}% + \caption@setlength{margin@}{#2}% + \addtolength\captionmargin@{-\captionmargin}} +\newcommand*\setcaptionwidth{% + \caption@resetcalcmargin + \caption@setwidth} +\newcommand*\caption@setwidth{% + \caption@teststar\caption@@setwidth\@gobble\@firstofone} +\newcommand*\caption@@setwidth[2]{% + #1{\captionmargin\z@\captionmargin@\z@}% + \caption@setlength{width}{#2}}% +\newcommand*\caption@setcalcmargin{% + \caption@teststar{\caption@@setcalcmargin\caption@setmargin}% + \@secondoftwo\@firstoftwo} +\newcommand*\caption@@setcalcmargin[3]{% + #2{\caption@resetcalcmargin + \l@addto@macro\caption@calcmargin@hook{#1{#3}}}% + {\l@addto@macro\caption@calcmargin@hook{#1*{#3}}}} +\newcommand*\caption@resetcalcmargin{% + \let\caption@calcmargin@hook\@empty} +\newcommand*\caption@setcalcwidth{% + \caption@teststar{\caption@@setcalcmargin\caption@setwidth}% + \@secondoftwo\@firstoftwo} +\newcommand*\caption@thecounter{0} +\newcommand*\caption@stepthecounter{% + \@tempcnta\caption@thecounter + \advance\@tempcnta\@ne\relax + \xdef\caption@thecounter{\the\@tempcnta}} +\newcommand*\caption@newlabel{\@newl@bel{caption@r}} +\newcommand*\caption@thepage{\the\c@page} +\newcommand*\caption@label[1]{% + \caption@@label + \protected@write\@auxout{\let\caption@thepage\relax}% + {\string\caption@newlabel{#1}{\caption@thepage}}} +\newcommand*\caption@@label{% + \global\let\caption@@label\relax + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@newlabel[2]{}}} +\newcommand*\caption@pageref[1]{% + \expandafter\ifx\csname caption@r@#1\endcsname\relax + \G@refundefinedtrue % => 'There are undefined references.' + \@latex@warning{Reference `#1' on page \thepage \space undefined}% + \else + \expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname + \fi} +\newcommand*\caption@ifoddpage{% + \caption@iftwoside{% + \caption@label\caption@thecounter + \caption@pageref\caption@thecounter + \ifodd\caption@thepage + \let\caption@ifoddpage\@firstoftwo + \else + \let\caption@ifoddpage\@secondoftwo + \fi + }{\let\caption@ifoddpage\@firstoftwo}% + \caption@ifoddpage} +\newcommand*\caption@setoptcmd[2]{% + \caption@ifinlist{#2}{0,false,no,off}{\let#1\@undefined}{\def#1{#2}}} +\DeclareCaptionLength{@indent}{0pt} +\DeclareCaptionLength{@parindent}{0pt} +\DeclareCaptionLength{@hangindent}{0pt} +\DeclareCaptionOption{indent}[\leftmargini]{% obsolete + \caption@setlength{@indent}{#1}} +\DeclareCaptionOption{indention}[\leftmargini]{% + \caption@setlength{@indent}{#1}} +\DeclareCaptionOption{parindent}{% + \caption@setlength{@parindent}{#1}} +\DeclareCaptionOption{hangindent}{% + \caption@setlength{@hangindent}{#1}} +\DeclareCaptionOption{parskip}{% + \l@addto@macro\caption@@par{\setlength\parskip{#1}}} +\newcommand*\DeclareCaptionStyle[1]{% + \@testopt{\caption@declarestyle{#1}}{}} +\@onlypreamble\DeclareCaptionStyle +\def\caption@declarestyle#1[#2]#3{% + \caption@decl{style}{#1}% + {\def\caption@slsty{#2}% + \def\caption@sty{#3}}% + \@namedef{caption@sty@#1}{\@unused}} +\@onlypreamble\caption@declarestyle +\DeclareCaptionOption{style}{\caption@setstyle{#1}} +\DeclareCaptionOption{style*}{\caption@setstyle*{#1}} +\newcommand*\caption@setstyle{% + \caption@teststar\caption@@setstyle\caption@ifdecl\caption@checkdecl} +\newcommand*\caption@@setstyle[2]{% + #1{style}{#2}% + {\caption@set{style}{#2}% + \caption@style % defines \caption@sty & \caption@slsty + \ifx\caption@setstyle@flag\@undefined + \let\caption@setstyle@flag\relax % prevent \caption@resetstyle if called recursively + \caption@resetstyle + \caption@xsetup\caption@sty + \let\caption@setstyle@flag\@undefined + \else + \caption@xsetup\caption@sty + \fi}% + {}} +\newcommand*\caption@resetstyle{% + \caption@setup{% + box=none,boxcolor=white,parbox=parbox,% + format=plain,labelformat=default,labelsep=colon,textformat=simple,% + font=,labelfont=,textfont=,size=,% + justification=justified,slc,rule,strut,% + margin=0pt,minmargin=0,maxmargin=0,% + indent=0pt,parindent=0pt,hangindent=0pt}} +\DeclareCaptionStyle{base}[indent=0pt,justification=centering]{} +\DeclareCaptionStyle{default}[indent=0pt,justification=centering]{% + box=default,% + format=default,labelformat=default,labelsep=default,textformat=default,% + font=default,labelfont=default,textfont=default,size=default,% + justification=default,slc=default,margin=default,% + indent=default,parindent=default,hangindent=default} +\newcommand*\DeclareCaptionSinglelinecheck[2]{% + \caption@decl{singlelinecheck}{#1}{#2}} +\@onlypreamble\DeclareCaptionSinglelinecheck +\DeclareCaptionOption{singlelinecheck}[1]{\caption@setsinglelinecheck{#1}} +\DeclareCaptionOption{slc}[1]{\KV@caption@singlelinecheck{#1}} +\DeclareCaptionSinglelinecheck{on}{\@firstoftwo} +\DeclareCaptionSinglelinecheck{off}{\@secondoftwo} +\SetCaptionDefault{singlelinecheck}{on} +\newcommand*\caption@setsinglelinecheck[1]{% + \caption@ifdecl{singlelinecheck}{#1}% + {\caption@set{singlelinecheck}{#1}}% + {\caption@set@bool\caption@singlelinecheck{#1}}} +\newcommand\DeclareCaptionBox[2]{% + \caption@decl{box}{#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionBox +\DeclareCaptionOption{box}{\caption@set{box}{#1}} +\DeclareCaptionOption{parbox}{\caption@set{parbox}{#1}} +\caption@setmapping{parbox}{box} +\DeclareCaptionBox{empty}{} +\DeclareCaptionBox{none}{#2} +\DeclareCaptionBox{parbox}{\parbox[b]{#1}{#2}} +\DeclareCaptionBox{colorbox}{% + \colorbox{\caption@boxcolor}{% + \setlength\caption@tempdima{#1}% + \addtolength\caption@tempdima{-2\fboxsep}% + \linewidth\caption@tempdima\relax + \hsize\caption@tempdima\relax + #2}} +\DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}} +\DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}} +\SetCaptionDefault{box}{none} +\newcommand*\DeclareCaptionFormat{% + \caption@teststar\caption@declareformat\@gobble\@firstofone} +\@onlypreamble\DeclareCaptionFormat +\newcommand*\caption@declareformat[2]{% + \@dblarg{\caption@@declareformat#1{#2}}} +\@onlypreamble\caption@declareformat +\long\def\caption@@declareformat#1#2[#3]#4{% + \caption@decl[\edef]{format}{#2}{% + \unexpanded{\let\caption@ifhmode#1}% + \unexpanded{\long\def\caption@slfmt}####1####2####3\unexpanded{{#3}}% + \unexpanded{\long\def\caption@fmt}####1####2####3\unexpanded{{#4}}}} +\@onlypreamble\caption@@declareformat +\newcommand*\caption@useformat[1]{% used by caption-koma.sto + \caption@checkdecl{format}{#1}{% + \begingroup + \@nameuse{caption@format@#1}\global\let\caption@tempa\caption@fmt + \endgroup\caption@tempa}} +\DeclareCaptionOption{format}{\caption@set{format}{#1}} +\DeclareCaptionFormat{plain}{#1#2#3\par} +\DeclareCaptionFormat{hang}[#1#2#3\par]{% + \caption@iflabelseparatorwithnewline + {\caption@Error{% + The option `labelsep=\caption@labelsep@name' does not work\MessageBreak + with `format=hang'}}% + {\@hangfrom{#1#2}% + \advance\caption@parindent\hangindent\relax + \advance\caption@hangindent\hangindent\relax + \caption@@par#3\par}} +\SetCaptionDefault{format}{plain} +\newcommand*\DeclareCaptionLabelFormat[2]{% + \caption@decl{labelformat}{#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionLabelFormat +\DeclareCaptionOption{labelformat}{\caption@set{labelformat}{#1}} +\DeclareCaptionLabelFormat{empty}{} +\DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} +\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} +\DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} +\DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}#2\autodot} +\DeclareCaptionLabelFormat{unnumbered}{#1} +\DeclareCaptionLabelFormat{original}{% + \caption@ifdefined\caption@original@fnum + {\caption@original@fnum}% + {\caption@labelformat@fallback{#1}{#2}}} +\SetCaptionDefault{labelformat}{original} +\SetCaptionFallback{labelformat}{simple} +\newcommand\DeclareCaptionLabelSeparator{% + \@ifstar + \DeclareCaptionLabelSeparator@ + {\caption@declarelabelseparator\@firstofone}} +\@onlypreamble\DeclareCaptionLabelSeparator +\newcommand\DeclareCaptionLabelSeparator@{% + \@ifstar + \DeclareCaptionLabelSeparator@@ + {\caption@declarelabelseparator\@gobble}} +\@onlypreamble\DeclareCaptionLabelSeparator@ +\newcommand*\DeclareCaptionLabelSeparator@@[2]{% + \caption@declarelabelseparator + {#2\@gobble\@firstofone}% + {#1}} +\@onlypreamble\DeclareCaptionLabelSeparator@@ +\newcommand\caption@declarelabelseparator[3]{% + \caption@decl{labelseparator}{#2}% + {\def\caption@iflabelfont{#1}% + \def\caption@labelsep@name{#2}% + \def\caption@labelsep{#3}}% + \@namedef{caption@lsep@#2}{#3}} +\newcommand*\caption@lsep@default{\caption@labelseparator@default\caption@labelsep}% +\@onlypreamble\caption@declarelabelseparator +\newcommand*\caption@LabelSeparatorWithNewline[1]{% + \caption@g@addto@list\caption@labelsep@crlist{#1}} +\@onlypreamble\caption@LabelSeparatorWithNewline +\newcommand*\caption@iflabelseparatorwithnewline{% + \caption@ifin@list\caption@labelsep@crlist\caption@labelsep@name} +\DeclareCaptionOption{labelsep}{\caption@set{labelseparator}{#1}} +\DeclareCaptionOption{labelseparator}{\caption@set{labelseparator}{#1}} +\DeclareCaptionLabelSeparator{none}{} +\DeclareCaptionLabelSeparator{colon}{: } +\DeclareCaptionLabelSeparator{period}{. } +\DeclareCaptionLabelSeparator{space}{ } +\DeclareCaptionLabelSeparator*{quad}{\quad} +\DeclareCaptionLabelSeparator*{newline}{\captionnewline} +\caption@LabelSeparatorWithNewline{newline} % does not work with "format=hang" +\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space} +\DeclareCaptionLabelSeparator{gobble}{ } +\DeclareCaptionLabelSeparator{gobbletwo}{} +\newcommand*\captionnewline{\\\relax} +\SetCaptionDefault{labelseparator}{colon} +\newcommand\DeclareCaptionTextFormat[2]{% + \caption@decl{textformat}{#1}##1{#2}} +\@onlypreamble\DeclareCaptionTextFormat +\DeclareCaptionOption{textformat}{\caption@set{textformat}{#1}} +\DeclareCaptionTextFormat{empty}{% + \caption@get@label#1\caption@makeanchor{}\@nil + \caption@thelabel + \global\let\caption@thelabel\relax} +\long\def\caption@get@label#1\caption@makeanchor#2#3\@nil{% + \def\caption@tempa{#2}% + \ifx\caption@tempa\@empty + \caption@getlabel{#1}% + \else + \caption@getlabel{#2}% + \fi} +\DeclareCaptionTextFormat{simple}{#1} +\DeclareCaptionTextFormat{period}{#1.} +\SetCaptionDefault{textformat}{simple} +\newcommand\caption@getlabel[1]{% + \caption@@getlabel#1\label{}\@nil} +\long\def\caption@@getlabel#1\label#2#3\@nil{% + \def\@tempa{#2}% + \ifx\@tempa\@empty + \let\caption@thelabel\relax + \else + \def\@tempb{*}% + \ifx\@tempa\@tempb + \def\caption@thelabel{\label*}% + \caption@@@getlabel#3\@nil + \else + \def\caption@thelabel{\label}% + \caption@@@getlabel{#2}#3\@nil + \fi + \fi} +\long\def\caption@@@getlabel#1#2\@nil{% + \def\@tempa{#1}% + \def\@tempb{[}% + \ifx\@tempa\@tempb + \caption@@@@getlabel#1#2\@nil + \else + \l@addto@macro\caption@thelabel{{#1}}% + \fi} +\long\def\caption@@@@getlabel[#1]#2\@nil{% + \l@addto@macro\caption@thelabel{[{#1}]}% + \caption@@@getlabel#2\@nil} +\let\caption@thelabel\relax +\DeclareCaptionOption{strut}[1]{\caption@set@bool\caption@ifstrut{#1}} +\newcommand*\DeclareCaptionFont{% + \caption@decl@package{font}{\caption@declarefont}} +\@onlypreamble\DeclareCaptionFont +\newcommand*\caption@declarefont[2]{% + \caption@decl{font}{#1}##1{#2}% + \define@key{caption@font}{#1}[]{\caption@addto@font{#1}{##1}}} +\@onlypreamble\caption@@declarefont +\newcommand*\caption@addto@font[1]{% + \caption@load@package{font}{#1}% + \caption@add@to@font{font}{#1}} +\newcommand*\caption@add@to@font[3]{% + \expandafter\g@addto@macro\expandafter\caption@fnt\expandafter{\csname caption@#1@#2\endcsname{#3}}} +\DeclareCaptionOption{font}{\caption@setfont{font}{#1}} +\DeclareCaptionOption{font+}{\caption@addtofont{font}{#1}} +\DeclareCaptionOption{labelfont}{\caption@setfont{labelfont}{#1}} +\DeclareCaptionOption{labelfont+}{\caption@addtofont{labelfont}{#1}} +\caption@setmapping{labelfont}{font} +\DeclareCaptionOption{textfont}{\caption@setfont{textfont}{#1}} +\DeclareCaptionOption{textfont+}{\caption@addtofont{textfont}{#1}} +\caption@setmapping{textfont}{font} +\newcommand*\caption@setfont[1]{% + \expandafter\let\csname caption#1\endcsname\@empty + \caption@addtofont{#1}} +\newcommand*\caption@addtofont[2]{% + \expandafter\let\expandafter\caption@fnt\csname caption#1\endcsname + \begingroup + \define@key{caption@font}{default}[]{\caption@add@to@font{#1}{default}{##1}}% + \caption@setkeys[caption]{caption@font}{#2}% + \endgroup + \expandafter\let\csname caption#1\endcsname\caption@fnt} +\DeclareCaptionFont{normalcolor}{\normalcolor} +\DeclareCaptionFont{color}{\color{#1}} +\DeclareCaptionFont{normalfont}{\normalfont} +\DeclareCaptionFont{up}{\upshape} +\DeclareCaptionFont{it}{\itshape} +\DeclareCaptionFont{sl}{\slshape} +\DeclareCaptionFont{sc}{\scshape} +\DeclareCaptionFont{md}{\mdseries} +\DeclareCaptionFont{bf}{\bfseries} +\DeclareCaptionFont{rm}{\rmfamily} +\DeclareCaptionFont{sf}{\sffamily} +\DeclareCaptionFont{tt}{\ttfamily} +\DeclareCaptionFont{tiny}{\tiny} +\DeclareCaptionFont{scriptsize}{\scriptsize} +\DeclareCaptionFont{footnotesize}{\footnotesize} +\DeclareCaptionFont{small}{\small} +\DeclareCaptionFont{normalsize}{\normalsize} +\DeclareCaptionFont{large}{\large} +\DeclareCaptionFont{Large}{\Large} +\DeclareCaptionFont{LARGE}{\LARGE} +\DeclareCaptionFont{huge}{\huge} +\DeclareCaptionFont{Huge}{\Huge} +\DeclareCaptionFont{smaller}{\caption@smaller} +\DeclareCaptionFont{larger}{\caption@larger} +\DeclareCaptionFont{none}{} +\DeclareCaptionFont{normal}{% + \caption@font@normalcolor\@unused + \caption@font@normalfont\@unused + \caption@font@normalsize\@unused + \caption@font@singlespacing\@unused} +\SetCaptionDefault{font}{none} +\SetCaptionDefault{labelfont}{none} +\SetCaptionDefault{textfont}{none} +\caption@setmapping{footfont}{font} +\SetCaptionDefault{footfont}{none} +\caption@setmapping{@tempa}{font} +\SetCaptionDefault{@tempa}{none} +\newcommand\caption@smaller{% + \ifx\@currsize\tiny + \relax + \else\ifx\@currsize\scriptsize + \tiny + \else\ifx\@currsize\footnotesize + \scriptsize + \else\ifx\@currsize\small + \footnotesize + \else\ifx\@currsize\normalsize + \small + \else\ifx\@currsize\large + \normalsize + \else\ifx\@currsize\Large + \large + \else\ifx\@currsize\LARGE + \Large + \else\ifx\@currsize\huge + \LARGE + \else\ifx\@currsize\Huge + \huge + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\newcommand\caption@larger{% + \ifx\@currsize\tiny + \scriptsize + \else\ifx\@currsize\scriptsize + \footnotesize + \else\ifx\@currsize\footnotesize + \small + \else\ifx\@currsize\small + \normalsize + \else\ifx\@currsize\normalsize + \large + \else\ifx\@currsize\large + \Large + \else\ifx\@currsize\Large + \LARGE + \else\ifx\@currsize\LARGE + \huge + \else\ifx\@currsize\huge + \Huge + \else\ifx\@currsize\Huge + \relax + \else + \caption@Warning{% + Cannot determine current font size.\MessageBreak + Try setting it with `size=' explicitly}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\newcommand*\caption@hypersetup{\caption@ifdefined\hypersetup\hypersetup\@gobble} +\DeclareCaptionFont{hypersetup}{\caption@hypersetup{#1}} % for usage in \captionsetup{font={hypersetup=...}} +\DeclareCaptionOption{hypersetup}{\caption@hypersetup{#1}} % for usage in \captionsetup[]{hypersetup=...} +\DeclareCaptionOption{size}{\caption@setfont{size}{#1}} +\caption@setmapping{size}{font} +\SetCaptionDefault{size}{none} +\newcommand*\DeclareCaptionJustification{% + \caption@withoptargs\caption@declare@justification} +\newcommand*\caption@declare@justification[3]{% + \caption@decl@package{justification}{\caption@decl{justification}}#1{#2}{#3}% + \expandafter\let\csname caption@hj@#2\expandafter\endcsname\csname caption@justification@#2\endcsname} +\@onlypreamble\DeclareCaptionJustification +\DeclareCaptionOption{justification}{% + \caption@load@package{justification}{#1}% + \caption@set{justification}{#1}} +\DeclareCaptionJustification{justified}{} +\DeclareCaptionJustification{centering}{\centering} +\DeclareCaptionJustification{centerfirst}{\centerfirst} +\DeclareCaptionJustification{centerlast}{\centerlast} +\DeclareCaptionJustification{raggedleft}{\raggedleft} +\DeclareCaptionJustification{raggedright}{\raggedright} +\SetCaptionDefault{justification}{justified} +\providecommand\centerfirst{% + \let\\\@centercr + \edef\caption@normaladjust{% + \leftskip\the\leftskip + \rightskip\the\rightskip + \parfillskip\the\parfillskip\relax}% + \leftskip\z@\@plus -1fil% + \rightskip\z@\@plus 1fil% + \parfillskip\z@skip + \noindent\hskip\z@\@plus 2fil% + \@setpar{\@@par\@restorepar\caption@normaladjust}} +\providecommand\centerlast{% + \let\\\@centercr + \leftskip\z@\@plus 1fil% + \rightskip\z@\@plus -1fil% + \parfillskip\z@\@plus 2fil\relax} +\caption@ifundefined\abovecaptionskip{% + \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} +\caption@ifundefined\belowcaptionskip{% + \newlength\belowcaptionskip\setlength\belowcaptionskip{0\p@}}{} +\DeclareCaptionOption{aboveskip}{\setlength\abovecaptionskip{#1}} +\DeclareCaptionOption{belowskip}{\setlength\belowcaptionskip{#1}} +\DeclareCaptionOption{skip}{\setlength\abovecaptionskip{#1}} +\newcommand*\caption@rule{\caption@ifrule\caption@hrule\relax} +\newcommand*\caption@hrule{\hrule\@height\z@} +\DeclareCaptionOption{rule}[1]{\caption@set@bool\caption@ifrule{#1}} +\newcommand*\caption@declare@position[2]{% + \caption@decl{position}{#1}{#2}} +\@onlypreamble\caption@declare@position +\DeclareCaptionOption{position}{\caption@setposition{#1}} +\DeclareCaptionOption{figureposition}{\captionsetup*[figure]{position=#1}} +\@onlypreamble@key{caption}{figureposition} +\DeclareCaptionOption{tableposition}{\captionsetup*[table]{position=#1}} +\@onlypreamble@key{caption}{tableposition} +\newcommand*\caption@setposition{\caption@set{position}} +\caption@declare@position{t}{\@firstoftwo} +\caption@declare@position{top}{\@firstoftwo} +\caption@declare@position{above}{\@firstoftwo} +\caption@declare@position{b}{\@secondoftwo} +\caption@declare@position{bottom}{\@secondoftwo} +\caption@declare@position{below}{\@secondoftwo} +\caption@declare@position{a}{\caption@autoposition}% needed by floatrow package, \flrow@cappos +\caption@declare@position{auto}{\caption@autoposition} +\SetCaptionDefault{position}{auto} +\let\caption@autoposition\@secondoftwo +\newcommand*\caption@iftop{\caption@position} +\newcommand*\caption@fixposition{% + \ifvmode + \edef\caption@tempa{\the\prevdepth}% + \caption@Debug{\protect\prevdepth=\caption@tempa}% + \ifdim\prevdepth>-\p@ + \let\caption@autoposition\@secondoftwo % position=below + \else + \let\caption@autoposition\@firstoftwo % position=above + \fi + \else + \caption@Debug{no \protect\prevdepth}% + \let\caption@autoposition\@secondoftwo % position=below + \fi} +\newcommand*\caption@setautoposition[1]{% + \def\caption@fixposition{\caption@@set{position}{autoposition}{#1}}} +\newcommand*\caption@beginhook{} +\newcommand*\caption@endhook{} +\newcommand*\AtBeginCaption{\l@addto@macro\caption@beginhook} +\newcommand*\AtEndCaption{\l@addto@macro\caption@endhook} +\DeclareCaptionOption{list}[1]{\caption@setlist{#1}} +\DeclareCaptionOption{listof}[1]{\caption@setlist{#1}} +\newcommand*\caption@setlist{\caption@set@bool\caption@iflist} +\caption@setlist{on} +\DeclareCaptionOption{listtype}{\caption@setlisttype{#1}} +\DeclareCaptionOption{listtype+}{\caption@setlisttype@ext{#1}} +\newcommand*\caption@setlisttype{% + \caption@setlisttype@ext{}% + \caption@@setlisttype\caption@listtype} +\newcommand*\caption@@setlisttype[2]{% + \edef#1{#2}% + \ifx#1\@empty \let#1\@undefined \fi} +\newcommand*\caption@setlisttype@ext{% + \caption@@setlisttype\caption@listtype@ext} +\newcommand*\DeclareCaptionListFormat[2]{% + \caption@decl{listformat}{#1}##1##2{#2}} +\@onlypreamble\DeclareCaptionListFormat +\DeclareCaptionOption{listformat}{\caption@set{listformat}{#1}} +\DeclareCaptionListFormat{empty}{} +\DeclareCaptionListFormat{simple}{#1#2} +\DeclareCaptionListFormat{subsimple}{#2} +\DeclareCaptionListFormat{parens}{#1(#2)} +\DeclareCaptionListFormat{subparens}{(#2)} +\DeclareCaptionListFormat{period}{#1#2.} +\DeclareCaptionListFormat{subperiod}{#2.} +\SetCaptionDefault{listformat}{subsimple} +\newcommand*\caption@lstfmt{\caption@listformat} +\DeclareCaptionOption{debug}[1]{% + \caption@set@bool\caption@ifdebug{#1}% + \caption@ifdebug + {\let\caption@Debug\caption@Info}% + {\let\caption@Debug\@gobble}} +\DeclareOption{debug}{\setkeys{caption}{debug}} +\setkeys{caption}{debug=0} +\newcommand\@makecaption@standard[2]{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \vskip\belowcaptionskip} +\@onlypreamble\@makecaption@standard +\newcommand\@makecaption@arabic[2]{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \sbox\@Arabitempboxa{\textRL{#2} : #1}% + \if@rl{ + \ifdim \wd\@Arabitempboxa >\hsize + \textRL{#2} : #1\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@Arabitempboxa\hfil}% + \fi}\else{ + \ifdim \wd\@tempboxa >\hsize + #1: #2\par + \else + \global \@minipagefalse + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% + \fi}\fi + \vskip\belowcaptionskip} +\@onlypreamble\@makecaption@arabic +\newcommand\@makecaption@latvian[2]{% + \vskip10\p@ + \sbox\@tempboxa{#1\if\empty#2\else: #2\fi}% + \ifdim\wd\@tempboxa>\hsize + #1: #2\par + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi} +\@onlypreamble\@makecaption@latvian +\caption@setbool{documentclass}{1} +\caption@ifundefined\caption@documentclass{% + \@ifclassloaded{beamer}{% + \caption@InfoNoLine{beamer document class detected}% + \def\caption@documentclass{beamer}% + }{\@ifclassloaded{elsarticle}{% + \caption@InfoNoLine{elsarticle document class detected}% + \def\caption@documentclass{elsarticle}% + }{\@ifclassloaded{memoir}{% + \caption@InfoNoLine{memoir document class detected}% + \def\caption@documentclass{memoir}% + }{\caption@ifdefined\scr@caption{% + \caption@InfoNoLine{KOMA-Script document class detected}% + \def\caption@documentclass{koma}% + }{\caption@ifdefined\@captionheadfont{% + \caption@InfoNoLine{AMS or SMF document class detected}% + \def\caption@documentclass{ams-smf}% + }{\caption@ifdefined\CaptionFonts{% + \caption@InfoNoLine{NTG document class detected}% + \def\caption@documentclass{ntg}% + }{\caption@ifdefined\cph@font{% + \caption@ifdefined\cpb@font\@firstoftwo\@secondoftwo + }{% + \@secondoftwo + }{% + \caption@InfoNoLine{thesis document class detected}% + \def\caption@documentclass{thesis}% + }{% + \ifx\@makecaption\@undefined + \caption@InfoNoLine{Document class w/o caption stuff detected}% + \else + \ifx\@makecaption\@makecaption@standard + \caption@InfoNoLine{Standard document class detected}% + \else + \ifx\@makecaption\@makecaption@arabic + \caption@InfoNoLine{arabic babel option detected}% + \else + \ifx\@makecaption\@makecaption@latvian + \caption@InfoNoLine{latvian babel option detected}% + \else + \caption@InfoNoLine{% + Unknown document class (or package),\MessageBreak + standard defaults will be used}% + \caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption\@gobble}% + \caption@setbool{documentclass}{0}% unknown document class + \fi + \fi + \fi + \fi + \let\caption@documentclass\@empty % don't load adaption code later on + }}}}}}}% +}{} +\newcommand*\AtCaptionPackage{% + \g@addto@macro\caption@documentclass@code} +\@onlypreamble\AtCaptionPackage +\providecommand*\caption@documentclass@code{} +\@onlypreamble\caption@documentclass@code +\newcommand*\AfterCaptionPackage{% + \g@addto@macro\caption@endtitles@code} +\@onlypreamble\AfterCaptionPackage +\providecommand*\caption@endtitles@code{} +\@onlypreamble\caption@endtitles@code +\newcommand*\caption@IfBabelPackageLoaded[4]{% + \caption@ifdefined#2\@firstofone\caption@AtBeginDocument{% + \caption@if@bool{\@nameuse{caption@ifbabel@#1}}% + {\def\caption@tempa{\caption@ifdefined#2}}% + {\let\caption@tempa\@secondoftwo}% + \caption@tempa + {\caption@InfoNoLine{#1 babel package is loaded}#3}% + {#4}}} +\@onlypreamble\caption@IfBabelPackageLoaded +\DeclareCaptionLabelSeparator{arabi}{\if@rl\space\fi: } +\newcommand*\caption@IfBabelArabi{% + \caption@IfBabelPackageLoaded{arabi}{\ArabiCoreLoaded}} +\@onlypreamble\caption@IfBabelArabi +\providecommand*\caption@ifbabel@arabi{true} +\caption@IfBabelArabi{% + \newcommand\caption@rl[1]{\if@rl\textRL{#1}\else\textLR{#1}\fi}% + \caption@ifdefined\extrasarabic{% + \addto\extrasarabic{% + \caption@switchdefault{labelseparator}{\babel@save #1}{arabi}}}{}% + \caption@ifdefined\extrasfarsi{% + \addto\extrasfarsi{% + \caption@switchdefault{labelseparator}{\babel@save #1}{arabi}}}{}% +}{% + \let\caption@rl\@firstofone +} +\DeclareCaptionLabelSeparator{french}{\caption@french@labelseparator} +\newcommand*\caption@IfBabelFrench{% + \caption@IfBabelPackageLoaded{french}{\FB@makecaption}} +\@onlypreamble\caption@IfBabelFrench +\providecommand*\caption@ifbabel@french{true} +\caption@IfBabelFrench{% + \providecommand\caption@french@labelseparator{\CaptionSeparator}% + \ifFB@active@punct + \DeclareCaptionLabelSeparator{colon}{% + \ifFBfrench\penalty\@M\FBcolonspace\fi : }% + \fi + \ifFBOldFigTabCaptions + \caption@ifdefined\extrasfrench{% + \addto\extrasfrench{% + \caption@switchdefault{labelseparator}{\babel@save #1}{french}}}{}% + \caption@ifdefined\extrasacadian{% + \addto\extrasacadian{% + \caption@switchdefault{labelseparator}{\babel@save #1}{french}}}{}% + \else + \ifFBCustomiseFigTabCaptions + \caption@AtBeginDocument{% + \ifFB@mainlanguage@FR + \SetCaptionDefault{labelseparator}{french}% + \fi}% + \fi + \fi +}{} +\newcommand*\caption@IfFrenchLe{% + \caption@IfBabelPackageLoaded{frenchle}{\frenchTeXmods}} +\@onlypreamble\caption@IfBabelFrenchLe +\providecommand*\caption@ifbabel@frenchle{true} +\caption@IfFrenchLe{% + \providecommand\caption@french@labelseparator{\captionseparator\space}% + \g@addto@macro\extrasfrench{% + \caption@switchdefault{labelseparator}{\let\caption@original@labelseparator#1}{french}% + \caption@switchdefault{font}{\let\caption@original@font#1}{it}% + \caption@switchdefault{labelfont}{\let\caption@original@labelfont#1}{up}}% + \g@addto@macro\extrasenglish{% + \caption@restoredefault{labelseparator}{\caption@original@labelseparator}% + \caption@restoredefault{font}{\caption@original@font}% + \caption@restoredefault{labelfont}{\caption@original@labelfont}}% + \caption@AtBeginDocument{% + \let\captionfont@original\captionfont + \let\captionlabelfont@original\captionlabelfont}% + \g@addto@macro\GOfrench{% + \let\captionfont\captionfont@original + \let\captionlabelfont\captionlabelfont@original}% +}{} +\DeclareCaptionLabelFormat{magyar}{#2\bothIfSecond{.~}{#1}} +\newcommand*\caption@IfBabelHungarian{% + \caption@IfBabelPackageLoaded{hungarian}{\magyar@opt@defaults}} +\@onlypreamble\caption@IfBabelHungarian +\providecommand*\caption@ifbabel@hungarian{true} +\caption@IfBabelHungarian{% + \caption@ifdefined\extrashungarian{% + \addto\extrashungarian{% + \caption@switchdefault{labelformat}{\babel@save #1}{magyar}% + \caption@switchdefault{labelseparator}{\babel@save #1}{period}% + \caption@switchdefault{listformat}{\babel@save #1}{subperiod}}}{}% + \caption@ifdefined\extrasmagyar{% + \addto\extrasmagyar{% + \caption@switchdefault{labelformat}{\babel@save #1}{magyar}% + \caption@switchdefault{labelseparator}{\babel@save #1}{period}% + \caption@switchdefault{listformat}{\babel@save #1}{subperiod}}}{}% +}{} +\DeclareCaptionLabelFormat{latvian}{#2\bothIfSecond{~}{#1}} +\newcommand*\caption@IfBabelLatvian{% + \caption@IfBabelPackageLoaded{latvian}{\bbl@latvianindent}} +\@onlypreamble\caption@IfBabelLatvian +\providecommand*\caption@ifbabel@latvian{true} +\caption@IfBabelLatvian{% + \caption@ifdefined\extraslatvian{% + \addto\extraslatvian{% + \caption@switchdefault{labelformat}{\babel@save #1}{latvian}}}{}% +}{} +\newcommand*\caption@ifpackageloaded[1]{% + \expandafter\ifx\csname ver@#1.\caption@pkgextension\endcsname\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi} +\let\caption@pkgextension\@pkgextension +\newcommand*\caption@pkg@list{} +\newcommand*\caption@requirepackage[2]{% + \caption@ifpackageloaded{#1}{}{\caption@@requirepackage{#1}{#2}}} +\newcommand*\caption@@requirepackage[2]{% + \@cons\caption@packagelist{{#1}{#2}}} % load package later on +\caption@AtBeginDocument{% + \renewcommand*\caption@@requirepackage[2]{% + \caption@Error{Option `#2' requires the `#1' package}}} +\newcommand*\caption@packagelist{} +\@onlypreamble\caption@packagelist +\caption@AtBeginDocument{% + \def\caption@tempa{\endgroup}% + \begingroup + \def\@elt#1#2{% + \g@addto@macro\caption@tempa{% + \caption@loadpackage{#1}{#2}}}% + \caption@packagelist + \caption@tempa} +\newcommand*\caption@loadpackage[2]{% + \caption@ifpackageloaded{#1}{}{\caption@@loadpackage{#1}{#2}}} +\newcommand*\caption@@loadpackage[2]{% + \caption@Info{Option `#2' requires the `#1' package}% + \RequirePackage{#1}\relax} +\caption@AtBeginDocument{% + \let\caption@@loadpackage\caption@@requirepackage} +\newcommand*\caption@newfloat[2]{% + \IfCaptionOptionCheck + {\caption@requirepackage{newfloat}{#1}}% + {\let\KV@prefix@ORI\KV@prefix + \let\@tempc@ORI\@tempc + \caption@loadpackage{newfloat}{#1}% + #2% + \let\@tempc\@tempc@ORI + \let\KV@prefix\KV@prefix@ORI}} +\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}} +\@onlypreamble@key{caption}{figurename} +\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}} +\@onlypreamble@key{caption}{tablename} +\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}} +\@onlypreamble@key{caption}{listfigurename} +\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}} +\@onlypreamble@key{caption}{listtablename} +\newcommand*\caption@SetName[2]{% + \caption@newfloat{#1name}{\newfloat@setname{#1}{#2}}} +\@onlypreamble\caption@SetName +\DeclareCaptionOption{name}{% + \IfCaptionOptionCheck{}{\caption@setname\@captype{#1}}} +\newcommand*\caption@setname[2]{% + \@namedef{#1name}{#2}} +\DeclareCaptionOption{figurewithin}{\caption@within{figure}{#1}} +\DeclareCaptionOptionNoValue{figurewithout}{\caption@within{figure}{none}} +\DeclareCaptionOption{tablewithin}{\caption@within{table}{#1}} +\DeclareCaptionOptionNoValue{tablewithout}{\caption@within{table}{none}} +\newcommand*\caption@within[2]{% + \caption@newfloat{#1within=#2}{\newfloat@setwithin{#1}{#2}}} +\DeclareCaptionOption{within}{% + \caption@newfloat{within=#1}{\newfloatsetup{within=#1}}} +\DeclareCaptionOptionNoValue{without}{% + \caption@newfloat{without}{\newfloatsetup{without}}} +\DeclareCaptionJustification[ragged2e]{Justified}{\justifying} +\DeclareCaptionJustification[ragged2e]{Centering}{\Centering} +\DeclareCaptionJustification[ragged2e]{RaggedLeft}{\RaggedLeft} +\DeclareCaptionJustification[ragged2e]{RaggedRight}{\RaggedRight} +\DeclareCaptionFont[sansmath]{sansmath}{\sansmath} +\DeclareCaptionFont{singlespacing}{% + \caption@ifdefined\setspace@singlespace{% + \setstretch\setspace@singlespace}{}}% normally 1 +\DeclareCaptionFont[setspace]{onehalfspacing}{\onehalfspacing} +\DeclareCaptionFont[setspace]{doublespacing}{\doublespacing} +\DeclareCaptionFont[setspace]{stretch}{\setstretch{#1}} +\caption@AtBeginDocument{% + \def\@tempa{2005/06/28 ver: 1.3 subfig package}% + \expandafter\ifx\csname ver@subfig.sty\endcsname\@tempa + \caption@InfoNoLine{subfig package v1.3 is loaded}% + \def\caption@eh{\caption@@eh{subfig}}% + \let\caption@setfloattype\@gobble + \let\@dottedxxxline\sf@NEW@dottedxxxline + \let\sf@subfloat\sf@NEW@subfloat + \let\sf@ifpositiontop\caption@iftop + \fi + \let\sf@NEW@dottedxxxline\@undefined + \let\sf@NEW@subfloat\@undefined} +\def\sf@NEW@dottedxxxline#1#2#3#4#5#6#7{% + \begingroup + \caption@setfloattype{#1}% + \caption@setoptions{subfloat}% + \caption@setoptions{sub#1}% + \ifnum #3>\@nameuse{c@#2depth}\else + \@dottedtocline{\z@}{#4}{#5}{#6}{#7}% + \fi + \endgroup} +\def\sf@NEW@subfloat{% + \begingroup + \@nameuse{caption@warmup}% + \caption@setfloattype\@captype + \sf@ifpositiontop{% + \maincaptiontoptrue + }{% + \maincaptiontopfalse + }% + \caption@setoptions{subfloat}% + \caption@setoptions{sub\@captype}% + \let\sf@oldlabel=\label + \let\label=\subfloat@label + \ifmaincaptiontop\else + \advance\@nameuse{c@\@captype}\@ne\relax + \fi + \refstepcounter{sub\@captype}% + \setcounter{sub\@captype @save}{\value{sub\@captype}}% + \@ifnextchar [% %] match left bracket + {\sf@@subfloat}% + {\sf@@subfloat[\@empty]}} +\DeclareCaptionOption{lofdepth}[2]{\caption@ifdefined\c@lofdepth{\setcounter{lofdepth}{#1}}{}} +\DeclareCaptionOption{lotdepth}[2]{\caption@ifdefined\c@lotdepth{\setcounter{lotdepth}{#1}}{}} +\newcommand\caption@addcontentsline[2]{% + \caption@ifcontentsline{#2}{% + \begingroup + \let\@tempa\@gobble + \caption@ifdefined\caption@listtype + {\let\@tempa\@firstofone}% + {\edef\caption@listtype{#1}}% + \caption@ifdefined\caption@listtype@ext + {\edef\caption@listtype{\caption@listtype\caption@listtype@ext}% + \let\@tempa\@firstofone}% + {}% + \@tempa + {\caption@Debug{addcontentsline: #1 => \caption@listtype}% + \@namedef{the\caption@listtype}{\@nameuse{the#1}}}% + \expandafter\caption@@addcontentsline\expandafter{\caption@listtype}{#2}% + \endgroup}% + \caption@addsubcontentslines{#1}} +\newcommand\caption@@addcontentsline[2]{% + {\let\\\space + \@ifundefined{ext@#1}% + {\caption@Error{No float type '#1' defined}}% + {\def\captionlisttype{#1}% + \caption@add@contentsline + {\csname ext@#1\endcsname}% + {#1}% + {\caption@listformat{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + {\ignorespaces #2}% + \caption@chkfloat{#1}{#2}}}} +\newcommand*\caption@add@contentsline{% + \caption@@@addcontentsline} +\newcommand*\caption@@@addcontentsline[4]{% + \addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}} +\let\caption@chkfloat\@gobbletwo +\newcommand\caption@ifcontentsline[1]{% + \caption@iflist + {\def\@tempa{#1}}% + {\let\@tempa\@empty}% + \ifx\@tempa\@empty + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi} +\newcommand*\caption@addsubcontentslines[1]{} +\newif\ifcaption@star +\newcommand*\caption@aboveskip{% + \vskip\abovecaptionskip} +\newcommand*\caption@belowskip{% + \vskip\belowcaptionskip} +\newcommand*\caption@fnum[1]{% + \expandafter\let\expandafter\caption@original@fnum\csname caption@fnum@#1\endcsname % for label format `original' + \caption@labelformat{\@nameuse{#1name}}{\@nameuse{the#1}}} +\newcommand\caption@make[2]{\caption@@make{\caption@labelformat{#1}{#2}}} +\newcommand\caption@@make[2]{% + \begingroup + \caption@@make@{#1}{#2}% + \endgroup + \caption@@make@epilogue} +\newcommand\caption@@make@[2]{% + \caption@stepthecounter + \caption@beginhook + \caption@box\hsize{% + \caption@singlelinecheck{\caption@slc{#1}{#2}\caption@singleline\caption@multiline}{\caption@multiline}% + \caption@calcmargin + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@\relax}% + \fi + \caption@ifhmode{\advance\caption@tempdima\caption@indent\relax}% + \hspace\caption@tempdima + \caption@tempdima\captionwidth + \caption@ifhmode{\advance\caption@tempdima-\caption@indent\relax}% + \caption@parbox\caption@tempdima{% + \caption@ifhmode{% + \ifdim\caption@indent=\z@ + \leavevmode + \else + \hskip-\caption@indent + \fi}% + \caption@@@make{#1}{#2}}% + \caption@tempdima\captionmargin + \ifdim\captionmargin@=\z@ \else + \caption@ifoddpage{\advance\caption@tempdima\captionmargin@\relax}{}% + \fi + \hspace\caption@tempdima + }% + \caption@endhook} +\newcommand\caption@@make@epilogue{% + \global\caption@starfalse} +\newcommand*\caption@calcmargin{% + \caption@calcmargin@hook + \ifx\caption@maxmargin\@undefined \else + \ifdim\captionmargin>\caption@maxmargin\relax + \captionmargin\caption@maxmargin\relax + \fi + \fi + \ifx\caption@minmargin\@undefined \else + \ifdim\captionmargin<\caption@minmargin\relax + \captionmargin\caption@minmargin\relax + \fi + \fi + \ifdim\captionwidth=\z@ + \captionwidth\hsize\relax + \advance\captionwidth by -2\captionmargin\relax + \advance\captionwidth by -\captionmargin@\relax + \else + \captionmargin\hsize\relax + \advance\captionmargin by -\captionwidth\relax + \divide\captionmargin by 2\relax + \captionmargin@\z@\relax + \fi + \caption@Debug{% + \string\hsize=\the\hsize, + \string\captionwidth=\the\captionwidth,\MessageBreak + \string\captionmargin=\the\captionmargin, + \string\captionmargin@=\the\captionmargin@}% +} +\newcommand\caption@slc[4]{% + \caption@Debug{Begin SLC}% + \singlelinecaptiontrue + \begingroup + \caption@singleline + \let\caption@justification\relax + \caption@calcmargin % calculate \captionwidth + \caption@prepareslc + \sbox\@tempboxa{\caption@@@make{#1}{#2}}% + \ifdim\wd\@tempboxa>\captionwidth + \endgroup + \singlelinecaptionfalse + #4% + \else + \endgroup + #3% + \fi + \caption@Debug{End SLC}} +\newif\ifsinglelinecaption +\newcommand*\caption@singleline{% + \caption@xsetup\caption@slsty % Note: This could change \caption@format + \caption@format % defines \caption@ifhmode, \caption@slfmt, and \caption@fmt + \let\caption@fmt\caption@slfmt} +\newcommand*\caption@multiline{% + \caption@format} % defines \caption@ifhmode, \caption@slfmt, and \caption@fmt +\providecommand*\caption@prepareslc{} +\g@addto@macro\caption@prepareslc{% + \let\label\caption@gobble + \let\hypertarget\@gobbletwo + \let\caption@footnote@ORI\footnote + \def\footnote{\caption@withoptargs\caption@footnote}% + \let\caption@footnotemark@ORI\footnotemark + \def\footnotemark{\caption@withoptargs\caption@footnotemark}% + \let\caption@footnotetext@ORI\@footnotetext + \let\@footnotetext\caption@gobble + \let\caption@endnote@ORI\endnote + \def\endnote{\caption@withoptargs\caption@endnote}% + \let\caption@endnotemark@ORI\endnotemark + \def\endnotemark{\caption@withoptargs\caption@endnotemark}% + \let\caption@endnotetext@ORI\@endnotetext + \let\@endnotetext\caption@gobble + \let\acused\@gobble + \let\AC@placelabel\@gobble + \let\glsunset\@gobble +} +\newcommand\caption@footnote[2]{% + \caption@footnotemark{#1}} +\newcommand\caption@footnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@footnotemark@ORI#1\relax + \endgroup} +\newcommand\caption@endnote[2]{% + \caption@endnotemark{#1}} +\newcommand\caption@endnotemark[1]{% + \begingroup + \let\stepcounter\caption@l@stepcounter + \caption@endnotemark@ORI#1\relax + \endgroup} +\newcommand*\caption@l@stepcounter[1]{% + \advance\csname c@#1\endcsname\@ne\relax} +\newcommand*\caption@applyfont{% + \caption@justification\captionfont\captionsize} +\newcommand\caption@@@make[2]{% + \ifx\caption@fmt\@undefined\caption@format\fi + \let\caption@lfmt\caption@labelformat + \global\def\caption@tempa{gobbletwo}% + \global\def\caption@tempb{}% + \sbox\@tempboxa{% + \let\caption@ignorespaces\ignorespaces + \def\ignorespaces{% + \global\def\caption@tempb{two}% "gobble" -> "gobbletwo" if \ignorespaces is used addtionally + \caption@ignorespaces}% + #1% + {\global\let\caption@tempa\@undefined\aftergroup\@gobble}% + {\global\def\caption@tempa{gobble\caption@tempb}}}% + \ifdim\wd\@tempboxa=\z@ + \gdef\caption@tempa{none}% + \fi + \ifx\caption@tempa\@undefined \else + \@expandtwoargs\caption@set{labelseparator}{\caption@tempa}% + \fi + \caption@ifempty{#2}{% + \caption@set{labelseparator}{none}% + \caption@set{textformat}{simple}% + }% + \caption@labelseparator % defines \caption@iflabelfont, \caption@labelsep and \caption@labelsep@name (the latter is needed by \caption@fmt) + \@setpar{\@@par\caption@@par}\caption@@par + \caption@applyfont + \caption@fmt + {\ifcaption@star\else + \begingroup + \captionlabelfont + #1\relax\relax + \endgroup + \fi}% + {\ifcaption@star\else + \begingroup + \caption@iflabelfont\captionlabelfont + \relax\caption@labelsep + \endgroup + \fi}% + {{\captiontextfont + \caption@textstart + \caption@ifstrut + {\vrule\@height\ht\strutbox\@width\z@}% + {}% + \nobreak\hskip\z@skip % enable hyphenation + \caption@textformat{#2}% + \caption@ifstrut + {\ifhmode\@finalstrut\strutbox\fi}% + {}% + \caption@textend}}} +\newcommand*\caption@textstart{} +\newcommand*\caption@textend{\par} +\newcommand\caption@ifempty[1]{% + \caption@if@empty{#1}% + \caption@ifempty\@unused} +\newcommand\caption@if@empty[1]{% + \def\caption@tempa{#1}% + \ifx\caption@tempa\@empty + \let\caption@ifempty\@secondoftwo + \else + \expandafter\def\expandafter\caption@tempa\expandafter{% + \caption@car#1\caption@if@empty\caption@nil}% + \def\caption@tempb{\caption@if@empty}% + \ifx\caption@tempa\caption@tempb + \let\caption@ifempty\@secondoftwo + \else + \def\caption@tempb{\ignorespaces}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobble#1}% + \else + \def\caption@tempb{\label}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\index}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \def\caption@tempb{\glossary}% + \ifx\caption@tempa\caption@tempb + \expandafter\caption@if@empty\expandafter{\@gobbletwo#1}% + \else + \let\caption@ifempty\@gobbletwo + \fi + \fi + \fi + \fi + \fi + \fi} +\long\def\caption@car#1#2\caption@nil{#1}% same as \@car, but \long +\newcommand*\caption@@par{% + \parindent\caption@parindent\hangindent\caption@hangindent}% +\newcommand*\DeclareCaptionType{% + \caption@loadpackage{newfloat}{declare type}% + \DeclareFloatingEnvironment} +\@onlypreamble\DeclareCaptionType +\newcommand*\ForEachCaptionType{% + \@ifstar + {\caption@foreach@type\@gobble}% + {\caption@foreach@type\@iden}} +\newcommand\caption@foreach@type[2]{% + \caption@ifdefined\ForEachFloatingEnvironment + {\ForEachFloatingEnvironment*{#2}}% + {\def\@elt##1{#2}% + \caption@ifdefined\c@figure\@elt\@gobble{figure}% + \caption@ifdefined\c@table\@elt\@gobble{table}% + \let\@elt\relax}% + #1{\newfloat@addtohook{#2}}} +\providecommand\newfloat@addtohook[1]{% + \toks@=\expandafter{\newfloat@hook{##1}#1}% + \edef\@tempa{\def\noexpand\newfloat@hook####1{\the\toks@}}% + \@tempa} +\providecommand*\newfloat@hook[1]{} +\newcommand*\DeclareCaptionSubType{% + \caption@teststar\caption@declaresubtype\@firstoftwo\@secondoftwo} +\@onlypreamble\DeclareCaptionSubType +\newcommand*\caption@declaresubtype[1]{% + \@testopt{\caption@@declaresubtype{#1}}{alph}} +\@onlypreamble\caption@declaresubtype +\def\caption@@declaresubtype#1[#2]#3{% + \@ifundefined{c@#3}% + {\caption@Error{No float type '#3' defined}}% + {\caption@@@declaresubtype{#1}{#2}{#3}{sub#3}}} +\@onlypreamble\caption@@declaresubtype +\newcommand*\caption@@@declaresubtype[4]{% + \caption@ifsubtype{#4}% + {\caption@Debug{Modify subtype `#4'}}% + {\caption@Debug{New subtype `#4'}% + \newcounter{#4}[{#3}]% + \@namedef{ext@#4}{\csname ext@#3\endcsname}% + \caption@declaresublistentry{#3}% + \caption@l@addto@list\caption@subtypelist{#4}% + \caption@subtype@hook{#4}}% + \caption@ifdefined\contentsuse{% + \contentsuse{#4}{\csname ext@#4\endcsname}}{}% + \@namedef{#4name}{}% + \@namedef{#4autorefname}{\csname #3autorefname\endcsname}% + #1% is \@firstoftwo in star form, and \@secondoftwo otherwise + {\@namedef{p@#4}{}% + \@namedef{the#4}{\csname the#3\endcsname.\@nameuse{#2}{#4}}}% + {\@namedef{p@#4}{\csname the#3\endcsname}% + \@namedef{the#4}{\@nameuse{#2}{#4}}}% + \@namedef{theH#4}{\csname theH#3\endcsname.\arabic{#4}}} +\@onlypreamble\caption@@@declaresubtype +\newcommand*\caption@declaresublistentry{% + \caption@ifdefined\l@chapter + {\caption@@declaresublistentry\l@subsection}% + {\caption@@declaresublistentry\l@subsubsection}} +\@onlypreamble\caption@declaresublistentry +\newcommand*\caption@@declaresublistentry[2]{% + \ifx#1\@undefined + \caption@@@declaresublistentry\relax\@dottedtocline\caption@nil{#2}% + \else + \expandafter\caption@@@declaresublistentry#1{}{}\@dottedtocline\caption@nil{#2}% + \fi} +\@onlypreamble\caption@@declaresublistentry +\long\def\caption@@@declaresublistentry#1\@dottedtocline#2\caption@nil#3{% + \def\@tempa{#1}% + \ifx\@tempa\@empty + \caption@@@@declaresublistentry{#3}#2\caption@nil + \else + \caption@@@@declaresublistentry{#3}@{3.8em}{3.2em}\caption@nil + \fi} +\@onlypreamble\caption@@@declaresublistentry +\def\caption@@@@declaresublistentry#1#2#3#4#5\caption@nil{% + \expandafter\caption@@@@@declaresublistentry\expandafter + {\csname @dotted\csname ext@#1\endcsname line\endcsname}{#1}{#3}{#4}} +\@onlypreamble\caption@@@@declaresublistentry +\newcommand*\caption@@@@@declaresublistentry[4]{% + \@namedef{l@sub#2}{#1{2}{#3}{#4}}% + \expandafter\caption@@@@@@declaresublistentry + \expandafter#1\expandafter{\csname ext@#2\endcsname depth}} +\@onlypreamble\caption@@@@@declaresublistentry +\newcommand*\caption@@@@@@declaresublistentry[2]{ + \ifx#1\relax + \def#1##1{% + \def\next{\@dottedtocline{##1}}% + \@ifundefined{c@#2}{}{% + \ifnum ##1>\@nameuse{c@#2}\relax + \let\next\@gobblefour + \else + \c@tocdepth=\@nameuse{c@#2}\relax + \fi}% + \next}% + \fi} +\@onlypreamble\caption@@@@@@declaresublistentry +\newcommand*\caption@subtypelist{} +\newcommand*\caption@ifsubtype{% + \caption@ifin@list\caption@subtypelist} +\newcommand*\ForEachCaptionSubType{% + \@ifstar + {\caption@foreach@subtype\@gobble}% + {\caption@foreach@subtype\@iden}} +\newcommand\caption@foreach@subtype[2]{% + \caption@for@list\caption@subtypelist{#2}% + #1{\caption@addto@subtype@hook{#2}}} +\providecommand\caption@addto@subtype@hook[1]{% + \toks@=\expandafter{\caption@subtype@hook{##1}#1}% + \edef\@tempa{\def\noexpand\caption@subtype@hook####1{\the\toks@}}% + \@tempa} +\providecommand*\caption@subtype@hook[1]{} +\caption@ifdefined\@memresetsubcounter + {\let\caption@memresetsubcounter\@memresetsubcounter + \renewcommand*\@memresetsubcounter[1]{% + \caption@ifsubtype{sub#1}\@gobble\caption@memresetsubcounter{#1}}}% + {} +\ifx\caption@documentclass\@empty\else + \@pushfilename + \edef\@currname{caption-\caption@documentclass} + \edef\@currext{sto} + \InputIfFileExists + {\@currname.\@currext}% + {}% + {\@missingfileerror\@currname\@currext}% + \@popfilename +\fi +\captionsetup{style=default,position=default,listformat=default} +\ProcessOptions* +\endinput +%% +%% End of file `caption3_2020-10-26.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption_1995-04-05.sty b/Master/texmf-dist/tex/latex/caption/caption_1995-04-05.sty new file mode 100644 index 00000000000..13770a99e9c --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption_1995-04-05.sty @@ -0,0 +1,157 @@ +%% +%% This is file `caption_1995-04-05.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v1/caption.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{caption}[1995/04/05 v1.4b caption package (AS)] +\newcommand{\captionsize}{} +\newcommand{\captionfont}{\captionsize} +\newcommand{\captionlabelfont}{} +\newlength{\captionmargin} +\newcommand{\as@normalcaption}[2]{% + #1 #2\par} +\newcommand{\as@isucaption}[2]{% + \sbox{\as@captionbox}{#1\space}% + \addtolength{\as@captionwidth}{-\wd\as@captionbox}% + \usebox{\as@captionbox}\parbox[t]{\as@captionwidth}{\leavevmode#2}} +\newcommand{\as@centercaption}[2]{% + \parbox[t]{\as@captionwidth}{{\centering#1 #2\par}}} +\newcommand{\as@annecaption}[2]{% + \addtolength{\leftskip}{0pt plus 1fil}% + \addtolength{\rightskip}{0pt plus -1fil}% + \setlength{\parfillskip}{0pt plus 2fil}% + #1 #2\par} +\let\as@shortcaption\as@centercaption +\ifx\thesubfigure\undefined + \newcommand{\as@subcapsize}[1]{} +\else% + \typeout{\space\space\space\space\space\space\space\space\space + `subfigure' package detected} + \let\as@subcapsize\subcapsize + \renewcommand{\@thesubfigure}{{\captionlabelfont\thesubfigure}\space} + \renewcommand{\@thesubtable}{{\captionlabelfont\thesubtable}\space} +\fi +\DeclareOption{normal}{\let\as@caption\as@normalcaption} +\DeclareOption{isu}{\let\as@caption\as@isucaption} +\DeclareOption{hang}{\ExecuteOptions{isu}} +\DeclareOption{center}{\let\as@caption\as@centercaption} +\DeclareOption{anne}{\let\as@caption\as@annecaption} +\DeclareOption{centerlast}{\ExecuteOptions{anne}} +\DeclareOption{nooneline}{\AtBeginDocument{\let\as@shortcaption\as@caption}} +\DeclareOption{scriptsize}{% + \renewcommand{\captionsize}{\scriptsize} + \as@subcapsize{\scriptsize}} +\DeclareOption{footnotesize}{% + \renewcommand{\captionsize}{\footnotesize} + \as@subcapsize{\scriptsize}} +\DeclareOption{small}{% + \renewcommand{\captionsize}{\small} + \as@subcapsize{\footnotesize}} +\DeclareOption{normalsize}{% + \renewcommand{\captionsize}{\normalsize} + \as@subcapsize{\footnotesize}} +\DeclareOption{large}{% + \renewcommand{\captionsize}{\large} + \as@subcapsize{\normalsize}} +\DeclareOption{Large}{% + \renewcommand{\captionsize}{\Large} + \as@subcapsize{\large}} +\DeclareOption{up}{\renewcommand{\captionlabelfont}{\upshape}} +\DeclareOption{it}{\renewcommand{\captionlabelfont}{\itshape}} +\DeclareOption{sl}{\renewcommand{\captionlabelfont}{\slshape}} +\DeclareOption{sc}{\renewcommand{\captionlabelfont}{\scshape}} +\DeclareOption{md}{\renewcommand{\captionlabelfont}{\mdseries}} +\DeclareOption{bf}{\renewcommand{\captionlabelfont}{\bfseries}} +\DeclareOption{rm}{\renewcommand{\captionlabelfont}{\rmfamily}} +\DeclareOption{sf}{\renewcommand{\captionlabelfont}{\sffamily}} +\DeclareOption{tt}{\renewcommand{\captionlabelfont}{\ttfamily}} +\DeclareOption{ruled}{\newcommand\as@ruled{}} +\ExecuteOptions{normal} +\ProcessOptions +\newsavebox{\as@captionbox} +\newlength{\as@captionwidth} +\newcommand{\as@makecaption}[2]{% + \setlength{\leftskip}{\captionmargin}% + \setlength{\rightskip}{\captionmargin}% + \addtolength{\as@captionwidth}{-2\captionmargin}% + \captionfont% + \sbox{\as@captionbox}{{\captionlabelfont #1:} #2}% + \ifdim \wd\as@captionbox >\as@captionwidth + \as@caption{{\captionlabelfont #1:}}{#2}% + \else% + \as@shortcaption{{\captionlabelfont #1:}}{#2}% + \fi} +\renewcommand{\@makecaption}[2]{% + \vskip\abovecaptionskip% + \setlength{\as@captionwidth}{\linewidth}% + \as@makecaption{#1}{#2}% + \vskip\belowcaptionskip} +\ifx\@makerotcaption\undefined +\else + \typeout{\space\space\space\space\space\space\space\space\space + `rotating' package detected} + \renewcommand{\@makerotcaption}[2]{% + \captionfont% + \sbox{\as@captionbox}{{\captionlabelfont #1:} #2}% + \ifdim \wd\as@captionbox > .8\vsize + \rotatebox{90}{% + \setlength{\as@captionwidth}{.8\textheight}% + \begin{minipage}{\as@captionwidth}% + \as@caption{{\captionlabelfont #1:}}{#2}% + \end{minipage}}\par + \else% + \rotatebox{90}{\usebox{\as@captionbox}}% + \fi + \hspace{12pt}} +\fi +\ifx\floatc@plain\undefined +\else + \typeout{\space\space\space\space\space\space\space\space\space + `float' package detected} + \renewcommand\floatc@plain[2]{% + \setlength{\as@captionwidth}{\linewidth}% + \as@makecaption{#1}{#2}} + \ifx\as@ruled\undefined + \else + \renewcommand\floatc@ruled[2]{% + \setlength{\as@captionwidth}{\linewidth}% + \captionfont% + \as@caption{{\captionlabelfont #1:}}{#2}} + \fi +\fi +\endinput +%% +%% End of file `caption_1995-04-05.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty b/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty new file mode 100644 index 00000000000..2e0a89931a4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption_2007-04-16.sty @@ -0,0 +1,455 @@ +%% +%% This is file `caption_2007-04-16.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.0/caption.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption}[2007/04/16 v3.0q Customising captions (AR)] +\RequirePackage{caption3}[=2007/01/31] % needs v1.0l or newer +\@ifpackageloaded{caption2}{% + \caption@Error{You can't use both the caption *and* caption2 package}% + \endinput +}{} +\DeclareCaptionOption{config}[caption]{% + \InputIfFileExists{#1.cfg}{\typeout{*** Local configuration file + #1.cfg used ***}}% + {\PackageWarning{caption}{Configuration + file #1.cfg not found}}} +\DeclareCaptionOption*{figureposition}{\captionsetup[figure]{position=#1}} +\DeclareCaptionOption*{tableposition}{\captionsetup[table]{position=#1}} +\DeclareCaptionOption*{figurename}{\captionsetup[figure]{name=#1}} +\DeclareCaptionOption*{tablename}{\captionsetup[table]{name=#1}} +\DeclareCaptionOption*{normal}[]{\caption@setformat{normal}} +\DeclareCaptionOption*{isu}[]{\caption@setformat{hang}} +\DeclareCaptionOption*{hang}[]{\caption@setformat{hang}} +\DeclareCaptionOption*{center}[]{\caption@setjustification{centering}} +\DeclareCaptionOption*{anne}[]{\caption@setjustification{centerlast}} +\DeclareCaptionOption*{centerlast}[]{\caption@setjustification{centerlast}} +\DeclareCaptionOption*{scriptsize}[]{\def\captionfont{\scriptsize}} +\DeclareCaptionOption*{footnotesize}[]{\def\captionfont{\footnotesize}} +\DeclareCaptionOption*{small}[]{\def\captionfont{\small}} +\DeclareCaptionOption*{normalsize}[]{\def\captionfont{\normalsize}} +\DeclareCaptionOption*{large}[]{\def\captionfont{\large}} +\DeclareCaptionOption*{Large}[]{\def\captionfont{\Large}} +\DeclareCaptionOption*{up}[]{\l@addto@macro\captionlabelfont\upshape} +\DeclareCaptionOption*{it}[]{\l@addto@macro\captionlabelfont\itshape} +\DeclareCaptionOption*{sl}[]{\l@addto@macro\captionlabelfont\slshape} +\DeclareCaptionOption*{sc}[]{\l@addto@macro\captionlabelfont\scshape} +\DeclareCaptionOption*{md}[]{\l@addto@macro\captionlabelfont\mdseries} +\DeclareCaptionOption*{bf}[]{\l@addto@macro\captionlabelfont\bfseries} +\DeclareCaptionOption*{rm}[]{\l@addto@macro\captionlabelfont\rmfamily} +\DeclareCaptionOption*{sf}[]{\l@addto@macro\captionlabelfont\sffamily} +\DeclareCaptionOption*{tt}[]{\l@addto@macro\captionlabelfont\ttfamily} +\DeclareCaptionOption*{nooneline}[]{\caption@setbool{slc}{0}} +\caption@setbool{ruled}{0} +\DeclareCaptionOption*{ruled}[]{\caption@setbool{ruled}{1}} +\DeclareCaptionOption*{flushleft}[]{\caption@setjustification{raggedright}} +\DeclareCaptionOption*{flushright}[]{\caption@setjustification{raggedleft}} +\DeclareCaptionOption*{oneline}[]{\caption@setbool{slc}{1}} +\DeclareCaptionOption*{ignoreLTcapwidth}[]{} +\DeclareCaptionOption*{onelinecaption}[]{\caption@setbool{slc}{1}} +\DeclareCaptionOption*{noonelinecaption}[]{\caption@setbool{slc}{0}} +\DeclareCaptionOption*{tablecaptionabove}[]{\captionsetup[table]{position=t}} +\DeclareCaptionOption*{tablecaptionbelow}[]{\captionsetup[table]{position=b}} +\newcommand*\caption@declarepackage[1]{% + \caption@setbool{pkt@#1}{1}% + \DeclareCaptionOption*{#1}{\caption@setbool{pkt@#1}{##1}}} +\AtEndOfPackage{\let\caption@declarepackage\@undefined} +\newcommand\caption@ifpackage[3]{% + \edef\caption@tempa{% + \caption@ifbool{pkt@#1}% + {\@ifundefined{#2}{AtBeginDocument}{firstofone}}% + {gobble}}% + \caption@Info{#1=\caption@ifbool{pkt@#1}{1}{0} % + (\@ifundefined{#2}{not }{}loaded->\caption@tempa)}% + \caption@ifbool{pkt@#1}{% + \@ifundefined{#2}% + {\let\caption@tempa\AtBeginDocument}% + {\let\caption@tempa\@firstofone}% + }{% + \let\caption@tempa\@gobble + }% + \caption@tempa{\@ifundefined{#2}{}{#3}}% + \caption@undefbool{pkt@#1}} +\AtEndOfPackage{\let\caption@ifpackage\@undefined} +\caption@declarepackage{caption} +\caption@declarepackage{float} +\caption@declarepackage{floatrow} +\caption@declarepackage{hyperref} +\caption@declarepackage{hypcap} +\caption@declarepackage{listings} +\caption@declarepackage{longtable} +\caption@declarepackage{picins} +\caption@declarepackage{rotating} +\caption@declarepackage{sidecap} +\caption@declarepackage{supertabular} +\DeclareCaptionOption{verbose}[1]{% + \caption@setbool{verbose}{#1}% + \caption@ifverbose{% + \def\caption@Info{\PackageInfo{caption}}% + }{% + \let\caption@Info\@gobble + }} +\setkeys{caption}{verbose=0} +\caption@ProcessOptions{caption} +\caption@ifbool{pkt@caption}{}{\endinput} +\caption@undefbool{pkt@caption} +\def\captionof{\@ifstar{\caption@of{\caption*}}{\caption@of\caption}} +\newcommand*\caption@of[2]{\def\@captype{#2}#1} +\DeclareCaptionOption{name}{\caption@setfloatname\@captype{#1}} +\DeclareCaptionOption{type}{\def\@captype{#1}} +\providecommand\ContinuedFloat{% + \@ifnextchar[%] + \@ContinuedFloat + {\ifx\@captype\@undefined + \@latex@error{\noexpand\ContinuedFloat outside float}\@ehd + \else + \@ContinuedFloat[\@captype]% + \fi}} +\def\@ContinuedFloat[#1]{% + \addtocounter{#1}\m@ne + \caption@ContinuedFloat{#1}% + \caption@@ContinuedFloat{#1}} +\let\caption@ContinuedFloat\@gobble +\let\caption@resetContinuedFloat\@gobble +\providecommand*\caption@@ContinuedFloat[1]{} +\newcommand*\caption@begin[1]{% + \caption@resetContinuedFloat{#1}% + \begingroup + \caption@setfloattype{#1}% + \ifx\caption@lfmt\caption@lfmt@default\else + \@namedef{fnum@#1}{% + \caption@lfmt{\caption@floatname{#1}}{\@nameuse{the#1}}}% + \fi + \caption@fixposition + \global\let\caption@fixedposition\caption@position} +\newcommand\caption@beginex[3]{% + \caption@begin{#1}% + \caption@iflof% + {\def\caption@tempa{#2}}% + {\let\caption@tempa\@empty}% + \ifx\caption@tempa\@empty + \long\def\addcontentsline##1##2##3{}% There is no \@gobblethree... + \fi + \caption@ifempty{#3}{\let\caption@ifempty\@secondoftwo}% +} +\newcommand*\caption@end{% + \endgroup + \let\caption@position\caption@fixedposition} +\let\caption@setfloattype\caption@settype +\newcommand*\caption@letfloattype[2]{% + \def\caption@setfloattype##1{% + \caption@settype{##1}#2\caption@settype{#1}}} +\newcommand*\caption@floatname[1]{\@nameuse{#1name}} +\newcommand*\caption@setfloatname[1]{\@namedef{#1name}} +\AtBeginDocument{% + \@ifundefined{cc@caption}{% + \@ifundefined{caption@old}{% + \let\caption@old\caption + \def\caption{\caption@caption\caption@old}% + \def\caption@caption#1{% + \@ifstar{\ContinuedFloat\global\caption@startrue#1[]}{#1}}% + \let\caption@@old\@caption + \long\def\@caption#1[#2]#3{% + \caption@beginex{#1}{#2}{#3}% + \caption@@old{#1}[{#2}]{#3}% + \caption@end}% + }{}}{% + \caption@Info{captcont package v2.0 detected}% + \def\caption@caption#1{#1}% + }% +} +\renewcommand\@makecaption[2]{% + \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}% + \caption@@make{#1}{#2}% + \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}} +\@ifundefined{scr@caption}{}{% + \caption@Info{KOMA-Script class detected} + \AtBeginDocument{\let\scr@caption\caption} + \def\onelinecaptionstrue{\caption@setbool{slc}{1}} + \def\onelinecaptionsfalse{\caption@setbool{slc}{0}} + \def\captionabove{% + \caption@setposition{t}\let\caption@setposition\@gobble + \scr@caption} + \def\captionbelow{% + \caption@setposition{b}\let\caption@setposition\@gobble + \scr@caption} +} +\AtBeginDocument{\@ifundefined{f@ffrench}{}{% + \caption@Info{french(le) package detected}% + \@ifundefined{GOfrench}% + {\let\caption@tempa\@firstofone}% + {\def\caption@tempa{\g@addto@macro\GOfrench}}% + \caption@tempa{% + \let\@cnORI\caption + \let\caption@tablescaption\@tablescaption + \def\@tablescaption{\caption@caption\caption@tablescaption}% + \let\@eatDP\@undefined + \let\caption@tempa\@empty + \ifx\f@ffrench\fnum@figure + \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}% + \fi + \ifx\f@tfrench\fnum@table + \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}% + \fi + \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% + \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% + \caption@tempa +}}} +\def\caption@setfloatposition{% + \caption@setposition{\@fs@iftopcapt t\else b\fi}} +\caption@ifpackage{float}{@float@setevery}{% + \caption@Info{float package v1.3 (or newer) detected}% + \let\caption@of@float\@gobble + \renewcommand*\caption@of[2]{% + \@ifundefined{fst@#2}{}{% + \let\caption@of@float\@firstofone + \@nameuse{fst@#2}\@float@setevery{#2}}% + \def\@captype{#2}#1}% + \let\caption@@float\float@caption + \long\def\float@caption#1[#2]#3{% + \caption@beginex{#1}{#2}{#3}% + \let\@fs@capt\caption@@make + \caption@@float{#1}[{#2}]{#3}% + \caption@of@float{% + \@ifundefined{hyper@@anchor}{}{% + \begingroup + \@tempdima\prevdepth + \nointerlineskip + \let\leavevmode\relax + \hyper@@anchor\@currentHref\relax + \prevdepth\@tempdima + \endgroup}% + \def\caption@@make##1##2{\unvbox\@floatcapt}% + \@makecaption{}{}}% + \caption@end}% + \let\caption@float@setevery\@float@setevery + \def\@float@setevery#1{% + \def\caption@floatname##1{\@nameuse{fname@#1}}% + \def\caption@setfloatname##1{\@namedef{fname@#1}}% + \expandafter\let\expandafter\caption@tempa\csname @float@c@#1\endcsname + \ifx\caption@tempa\float@caption + \else\ifx\caption@tempa\@caption + \else\ifx\caption@tempa\caption@@float + \caption@Info{\protect\@float@c@#1\space := \protect\float@caption}% + \expandafter\let\csname @float@c@#1\endcsname\float@caption + \else + \caption@Info{\protect\@float@c@#1\space := \protect\@caption}% + \expandafter\let\csname @float@c@#1\endcsname\@caption + \fi\fi\fi + \expandafter\ifx\csname @float@c@#1\endcsname\float@caption + \caption@setfloatposition + \expandafter\let\expandafter\caption@fst\csname fst@#1\endcsname + \edef\caption@fst{\noexpand\string\expandafter\noexpand\caption@fst}% + \edef\caption@fst{\noexpand\@gobblefour\caption@fst}% + \caption@setstyle*\caption@fst + \caption@settype\caption@fst + \fi + \caption@float@setevery{#1}}% + \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% + \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% +} +\captionsetup[boxed]{skip=2pt} +\caption@ifbool{ruled}{% + \captionsetup[ruled]{margin=0pt,singlelinecheck=0}% +}{% + \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% +} +\caption@undefbool{ruled} +\caption@ifpackage{floatrow}{flrow@setlist}{% + \caption@Info{floatrow package v0.1f (or newer) detected}% + \renewcommand*\caption@of[2]{% + \def\@captype{#2}\flrow@setlist{{#2}}#1}% + \renewcommand*\caption@floatname[1]{% + \@nameuse{\@ifundefined{fname@#1}{#1name}{fname@#1}}}% + \renewcommand*\caption@setfloatname[1]{% + \@namedef{\@ifundefined{fname@#1}{#1name}{fname@#1}}}% +} +\caption@ifpackage{hyperref}{theHfigure}{% + \caption@Info{hyperref package v6.74m (or newer) detected}% + \def\caption@ContinuedFloat#1{% + \@ifundefined{theH#1}{}{% + \@ifundefined{CF@#1}{% + \expandafter\caption@newcounter\csname CF@#1\endcsname + \caption@resetContinuedFloat{#1}}{}% + \expandafter\caption@stepcounter\csname CF@#1\endcsname + \expandafter\l@addto@macro\csname theH#1\endcsname{% + .\csname CF@#1\endcsname}% + \let\caption@resetContinuedFloat\@gobble + }}% + \def\caption@resetContinuedFloat#1{% + \@ifundefined{CF@#1}{}{% + \expandafter\caption@setcounter\csname CF@#1\endcsname0}}% +} +\caption@ifpackage{hypcap}{hc@caption}{% + \caption@Info{hypcap package v1.0 (or newer) detected}% + \let\caption@capstart\capstart + \def\capstart{% + \let\hc@org@caption\caption + \begingroup + \let\H@refstepcounter\@gobble + \Hy@hypertexnamesfalse + \caption@capstart + \@ifundefined{hc@hyperref}{}{% hypcap v1.7 + \global\advance\csname c@\@captype\endcsname\@ne}% + \global\let\hc@currentHref\@currentHref + \endgroup + \@ifundefined{hc@hyperref}% + {\let\next\@firstofone}{\let\next\hc@hyperref}% hypcap v1.7 + \next{\def\caption{% + \let\caption\hc@org@caption + \H@refstepcounter\@captype + \@ifundefined{hc@hyperref}{}{% hypcap v1.7 + \global\advance\csname c@\@captype\endcsname\m@ne}% + \caption@caption\hc@caption}}% + }% + \let\caption@hc@@caption\hc@@caption + \long\def\hc@@caption#1[#2]#3{% + \caption@beginex{#1}{#2}{#3}% + \let\caption@hyper@makecurrent\hyper@makecurrent + \def\hyper@makecurrent\@captype{% + \let\hyper@makecurrent\caption@hyper@makecurrent + \global\let\@currentHref\hc@currentHref}% + \caption@hc@@caption{#1}[{#2}]{#3}% + \caption@end}% +} +\caption@ifpackage{listings}{lst@MakeCaption}{% + \caption@Info{listings package v1.2 (or newer) detected}% + \let\caption@lst@MakeCaption\lst@MakeCaption + \def\lst@MakeCaption#1{% + \def\caption@autoposition{\caption@setposition{#1}}% + \caption@begin{lstlisting}% + \caption@lst@MakeCaption{#1}% + \caption@end}% +} +\caption@ifpackage{longtable}{LT@makecaption}{% + \caption@Info{longtable package v3.15 (or newer) detected}% + \def\LT@makecaption#1#2#3{% + \caption@LT@make{% + \caption@startrue#1\caption@starfalse + \caption@letfloattype{longtable}{% + \ifdim\LTcapwidth=4in \else + \setcaptionwidth\LTcapwidth + \fi}% + \let\caption@defaultpos\@firstoftwo + \def\caption@autoposition{% + \caption@setposition{\ifcase\LT@rows t\else b\fi}}% + \caption@begin{table}% + \vskip-\ht\strutbox + \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}% + \caption@@make{#2}{#3}\endgraf + \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}% + \caption@end}}% + \newcommand\caption@LT@make[1]{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\hsize{#1}\hss}}}% +} +\caption@ifpackage{picins}{piccaption}{% + \caption@Info{picins package v3.0 (or newer) detected}% + \def\piccaption{\@dblarg\@piccaption} +} +\caption@ifpackage{rotating}{@rotcaption}{% + \caption@Info{rotating package v2.0 (or newer) detected}% + \def\rotcaption{\let\@makecaption\@makerotcaption\caption}% + \def\rotcaptionof{% + \@ifstar{\caption@of{\rotcaption*}}{\caption@of\rotcaption}}% + \long\def\@makerotcaption#1#2{% + \ifdim\captionwidth=\z@ + \setcaptionwidth{.8\textheight}% + \caption@slc{#1}{#2}{.8\vsize}{% + \let\caption@makerot\caption@@make + \setcaptionmargin\z@ + \let\captionbox\@secondoftwo}% + \caption@setbool{slc}{0}% been there, done that + \fi + \rotatebox{90}{\caption@makerot{#1}{#2}}% + \nobreak\hspace{12pt}}% + \newcommand\caption@makerot[2]{% + \begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}% +} +\caption@ifpackage{sidecap}{endSC@FLOAT}{% + \caption@Info{sidecap package v1.4d (or newer) detected}% + \@ifundefined{caption@caption}% + {\let\caption@tempa\AtBeginDocument}% + {\let\caption@tempa\@firstofone}% + \caption@tempa{\let\SC@caption=\caption}% + \let\caption@SC@zfloat\SC@zfloat + \def\SC@zfloat#1#2#3[#4]{% + \caption@SC@zfloat{#1}{#2}{#3}[#4]% + \global\let\SC@CAPsetup\@empty + \def\captionsetup##1{\g@addto@macro\SC@CAPsetup{,##1}}% + \let\caption@SC\caption + \def\caption{\caption@caption\caption@SC}% + }% + \let\caption@endSC@FLOAT\endSC@FLOAT + \def\endSC@FLOAT{% + \let\@captype\SC@captype + \caption@esetup\SC@CAPsetup + \caption@letfloattype{SC\@captype}{% + \@listdepth\z@ + \setcaptionmargin\z@ + \@ifundefined{SC@justify}{}{% + \ifx\SC@justify\@empty\else + \let\caption@hj\SC@justify + \let\SC@justify\@empty + \fi}}% + \long\def\caption@ifempty##1{% + \ifx\SC@CAPtext\@empty + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi}% + \caption@endSC@FLOAT}% +} +\def\caption@setSTposition{% + \caption@setposition{\if@topcaption t\else b\fi}} +\caption@ifpackage{supertabular}{ST@caption}{% + \caption@Info{supertabular package detected}% + \let\caption@tablecaption\tablecaption + \def\tablecaption{\caption@caption\caption@tablecaption}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@letfloattype{supertabular}{}% + \let\caption@fixposition\caption@setSTposition + \caption@beginex{#1}{#2}{#3}% + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{% + \csname the#1\endcsname}{\ignorespaces #2}}% + \@parboxrestore + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end}% +} +\endinput +%% +%% End of file `caption_2007-04-16.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty b/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty new file mode 100644 index 00000000000..a3252632f01 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption_2010-01-09.sty @@ -0,0 +1,1645 @@ +%% +%% This is file `caption_2010-01-09.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.1/caption.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption}[2010/01/09 v3.1m Customizing captions (AR)] +\newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}} +\@onlypreamble\caption@Info +\RequirePackage{caption3}[=2008/08/24] % needs v1.1j or newer +\caption@ifbool{documentclass}{}{% + \caption@WarningNoLine{% + Unsupported document class (or package) detected,\MessageBreak + usage of the caption package is not recommended}% + \caption@Info{\string\@makecaption\space=\space\meaning\@makecaption}% +} +\@ifpackageloaded{caption2}{% + \caption@Error{% + You can't use both, the (obsolete) caption2 *and*\MessageBreak + the (current) caption package}% + \endinput +}{} +\caption@AtBeginDocument{% + \@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}% + \@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}% + \@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}} +\newcommand*\caption@DisablePositionOption[1]{% + \caption@Info{% + `#1' package detected; setting `position=b' for compatibility reasons}% + \caption@setposition b% + \DeclareCaptionOption{position}{% + \caption@Error{Usage of the `position' option is incompatible\MessageBreak + to the `#1' package}}} +\@onlypreamble\caption@DisablePositionOption +\DeclareCaptionOption{figureposition}{% + \captionsetup*[figure]{position=#1}} +\@onlypreamble@key{caption}{figureposition} +\DeclareCaptionOption{tableposition}{% + \captionsetup*[table]{position=#1}} +\@onlypreamble@key{caption}{tableposition} +\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}} +\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}} +\DeclareCaptionOption{name}{\caption@setname\@captype{#1}} +\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}} +\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}} +\newcommand*\caption@SetName[2]{% + \caption@setname{#1}{#2}% + \begingroup + \@ifundefined{languagename}{}{% + \@ifundefined{captions\languagename}{}{% + \expandafter\g@addto@macro\csname captions\languagename\endcsname + {\caption@setname{#1}{#2}}}}% + \endgroup} +\newcommand*\caption@setname[2]{\@namedef{#1name}{#2}} +\caption@AtBeginDocument{\let\caption@SetName\caption@setname} +\newcommand*\caption@DeclareWithinOption[1]{% + \DeclareCaptionOption{#1within}{\caption@Within{#1}{##1}}% + \DeclareCaptionOption{#1without}{\caption@Within{#1}{none}}} +\caption@DeclareWithinOption{figure} +\caption@DeclareWithinOption{table} +\DeclareCaptionOption{within}{% + \@ifundefined{c@figure}{}{\caption@Within{figure}{#1}}% + \@ifundefined{c@table}{}{\caption@Within{table}{#1}}% + \caption@For{typelist}{\caption@Within{##1}{#1}}% + \def\caption@within@default{#1}} +\DeclareCaptionOption{without}{\KV@caption@within{none}} +\newcommand*\caption@Within[1]{\def\caption@type{#1}\KV@caption@DCT@within} +\DeclareCaptionOption*{config}[caption]{% + \InputIfFileExists{#1.cfg}% + {\typeout{*** Local configuration file #1.cfg used ***}}% + {\caption@Warning{Configuration file #1.cfg not found}}} +\DeclareCaptionOption{@minipage}{% + \caption@ifinlist{#1}{auto,default}% + {\let\caption@if@minipage\@gobbletwo}% + {\caption@set@bool\caption@if@minipage{#1}}} +\captionsetup{@minipage=default} +\DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}} +\@onlypreamble@key{caption}{compatibility} +\DeclareCaptionOptionNoValue*{normal}{% + \caption@setformat{plain}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{isu}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{hang}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{center}{% + \caption@setformat{plain}% + \caption@setjustification{centering}} +\DeclareCaptionOptionNoValue*{anne}{% + \caption@setformat{plain}% + \caption@setjustification{centerlast}} +\DeclareCaptionOptionNoValue*{centerlast}{% + \caption@setformat{plain}% + \caption@setjustification{centerlast}} +\DeclareCaptionOptionNoValue*{scriptsize}{\def\captionfont{\scriptsize}} +\DeclareCaptionOptionNoValue*{footnotesize}{\def\captionfont{\footnotesize}} +\DeclareCaptionOptionNoValue*{small}{\def\captionfont{\small}} +\DeclareCaptionOptionNoValue*{normalsize}{\def\captionfont{\normalsize}} +\DeclareCaptionOptionNoValue*{large}{\def\captionfont{\large}} +\DeclareCaptionOptionNoValue*{Large}{\def\captionfont{\Large}} +\DeclareCaptionOptionNoValue*{up}{\l@addto@macro\captionlabelfont\upshape} +\DeclareCaptionOptionNoValue*{it}{\l@addto@macro\captionlabelfont\itshape} +\DeclareCaptionOptionNoValue*{sl}{\l@addto@macro\captionlabelfont\slshape} +\DeclareCaptionOptionNoValue*{sc}{\l@addto@macro\captionlabelfont\scshape} +\DeclareCaptionOptionNoValue*{md}{\l@addto@macro\captionlabelfont\mdseries} +\DeclareCaptionOptionNoValue*{bf}{\l@addto@macro\captionlabelfont\bfseries} +\DeclareCaptionOptionNoValue*{rm}{\l@addto@macro\captionlabelfont\rmfamily} +\DeclareCaptionOptionNoValue*{sf}{\l@addto@macro\captionlabelfont\sffamily} +\DeclareCaptionOptionNoValue*{tt}{\l@addto@macro\captionlabelfont\ttfamily} +\DeclareCaptionOptionNoValue*{nooneline}{\caption@setbool{slc}{0}} +\caption@setbool{ruled}{0} +\DeclareCaptionOptionNoValue*{ruled}{\caption@setbool{ruled}{1}} +\DeclareCaptionOptionNoValue*{flushleft}{% + \caption@setformat{plain}% + \caption@setjustification{raggedright}} +\DeclareCaptionOptionNoValue*{flushright}{% + \caption@setformat{plain}% + \caption@setjustification{raggedleft}} +\DeclareCaptionOptionNoValue*{oneline}{\caption@setbool{slc}{1}} +\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{% + \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}} +\DeclareCaptionOption*{caption}{% + \caption@setbool{temp}{#1}% + \caption@ifbool{temp}{}{% + \caption@Error{% + The package option `caption=#1' is obsolete.\MessageBreak + Please pass this option to the subfig package instead\MessageBreak + and do *not* load the caption package anymore}}} +\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}} +\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}} +\@onlypreamble@key{caption}{FPlist} +\@onlypreamble@key{caption}{FPref} +\newcommand*\caption@setFPoption[2]{% + \edef\caption@tempa{\@car#2\@nil}% + \caption@setbool{FP#1cap}{\if c\caption@tempa 1\else 0\fi}} +\@onlypreamble\caption@setFPoption +\captionsetup{FPlist=caption,FPref=figure} +\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}} +\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}} +\captionsetup{hypcap=1,hypcapspace=.5\baselineskip} +\caption@ifamsclass{% + \caption@Info{AMS or SMF document class}% + \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class +} +\caption@ifkomaclass{% + \caption@Info{KOMA-Script document class}% + \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}} + \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}} + \if@tablecaptionabove + \@tablecaptionabovetrue + \else + \@tablecaptionabovefalse + \fi + \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo} + \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo} + \ifonelinecaptions + \onelinecaptionstrue + \else + \onelinecaptionsfalse + \fi + \g@addto@macro\@captionabovetrue{\let\caption@position\@firstoftwo} + \g@addto@macro\@captionabovefalse{\let\caption@position\@secondoftwo} + \DeclareCaptionOption{figureposition}{% + \caption@WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}} + \DeclareCaptionOption{tableposition}{% + \caption@WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}} + \let\caption@KOMA@setcapindent\@setcapindent + \renewcommand*\@setcapindent[1]{% + \caption@KOMA@setcapindent{#1}\caption@setcapindent} + \let\caption@KOMA@@setcapindent\@@setcapindent + \renewcommand*\@@setcapindent[1]{% + \caption@KOMA@@setcapindent{#1}\caption@setcapindent} + \newcommand*\caption@setcapindent{% + \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}} + \@ifundefined{cap@indent}{}{\caption@setcapindent} + \expandafter\let\expandafter\caption@KOMA@setcapwidth + \csname\string\setcapwidth\endcsname + \@namedef{\string\setcapwidth}[#1]#2{% + \caption@KOMA@setcapwidth[#1]{#2}\caption@setcapwidth{#1}} + \newcommand*\caption@setcapwidth[1]{% + \ifx\\#1\\\else + \@ifundefined{cap@margin}{}{% + \def\@tempa{captionbeside}% + \ifx\@tempa\@currenvir\else\caption@Warning{% + Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}% + \fi}% + \fi + \captionsetup{width=\cap@width}} + \def\caption@tempa{\hsize}% + \ifx\caption@tempa\cap@width \else + \caption@setcapwidth{?} + \fi + \expandafter\let\expandafter\caption@KOMA@setcapmargin + \csname\string\@setcapmargin\endcsname + \@namedef{\string\@setcapmargin}[#1]#2{% + \caption@KOMA@setcapmargin[#1]{#2}\caption@setcapmargin} + \expandafter\let\expandafter\caption@KOMA@@setcapmargin + \csname\string\@@setcapmargin\endcsname + \@namedef{\string\@@setcapmargin}[#1]#2{% + \caption@KOMA@@setcapmargin[#1]{#2}\caption@setcapmargin} + \newcommand*\caption@setcapmargin{% + \begingroup + \let\onelinecaptionsfalse\relax + \def\@twoside{0}% + \def\if@twoside{\def\@twoside{1}\iffalse}% + \cap@margin + \def\@tempa{\endgroup}% + \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else + \def\hspace##1##{\@firstofone}% + \edef\@tempa{\endgroup + \noexpand\captionsetup{% + twoside=\@twoside,slc=0,% + margin={\cap@left,\cap@right}}}% + \fi\fi + \@tempa} + \ifx\cap@margin\relax \else + \caption@setcapmargin + \fi +} +\caption@ProcessOptions*{caption} +\caption@AtBeginDocument{% + \DeclareCaptionOption{type}{\caption@settype{#1}}% + \DeclareCaptionOption{type*}{\caption@settype*{#1}}% + \DeclareCaptionOption{subtype}[sub\@captype]{\caption@setsubtype{#1}}% + \DeclareCaptionOption{subtype*}[sub\@captype]{\caption@setsubtype*{#1}}% +} +\newcommand*\caption@settype{% + \caption@@settype{}} +\newcommand*\caption@setsubtype{% + \caption@iftype + {\caption@@settype{sub}}% + {\caption@Error{Option `subtype=' outside float}}}% +\newcommand*\caption@@settype[1]{% + \caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo} +\newcommand*\caption@@@settype[3]{% + \@ifundefined{c@#3}% + {\caption@Error{No float type '#3' defined}}% + {\caption@Debug{#1type=#3}% + \caption@checkgrouplevel{#1}{% + \captionsetup{#1type#2*\@empty=...}#2{ or + \@backslashchar#1captionof}{}}% + \edef\caption@tempa{#3}% + \expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else + \ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi + \fi + \expandafter\let\csname @#1captype\endcsname\caption@tempa + \@nameuse{caption@#1typehook}% + \caption@setoptions{#3}% + \ifx\caption@opt\relax + \@nameundef{caption@#1type@warning}% + \else + \@namedef{caption@#1type@warning}{\caption@Warning{% + The #1caption type was already set to + `\csname @#1captype\endcsname'\MessageBreak}}% + \fi + \let\caption@ifrefstepcounter\@secondoftwo + #2{}{% + \let\@currentlabel\caption@undefinedlabel + \ifx\caption@ORI@label\@undefined + \let\caption@ORI@label\label + \let\label\caption@xlabel + \fi + \caption@start}}} +\newcommand*\caption@typehook{} +\newcommand*\caption@iftype{% + \@ifundefined{@captype}{\let\@captype\@undefined\@secondoftwo}\@firstoftwo} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname currentgrouplevel\endcsname\relax + \caption@Debug{TeX engine: TeX} + \let\caption@checkgrouplevel\@gobbletwo +\else + \caption@Debug{TeX engine: e-TeX} + \newcommand*\caption@checkgrouplevel[2]{% + \@ifundefined{#1caption@grouplevel}{% + \@ifundefined{caption@grouplevel}{\let\caption@grouplevel\z@}{}% + \ifnum\currentgrouplevel>\caption@grouplevel\relax + \expandafter\edef\csname #1caption@grouplevel\endcsname{% + \the\currentgrouplevel}% + \else + \caption@Warning{\string#2\MessageBreak outside box or environment}% + \fi + }{}} +\fi +\newcommand*\caption@undefinedlabel{% + \protect\caption@xref{\caption@labelname}{\on@line}} +\DeclareRobustCommand*\caption@xref[2]{% + \caption@WarningNoLine{\noexpand\label before \string\caption#2}% + \@setref\relax\@undefined{#1}} +\newcommand*\caption@labelname{??} +\newcommand*\caption@xlabel[1]{% + \caption@@xlabel + \def\caption@labelname{#1}% + \caption@ORI@label{#1}} +\newcommand*\caption@@xlabel{% + \global\let\caption@@xlabel\@empty + \@bsphack + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@xref[2]{% + \string\@setref\string\relax\string\@undefined{\string##1}}}% + \@esphack} +\caption@AtBeginDocument{% + \def\captionof{\caption@teststar\caption@of{\caption*}\caption}} +\newcommand*\caption@of[2]{\caption@settype*{#2}#1} +\newcommand*\captionlistentry{% + \caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo} +\newcommand*\@captionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@captype} +\def\caption@listentry#1[#2]#3{% + \@bsphack + #1{\caption@gettitle{#3}}% + {\caption@refstepcounter{#2}% + \caption@makecurrent{#2}{#3}}% + \caption@addcontentsline{#2}{#3}% + \@esphack} +\def\ContinuedFloat{% + \@ifnextchar[\@Continued@Float\@ContinuedFloat} +\def\@Continued@Float[#1]{\addtocounter{#1}\m@ne} +\def\@ContinuedFloat{% + \caption@iftype + {\addtocounter\@captype\m@ne + \caption@ContinuedFloat\@captype}% + {\caption@Error{\noexpand\ContinuedFloat outside float}}} +\def\caption@ContinuedFloat#1{% + \@ifstar{\caption@Continued@Float@{#1}}{\caption@Continued@Float{#1}}} +\def\caption@Continued@Float@{% + \addtocounter\@captype\@ne + \@stpelt{ContinuedFloat}\stepcounter{ContinuedFloat}% + \def\caption@resetContinuedFloat##1{\xdef\caption@CFtype{##1}}% + \caption@@ContinuedFloat} +\def\caption@Continued@Float#1{% + \edef\caption@tempa{#1}% + \ifx\caption@tempa\caption@CFtype + \stepcounter{ContinuedFloat}% + \let\caption@resetContinuedFloat\@gobble + \caption@@ContinuedFloat{#1}% + \sf@ContinuedFloat{#1}% + \else + \caption@Error{Continued `#1' after `\caption@CFtype'}% + \fi} +\def\caption@@ContinuedFloat#1{% + \expandafter\l@addto@macro\csname the#1\endcsname\theContinuedFloat + \@ifundefined{theH#1}{}{% + \expandafter\l@addto@macro\csname theH#1\endcsname{% + \@alph\c@ContinuedFloat}}% + \caption@setoptions{ContinuedFloat}% + \caption@setoptions{continued#1}} +\providecommand*\sf@ContinuedFloat[1]{} +\newcommand*\caption@CFtype{??} +\newcounter{ContinuedFloat} +\let\theContinuedFloat\@empty +\newcommand*\caption@resetContinuedFloat[1]{% + \@stpelt{ContinuedFloat}\xdef\caption@CFtype{#1}} +\newcommand*\caption@refstepcounter[1]{% + \caption@resetContinuedFloat{#1}% + \caption@@refstepcounter{#1}% + \let\caption@ifrefstepcounter\@firstoftwo} +\newcommand*\caption@@refstepcounter{\refstepcounter} +\let\caption@ifrefstepcounter\@secondoftwo +\@ifundefined{kernel@ifnextchar}% + {\newcommand\caption@dblarg[1]{\@ifnextchar[{#1}{\caption@xdblarg{#1}}}}% + {\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}}% +\newcommand\caption@xdblarg[2]{#1[{#2\relax}]{#2}}% +\newcommand*\caption@begin[1]{% + \begingroup + \caption@setfnum{#1}% + \caption@fixposition + \global\let\caption@fixedposition\caption@position} +\newcommand\caption@beginex[3]{% + \caption@begin{#1}% + \caption@addcontentsline{#1}{#2}% + \caption@ifempty{#3}{}} +\newcommand*\caption@end{% + \endgroup + \let\caption@position\caption@fixedposition} +\newcommand*\caption@setfnum[1]{% + \@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}% + \@namedef{fnum@#1}{\caption@fnum{#1}}% + \fi} +\newcommand*\caption@boxrestore{% + \let\if@nobreak\iffalse + \let\if@noskipsec\iffalse + \let\par\@@par + \parindent\z@ \parskip\z@skip + \everypar{}% + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip + \parfillskip\@flushglue \lineskip\normallineskip + \baselineskip\normalbaselineskip + \sloppy + \let\\\@normalcr +} +\newcommand*\caption@normalsize{% + \caption@font*{\KV@caption@fnt@normal\@unused}} +\let\caption@setfloatcapt\@firstofone +\newcommand*\caption@makecurrent[2]{} +\let\caption@makeanchor\@firstofone +\let\caption@start\relax +\let\caption@@start\relax +\let\caption@freezeHref\relax +\let\caption@defrostHref\relax +\newcommand\caption@gettitle[1]{% + \@ifundefined{NR@gettitle}% + {\def\@currentlabelname{#1}}% + {\NR@gettitle{#1}}} +\def\caption@caption{% + \caption@iftype + {\caption@checkgrouplevel\@empty\caption + \caption@star + {\caption@refstepcounter\@captype}% + {\caption@dblarg{\@caption\@captype}}}% + {\caption@Error{\noexpand\caption outside float}}}% +\newcommand*\caption@star[2]{% + \@ifstar{\global\caption@startrue#2[]}{#1#2}}% +\long\def\caption@@caption#1[#2]#3{% + \ifcaption@star \else + \caption@prepareanchor{#1}{#2}% + \fi + \par + \caption@beginex{#1}{#2}{#3}% + \caption@setfloatcapt{% + \caption@boxrestore + \if@minipage + \@setminipage + \fi + \caption@normalsize + \ifcaption@star + \let\caption@makeanchor\@firstofone + \fi + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces\caption@makeanchor{#3}}\par + \caption@if@minipage\@minipagetrue\@minipagefalse}% + \caption@end}% +\newcommand*\caption@prepareanchor[2]{% + \caption@makecurrent{#1}{#2}% + \caption@ifhypcap\caption@@start{}} +\long\def\caption@makecaption#1#2{% + \caption@iftop + {\vskip\belowcaptionskip}% + {\caption@rule\vskip\abovecaptionskip}% + \caption@@make{#1}{#2}% + \caption@iftop + {\vskip\abovecaptionskip\caption@rule}% + {\vskip\belowcaptionskip}} +\newcommand*\caption@redefine{} +\g@addto@macro\caption@redefine{% + \caption@setbool{incompatible}{0}% + \caption@CheckCommand\caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% + \caption@CheckCommand\caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \def\caption{ + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside figure or table}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% + \caption@CheckCommand\caption{% + % float.sty [2001/11/08 v1.3d Float enhancements (AL)] + \renewcommand\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \let\@tempf\@caption + \expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else + \expandafter\expandafter\let + \expandafter\@tempf\csname @float@c@\@captype\endcsname + \fi + \fi + \@dblarg{\@tempf\@captype}}}% + \caption@CheckCommand\caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \@ifundefined{fst@\@captype}{% + \let\Hy@tempa\@caption + }{% + \let\Hy@tempa\Hy@float@caption + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% + \caption@CheckCommand\caption{% + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \let\Hy@tempa\@caption + \@ifundefined{float@caption}{% + }{% + \expandafter\ifx\csname @float@c@\@captype\endcsname\float@caption + \let\Hy@tempa\Hy@float@caption + \fi + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% + \caption@IfCheckCommand{}{% + \caption@Info{% + Incompatible package detected (regarding \string\caption).\MessageBreak + \string\caption\space=\space\meaning\caption}% + \caption@setbool{incompatible}{1}}% + \caption@CheckCommand\@caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup}}% + \caption@CheckCommand\@caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\@caption#1[#2]#3{% second argument ignored + \par\nobreak + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak + \endgroup}}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \hyper@makecurrent{\@captype}% + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2009/11/27 v6.79k Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }% + #3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2009/12/09 v6.79m Hypertext links for LaTeX] + % hyperref.sty [2009/12/28 v6.79z Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \@ifundefined{NR@gettitle}{% + \def\@currentlabelname{#2}% + }{% + \NR@gettitle{#2}% + }% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{% + \@currentHref + }{\relax}% + }% + #3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section] + \long\def\@caption#1[#2]{% + \def\@currentlabelname{#2}% + \NR@@caption{#1}[{#2}]% + }}% + \caption@CheckCommand\@caption{% + % nameref.sty [2009/11/27 v2.32 Cross-referencing by name of section] + \long\def\@caption#1[#2]{% + \NR@gettitle{#2}% + \NR@@caption{#1}[{#2}]% + }}% + \caption@CheckCommand\@caption{% + % subfigure.sty [2002/07/30 v2.1.4 subfigure package] + \long\def\@caption#1[#2]#3{% + \@ifundefined{if#1topcap}% + {\subfig@oldcaption{#1}[{#2}]{#3}}% + {\@nameuse{if#1topcap}% + \@listsubcaptions{#1}% + \subfig@oldcaption{#1}[{#2}]{#3}% + \else + \subfig@oldcaption{#1}[{#2}]{#3}% + \@listsubcaptions{#1}% + \fi}}}% + \caption@CheckCommand\@caption{% + % subfig.sty [2005/06/28 ver: 1.3 subfig package] + \def\@caption{\caption@}% + }% + \caption@IfCheckCommand{}{% + \caption@Info{% + Incompatible package detected (regarding \string\@caption).\MessageBreak + \string\@caption\space=\space\meaning\@caption}% + \caption@setbool{incompatible}{1}}% + \@ifundefined{caption@ifcompatibility}% + {\let\caption@ifcompatibility\caption@ifincompatible + \let\caption@tempa\caption@WarningNoLine}% + {\let\caption@tempa\@gobble}% suppress warning + \caption@ifcompatibility{% + \caption@tempa{% + \noexpand\caption will not be redefined since it's already\MessageBreak + redefined by a document class or package which is\MessageBreak + unknown to the caption package}% + \renewcommand*\caption@redefine{}% + \renewcommand*\caption@ContinuedFloat[1]{% + \caption@Error{Not available in compatibility mode}}% + \caption@AtBeginDocument*{% + \let\caption@start\relax + \@ifundefined{caption@ORI@capstart}{}{% + \caption@Debug{% + Restore hypcap definition of \string\capstart\@gobble}% + \let\capstart\caption@ORI@capstart}% + \@ifundefined{caption@ORI@float@makebox}{}{% + \caption@Debug{% + Restore hyperref redefinition of \string\float@makebox\@gobble}% + \let\float@makebox\caption@ORI@float@makebox}% + }% + \renewcommand*\caption@star[2]{#1#2}% + }{% + \caption@ifincompatible{% + \caption@WarningNoLine{% + Forced redefinition of \noexpand\caption since the\MessageBreak + unsupported(!) package option `compatibility=false'\MessageBreak + was given}% + }{}% + \renewcommand*\caption@redefine{% + \let\caption\caption@caption + \let\@caption\caption@@caption}% + \caption@redefine + }% + \caption@AtBeginDocument*{% + \let\caption@ORI@capstart\@undefined + \let\caption@ORI@float@makebox\@undefined}% + \let\caption@ORI@xfloat\@xfloat + \def\@xfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}}% +} +\caption@AtBeginDocument{\caption@redefine} +\let\@makecaption\caption@makecaption +\def\caption@DeclareSubType sub#1\@nil{% + \caption@Debug{Initializing subtype for `#1'\@gobble}% + \@namedef{caption@c@#1}{0}% + \@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}} +\@onlypreamble\caption@DeclareSubType +\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil} +\caption@AtBeginDocument*{% + \@ifundefined{sf@counterlist}{}{% + \@for\sf@temp:=\sf@counterlist\do{% + \expandafter\caption@DeclareSubType\sf@temp\@nil}}} +\newcommand*\caption@subtypehook{% + \ifx\caption\caption@subcaption \else + \caption@ifrefstepcounter{}{% + % no \caption or \subcaption in this (floating) environment yet + \caption@Debug{Increment \@captype\ counter =\the\value\@captype}% + \caption@l@stepcounter\@captype + \let\addcontentsline\caption@addsubcontentsline}% + \ifnum\csname caption@c@\@captype\endcsname=\value\@captype \else + \caption@Debug{Reset sub\@captype\ counter}% + \expandafter\xdef\csname caption@c@\@captype\endcsname{% + \the\value\@captype}% + \@stpelt\@subcaptype + \fi + \c@ContinuedFloat=0\relax + \let\caption@resetContinuedFloat\@gobble + \let\caption@addcontentsline\caption@kernel@addcontentsline + \let\caption@setfloatcapt\@firstofone + \caption@clearmargin + \caption@iflist{}{\let\caption@setlist\@gobble}% + \caption@setoptions{sub}% + \caption@setoptions{subfloat}% for subfig-package compatibility + \let\caption\caption@subcaption + \let\@makecaption\caption@makecaption + \fi}% +\newcommand*\caption@subcaption{% + \caption@iftype + {\caption@checkgrouplevel{sub}\subcaption + \caption@star + {\caption@refstepcounter\@subcaptype}% + {\caption@dblarg{\@caption\@subcaptype}}}% + {\caption@Error{\noexpand\subcaption outside float}}} +\let\caption@kernel@addcontentsline\caption@addcontentsline +\renewcommand*\caption@addcontentsline[2]{% + \sf@ifpositiontop{\@listsubcaptions{#1}}{}% + \caption@kernel@addcontentsline{#1}{#2}% + \sf@ifpositiontop{}{\@listsubcaptions{#1}}% + \caption@addsubcontentslines{#1}} +\newcommand*\caption@addsubcontentslines[1]{% + \begingroup + \caption@subcontentslines + \endgroup + \caption@clearsubcontentslines}% +\caption@AtBeginDocument*{% + \@ifundefined{sf@ifpositiontop}{\let\sf@ifpositiontop\@gobbletwo}{}% + \caption@clearsubcontentslines + \g@addto@macro\caption@typehook{\caption@checksubcontentslines}% + \AtEndDocument{\caption@checksubcontentslines}}% +\newcommand*\caption@addsubcontentsline[3]{% + \begingroup + \let\label\@gobble \let\index\@gobble \let\glossary\@gobble + \protected@edef\@tempa{\endgroup + \noexpand\g@addto@macro\noexpand\caption@subcontentslines{% + \noexpand\@namedef{the#2}{\csname the#2\endcsname}% + \ifx\@currentHref\@undefined \else + \noexpand\def\noexpand\@currentHref{\@currentHref}% + \fi + \protect\addcontentsline{#1}{#2}{#3}}}% + \@tempa} +\newcommand*\caption@checksubcontentslines{% + \ifx\caption@subcontentslines\@empty \else + \caption@Error{% + Something's wrong--perhaps a missing \protect\caption\MessageBreak + in the last figure or table}% + \caption@clearsubcontentslines + \fi} +\newcommand*\caption@clearsubcontentslines{% + \global\let\caption@subcontentslines\@empty} +\@ifundefined{smf@makecaption}{}{\let\smf@makecaption\@makecaption} +\@ifclassloaded{beamer}{% + \caption@Info{beamer document class}% + \captionsetup{list=false} + \DeclareCaptionOption{list}[1]{} + \DeclareCaptionOption{listof}[1]{} + \expandafter\let\expandafter\caption@ORI@figure + \csname\string\figure\endcsname + \@namedef{\string\figure}[#1]{% + \caption@ORI@figure[#1]% + \caption@settype{figure}} + \expandafter\let\expandafter\caption@ORI@table + \csname\string\table\endcsname + \@namedef{\string\table}[#1]{% + \caption@ORI@table[#1]% + \caption@settype{table}} +}{} +\@ifundefined{scr@caption}{}{% + \caption@AtBeginDocument{\let\scr@caption\caption}} +\@nameuse{caption@frenchb}\@nameundef{caption@frenchb} +\caption@AtBeginDocument{\@ifundefined{frenchTeXmods}{}{% + \caption@Info{frenchle/pro package is loaded}% + \let\captionfont@ORI\captionfont + \let\captionlabelfont@ORI\captionlabelfont + \let\@makecaption@ORI\@makecaption + + \@ifundefined{GOfrench}% + {\let\caption@tempa\@firstofone}% + {\def\caption@tempa{\g@addto@macro\GOfrench}}% + \caption@tempa{% + \let\captionfont\captionfont@ORI + \let\captionfont@ORI\@undefined + \let\captionlabelfont\captionlabelfont@ORI + \let\captionlabelfont@ORI\@undefined + \let\@makecaption\@makecaption@ORI + \let\@makecaption@ORI\@undefined + \let\@cnORI\caption + \let\caption@tcORI\@tablescaption + \def\@tablescaption{\caption@star\relax\caption@tcORI}% + \let\@eatDP\@undefined + \let\caption@tempa\@empty + \ifx\f@ffrench\fnum@figure + \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}% + \fi + \ifx\f@tfrench\fnum@table + \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}% + \fi + \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% + \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% + \caption@tempa + }% +}} +\newcommand\caption@IfPackageLoaded[1]{% + \@testopt{\caption@@IfPackageLoaded{#1}}{}} +\@onlypreamble\caption@IfPackageLoaded +\long\def\caption@@IfPackageLoaded#1[#2]#3#4{% + \@ifpackageloaded{#1}\@firstofone{% + \caption@Debug{#1 package is not loaded (yet)\@gobble}% + \caption@AtBeginDocument}{% + \caption@@ifpackageloaded{#1}[#2]{#3}{#4}}} +\@onlypreamble\caption@@IfPackageLoaded +\newcommand\caption@ifpackageloaded[1]{% + \@testopt{\caption@@ifpackageloaded{#1}}{}} +\@onlypreamble\caption@ifpackageloaded +\long\def\caption@@ifpackageloaded#1[#2]{% + \@ifpackageloaded{#1}{% + \caption@Info{#1 package is loaded}% + \@ifpackagelater{#1}{#2}\@firstoftwo{% + \caption@Error{% + For a successful cooperation we need at least version\MessageBreak + `#2' of package #1,\MessageBreak + but only version\MessageBreak + `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak + is available}% + \@secondoftwo}% + }{\@secondoftwo}} +\@onlypreamble\caption@@ifpackageloaded +\newcommand*\caption@clearmargin{% + \setcaptionmargin\z@ + \let\caption@minmargin\@undefined} +\caption@setbool{needfreeze}{0} +\caption@AtBeginDocument*{% + \caption@ifneedfreeze{% + \newcommand*\caption@freeze{% + \caption@teststar\caption@@freeze\@gobble\@firstofone}% + \newcommand*\caption@@freeze[1]{% + \global\let\caption@SCcontinued\relax + \global\let\caption@SCsetup\@undefined + \global\let\caption@SClentry\@undefined + \global\let\caption@SCtext\@undefined + \global\let\caption@SClabel\@undefined + \let\caption@ORI@ContinuedFloat\ContinuedFloat + \def\ContinuedFloat{% + \caption@withoptargs\caption@SC@ContinuedFloat}% + \def\caption@SC@ContinuedFloat##1{% + \let\caption@ORI@setcounter\setcounter + \let\caption@ORI@addtocounter\addtocounter + \def\setcounter####1####2{\csname c@####1\endcsname####2\relax}% + \def\addtocounter####1####2{\advance\csname c@####1\endcsname ####2\relax}% + \caption@ORI@ContinuedFloat##1% + \global\let\caption@SCcontinued\caption@ORI@ContinuedFloat + \let\setcounter\caption@ORI@setcounter + \let\addtocounter\caption@ORI@addtocounter}% + \let\caption@ORI@setup\captionsetup + \def\captionsetup{% + \caption@withoptargs\caption@SC@setup}% + \def\caption@SC@setup##1##2{% + \caption@g@addto@list\caption@SCsetup{##2}% + \caption@ORI@setup##1{##2}}% + \let\caption@ORI\caption + \def\caption{% + \def\caption{\caption@Error{% + Only one \noexpand\caption can be placed in this environment}}% + \let\captionsetup\caption@setup + \let\caption@@refstepcounter\caption@l@stepcounter + \caption@ORI}% + \long\def\@caption##1[##2]##3{% + \@bsphack + \gdef\caption@SClentry{##2}% + \gdef\caption@SCtext{##3}% + \@esphack}% + #1{% is \@gobble in star form, and \@firstofone otherwise + \def\label##1{\@bsphack\gdef\caption@SClabel{##1}\@esphack}}% + }% + \newcommand*\caption@defrost{% + \ifx\caption@ORI@ContinuedFloat\@undefined + \caption@defrost@setup + \ifx\caption@SCtext\@undefined \else + \expandafter\expandafter\expandafter\caption + \expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter{% + \expandafter\caption@SClentry\expandafter}\expandafter]% + \expandafter{\caption@SCtext}% + \fi + \ifx\caption@SClabel\@undefined \else + \expandafter\label\expandafter{\caption@SClabel}% + \fi + \else + \caption@Error{Internal Error:\MessageBreak + \noexpand\caption@defrost in same group as \string\caption@freeze}% + \fi}% + \newcommand*\caption@defrost@setup{% + \caption@SCcontinued + \ifx\caption@SCsetup\@undefined \else + \expandafter\captionsetup\expandafter{\caption@SCsetup}% + \fi}% + }{}% + \caption@undefbool{needfreeze}} +\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{% + \@ifpackageloaded{floatrow}{% + \caption@ifpackageloaded{floatrow}[2007/08/24 v0.2a]{}{}% + }{% + \let\caption@ORI@float@setevery\@float@setevery + \def\@float@setevery#1{% + \float@ifcaption{#1}{% + \caption@setposition{\@fs@iftopcapt t\else b\fi}% + \renewcommand\caption@setfloatcapt[1]{% + \let\@makecaption\caption@@make + \global\setbox\@floatcapt\vbox{% + \color@begingroup ##1\color@endgroup}}% + \float@getstyle\float@style{#1}% + \caption@setstyle*\float@style + \caption@setoptions\float@style + }{}% + \caption@freezeHref % will be defrosted in \float@makebox + \caption@ORI@float@setevery{#1}}% + \g@addto@macro\caption@typehook{% + \expandafter\ifx\csname #1name\endcsname\relax + \expandafter\let\csname #1name\expandafter\endcsname + \csname fname@#1\endcsname + \fi}% + \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% + \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% + \providecommand*\float@ifstyle[1]{% + \expandafter\ifx\csname fst@#1\endcsname\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \providecommand*\float@getstyle[2]{% + \edef#1{% + \noexpand\expandafter\noexpand\@gobblefour\noexpand\string + \expandafter\expandafter\expandafter\noexpand + \csname fst@#2\endcsname}% + \edef#1{#1}% + \caption@Debug{floatstyle{#2} = `#1'}}% + \providecommand*\float@setstyle[2]{% + \expandafter\edef\csname fst@#1\endcsname{% + \expandafter\noexpand\csname fs@#2\endcsname}}% + \providecommand*\float@dostyle[1]{% + \@nameuse{fst@#1}\@float@setevery{#1}}% + \providecommand*\float@ifcaption[1]{% + \expandafter\ifx\csname @float@c@#1\endcsname\float@caption + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}% +}}{% + \providecommand*\float@ifstyle[1]{\@secondoftwo}% + \providecommand*\float@ifcaption[1]{\@secondoftwo}% +} +\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used +\caption@ifbool{ruled}{% + \captionsetup[ruled]{margin=0pt,minmargin=0,slc=0}% +}{% + \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% +} +\caption@undefbool{ruled} +\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{% + \let\caption@ORI@floatingfigure\floatingfigure + \def\floatingfigure{% + \caption@floatflt{figure}% + \caption@ORI@floatingfigure}% + \let\caption@ORI@floatingtable\floatingtable + \def\floatingtable{% + \caption@floatflt{table}% + \caption@ORI@floatingtable}% + \newcommand*\caption@floatflt[1]{% + \caption@settype{#1}% + \caption@clearmargin + \caption@setoptions{floating#1}% + \let\caption@boxrestore\@parboxrestore}% +}{} +\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% + \caption@setbool{needfreeze}{1}% + \renewcommand\FP@helpNote[2]{% + \begingroup % save \caption@thepage + \caption@pageref{#2}% + \typeout{FP#1 is inserted on page \caption@thepage!}% + \endgroup}% + \renewcommand*\FP@floatBegin[1]{% + \def\@captype{#1}% + \let\FP@LabelText\@empty + \begin{lrbox}{\FP@floatCorpusBOX}% + \caption@ifFPrefcap + {\caption@freeze\relax}% + {\def\label##1{\@bsphack\gdef\FP@LabelText{##1}\@esphack}% + \caption@freeze*}% + \ignorespaces}% + \renewcommand*\FP@floatEnd{% + \end{lrbox}% + \stepcounter{FP@\@captype C}% + \caption@label\FP@positionLabel + \FP@helpNote\@captype\FP@positionLabel + \edef\FP@RestoreCounter{% + \noexpand\setcounter{\@captype}{\the\value\@captype}% + \noexpand\setcounter{ContinuedFloat}{\the\value{ContinuedFloat}}}% + \FP@float + {\FP@positionLabel}% location label test + {\begin\@captype[p!]% + \usebox\FP@floatCorpusBOX + \caption@defrost@setup + \caption@ifFPlistcap + {\caption@refstepcounter\@captype + \expandafter\caption@makecurrent\expandafter\@captype + \expandafter{\caption@SClentry}}% + {\expandafter\captionlistentry\expandafter{\caption@SClentry}}% + \caption@makeanchor\relax + \ifx\FP@LabelText\@empty \else + \expandafter\label\expandafter{\FP@LabelText}% + \fi + \end\@captype}% + {\FP@RestoreCounter + \@ifundefined{theH\@captype}{}{% + \expandafter\l@addto@macro\csname theH\@captype\endcsname{.FP}}}% + {\begin\@captype[b!]% + \let\FP@savedSetfnumCommand\caption@setfnum + \def\caption@setfnum##1{% + \FP@savedSetfnumCommand{##1}% + \ifx\FP@guide\@empty \else + \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}% + \fi}% + \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption + \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption + \caption@setoptions{FP\@captype}% + \FP@separatorCaption + \caption@ifFPlistcap{}{\let\caption@addcontentsline\@gobbletwo}% + \caption@defrost + \end\@captype}% + }% + \caption@For{typelist}{% + \newcounter{FP@#1C}% + \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}}% +}{% + \let\caption@ifFPlistcap\@undefined + \let\caption@ifFPrefcap\@undefined +} +\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{% + \@ifundefined{hyper@makecurrent}{% hyperref has stopped early + \caption@WarningNoLine{% + Hyperref support is turned off\MessageBreak + because hyperref has stopped early}% + }{% + \g@addto@macro\caption@prepareslc{\measuring@true}% + \renewcommand*\caption@@refstepcounter{\H@refstepcounter}% + \renewcommand*\caption@makecurrent[2]{% + \caption@makecurrentHref{#1}% + \caption@Debug{hyperref current=\@currentHref}% + \caption@gettitle{#2}}% + \newcommand*\caption@makecurrentHref{\hyper@makecurrent}% + \renewcommand\caption@makeanchor[1]{% + \caption@Debug{hyperref anchor: \@currentHref}% + % If we cannot have nesting, the anchor is empty. + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#1}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }#1% + \fi}% + \g@addto@macro\caption@prepareslc{\let\caption@makeanchor\@firstofone}% + \newif\if@capstart + \def\caption@start{\caption@ifhypcap\caption@start@\relax}% + \def\caption@start@{% + \caption@makestart\@captype + \caption@startanchor\@currentHref + \global\@capstarttrue + \let\hc@currentHref\@currentHref + \def\caption@makecurrentHref##1{% + \global\@capstartfalse + \global\let\@currentHref\hc@currentHref}% + \let\caption@makeanchor\@firstofone + }% + \newcommand*\caption@makestart[1]{% + \begingroup + \Hy@hypertexnamesfalse + \hyper@makecurrent{#1.caption}% + \endgroup + \caption@Debug{hypcap start=\@currentHref}}% + \newcommand*\caption@startanchor[1]{% + \ifvmode\begingroup + \caption@Debug{hypcap anchor: #1 (vertical mode)}% + \@tempdima\prevdepth + \nointerlineskip + \vspace*{-\caption@hypcapspace}% + \caption@anchor{#1}% + \vspace*{\caption@hypcapspace}% + \prevdepth\@tempdima + \endgroup\else + \caption@Debug{hypcap anchor: #1 (horizontal mode)}% + \caption@anchor{#1}% + \fi}% + \newcommand*\caption@anchor[1]{% + \ifmeasuring@ \else + \caption@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}% + \fi}% + \ifx\HyperRaiseLinkLength\@tempdima + \def\caption@raisedlink#1{\ifvmode#1\else\Hy@raisedlink{#1}\fi}% + \else + \let\caption@raisedlink\Hy@raisedlink + \fi + \def\caption@@start{% + \@ifundefined{hc@currentHref}{% + \caption@Warning{% + The option `hypcap=true' will be ignored for this\MessageBreak + particular \string\caption}}{}}% + \def\caption@freezeHref{% + \let\caption@ORI@start\caption@start + \def\caption@start{\let\caption@start\caption@ORI@start}% + \global\let\caption@currentHref\@undefined + \def\caption@@start{\global\let\caption@currentHref\@currentHref}% + \let\caption@ORI@setfloatcapt\caption@setfloatcapt + \renewcommand*\caption@setfloatcapt{% + \ifx\caption@currentHref\@undefined \else + \let\caption@makeanchor\@firstofone + \fi + \caption@ORI@setfloatcapt}}% + \def\caption@defrostHref{% + \ifx\caption@currentHref\@undefined \else + \caption@startanchor\caption@currentHref + \global\let\caption@currentHref\@undefined + \fi}% + \@ifundefined{HyOrg@float@makebox}{}{% + \caption@Debug{% + Redefining \noexpand\float@makebox (again)\@gobble}% + \let\caption@ORI@float@makebox\float@makebox % save for compatibility mode + \renewcommand\float@makebox[1]{% + \HyOrg@float@makebox{#1\relax \caption@defrostHref}}% + }% +}}{} +\caption@IfPackageLoaded{hypcap}{% v1.0 + \ifx\caption@start\relax \else % hyperref hasn't stopped early + \let\caption@ORI@capstart\capstart % save for compatibility mode + \@ifundefined{capstarttrue}% check for v1.10 of hypcap package + {\def\capstart{\caption@start@}}% + {\def\capstart{\ifcapstart\caption@start@\fi}}% + \let\caption@start\relax + \let\caption@@start\relax + \caption@set@bool\caption@ifhypcap 1% + \renewcommand*\caption@hypcapspace{\hypcapspace}% + \fi}{} +\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% + \let\caption@ORI@lst@MakeCaption\lst@MakeCaption + \def\lst@MakeCaption#1{% #1 is `t' or `b' + \begingroup + \caption@setposition{#1}% + \caption@iftop{% + \@tempdima\belowcaptionskip + \belowcaptionskip\abovecaptionskip + \abovecaptionskip\@tempdima}{}% + \caption@setup{rule=0}% + \caption@setoptions{lstlisting}% + \caption@setautoposition{#1}% + \caption@begin{lstlisting}% + \caption@ORI@lst@MakeCaption{#1}% + \caption@end + \endgroup}% + \def\lst@makecaption{\caption@starfalse\@makecaption}% + \def\lst@maketitle{\caption@startrue\@makecaption\@empty}% + \providecommand*\ext@lstlisting{lol}% +}{} +\providecommand*\LTcaptype{table} +\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{% + \RequirePackage{ltcaption}[=2007/09/01]% + \let\LT@@makecaption\@undefined + \caption@AtBeginDocument{% + \let\caption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% + \global\let\caption@opt@@longtable\@undefined + \def\captionsetup{% + \noalign\bgroup + \@ifstar\@captionsetup\@captionsetup}% gobble * + \def\@captionsetup##1{\LT@captionsetup{##1}\egroup}% + \def\LT@captionsetup##1{% + \captionsetup@startrue\caption@setup@options[@longtable]{##1}% + \global\let\caption@opt@@longtable\caption@opt@@longtable}% + \def\@captionabovetrue{\LT@captionsetup{position=t}}% + \def\@captionabovefalse{\LT@captionsetup{position=b}}% + \def\captionlistentry{% + \noalign\bgroup + \@ifstar{\egroup\LT@captionlistentry}% gobble * + {\egroup\LT@captionlistentry}}% + \def\LT@captionlistentry##1{% + \caption@listentry\@firstoftwo[\LTcaptype]{##1}}% +%% \let\Hy@LT@currentHlabel\@currentHlabel +%% \let\@currentHlabel\Hy@LT@currentHlabel + \def\ContinuedFloat{\noalign{% + \caption@Error{\noexpand\ContinuedFloat outside float}}}% + \caption@ORI@LT@array}}% + \long\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}% + \LT@captionlistentry{#2}}% + \renewcommand\LT@makecaption[3]{% + \caption@LT@make{% + \caption@settype*\LTcaptype + \ifdim\LTcapwidth=4in \else + \setcaptionwidth\LTcapwidth + \fi + \caption@setoptions{longtable}% + \caption@setoptions{@longtable}% + \caption@setautoposition{\ifcase\LT@rows t\else b\fi}% + \caption@startrue#1\caption@starfalse + \caption@resetContinuedFloat\LTcaptype + \caption@begin\LTcaptype + \caption@normalsize + \vskip-\ht\strutbox + \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}% + \caption@@make{#2}{#3}\endgraf + \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}% + \caption@end}}% +}{} +\caption@IfPackageLoaded{picinpar}{% + \long\def\figwindow[#1,#2,#3,#4] {% + \caption@window{figure}% + \caption@setoptions{figwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \long\def\tabwindow[#1,#2,#3,#4] {% + \caption@window{table}% + \caption@setoptions{tabwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \newcommand*\caption@window[1]{% + \let\caption@boxrestore\@parboxrestore + \let\@makecaption\caption@@make + \caption@setautoposition b% + \caption@settype{#1}% + \caption@clearmargin}% + \newcommand\caption@wincaption[1]{% + \ifdim\picwd=\z@ + \let\caption@makecurrent\@gobbletwo + \let\caption@@start\relax + \caption@prepareslc + \fi + \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% + \if\@tempa*% + \let\@tempa\@firstofone + \else\if\@tempa[%] + \let\@tempa\@firstofone + \else + \let\@tempa\@empty + \fi\fi + \expandafter\caption\@tempa{#1}}% +}{} +\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}} +\caption@IfPackageLoaded{picins}{% + \@ifundefined{@piccaptype}{% + \caption@iftype{% + \let\@piccaptype\@captype + }{% + \def\@piccaptype{figure}% + }% + }{}% + \let\@captype\@undefined + \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}% + \let\caption@ORI@make@piccaption\make@piccaption + \def\make@piccaption{% + \let\caption@ORI\caption + \long\def\caption[##1]##2{% + \caption@freezeHref % will be defrosted in \ivparpic + \caption@settype\@piccaptype + \caption@clearmargin + \caption@setoptions{parpic}% + \let\caption@boxrestore\@parboxrestore + \caption@setautoposition b% + \expandafter\expandafter\expandafter\caption@ORI + \expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter{% + \expandafter##1\expandafter}\expandafter]\expandafter{##2}}% + \caption@ORI@make@piccaption + \let\caption\caption@ORI}% + + \let\caption@ORI@ivparpic\ivparpic + \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{% + \let\caption@ORI@noindent\noindent + \def\noindent{% + \caption@defrostHref + \let\noindent\caption@ORI@noindent + \noindent}% + \caption@ORI@ivparpic(#1,#2)(#3,#4)[#5][#6]{#7}% + \let\noindent\caption@ORI@noindent}% +}{% + \let\piccaptiontype\@undefined +} +\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{% + \def\rotcaption{\let\@makecaption\@makerotcaption\caption}% + \def\rotcaptionof{% + \caption@teststar\caption@of{\rotcaption*}\rotcaption}% + \long\def\@makerotcaption#1#2{% + \ifdim\captionwidth=\z@ + \setcaptionwidth{.8\textheight}% + \caption@slc{#1}{#2}{.8\vsize}{% + \let\caption@makerot\caption@@make + \caption@clearmargin + \let\caption@parbox\@secondoftwo}% + \caption@set@bool\caption@ifslc0% been there, done that + \fi + \rotatebox{90}{\caption@makerot{#1}{#2}}% + \nobreak\hspace{12pt}}% + \newcommand\caption@makerot[2]{% + \begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}% + \caption@For{typelist}{% + \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}% + \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}}% +}{} +\caption@IfPackageLoaded{sidecap}[1999/05/11 v1.4d]{% + \caption@setbool{needfreeze}{1}% + \caption@AtBeginDocument{\let\SC@caption=\caption}% + \let\caption@ORI@SC@zfloat\SC@zfloat + \def\SC@zfloat#1#2#3[#4]{% + \let\caption@ORI\caption + \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]% + \let\caption\caption@ORI + \caption@settype*{#2}% + \caption@freeze*}% + \let\caption@ORI@endSC@FLOAT\endSC@FLOAT + \def\endSC@FLOAT{% + \let\caption@ORI@settype\caption@settype + \def\caption@settype##1{% will be done in \@xfloat + \caption@ORI@settype*{##1}% do not change \@currentlabel + \caption@setSC@justify +%%% \caption@setoptions{SCfloat}% + \caption@setoptions{SC\@captype}% + \caption@start}% + \def\caption@setSC@justify{% + \caption@clearmargin + \@ifundefined{SC@justify}{}{% + \ifx\SC@justify\@empty \else + \let\caption@hj\SC@justify + \let\SC@justify\@empty + \fi}}% + \let\caption\SC@orig@caption + \def\SC@orig@caption[##1]##2{\caption@defrost}% + \caption@setSC@justify % for compatibility mode + \caption@ORI@endSC@FLOAT}% + \newcommand*\caption@For@SC[2]{% + \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6) + \newenvironment{SC#2}% + {\SC@float[#1]{#2}}{\endSC@float}% + \newenvironment{SC#2*}% + {\SC@dblfloat[#1]{#2}}{\endSC@dblfloat}}% + \@onlypreamble\caption@For@SC + \caption@For{typelist}{% + \expandafter\caption@For@SC\csname SC@#1@vpos\endcsname{#1}}% +}{} +\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{% + \def\sf@ifpositiontop{% + \ifx\@captype\@undefined + \expandafter\@gobbletwo + \else\ifx\@captype\relax + \expandafter\expandafter\expandafter\@gobbletwo + \else + \expandafter\expandafter\expandafter\sf@if@position@top + \fi\fi} + \def\sf@if@position@top{% + \@ifundefined{if\@captype topcap}% + {\@gobbletwo}% + {\@nameuse{if\@captype topcap}% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}} +}{} +\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[#1]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{supertabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end}% +}{} +\caption@IfPackageLoaded{xtab}[2000/04/09 v2.3]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[#1]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{xtabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% + \@initisotab + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end + \global\advance\ST@pageleft -\PWSTcapht + \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}% +}{} +\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{% + \let\caption@ORI@threeparttable\threeparttable + \renewcommand*\threeparttable{% + \caption@settype{table}% + \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{threeparttable}% + \caption@ORI@threeparttable}% + \let\caption@ORI@measuredfigure\measuredfigure + \renewcommand*\measuredfigure{% + \caption@settype{figure}% + \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{measuredfigure}% + \caption@ORI@measuredfigure}% + \def\TPT@caption#1[#2]#3{% + \gdef\TPT@docapt{% + \global\let\TPT@docapt\@undefined + \caption@setautoposition\caption@TPT@position + \TPT@LA@caption{#1}[{#2}]{#3}}% + \ifx\TPT@hsize\@empty + \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures + \gdef\caption@TPT@position{t}% + \g@addto@macro\TPT@docapt\caption@TPT@eatvskip + \else + \def\caption@TPT@position{b}% + \TPT@docapt + \fi + \ignorespaces}% + %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}% + \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}% +}{} +\caption@IfPackageLoaded{wrapfig}{% ver 3.3 (Oct 12, 1999) + \providecommand*\float@ifstyle[1]{% + \expandafter\ifx\csname fst@#1\endcsname\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi}% + \newcommand*\caption@restylewrapfloat[1]{% + \expandafter\ifx\csname caption@OUR@wrap#1\expandafter\endcsname + \csname wrap#1\endcsname + \caption@Error{% + For a successful cooperation of the `wrapfig' package\MessageBreak + with the `float' package you should load the `wrapfig'\MessageBreak + package *after* the `float' package}% + \else + \expandafter\let\csname caption@ORI@wrap#1\expandafter\endcsname + \csname wrap#1\endcsname + \@namedef{wrap#1}{\caption@wrapfloat{#1}}% + \expandafter\let\csname caption@OUR@wrap#1\expandafter\endcsname + \csname wrap#1\endcsname + \fi}% + \newcommand*\caption@wrapfloat[1]{% + \caption@settype*{#1}% + \float@ifstyle{#1}{% + \ifx\WF@floatstyhook\@undefined + \caption@Error{% + For a successful cooperation of the `wrapfig' package\MessageBreak + with the `float' package you should use at least\MessageBreak + `wrapfig' version 3.6}% + \else + \float@dostyle{#1}% + \fi}{}% + \caption@clearmargin +%%% \caption@setoptions{wrapfloat}% + \caption@setoptions{wrap#1}% + \@nameuse{caption@ORI@wrap#1}}% + \caption@restylewrapfloat{figure}% + \caption@restylewrapfloat{table}% + \caption@For{typelist}{% + \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}% + \caption@restylewrapfloat{#1}}% + \ifx\WF@floatstyhook\@undefined \else % wrapfig v3.6 + \@ifundefined{float@restyle}{}{% + \toks@=\expandafter{\float@restyle{#1}% (env may or may not be defined) + \caption@restylewrapfloat{#1}}% + \edef\@tempa{\def\noexpand\float@restyle##1{\the\toks@}}% + \@tempa}% perform redefinitions + \let\caption@ORI@wrapfloat\wrapfloat + \def\wrapfloat#1{% + \float@ifstyle{#1}{% + \caption@Error{% + For a successful cooperation of the `wrapfig' package\MessageBreak + with the `float' package you should load the `wrapfig'\MessageBreak + package *right after* the `float' package}}{}% + \caption@ORI@wrapfloat{#1}}% + \fi % wrapfig v3.6 + \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, + \gdef\WF@ovh{#1}% hold overhang for later, when \width is known + \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% + \caption@start + \ifdim\hsize>\z@ \@parboxrestore \else + \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption + \ignorespaces \fi}% +}{} +\endinput +%% +%% End of file `caption_2010-01-09.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty b/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty new file mode 100644 index 00000000000..ad78a2452e2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption_2011-11-10.sty @@ -0,0 +1,1717 @@ +%% +%% This is file `caption_2011-11-10.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.2/caption.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption}[2011/11/10 v3.2e Customizing captions (AR)] +\RequirePackage{caption3}[=2011/08/30] % needs v1.4 or newer +\caption@ifbool{documentclass}{}{% + \caption@WarningNoLine{% + Unsupported document class (or package) detected,\MessageBreak + usage of the caption package is not recommended}% + \caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption}% +} +\@ifpackageloaded{caption2}{% + \caption@Error{% + You can't use both, the (obsolete) caption2 *and*\MessageBreak + the (current) caption package}% + \endinput +}{} +\caption@AtBeginDocument{% + \@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}% + \@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}% + \@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}} +\newcommand*\caption@DisablePositionOption[1]{% + \caption@InfoNoLine{% + `#1' package detected; setting `position=b' for compatibility reasons}% + \caption@setposition b% + \DeclareCaptionOption{position}{% + \caption@Error{Usage of the `position' option is incompatible\MessageBreak + to the `#1' package}}} +\@onlypreamble\caption@DisablePositionOption +\DeclareCaptionOption{figureposition}{% + \captionsetup*[figure]{position=#1}} +\@onlypreamble@key{caption}{figureposition} +\DeclareCaptionOption{tableposition}{% + \captionsetup*[table]{position=#1}} +\@onlypreamble@key{caption}{tableposition} +\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}} +\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}} +\DeclareCaptionOption{name}{\caption@setname\@captype{#1}} +\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}} +\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}} +\newcommand*\caption@SetName{% + \RequirePackage{newfloat}% + \newfloat@setname} +\newcommand*\caption@setname[2]{\@namedef{#1name}{#2}} +\caption@AtBeginDocument{\let\caption@SetName\caption@setname} +\newcommand*\caption@DeclareWithinOption[1]{% + \DeclareCaptionOption{#1within}{\caption@Within{#1}{##1}}% + \DeclareCaptionOptionNoValue{#1without}{\caption@Within{#1}{none}}} +\@onlypreamble\caption@DeclareWithinOption +\caption@DeclareWithinOption{figure} +\caption@DeclareWithinOption{table} +\DeclareCaptionOption{within}{% + \RequirePackage{newfloat}% + \newfloatsetup{within=#1}} +\DeclareCaptionOptionNoValue{without}{% + \RequirePackage{newfloat}% + \newfloatsetup{without}} +\newcommand*\caption@Within{% + \RequirePackage{newfloat}% + \newfloat@setwithin} +\DeclareCaptionOption*{config}[caption]{% + \InputIfFileExists{#1.cfg}% + {\typeout{*** Local configuration file #1.cfg used ***}}% + {\caption@Warning{Configuration file #1.cfg not found}}} +\newcommand*\caption@setparboxrestore[1]{% + \caption@ifinlist{#1}{full}{% + \caption@setfullparboxrestore + }{\caption@ifinlist{#1}{default,light,partial}{% + \let\caption@parboxrestore\@secondoftwo + }{% + \caption@Error{Undefined parboxrestore `#1'}% + }}} +\newcommand*\caption@setfullparboxrestore{% + \let\caption@parboxrestore\@firstoftwo} +\DeclareCaptionOption{parboxrestore}{\caption@setparboxrestore{#1}} +\captionsetup{parboxrestore=default} +\DeclareCaptionOption{@minipage}{% + \caption@ifinlist{#1}{auto,default}% + {\let\caption@if@minipage\@gobbletwo}% + {\caption@set@bool\caption@if@minipage{#1}}} +\captionsetup{@minipage=default} +\DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}} +\@onlypreamble@key{caption}{compatibility} +\DeclareCaptionOptionNoValue*{normal}{% + \caption@setformat{plain}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{isu}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{hang}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{center}{% + \caption@setformat{plain}% + \caption@setjustification{centering}} +\DeclareCaptionOptionNoValue*{anne}{% + \caption@setformat{plain}% + \caption@setjustification{centerlast}} +\DeclareCaptionOptionNoValue*{centerlast}{% + \caption@setformat{plain}% + \caption@setjustification{centerlast}} +\DeclareCaptionOptionNoValue*{scriptsize}{\def\captionfont{\scriptsize}} +\DeclareCaptionOptionNoValue*{footnotesize}{\def\captionfont{\footnotesize}} +\DeclareCaptionOptionNoValue*{small}{\def\captionfont{\small}} +\DeclareCaptionOptionNoValue*{normalsize}{\def\captionfont{\normalsize}} +\DeclareCaptionOptionNoValue*{large}{\def\captionfont{\large}} +\DeclareCaptionOptionNoValue*{Large}{\def\captionfont{\Large}} +\DeclareCaptionOptionNoValue*{up}{\l@addto@macro\captionlabelfont\upshape} +\DeclareCaptionOptionNoValue*{it}{\l@addto@macro\captionlabelfont\itshape} +\DeclareCaptionOptionNoValue*{sl}{\l@addto@macro\captionlabelfont\slshape} +\DeclareCaptionOptionNoValue*{sc}{\l@addto@macro\captionlabelfont\scshape} +\DeclareCaptionOptionNoValue*{md}{\l@addto@macro\captionlabelfont\mdseries} +\DeclareCaptionOptionNoValue*{bf}{\l@addto@macro\captionlabelfont\bfseries} +\DeclareCaptionOptionNoValue*{rm}{\l@addto@macro\captionlabelfont\rmfamily} +\DeclareCaptionOptionNoValue*{sf}{\l@addto@macro\captionlabelfont\sffamily} +\DeclareCaptionOptionNoValue*{tt}{\l@addto@macro\captionlabelfont\ttfamily} +\DeclareCaptionOptionNoValue*{nooneline}{\caption@setbool{slc}{0}} +\caption@setbool{ruled}{0} +\DeclareCaptionOptionNoValue*{ruled}{\caption@setbool{ruled}{1}} +\DeclareCaptionOptionNoValue*{flushleft}{% + \caption@setformat{plain}% + \caption@setjustification{raggedright}} +\DeclareCaptionOptionNoValue*{flushright}{% + \caption@setformat{plain}% + \caption@setjustification{raggedleft}} +\DeclareCaptionOptionNoValue*{oneline}{\caption@setbool{slc}{1}} +\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{% + \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}} +\DeclareCaptionOption*{caption}{% + \caption@setbool{temp}{#1}% + \caption@ifbool{temp}{}{% + \caption@Error{% + The package option `caption=#1' is obsolete.\MessageBreak + Please pass this option to the subfig package instead\MessageBreak + and do *not* load the caption package anymore}}} +\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}} +\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}} +\@onlypreamble@key{caption}{FPlist} +\@onlypreamble@key{caption}{FPref} +\newcommand*\caption@setFPoption[2]{% + \edef\caption@tempa{\@car#2\@nil}% + \caption@setbool{FP#1cap}{\if c\caption@tempa 1\else 0\fi}} +\@onlypreamble\caption@setFPoption +\captionsetup{FPlist=caption,FPref=figure} +\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}} +\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}} +\captionsetup{hypcap=1,hypcapspace=.5\baselineskip} +\caption@ifamsclass{% + \caption@InfoNoLine{AMS or SMF document class}% + \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class +} +\caption@ifkomaclass{% + \caption@InfoNoLine{KOMA-Script document class}% + \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}} + \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}} + \if@tablecaptionabove + \@tablecaptionabovetrue + \else + \@tablecaptionabovefalse + \fi + \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo} + \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo} + \ifonelinecaptions + \onelinecaptionstrue + \else + \onelinecaptionsfalse + \fi + \g@addto@macro\@captionabovetrue{\let\caption@position\@firstoftwo} + \g@addto@macro\@captionabovefalse{\let\caption@position\@secondoftwo} + \DeclareCaptionOption{figureposition}{% + \caption@WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}} + \DeclareCaptionOption{tableposition}{% + \caption@WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}} + \let\caption@KOMA@setcapindent\@setcapindent + \renewcommand*\@setcapindent[1]{% + \caption@KOMA@setcapindent{#1}\caption@setcapindent} + \let\caption@KOMA@@setcapindent\@@setcapindent + \renewcommand*\@@setcapindent[1]{% + \caption@KOMA@@setcapindent{#1}\caption@setcapindent} + \newcommand*\caption@setcapindent{% + \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}} + \caption@ifundefined\cap@indent{}{\caption@setcapindent} + \expandafter\let\expandafter\caption@KOMA@setcapwidth + \csname\string\setcapwidth\endcsname + \@namedef{\string\setcapwidth}[#1]#2{% + \caption@KOMA@setcapwidth[#1]{#2}\caption@setcapwidth{#1}} + \newcommand*\caption@setcapwidth[1]{% + \ifx\\#1\\\else + \caption@ifundefined\cap@margin{}{% + \def\@tempa{captionbeside}% + \ifx\@tempa\@currenvir\else\caption@Warning{% + Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}% + \fi}% + \fi + \captionsetup{width=\cap@width}} + \def\caption@tempa{\hsize}% + \ifx\caption@tempa\cap@width \else + \caption@setcapwidth{?} + \fi + \expandafter\let\expandafter\caption@KOMA@setcapmargin + \csname\string\@setcapmargin\endcsname + \@namedef{\string\@setcapmargin}[#1]#2{% + \caption@KOMA@setcapmargin[#1]{#2}\caption@setcapmargin} + \expandafter\let\expandafter\caption@KOMA@@setcapmargin + \csname\string\@@setcapmargin\endcsname + \@namedef{\string\@@setcapmargin}[#1]#2{% + \caption@KOMA@@setcapmargin[#1]{#2}\caption@setcapmargin} + \newcommand*\caption@setcapmargin{% + \begingroup + \let\onelinecaptionsfalse\relax + \def\@twoside{0}% + \def\if@twoside{\def\@twoside{1}\iffalse}% + \cap@margin + \def\@tempa{\endgroup}% + \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else + \def\hspace##1##{\@firstofone}% + \edef\@tempa{\endgroup + \noexpand\captionsetup{% + twoside=\@twoside,slc=0,% + margin={\cap@left,\cap@right}}}% + \fi\fi + \@tempa} + \ifx\cap@margin\relax \else + \caption@setcapmargin + \fi +} +\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}} +\caption@ProcessOptions*{caption} +\def\caption@caption{% + \caption@iftype + {\caption@checkgrouplevel\@empty\caption + \caption@star + {\@nameuse{donemaincaptiontrue}% + \caption@refstepcounter\@captype}% + {\caption@dblarg{\@caption\@captype}}}% + {\caption@Error{\noexpand\caption outside float}% + \caption@gobble}} +\newcommand*\caption@star[2]{% + \@ifstar{\caption@startrue#2[]}{#1#2}} +\long\def\caption@@caption#1[#2]#3{% + \ifcaption@star \else + \caption@prepareanchor{#1}{#2}% + \M@gettitle{#2}% + \memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}% + \fi + \par + \caption@beginex{#1}{#2}{#3}% + \caption@setfloatcapt{% + \caption@boxrestore + \if@minipage + \@setminipage + \fi + \caption@normalsize + \ifcaption@star + \let\caption@makeanchor\@firstofone + \fi + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces\caption@makeanchor{#3}}\par + \caption@if@minipage\@minipagetrue\@minipagefalse}% + \caption@end} +\providecommand\M@gettitle[1]{} +\providecommand\memcaptioninfo[4]{} +\newcommand*\caption@prepareanchor[2]{% + \caption@makecurrent{#1}{#2}% + \caption@ifhypcap\caption@@start{}} +\long\def\caption@makecaption#1#2{% + \caption@iftop + {\vskip\belowcaptionskip}% + {\caption@rule\vskip\abovecaptionskip}% + \caption@@make{#1}{#2}% + \caption@iftop + {\vskip\abovecaptionskip\caption@rule}% + {\vskip\belowcaptionskip}} +\newcommand*\caption@redefine{} +\g@addto@macro\caption@redefine{% + \caption@setbool{incompatible}{0}% + \caption@CheckCommand\caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% + \caption@CheckCommand\caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \def\caption{ + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside figure or table}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% + \caption@CheckCommand\caption{% + % float.sty [2001/11/08 v1.3d Float enhancements (AL)] + \renewcommand\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \let\@tempf\@caption + \expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else + \expandafter\expandafter\let + \expandafter\@tempf\csname @float@c@\@captype\endcsname + \fi + \fi + \@dblarg{\@tempf\@captype}}}% + \caption@CheckCommand\caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \@ifundefined{fst@\@captype}{% + \let\Hy@tempa\@caption + }{% + \let\Hy@tempa\Hy@float@caption + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% + \caption@CheckCommand\caption{% + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \let\Hy@tempa\@caption + \@ifundefined{float@caption}{% + }{% + \expandafter\ifx\csname @float@c@\@captype\endcsname\float@caption + \let\Hy@tempa\Hy@float@caption + \fi + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% + \caption@CheckCommand\caption{% + % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class] + % \let\m@moldhypcaption\caption + \renewcommand{\caption}{\donemaincaptiontrue\m@moldhypcaption}}% + \caption@IfCheckCommand{}{% + \caption@InfoNoLine{% + Incompatible package detected (regarding \string\caption).\MessageBreak + \string\caption\space=\space\meaning\caption}% + \caption@setbool{incompatible}{1}}% + \caption@CheckCommand\@caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup}}% + \caption@CheckCommand\@caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\@caption#1[#2]#3{% second argument ignored + \par\nobreak + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak + \endgroup}}% + \caption@CheckCommand\@caption{% + % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system] + \long\def\@caption#1[#2]#3{% + \csname par\endcsname + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces #3}\csname par\endcsname + \endgroup}}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \hyper@makecurrent{\@captype}% + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2009/11/27 v6.79k Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }% + #3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2009/12/09 v6.79m Hypertext links for LaTeX] + % hyperref.sty [2009/12/28 v6.79z Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \@ifundefined{NR@gettitle}{% + \def\@currentlabelname{#2}% + }{% + \NR@gettitle{#2}% + }% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{% + \@currentHref + }{\relax}% + }% + #3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section] + \long\def\@caption#1[#2]{% + \def\@currentlabelname{#2}% + \NR@@caption{#1}[{#2}]% + }}% + \caption@CheckCommand\@caption{% + % nameref.sty [2009/11/27 v2.32 Cross-referencing by name of section] + \long\def\@caption#1[#2]{% + \NR@gettitle{#2}% + \NR@@caption{#1}[{#2}]% + }}% + \caption@CheckCommand\@caption{% + % subfigure.sty [2002/07/30 v2.1.4 subfigure package] + \long\def\@caption#1[#2]#3{% + \@ifundefined{if#1topcap}% + {\subfig@oldcaption{#1}[{#2}]{#3}}% + {\@nameuse{if#1topcap}% + \@listsubcaptions{#1}% + \subfig@oldcaption{#1}[{#2}]{#3}% + \else + \subfig@oldcaption{#1}[{#2}]{#3}% + \@listsubcaptions{#1}% + \fi}}}% + \caption@CheckCommand\@caption{% + % subfig.sty [2005/06/28 ver: 1.3 subfig package] + \def\@caption{\caption@}% + }% + \caption@IfCheckCommand{}{% + \caption@InfoNoLine{% + Incompatible package detected (regarding \string\@caption).\MessageBreak + \string\@caption\space=\space\meaning\@caption}% + \caption@setbool{incompatible}{1}}% + \caption@ifundefined\caption@ifcompatibility + {\let\caption@ifcompatibility\caption@ifincompatible + \let\caption@tempa\caption@WarningNoLine}% + {\let\caption@tempa\@gobble}% suppress warning + \caption@ifcompatibility{% + \caption@tempa{% + \noexpand\caption will not be redefined since it's already\MessageBreak + redefined by a document class or package which is\MessageBreak + unknown to the caption package}% + \renewcommand*\caption@redefine{}% + \renewcommand*\caption@ContinuedFloat[1]{% + \caption@Error{Not available in compatibility mode}}% + \caption@AtBeginDocument*{% + \let\caption@start\relax + \caption@ifundefined\caption@ORI@capstart{}{% + \caption@Debug{% + Restore hypcap definition of \string\capstart\@gobble}% + \let\capstart\caption@ORI@capstart}% + \caption@ifundefined\caption@ORI@float@makebox{}{% + \caption@Debug{% + Restore hyperref redefinition of \string\float@makebox\@gobble}% + \let\float@makebox\caption@ORI@float@makebox}% + }% + \renewcommand*\caption@star[2]{#1#2}% + }{% + \caption@ifincompatible{% + \caption@WarningNoLine{% + Forced redefinition of \noexpand\caption since the\MessageBreak + unsupported(!) package option `compatibility=false'\MessageBreak + was given}% + }{}% + \renewcommand*\caption@redefine{% + \let\caption\caption@caption + \let\@caption\caption@@caption}% + \caption@redefine + }% + \caption@AtBeginDocument*{% + \let\caption@ORI@capstart\@undefined + \let\caption@ORI@float@makebox\@undefined}% + \let\caption@ORI@xfloat\@xfloat + \def\@xfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}}% +} +\caption@AtBeginDocument{\caption@redefine} +\let\@makecaption\caption@makecaption +\caption@AtBeginDocument{% + \DeclareCaptionOption{type}{\setcaptiontype{#1}}% + \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}% + \DeclareCaptionOptionNoValue{subtype}{\setcaptionsubtype\relax}% + \DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}% +} +\newcommand\setcaptiontype{% + \caption@boxrestore@mini + \caption@settype} +\newcommand\setcaptionsubtype{% + \caption@iftype + \caption@setsubtype + {\caption@Error{\noexpand\setcaptionsubtype outside float}}}% +\newcommand\caption@setsubtype{% + \@ifstar + {\caption@@settype{sub}*{sub\@captype}}% + {\caption@@settype{sub}{sub\@captype}}}% +\newcommand*\caption@settype{% + \caption@@settype{}} +\newcommand*\caption@@settype[1]{% + \caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo} +\newcommand*\caption@@@settype[3]{% + \caption@Debug{#1type=#3}% + \caption@checkgrouplevel{#1}{% + \captionsetup{#1type#2*\@empty=...}#2{ or + \@backslashchar#1captionof}{}}% + \edef\caption@tempa{#3}% + \expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else + \ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi + \fi + \expandafter\let\csname @#1captype\endcsname\caption@tempa + \@nameuse{caption@#1typehook}% + \caption@setoptions{#3}% + \ifx\caption@opt\relax + \@nameundef{caption@#1type@warning}% + \else + \@namedef{caption@#1type@warning}{\caption@Warning{% + The #1caption type was already set to + `\csname @#1captype\endcsname'\MessageBreak}}% + \fi + \let\caption@ifrefstepcounter\@secondoftwo + #2{}{% + \let\@currentlabel\caption@undefinedlabel + \ifx\caption@x@label\@undefined + \let\caption@x@label\label + \let\label\caption@xlabel + \fi + \caption@start}} +\newcommand*\caption@typehook{} +\newcommand*\caption@iftype{% + \caption@ifundefined\@captype\@secondoftwo\@firstoftwo} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname currentgrouplevel\endcsname\relax + \caption@Debug{TeX engine: TeX} + \let\caption@checkgrouplevel\@gobbletwo +\else + \caption@Debug{TeX engine: e-TeX} + \newcommand*\caption@checkgrouplevel[2]{% + \@ifundefined{#1caption@grouplevel}{% + \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}% + \ifnum\currentgrouplevel>\caption@grouplevel\relax + \expandafter\edef\csname #1caption@grouplevel\endcsname{% + \the\currentgrouplevel}% + \else + \caption@Warning{\string#2\MessageBreak outside box or environment}% + \fi + }{}} +\fi +\newcommand*\caption@undefinedlabel{% + \protect\caption@xref{\caption@labelname}{\on@line}} +\DeclareRobustCommand*\caption@xref[2]{% + \caption@WarningNoLine{\noexpand\label without proper \string\caption#2}% + \@setref\relax\@undefined{#1}} +\newcommand*\caption@labelname{??} +\newcommand*\caption@xlabel{% + \caption@withoptargs\caption@@xlabel} +\newcommand*\caption@@xlabel[2]{% + \caption@@@xlabel + \def\caption@labelname{#2}% + \caption@x@label#1{#2}} +\newcommand*\caption@@@xlabel{% + \global\let\caption@@@xlabel\@empty + \@bsphack + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@xref[2]{% + \string\@setref\string\relax\string\@undefined{\string##1}}}% + \@esphack} +\caption@AtBeginDocument{% + \def\captionof{\caption@teststar\caption@of{\caption*}\caption}} +\newcommand*\caption@of[2]{\setcaptiontype*{#2}#1} +\newcommand*\captionlistentry{% + \caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo} +\newcommand*\@captionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@captype} +\def\caption@listentry#1[#2]#3{% + \@bsphack + #1{\caption@gettitle{#3}}% + {\caption@refstepcounter{#2}% + \caption@makecurrent{#2}{#3}}% + \caption@addcontentsline{#2}{#3}% + \@esphack} +\newcommand*\captionbox{% + \let\captionbox@settype\@gobble + \caption@withoptargs\caption@box} +\newcommand\caption@box[2]{% + \@testopt{\caption@ibox{#1}{#2}}{\wd\@tempboxa}} +\long\def\caption@ibox#1#2[#3]{% + \@testopt{\caption@iibox{#1}{#2}{#3}}\captionbox@hj@default} +\long\def\caption@iibox#1#2#3[#4]#5{% + \setbox\@tempboxa\hbox{#5}% + \begingroup + \captionbox@settype*% set \caption@position + \caption@iftop{% + \endgroup + \parbox[t]{#3}{% + \captionbox@settype\relax + \caption@setposition t% + \vbox{\caption#1{#2}}% + \captionbox@hrule + \csname caption@hj@#4\endcsname + \unhbox\@tempboxa}% + }{% + \endgroup + \parbox[b]{#3}{% + \captionbox@settype\relax + \caption@setposition b% + \csname caption@hj@#4\endcsname + \unhbox\@tempboxa + \captionbox@hrule + \vtop{\caption#1{#2}}}% + }} +\newcommand*\captionbox@hj@default{c} +\newcommand*\captionbox@hrule{\hrule\@height\z@\relax} +\providecommand*\caption@hj@c{\centering} +\providecommand*\caption@hj@l{\raggedright} +\providecommand*\caption@hj@r{\raggedleft} +\providecommand*\caption@hj@s{} +\def\ContinuedFloat{% + \@ifnextchar[\@Continued@Float\@ContinuedFloat} +\def\@Continued@Float[#1]{\addtocounter{#1}\m@ne} +\def\@ContinuedFloat{% + \caption@iftype + {\addtocounter\@captype\m@ne + \caption@ContinuedFloat\@captype}% + {\caption@Error{\noexpand\ContinuedFloat outside float}}} +\def\caption@ContinuedFloat#1{% + \@ifstar{\caption@Continued@Float@{#1}}{\caption@Continued@Float{#1}}} +\def\caption@Continued@Float@{% + \addtocounter\@captype\@ne + \@stpelt{ContinuedFloat}\stepcounter{ContinuedFloat}% + \def\caption@resetContinuedFloat##1{\xdef\caption@CFtype{##1}}% + \caption@@ContinuedFloat} +\def\caption@Continued@Float#1{% + \edef\caption@tempa{#1}% + \ifx\caption@tempa\caption@CFtype + \stepcounter{ContinuedFloat}% + \let\caption@resetContinuedFloat\@gobble + \caption@@ContinuedFloat{#1}% + \sf@ContinuedFloat{#1}% + \else + \caption@Error{Continued `#1' after `\caption@CFtype'}% + \fi} +\def\caption@@ContinuedFloat#1{% + \expandafter\l@addto@macro\csname the#1\endcsname\theContinuedFloat + \@ifundefined{theH#1}{}{% + \expandafter\l@addto@macro\csname theH#1\endcsname{% + \@alph\c@ContinuedFloat}}% + \caption@setoptions{ContinuedFloat}% + \caption@setoptions{continued#1}} +\providecommand*\sf@ContinuedFloat[1]{} +\newcommand*\caption@CFtype{??} +\newcounter{ContinuedFloat} +\let\theContinuedFloat\@empty +\newcommand*\caption@resetContinuedFloat[1]{% + \@stpelt{ContinuedFloat}\xdef\caption@CFtype{#1}} +\newcommand\phantomcaption{% + \caption@iftype + {\caption@refstepcounter\@captype}% + {\caption@Error{\noexpand\phantomcaption outside float}}}% +\newcommand*\caption@refstepcounter[1]{% + \@ifundefined{c@#1}% + {\caption@Error{No float type '#1' defined}}% + {\caption@resetContinuedFloat{#1}% + \caption@@refstepcounter{#1}% + \let\caption@ifrefstepcounter\@firstoftwo}} +\newcommand*\caption@@refstepcounter{\refstepcounter} +\let\caption@ifrefstepcounter\@secondoftwo +\caption@ifundefined\kernel@ifnextchar + {\newcommand\caption@dblarg[1]{\@ifnextchar[{#1}{\caption@xdblarg{#1}}}}% + {\newcommand\caption@dblarg[1]{\kernel@ifnextchar[{#1}{\caption@xdblarg{#1}}}}% +\newcommand\caption@xdblarg[2]{#1[{#2\relax}]{#2}}% +\newcommand*\caption@begin[1]{% + \begingroup + \caption@setfnum{#1}% + \caption@fixposition + \global\let\caption@fixedposition\caption@position} +\newcommand\caption@beginex[3]{% + \caption@begin{#1}% + \let\lst@@caption\relax + \caption@addcontentsline{#1}{#2}% + \caption@ifempty{#3}{}} +\newcommand*\caption@end{% + \endgroup + \let\caption@position\caption@fixedposition} +\newcommand*\caption@setfnum[1]{% + \@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}% + \@namedef{fnum@#1}{\caption@fnum{#1}}% + \fi} +\newcommand*\caption@boxrestore{% + \caption@parboxrestore{\@parboxrestore}{% + \let\if@nobreak\iffalse + \let\if@noskipsec\iffalse + \let\par\@@par + \parindent\z@ \parskip\z@skip + \everypar{}% + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip + \parfillskip\@flushglue \lineskip\normallineskip + \baselineskip\normalbaselineskip + \sloppy + \let\\\@normalcr + }} +\newcommand\caption@boxrestore@mini{% + \let\par\@@par + \parindent\z@ \parskip\z@skip + \sloppy} +\newcommand*\caption@normalsize{% + \caption@font*{\KV@caption@fnt@normal\@unused}} +\let\caption@setfloatcapt\@firstofone +\newcommand*\caption@makecurrent[2]{} +\let\caption@makeanchor\@firstofone +\let\caption@start\relax +\let\caption@@start\relax +\let\caption@freezeHref\relax +\let\caption@defrostHref\relax +\newcommand\caption@gettitle[1]{% + \caption@ifundefined\NR@gettitle + {\def\@currentlabelname{#1}}% + {\NR@gettitle{#1}}} +\def\caption@DeclareSubType sub#1\@nil{% + \caption@Debug{Initializing subtype for `#1'\@gobble}% + \@namedef{caption@c@#1}{0}% + \@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}} +\@onlypreamble\caption@DeclareSubType +\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil} +\caption@AtBeginDocument*{% + \caption@ifundefined\sf@counterlist{}{% + \@for\sf@temp:=\sf@counterlist\do{% + \expandafter\caption@DeclareSubType\sf@temp\@nil}}} +\newcommand*\caption@subtypehook{% + \ifx\caption\caption@subcaption \else + \caption@warmup + \caption@ifrefstepcounter{}{% + % no \caption or \subcaption in this (floating) environment yet + \caption@Debug{Increment \@captype\ counter =\the\value\@captype}% + \caption@l@stepcounter\@captype + \let\caption@@@addcontentsline\caption@addsubcontentsline}% + \ifnum\csname caption@c@\@captype\endcsname=\value\@captype \else + \caption@Debug{Reset sub\@captype\ counter}% + \expandafter\xdef\csname caption@c@\@captype\endcsname{% + \the\value\@captype}% + \@stpelt\@subcaptype + \fi + \c@ContinuedFloat=0\relax + \let\caption@resetContinuedFloat\@gobble + \let\caption@addcontentsline\caption@kernel@addcontentsline + \let\caption@setfloatcapt\@firstofone + \caption@clearmargin + \caption@iflist{}{\let\caption@setlist\@gobble}% + \caption@setoptions{sub}% + \caption@setoptions{subfloat}% for subfig-package compatibility + \let\caption\caption@subcaption + \let\phantomcaption\caption@subphantom + \if@subfloatrow + \caption@Debug{Keeping \string\@makecaption}% + \else + \let\@makecaption\caption@makecaption + \fi + \fi}% +\caption@AtBeginDocument{% + \caption@ifundefined\@subfloatrowtrue + {\newif\if@subfloatrow + \caption@ifundefined\subfloatrow{}% + {\caption@Debug{Patching subfloatrow environment}% + \g@addto@macro\capsubrowsettings{\@subfloatrowtrue}% + \g@addto@macro\killfloatstyle{% + \ifx\c@FRobj\c@FRsobj\@subfloatrowtrue\fi}}}% + {\caption@Debug{\string\if@subfloatrow is already defined}}}% +\newcommand*\caption@subcaption{% + \caption@checkgrouplevel{sub}\subcaption + \caption@star + {\caption@refstepcounter\@subcaptype}% + {\caption@dblarg{\@caption\@subcaptype}}} +\newcommand*\caption@subphantom{% + \caption@checkgrouplevel{sub}\phantomsubcaption + \caption@refstepcounter\@subcaptype} +\let\caption@kernel@addcontentsline\caption@addcontentsline +\renewcommand\caption@addcontentsline[2]{% + \sf@ifpositiontop{\@listsubcaptions{#1}}{}% + \caption@kernel@addcontentsline{#1}{#2}% + \sf@ifpositiontop{}{\@listsubcaptions{#1}}% + \caption@addsubcontentslines{#1}} +\newcommand*\caption@addsubcontentslines[1]{% + \begingroup + \caption@subcontentslines + \endgroup + \caption@clearsubcontentslines}% +\newcommand*\caption@addsubcontentsline[4]{% + \begingroup + \let\label\caption@gobble \let\index\caption@gobble \let\glossary\caption@gobble + \protected@edef\@tempa{\endgroup + \noexpand\g@addto@macro\noexpand\caption@subcontentslines{% + \noexpand\@namedef{the#2}{\csname the#2\endcsname}% + \ifx\@currentHref\@undefined \else + \noexpand\def\noexpand\@currentHref{\@currentHref}% + \fi + \protect\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}% + \@tempa} +\newcommand*\caption@checksubcontentslines{% + \ifx\caption@subcontentslines\@empty \else + \caption@Error{% + Something's wrong--perhaps a missing \protect\caption\MessageBreak + in the last figure or table}% + \caption@clearsubcontentslines + \fi} +\newcommand*\caption@clearsubcontentslines{% + \global\let\caption@subcontentslines\@empty} +\caption@AtBeginDocument*{% + \caption@ifundefined\sf@ifpositiontop{\let\sf@ifpositiontop\@gobbletwo}{}% + \caption@clearsubcontentslines + \g@addto@macro\caption@typehook{\caption@checksubcontentslines}% + \AtEndDocument{\caption@checksubcontentslines}}% +\caption@ifundefined\smf@makecaption{}{\let\smf@makecaption\@makecaption} +\@ifclassloaded{beamer}{% + \caption@InfoNoLine{beamer document class}% + \expandafter\let\expandafter\caption@ORI@figure + \csname\string\figure\endcsname + \@namedef{\string\figure}[#1]{% + \caption@ORI@figure[#1]% + \caption@settype{figure}} + \expandafter\let\expandafter\caption@ORI@table + \csname\string\table\endcsname + \@namedef{\string\table}[#1]{% + \caption@ORI@table[#1]% + \caption@settype{table}} +}{} +\caption@ifundefined\scr@caption{}{% + \caption@AtBeginDocument{\let\scr@caption\caption}} +\@nameuse{caption@frenchb}\@nameundef{caption@frenchb} +\caption@AtBeginDocument{\caption@ifundefined\frenchTeXmods{}{% + \caption@InfoNoLine{frenchle/pro package is loaded}% + \let\captionfont@ORI\captionfont + \let\captionlabelfont@ORI\captionlabelfont + \let\@makecaption@ORI\@makecaption + + \caption@ifundefined\GOfrench + {\let\caption@tempa\@firstofone}% + {\def\caption@tempa{\g@addto@macro\GOfrench}}% + \caption@tempa{% + \let\captionfont\captionfont@ORI + \let\captionfont@ORI\@undefined + \let\captionlabelfont\captionlabelfont@ORI + \let\captionlabelfont@ORI\@undefined + \let\@makecaption\@makecaption@ORI + \let\@makecaption@ORI\@undefined + \let\@cnORI\caption + \let\caption@tcORI\@tablescaption + \def\@tablescaption{\caption@star\relax\caption@tcORI}% + \let\@eatDP\@undefined + \let\caption@tempa\@empty + \ifx\f@ffrench\fnum@figure + \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}% + \fi + \ifx\f@tfrench\fnum@table + \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}% + \fi + \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% + \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% + \caption@tempa + }% +}} +\def\caption@tempa#1{% + \@ifundefined{extras#1}\caption@AtBeginDocument\@firstofone{% + \@ifundefined{extras#1}{}{% + \caption@InfoNoLine{#1 babel option is loaded}% + \expandafter\addto\csname extras#1\endcsname{% + % reverse changes made by magyar.ldf + \let\@makecaption\caption@makecaption + \babel@save\@makecaption + \caption@redefine + \babel@save\@caption}% + }}} +\caption@tempa{hungarian}% +\caption@tempa{magyar}% +\newcommand\caption@IfPackageLoaded[1]{% + \@testopt{\caption@@IfPackageLoaded{#1}}{}} +\@onlypreamble\caption@IfPackageLoaded +\long\def\caption@@IfPackageLoaded#1[#2]#3#4{% + \@ifpackageloaded{#1}\@firstofone{% + \caption@Debug{#1 package is not loaded (yet)\@gobble}% + \caption@AtBeginDocument}{% + \caption@@ifpackageloaded{#1}[#2]{#3}{#4}}} +\@onlypreamble\caption@@IfPackageLoaded +\newcommand\caption@ifpackageloaded[1]{% + \@testopt{\caption@@ifpackageloaded{#1}}{}} +\@onlypreamble\caption@ifpackageloaded +\long\def\caption@@ifpackageloaded#1[#2]{% + \@ifpackageloaded{#1}{% + \caption@InfoNoLine{#1 package is loaded}% + \@ifpackagelater{#1}{#2}\@firstoftwo{% + \caption@Error{% + For a successful cooperation we need at least version\MessageBreak + `#2' of package #1,\MessageBreak + but only version\MessageBreak + `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak + is available}% + \@secondoftwo}% + }{\@secondoftwo}} +\@onlypreamble\caption@@ifpackageloaded +\newcommand*\caption@clearmargin{% + \setcaptionmargin\z@ + \let\caption@minmargin\@undefined} +\caption@setbool{needfreeze}{0} +\caption@AtBeginDocument*{% + \caption@ifneedfreeze{% + \newcommand*\caption@freeze{% + \let\caption@frozen@ContinuedFloat\ContinuedFloat + \def\ContinuedFloat{% + \caption@withoptargs\caption@SC@ContinuedFloat}% + \def\caption@SC@ContinuedFloat##1{% + \caption@@freeze{\ContinuedFloat##1}% + \let\caption@frozen@setcounter\setcounter + \let\caption@frozen@addtocounter\addtocounter + \def\setcounter####1####2{\csname c@####1\endcsname####2\relax}% + \def\addtocounter####1####2{\advance\csname c@####1\endcsname ####2\relax}% + \caption@frozen@ContinuedFloat##1% + \let\setcounter\caption@frozen@setcounter + \let\addtocounter\caption@frozen@addtocounter}% + \let\caption@frozen@setup\caption@setup + \def\caption@setup##1{% + \caption@@freeze{\caption@setup{##1}}% + \caption@frozen@setup{##1}}% + \let\caption@frozen@caption\caption + \def\caption{% + \def\caption{% + \caption@Error{% + Only one \noexpand\caption can be placed in this environment}% + \caption@gobble}% + \@ifstar + {\caption@SC@caption*}% + {\let\caption@frozen@refstepcounter\caption@@refstepcounter + \let\caption@@refstepcounter\caption@l@stepcounter + \caption@refstepcounter\@captype + \let\caption@@refstepcounter\caption@frozen@refstepcounter + \let\@currentlabel\caption@SClabel + \caption@withoptargs\caption@SC@caption}}% + \long\def\caption@SC@caption##1##2{% + \caption@@freeze{\caption##1{##2}}% + \ignorespaces}% + \let\caption@frozen@label\label + \def\label{% + \caption@withoptargs\caption@SC@label}% + \def\caption@SC@label##1##2{% + \ifx\@currentlabel\caption@SClabel + \@bsphack + \caption@freeze@label{##1}{##2}% + \@esphack + \else + \caption@frozen@label##1{##2}% + \fi}% + \def\caption@SClabel{\caption@undefinedlabel}% + \def\caption@freeze@label##1##2{% + \caption@@freeze{\label##1{##2}}}% + \global\let\caption@frozen@content\@empty + \long\def\caption@@freeze{% + \g@addto@macro\caption@frozen@content}% + \def\caption@warmup{% + \let\ContinuedFloat\caption@frozen@ContinuedFloat + \let\caption@setup\caption@frozen@setup + \let\caption\caption@frozen@caption + \let\label\caption@frozen@label}}% + \newcommand*\caption@defrost{% + \ifx\caption@frozen@caption\@undefined + \caption@frozen@content + \else + \caption@Error{Internal Error:\MessageBreak + \noexpand\caption@defrost in same group as \string\caption@freeze}% + \fi}% + }{}% + \caption@undefbool{needfreeze}} +\let\caption@warmup\relax +\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{% + \@ifpackageloaded{floatrow}{% + \caption@ifpackageloaded{floatrow}[2007/08/24 v0.2a]{}{}% + }{% + \let\caption@ORI@float@setevery\@float@setevery + \def\@float@setevery#1{% + \float@ifcaption{#1}{% + \caption@setposition{\@fs@iftopcapt t\else b\fi}% + \renewcommand\caption@setfloatcapt[1]{% + \let\@makecaption\caption@@make + \global\setbox\@floatcapt\vbox{% + \color@begingroup ##1\color@endgroup}}% + \float@getstyle\float@style{#1}% + \caption@setstyle*\float@style + \caption@setoptions\float@style + }{}% + \caption@freezeHref % will be defrosted in \float@makebox + \caption@ORI@float@setevery{#1}}% + \g@addto@macro\caption@typehook{% + \expandafter\ifx\csname #1name\endcsname\relax + \expandafter\let\csname #1name\expandafter\endcsname + \csname fname@#1\endcsname + \fi}% + \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% + \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% + \providecommand*\float@getstyle[2]{% + \edef#1{% + \noexpand\expandafter\noexpand\@gobblefour\noexpand\string + \expandafter\expandafter\expandafter\noexpand + \csname fst@#2\endcsname}% + \edef#1{#1}% + \caption@Debug{floatstyle{#2} = `#1'}}% + \providecommand*\float@ifcaption[1]{% + \expandafter\ifx\csname @float@c@#1\endcsname\float@caption + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}% +}}{% + \providecommand*\float@ifcaption[1]{\@secondoftwo}% +} +\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used +\caption@ifbool{ruled}{% + \captionsetup[ruled]{margin=0pt,minmargin=0,slc=0}% +}{% + \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% +} +\caption@undefbool{ruled} +\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{% + \let\caption@ORI@floatingfigure\floatingfigure + \def\floatingfigure{% + \caption@floatflt{figure}% + \caption@ORI@floatingfigure}% + \let\caption@ORI@floatingtable\floatingtable + \def\floatingtable{% + \caption@floatflt{table}% + \caption@ORI@floatingtable}% + \newcommand*\caption@floatflt[1]{% + \caption@settype{#1}% + \caption@clearmargin + \caption@setfullparboxrestore + \caption@setoptions{floating#1}}% +}{} +\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% + \caption@setbool{needfreeze}{1}% + \renewcommand\FP@positionLabel{% + FP\FP@captype-\number\value{FP@\FP@captype C}-pos}% + \renewcommand\FP@helpNote[2]{% + \begingroup % save \caption@thepage + \caption@pageref{#2}% + \typeout{FP#1 is inserted on page \caption@thepage!}% + \endgroup}% + \renewcommand*\FP@floatBegin[1]{% + \def\FP@captype{#1}% + \begin{lrbox}{\FP@floatCorpusBOX}% + \caption@settype*{#1}% + \caption@freeze + \global\let\FP@Label\@empty + \caption@ifFPrefcap + {}% + {\def\caption@freeze@label##1##2{% + \g@addto@macro\FP@Label{\FP@label##1{##2}}}}% + \ignorespaces}% + \renewcommand*\FP@floatEnd{% + \end{lrbox}% + \stepcounter{FP@\FP@captype C}% + \caption@label\FP@positionLabel + \FP@helpNote\FP@captype\FP@positionLabel + \edef\FP@RestoreCounter{% + \noexpand\setcounter{\FP@captype}{\the\value\FP@captype}% + \noexpand\setcounter{ContinuedFloat}{\the\value{ContinuedFloat}}}% + \FP@float + {\FP@positionLabel}% location label test + {\begin\FP@captype[p!]% + \usebox\FP@floatCorpusBOX + \let\caption@SClentry\@empty + \def\caption{\caption@dblarg{\@caption\@captype}}% + \long\def\@caption##1[##2]##3{\def\caption@SClentry{##2}}% + \let\FP@label\label + \let\label\caption@gobble + \caption@defrost + \caption@ifFPlistcap + {\caption@refstepcounter\@captype + \expandafter\caption@makecurrent\expandafter\@captype + \expandafter{\caption@SClentry}}% + {\ifx\caption@SClentry\@empty \else + \expandafter\captionlistentry\expandafter{\caption@SClentry}% + \fi}% + \caption@makeanchor\relax + \FP@Label + \end\FP@captype}% + {\FP@RestoreCounter + \@ifundefined{theH\FP@captype}{}{% + \expandafter\l@addto@macro\csname theH\FP@captype\endcsname{.FP}}}% + {\begin\FP@captype[b!]% + \let\FP@savedSetfnumCommand\caption@setfnum + \def\caption@setfnum##1{% + \FP@savedSetfnumCommand{##1}% + \ifx\FP@guide\@empty \else + \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}% + \fi}% + \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption + \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption + \caption@setoptions{FP\@captype}% + \FP@separatorCaption + \caption@ifFPlistcap{}{\let\caption@addcontentsline\@gobbletwo}% + \caption@defrost + \end\FP@captype}% + }% +}{% + \let\caption@ifFPlistcap\@undefined + \let\caption@ifFPrefcap\@undefined +} +\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{% + % Test if hyperref has stopped early + \caption@ifundefined\IfHyperBoolean{% + \caption@set@bool\caption@ifhyp@stoppedearly0% + \caption@ifundefined\H@refstepcounter + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\hyper@makecurrent + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\measuring@true + {\caption@set@bool\caption@ifhyp@stoppedearly1}{}}}% + }{% + \def\caption@ifhyp@stoppedearly{\IfHyperBoolean{stoppedearly}}% + }% + \caption@ifhyp@stoppedearly{% hyperref has stopped early + \caption@InfoNoLine{% + Hyperref support is turned off\MessageBreak + because hyperref has stopped early}% + }{% + \g@addto@macro\caption@prepareslc{\measuring@true}% + \renewcommand*\caption@@refstepcounter{\H@refstepcounter}% + \renewcommand*\caption@makecurrent[2]{% + \caption@makecurrentHref{#1}% + \caption@Debug{hyperref current=\@currentHref}% + \caption@gettitle{#2}}% + \newcommand*\caption@makecurrentHref{\hyper@makecurrent}% + \renewcommand\caption@makeanchor[1]{% + \caption@Debug{hyperref anchor: \@currentHref}% + % If we cannot have nesting, the anchor is empty. + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#1}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }#1% + \fi}% + \g@addto@macro\caption@prepareslc{\let\caption@makeanchor\@firstofone}% + \newif\if@capstart + \def\caption@start{\caption@ifhypcap\caption@start@\relax}% + \def\caption@start@{% + \caption@makestart\@captype + \caption@startanchor\@currentHref + \global\@capstarttrue + \let\hc@currentHref\@currentHref + \def\caption@makecurrentHref##1{% + \global\@capstartfalse + \global\let\@currentHref\hc@currentHref}% + \let\caption@makeanchor\@firstofone + }% + \newcommand*\caption@makestart[1]{% + \begingroup + \Hy@hypertexnamesfalse + \hyper@makecurrent{#1.caption}% + \endgroup + \caption@Debug{hypcap start=\@currentHref}}% + \newcommand*\caption@startanchor[1]{% + \ifvmode\begingroup + \caption@Debug{hypcap anchor: #1 (vertical mode)}% + \@tempdima\prevdepth + \nointerlineskip + \vspace*{-\caption@hypcapspace}% + \caption@anchor{#1}% + \vspace*{\caption@hypcapspace}% + \prevdepth\@tempdima + \endgroup\else + \caption@Debug{hypcap anchor: #1 (horizontal mode)}% + \caption@anchor{#1}% + \fi}% + \newcommand*\caption@anchor[1]{% + \ifmeasuring@ \else + \caption@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}% + \fi}% + \ifx\HyperRaiseLinkLength\@tempdima + \def\caption@raisedlink#1{\ifvmode#1\else\Hy@raisedlink{#1}\fi}% + \else + \let\caption@raisedlink\Hy@raisedlink + \fi + \def\caption@@start{% + \caption@ifundefined\hc@currentHref{% + \caption@Warning{% + The option `hypcap=true' will be ignored for this\MessageBreak + particular \string\caption}}{}}% + \def\caption@freezeHref{% + \let\caption@ORI@start\caption@start + \def\caption@start{\let\caption@start\caption@ORI@start}% + \global\let\caption@currentHref\@undefined + \def\caption@@start{\global\let\caption@currentHref\@currentHref}% + \let\caption@ORI@setfloatcapt\caption@setfloatcapt + \renewcommand*\caption@setfloatcapt{% + \ifx\caption@currentHref\@undefined \else + \let\caption@makeanchor\@firstofone + \fi + \caption@ORI@setfloatcapt}}% + \def\caption@defrostHref{% + \ifx\caption@currentHref\@undefined \else + \caption@startanchor\caption@currentHref + \global\let\caption@currentHref\@undefined + \fi}% + \caption@ifundefined\HyOrg@float@makebox{}{% + \caption@Debug{% + Redefining \noexpand\float@makebox (again)\@gobble}% + \let\caption@ORI@float@makebox\float@makebox % save for compatibility mode + \renewcommand\float@makebox[1]{% + \HyOrg@float@makebox{#1\relax \caption@defrostHref}}% + }% + }}{} +\caption@IfPackageLoaded{hypcap}{% v1.0 + \ifx\caption@start\relax \else % hyperref hasn't stopped early + \let\caption@ORI@capstart\capstart % save for compatibility mode + \caption@ifundefined\capstarttrue % check for v1.10 of hypcap package + {\def\capstart{\caption@start@}}% + {\def\capstart{\ifcapstart\caption@start@\fi}}% + \let\caption@start\relax + \let\caption@@start\relax + \caption@set@bool\caption@ifhypcap 1% + \renewcommand*\caption@hypcapspace{\hypcapspace}% + \fi}{} +\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% + \let\caption@ORI@lst@MakeCaption\lst@MakeCaption + \def\lst@MakeCaption#1{% #1 is `t' or `b' + \begingroup + \ifdim\hsize>\linewidth + \hsize\linewidth + \fi + \caption@setposition{#1}% + \caption@iftop{% + \@tempdima\belowcaptionskip + \belowcaptionskip\abovecaptionskip + \abovecaptionskip\@tempdima}{}% + \caption@setup{rule=0}% + \caption@setoptions{lstlisting}% + \caption@setautoposition{#1}% + \caption@begin{lstlisting}% + \caption@ORI@lst@MakeCaption{#1}% + \caption@end + \endgroup}% + \def\lst@makecaption{\caption@starfalse\@makecaption}% + \def\lst@maketitle{\caption@startrue\@makecaption\@empty}% + \providecommand*\ext@lstlisting{lol}% +}{} +\providecommand*\LTcaptype{table} +\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{% + \RequirePackage{ltcaption}[=2007/09/01]% + \let\LT@@makecaption\@undefined + \caption@AtBeginDocument{% + \let\caption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% + \global\let\caption@opt@@longtable\@undefined + \def\captionsetup{% + \noalign\bgroup + \@ifstar\@captionsetup\@captionsetup}% gobble * + \def\@captionsetup##1{\LT@captionsetup{##1}\egroup}% + \def\LT@captionsetup##1{% + \captionsetup@startrue\caption@setup@options[@longtable]{##1}% + \global\let\caption@opt@@longtable\caption@opt@@longtable}% + \def\@captionabovetrue{\LT@captionsetup{position=t}}% + \def\@captionabovefalse{\LT@captionsetup{position=b}}% + \def\captionlistentry{% + \noalign\bgroup + \@ifstar{\egroup\LT@captionlistentry}% gobble * + {\egroup\LT@captionlistentry}}% + \def\LT@captionlistentry##1{% + \caption@listentry\@firstoftwo[\LTcaptype]{##1}}% +%% \let\Hy@LT@currentHlabel\@currentHlabel +%% \let\@currentHlabel\Hy@LT@currentHlabel + \def\ContinuedFloat{\noalign{% + \caption@Error{\noexpand\ContinuedFloat outside float}}}% + \caption@ORI@LT@array}}% + \long\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}% + \LT@captionlistentry{#2}}% + \renewcommand\LT@makecaption[3]{% + \caption@LT@make{% + \caption@settype*\LTcaptype + \ifdim\LTcapwidth=4in \else + \setcaptionwidth\LTcapwidth + \fi + \caption@setoptions{longtable}% + \caption@setoptions{@longtable}% + \caption@setautoposition{\ifcase\LT@rows t\else b\fi}% + \caption@startrue#1\caption@starfalse + \caption@resetContinuedFloat\LTcaptype + \caption@begin\LTcaptype + \caption@normalsize + \vskip-\ht\strutbox + \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}% + \caption@@make{#2}{#3}\endgraf + \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}% + \caption@end}}% +}{} +\caption@IfPackageLoaded{picinpar}{% + \long\def\figwindow[#1,#2,#3,#4] {% + \caption@window{figure}% + \caption@setoptions{figwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \long\def\tabwindow[#1,#2,#3,#4] {% + \caption@window{table}% + \caption@setoptions{tabwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \newcommand*\caption@window[1]{% + \let\@makecaption\caption@@make + \caption@setautoposition b% + \caption@settype{#1}% + \caption@clearmargin + \caption@setfullparboxrestore}% + \newcommand\caption@wincaption[1]{% + \ifdim\picwd=\z@ + \let\caption@makecurrent\@gobbletwo + \let\caption@@start\relax + \caption@prepareslc + \fi + \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% + \if\@tempa*% + \let\@tempa\@firstofone + \else\if\@tempa[%] + \let\@tempa\@firstofone + \else + \let\@tempa\@empty + \fi\fi + \expandafter\caption\@tempa{#1}}% +}{} +\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}} +\caption@IfPackageLoaded{picins}{% + \caption@ifundefined\@piccaptype{% + \caption@iftype{% + \let\@piccaptype\@captype + }{% + \def\@piccaptype{figure}% + }% + }{}% + \let\@captype\@undefined + \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}% + \let\caption@ORI@make@piccaption\make@piccaption + \def\make@piccaption{% + \let\caption@ORI\caption + \long\def\caption[##1]##2{% + \caption@freezeHref % will be defrosted in \ivparpic + \caption@settype\@piccaptype + \caption@clearmargin + \caption@setfullparboxrestore + \caption@setoptions{parpic}% + \caption@setautoposition b% + \expandafter\expandafter\expandafter\caption@ORI + \expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter{% + \expandafter##1\expandafter}\expandafter]\expandafter{##2}}% + \caption@ORI@make@piccaption + \let\caption\caption@ORI}% + + \let\caption@ORI@ivparpic\ivparpic + \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{% + \let\caption@ORI@noindent\noindent + \def\noindent{% + \caption@defrostHref + \let\noindent\caption@ORI@noindent + \noindent}% + \caption@ORI@ivparpic(#1,#2)(#3,#4)[#5][#6]{#7}% + \let\noindent\caption@ORI@noindent}% +}{% + \let\piccaptiontype\@undefined +} +\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{% + \def\rotcaption{\let\@makecaption\@makerotcaption\caption}% + \def\rotcaptionof{% + \caption@teststar\caption@of{\rotcaption*}\rotcaption}% + \long\def\@makerotcaption#1#2{% + \ifdim\captionwidth=\z@ + \setcaptionwidth{.8\textheight}% + \caption@slc{#1}{#2}{.8\vsize}{% + \let\caption@makerot\caption@@make + \caption@clearmargin + \let\caption@parbox\@secondoftwo}% + \caption@set@bool\caption@ifslc0% been there, done that + \fi + \rotatebox{90}{\caption@makerot{#1}{#2}}% + \nobreak\hspace{12pt}}% + \newcommand\caption@makerot[2]{% + \begin{minipage}\captionwidth\caption@@make{#1}{#2}\end{minipage}}% +}{} +\caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{% + \caption@setbool{needfreeze}{1}% + \let\caption@ORI@SC@zfloat\SC@zfloat + \def\SC@zfloat#1#2#3[#4]{% + \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]% + \SC@RestoreCommands + \caption@settype*{#2}% + \caption@freeze + \let\SC@label\label}% + \providecommand*\SC@RestoreCommands{% + \let\caption=\SC@orig@caption \let\label=\SC@orig@label}% + \let\caption@ORI@endSC@FLOAT\endSC@FLOAT + \def\endSC@FLOAT{% + \let\caption@ORI@settype\caption@settype + \def\caption@settype##1{% will be done in \@xfloat + \caption@ORI@settype*{##1}% do not change \@currentlabel + \caption@setSC@justify +%%% \caption@setoptions{SCfloat}% + \caption@setoptions{SC\@captype}% + \caption@start}% + \def\caption@setSC@justify{% + \caption@clearmargin + \ifx\SC@justify\@empty \else + \let\caption@hj\SC@justify + \let\SC@justify\@empty + \fi}% + \let\caption\SC@orig@caption + \def\SC@orig@caption[##1]##2{\caption@defrost}% + \caption@setSC@justify % for compatibility mode + \caption@ORI@endSC@FLOAT}% +}{} +\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{% + \def\sf@ifpositiontop{% + \ifx\@captype\@undefined + \expandafter\@gobbletwo + \else\ifx\@captype\relax + \expandafter\expandafter\expandafter\@gobbletwo + \else + \expandafter\expandafter\expandafter\sf@if@position@top + \fi\fi} + \def\sf@if@position@top{% + \@ifundefined{if\@captype topcap}% + {\@gobbletwo}% + {\@nameuse{if\@captype topcap}% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}} +}{} +\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[#1]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{supertabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end}% +}{} +\caption@IfPackageLoaded{xtab}[2000/04/09 v2.3]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[#1]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{xtabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% + \@initisotab + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end + \global\advance\ST@pageleft -\PWSTcapht + \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}% +}{} +\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{% + \let\caption@ORI@threeparttable\threeparttable + \renewcommand*\threeparttable{% + \caption@settype{table}% + \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{threeparttable}% + \caption@ORI@threeparttable}% + \let\caption@ORI@measuredfigure\measuredfigure + \renewcommand*\measuredfigure{% + \caption@settype{figure}% + \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{measuredfigure}% + \caption@ORI@measuredfigure}% + \def\TPT@caption#1[#2]#3{% + \gdef\TPT@docapt{% + \global\let\TPT@docapt\@undefined + \caption@setautoposition\caption@TPT@position + \TPT@LA@caption{#1}[{#2}]{#3}}% + \ifx\TPT@hsize\@empty + \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures + \gdef\caption@TPT@position{t}% + \g@addto@macro\TPT@docapt\caption@TPT@eatvskip + \else + \def\caption@TPT@position{b}% + \TPT@docapt + \fi + \ignorespaces}% + %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}% + \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}% +}{} +\caption@IfPackageLoaded{wrapfig}[2003/01/31 v3.6]{% + \renewcommand*\wrapfloat[1]{% + \def\@captype{#1}% + \@ifundefined{fst@#1}{}{% + \@nameuse{fst@#1}% + \def\WF@floatstyhook{\let\@currbox\WF@box + \global\setbox\WF@box\float@makebox{\wd\WF@box}}}% + \@ifnextchar[\WF@wr{\WF@wr[]}} + \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, + \gdef\WF@ovh{#1}% hold overhang for later, when \width is known + \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% + \expandafter\WF@captionstyhook\expandafter{\@captype}% <= new + \ifdim\hsize>\z@ \@parboxrestore \else + \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption + \ignorespaces \fi}% + \def\WF@captionstyhook#1{% + \let\@captype\@undefined + \@ifundefined{fst@#1}{}{\@float@setevery{#1}}% + \caption@settype{#1}% + \caption@clearmargin +%%% \caption@setoptions{wrapfloat}% + \caption@setoptions{wrap#1}}% +}{} +\endinput +%% +%% End of file `caption_2011-11-10.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty b/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty new file mode 100644 index 00000000000..0ab687fe055 --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption_2019-09-01.sty @@ -0,0 +1,1864 @@ +%% +%% This is file `caption_2019-09-01.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.3/caption.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption}[2019/09/01 v3.3d Customizing captions (AR)] +\RequirePackage{caption3}[=2019/09/01] % needs v1.8d or newer +\caption@ifbool{documentclass}{}{% + \caption@WarningNoLine{% + Unsupported document class (or package) detected,\MessageBreak + usage of the caption package is not recommended}% + \caption@InfoNoLine{\string\@makecaption\space=\space\meaning\@makecaption}% +} +\@ifpackageloaded{caption2}{% + \caption@Error{% + You can't use both, the (obsolete) caption2 *and*\MessageBreak + the (current) caption package}% + \endinput +}{} +\caption@AtBeginDocument{% + \@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}% + \@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}% + \@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}} +\newcommand*\caption@DisablePositionOption[1]{% + \caption@InfoNoLine{% + `#1' package detected; setting `position=b' for compatibility reasons}% + \caption@setposition b% + \DeclareCaptionOption{position}{% + \caption@Error{Usage of the `position' option is incompatible\MessageBreak + to the `#1' package}}} +\@onlypreamble\caption@DisablePositionOption +\DeclareCaptionOption{figureposition}{% + \captionsetup*[figure]{position=#1}} +\@onlypreamble@key{caption}{figureposition} +\DeclareCaptionOption{tableposition}{% + \captionsetup*[table]{position=#1}} +\@onlypreamble@key{caption}{tableposition} +\DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}} +\@onlypreamble@key{caption}{figurename} +\DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}} +\@onlypreamble@key{caption}{tablename} +\DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}} +\@onlypreamble@key{caption}{listfigurename} +\DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}} +\@onlypreamble@key{caption}{listtablename} +\newcommand*\caption@SetName[2]{% + \caption@NewFloat{\newfloat@setname{#1}{#2}}} +\@onlypreamble\caption@SetName +\DeclareCaptionOption{name}{\caption@setname\@captype{#1}} +\newcommand*\caption@setname[2]{% + \@namedef{#1name}{#2}} +\newcommand*\caption@DeclareWithinOption[1]{% + \DeclareCaptionOption{#1within}{\caption@Within{#1}{##1}}% + \DeclareCaptionOptionNoValue{#1without}{\caption@Within{#1}{none}}} +\@onlypreamble\caption@DeclareWithinOption +\caption@DeclareWithinOption{figure} +\caption@DeclareWithinOption{table} +\DeclareCaptionOption{within}{% + \caption@NewFloat{\newfloatsetup{within=#1}}} +\DeclareCaptionOptionNoValue{without}{% + \caption@NewFloat{\newfloatsetup{without}}} +\newcommand*\caption@Within[2]{% + \caption@NewFloat{\newfloat@setwithin{#1}{#2}}} +\newcommand*\caption@NewFloat[1]{% + \let\KV@prefix@ORI\KV@prefix + \let\@tempc@ORI\@tempc + \caption@ifpackageloaded{newfloat}{#1}{}% + \let\@tempc\@tempc@ORI + \let\KV@prefix\KV@prefix@ORI} +\DeclareCaptionOption*{config}[caption]{% + \InputIfFileExists{#1.cfg}% + {\typeout{*** Local configuration file #1.cfg used ***}}% + {\caption@Warning{Configuration file #1.cfg not found}}} +\newcommand*\caption@selectlistentry[1]{% + \caption@ifinlist{#1}{heading}{% + \let\caption@iflistheading\@firstoftwo + }{\caption@ifinlist{#1}{default,list-entry,entry}{% + \let\caption@iflistheading\@secondoftwo + }{% + \caption@Error{Undefined list-entry selection `#1'}% + }}} +\DeclareCaptionOption{list-entry}{\caption@selectlistentry{#1}} +\captionsetup{list-entry=default} +\newcommand*\caption@setparboxrestore[1]{% + \caption@ifinlist{#1}{full}{% + \caption@setfullparboxrestore + }{\caption@ifinlist{#1}{default,light,partial}{% + \let\caption@parboxrestore\@secondoftwo + }{% + \caption@Error{Undefined parboxrestore `#1'}% + }}} +\newcommand*\caption@setfullparboxrestore{% + \let\caption@parboxrestore\@firstoftwo} +\DeclareCaptionOption{parboxrestore}{\caption@setparboxrestore{#1}} +\captionsetup{parboxrestore=default} +\DeclareCaptionOption{@minipage}{% + \caption@ifinlist{#1}{auto,default}% + {\let\caption@if@minipage\@gobbletwo}% + {\caption@set@bool\caption@if@minipage{#1}}} +\captionsetup{@minipage=default} +\DeclareCaptionOption{compatibility}[1]{\caption@setbool{compatibility}{#1}} +\@onlypreamble@key{caption}{compatibility} +\DeclareCaptionOptionNoValue*{normal}{% + \caption@setformat{plain}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{isu}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{hang}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{center}{% + \caption@setformat{plain}% + \caption@setjustification{centering}} +\DeclareCaptionOptionNoValue*{centerlast}{% + \caption@setformat{plain}% + \caption@setjustification{centerlast}} +\DeclareCaptionOptionNoValue*{scriptsize}{\def\captionfont{\scriptsize}} +\DeclareCaptionOptionNoValue*{footnotesize}{\def\captionfont{\footnotesize}} +\DeclareCaptionOptionNoValue*{small}{\def\captionfont{\small}} +\DeclareCaptionOptionNoValue*{normalsize}{\def\captionfont{\normalsize}} +\DeclareCaptionOptionNoValue*{large}{\def\captionfont{\large}} +\DeclareCaptionOptionNoValue*{Large}{\def\captionfont{\Large}} +\DeclareCaptionOptionNoValue*{up}{\l@addto@macro\captionlabelfont\upshape} +\DeclareCaptionOptionNoValue*{it}{\l@addto@macro\captionlabelfont\itshape} +\DeclareCaptionOptionNoValue*{sl}{\l@addto@macro\captionlabelfont\slshape} +\DeclareCaptionOptionNoValue*{sc}{\l@addto@macro\captionlabelfont\scshape} +\DeclareCaptionOptionNoValue*{md}{\l@addto@macro\captionlabelfont\mdseries} +\DeclareCaptionOptionNoValue*{bf}{\l@addto@macro\captionlabelfont\bfseries} +\DeclareCaptionOptionNoValue*{rm}{\l@addto@macro\captionlabelfont\rmfamily} +\DeclareCaptionOptionNoValue*{sf}{\l@addto@macro\captionlabelfont\sffamily} +\DeclareCaptionOptionNoValue*{tt}{\l@addto@macro\captionlabelfont\ttfamily} +\DeclareCaptionOptionNoValue*{nooneline}{\caption@setbool{slc}{0}} +\caption@setbool{ruled}{0} +\DeclareCaptionOptionNoValue*{ruled}{\caption@setbool{ruled}{1}} +\DeclareCaptionOptionNoValue*{flushleft}{% + \caption@setformat{plain}% + \caption@setjustification{raggedright}} +\DeclareCaptionOptionNoValue*{flushright}{% + \caption@setformat{plain}% + \caption@setjustification{raggedleft}} +\DeclareCaptionOptionNoValue*{oneline}{\caption@setbool{slc}{1}} +\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{% + \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}} +\DeclareCaptionOption*{caption}{% + \caption@setbool{temp}{#1}% + \caption@ifbool{temp}{}{% + \caption@Error{% + The package option `caption=#1' is obsolete.\MessageBreak + Please pass this option to the subfig package instead\MessageBreak + and do *not* load the caption package anymore}}} +\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}} +\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}} +\@onlypreamble@key{caption}{FPlist} +\@onlypreamble@key{caption}{FPref} +\newcommand*\caption@setFPoption[2]{% + \edef\caption@tempa{\@car#2\@nil}% + \caption@setbool{FP#1cap}{\if c\caption@tempa 1\else 0\fi}} +\@onlypreamble\caption@setFPoption +\captionsetup{FPlist=caption,FPref=figure} +\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}} +\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}} +\captionsetup{hypcap=1,hypcapspace=.5\baselineskip} +\caption@ifamsclass{% + \caption@InfoNoLine{AMS or SMF document class}% + \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class +} +\caption@ifkomaclass{% + \caption@InfoNoLine{KOMA-Script document class}% + \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}} + \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}} + \if@tablecaptionabove + \@tablecaptionabovetrue + \else + \@tablecaptionabovefalse + \fi + \caption@ifundefined\@figurecaptionabovetrue{}{% + \g@addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}} + \g@addto@macro\@figurecaptionabovefalse{\captionsetup*[figure]{position=b}} + \if@figurecaptionabove + \@figurecaptionabovetrue + \else + \@figurecaptionabovefalse + \fi + }% + \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo} + \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo} + \ifonelinecaptions + \onelinecaptionstrue + \else + \onelinecaptionsfalse + \fi + \g@addto@macro\@captionabovetrue{\let\caption@position\@firstoftwo} + \g@addto@macro\@captionabovefalse{\let\caption@position\@secondoftwo} + \DeclareCaptionOption{figureposition}{% + \caption@WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}} + \DeclareCaptionOption{tableposition}{% + \caption@WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}} + \let\caption@KOMA@setcapindent\@setcapindent + \renewcommand*\@setcapindent[1]{% + \caption@KOMA@setcapindent{#1}\caption@setcapindent} + \let\caption@KOMA@@setcapindent\@@setcapindent + \renewcommand*\@@setcapindent[1]{% + \caption@KOMA@@setcapindent{#1}\caption@setcapindent} + \newcommand*\caption@setcapindent{% + \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}} + \caption@ifundefined\cap@indent{}{\caption@setcapindent} + \expandafter\let\expandafter\caption@KOMA@setcapwidth + \csname\string\setcapwidth\endcsname + \@namedef{\string\setcapwidth}[#1]#2{% + \caption@KOMA@setcapwidth[{#1}]{#2}\caption@setcapwidth{#1}} + \newcommand*\caption@setcapwidth[1]{% + \ifx\\#1\\\else + \caption@ifundefined\cap@margin{}{% + \def\@tempa{captionbeside}% + \ifx\@tempa\@currenvir\else\caption@Warning{% + Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}% + \fi}% + \fi + \captionsetup{width=\cap@width}} + \def\caption@tempa{\hsize}% + \ifx\caption@tempa\cap@width \else + \caption@setcapwidth{?} + \fi + \expandafter\let\expandafter\caption@KOMA@setcapmargin + \csname\string\@setcapmargin\endcsname + \@namedef{\string\@setcapmargin}[#1]#2{% + \caption@KOMA@setcapmargin[{#1}]{#2}\caption@setcapmargin} + \expandafter\let\expandafter\caption@KOMA@@setcapmargin + \csname\string\@@setcapmargin\endcsname + \@namedef{\string\@@setcapmargin}[#1]#2{% + \caption@KOMA@@setcapmargin[{#1}]{#2}\caption@setcapmargin} + \newcommand*\caption@setcapmargin{% + \begingroup + \let\onelinecaptionsfalse\relax + \def\@twoside{0}% + \def\if@twoside{\def\@twoside{1}\iffalse}% + \cap@margin + \def\@tempa{\endgroup}% + \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else + \def\hspace##1##{\@firstofone}% + \edef\@tempa{\endgroup + \noexpand\captionsetup{% + twoside=\@twoside,slc=0,% + margin={\cap@left,\cap@right}}}% + \fi\fi + \@tempa} + \ifx\cap@margin\relax \else + \caption@setcapmargin + \fi +} +\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}} +\caption@ProcessOptions*{caption} +\newcounter{caption@flags} +\newcommand*\caption@ifflag[1]{% + \@tempcnta\c@caption@flags + \divide\@tempcnta #1\relax + \ifodd\@tempcnta + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\newcommand*\caption@clrflags{% + \setcounter{caption@flags}\z@} +\newcommand*\caption@clrflag[1]{% + \caption@ifflag{#1}{\caption@addtoflags{-#1}}{}} +\newcommand*\caption@setflag[1]{% + \caption@ifflag{#1}{}{\caption@addtoflags{#1}}} +\newcommand*\caption@addtoflags{% + \addtocounter{caption@flags}} +\def\caption@caption{% + \caption@iftype + {\caption@checkgrouplevel\@empty\caption + \caption@star + {\caption@refstepcounter\@captype}% + {\caption@dblarg{\@caption\@captype}}}% + {\caption@Error{\noexpand\caption outside float}% + \caption@gobble}} +\newcommand*\caption@star[2]{% + \@ifstar{\caption@startrue#2[]}{#1#2}} +\long\def\caption@@caption#1[#2]#3{% + \ifcaption@star \else + \caption@prepareanchor{#1}{#2}% + \memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}% + \@nameuse{nag@hascaptiontrue}% + \fi + \par + \caption@beginex{#1}{#2}{#3}% + \caption@setfloatcapt{% + \caption@boxrestore + \if@minipage + \@setminipage + \fi + \caption@normalsize + \ifcaption@star + \let\caption@makeanchor\@firstofone + \fi + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces\caption@makeanchor{#3}}\par + \caption@if@minipage\@minipagetrue\@minipagefalse}% + \caption@end} +\providecommand\M@gettitle[1]{} +\providecommand\memcaptioninfo[4]{} +\newcommand*\caption@prepareanchor[2]{% + \caption@makecurrent{#1}{#2}% + \caption@ifhypcap\caption@@start\relax + \M@gettitle{#2}} +\long\def\caption@makecaption#1#2{% + \caption@make@above + \caption@@make{#1}{#2}% + \caption@make@below} +\newcommand*\caption@make@above{% + \caption@iftop + \caption@belowskip + {\caption@rule\caption@aboveskip}} +\newcommand*\caption@make@below{% + \caption@iftop + {\caption@aboveskip\caption@rule}% + \caption@belowskip} +\newcommand*\caption@aboveskip{% + \vskip\abovecaptionskip} +\newcommand*\caption@belowskip{% + \vskip\belowcaptionskip} +\newcommand*\caption@redefine{} +\g@addto@macro\caption@redefine{% + \caption@setbool{incompatible}{0}% + \caption@CheckCommand\caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% + \caption@CheckCommand\caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \def\caption{ + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside figure or table}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% + \caption@CheckCommand\caption{% + % beamerbaselocalstructure.sty, Joseph Wright committed 4ac715c 2013-09-04 + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside figure or table}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \expandafter\@firstofone + \fi + {\@dblarg{\@caption\@captype}}% + }}% + \caption@CheckCommand\caption{% + % float.sty [2001/11/08 v1.3d Float enhancements (AL)] + \long\def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \refstepcounter\@captype + \let\@tempf\@caption + \expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else + \expandafter\expandafter\let + \expandafter\@tempf\csname @float@c@\@captype\endcsname + \fi + \fi + \@dblarg{\@tempf\@captype}}}% + \caption@CheckCommand\caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \@ifundefined{fst@\@captype}{% + \let\Hy@tempa\@caption + }{% + \let\Hy@tempa\Hy@float@caption + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% + \caption@CheckCommand\caption{% + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \H@refstepcounter\@captype + \let\Hy@tempa\@caption + \@ifundefined{float@caption}{% + }{% + \expandafter\ifx\csname @float@c@\@captype\endcsname\float@caption + \let\Hy@tempa\Hy@float@caption + \fi + }% + \expandafter\@firstofone + \fi + {\@dblarg{\Hy@tempa\@captype}}% + }}% + \caption@CheckCommand\caption{% + % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class] + % \let\m@moldhypcaption\caption + \long\def\caption{\donemaincaptiontrue\m@moldhypcaption}}% + \caption@IfCheckCommand{}{% + \caption@InfoNoLine{% + Incompatible package detected (regarding \string\caption).\MessageBreak + \string\caption\space=\space\meaning\caption}% + \caption@setbool{incompatible}{1}}% + \caption@CheckCommand\@caption{% + % ltfloat.dtx [2002/10/01 v1.1v LaTeX Kernel (Floats)] + \long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup}}% + \caption@CheckCommand\@caption{% + % beamerbaselocalstructure.sty,v 1.53 2007/01/28 20:48:21 tantau + \long\def\@caption#1[#2]#3{% second argument ignored + \par\nobreak + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \beamer@makecaption{#1}{\ignorespaces #3}\par\nobreak + \endgroup}}% + \caption@CheckCommand\@caption{% + % memhfixc.sty [2010/08/17 v1.15 nameref/hyperref package fixes for memoir class] + \long\def\@caption#1[#2]#3{% + \MNR@old@caption{#1}[{#2}]{#3}% + \def\@currentlabelname{#2}% + \M@gettitle{#2}% + }}% + \caption@CheckCommand\@caption{% + % arabicore.sty [2006/01/01 v1.0 Arabi Core switching commands (may still change)] + \long\def\@caption#1[#2]#3{% + \par + \addtocontents{\csname ext@#1\endcsname}{\xstring\select@language{\main@Arabi@language}}% + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}{\ignorespaces \if@rl{\textRL{#2}}\else\textLR{#2}\fi}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces \if@rl{\textRL{#3}}\else\textLR{#3}\fi}\par + \endgroup}}% + \caption@CheckCommand\@caption{% + % rlbabel.def [2005/03/30 v2.3h Right-to-Left support from the babel system Hebrew language support from the babel system] + \long\def\@caption#1[#2]#3{% + \par + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}% + {\ignorespaces #2}}% + \def\@fignm{figure} + \ifx#1\@fignm\addcontentsline{fol}{#1}% + {\protect\numberline{\csname the#1\endcsname}% + {\ignorespaces #2}}\fi% + \def\@tblnm{table} + \ifx#1\@tblnm\addcontentsline{tol}{#1}% + {\protect\numberline{\csname the#1\endcsname}% + {\ignorespaces #2}}\fi% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup}}% + \caption@CheckCommand\@caption{% + % magyar.ldf [2005/03/30 v1.4j Magyar support from the babel system] + \long\def\@caption#1[#2]#3{% + \csname par\endcsname + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces #3}\csname par\endcsname + \endgroup}}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/02/27 v6.75t Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \hyper@makecurrent{\@captype}% + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2007/04/09 v6.76a Hypertext links for LaTeX] + % hyperref.sty [2007/06/12 v6.76h Hypertext links for LaTeX] + % hyperref.sty [2007/08/05 v6.76j Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \hyper@@anchor{\@currentHref}{#3}% + \else + \Hy@raisedlink{\hyper@@anchor{\@currentHref}{\relax}}#3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2009/11/27 v6.79k Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \def\@currentlabelname{#2}% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }% + #3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % hyperref.sty [2009/12/09 v6.79m Hypertext links for LaTeX] + % hyperref.sty [2009/12/28 v6.79z Hypertext links for LaTeX] + \long\def\@caption#1[#2]#3{% + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\let\@currentHref\hc@currentHref + \else + \hyper@makecurrent{\@captype}% + \fi + \@ifundefined{NR@gettitle}{% + \def\@currentlabelname{#2}% + }{% + \NR@gettitle{#2}% + }% + \par\addcontentsline{\csname ext@#1\endcsname}{#1}{% + \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}% + }% + \begingroup + \@parboxrestore + \if@minipage + \@setminipage + \fi + \normalsize + \expandafter\ifx\csname if@capstart\expandafter\endcsname + \csname iftrue\endcsname + \global\@capstartfalse + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}% + \else + \@makecaption{\csname fnum@#1\endcsname}{% + \ignorespaces + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{% + \@currentHref + }{\relax}% + }% + #3% + \fi + }% + \fi + \par + \endgroup + }}% + \caption@CheckCommand\@caption{% + % nameref.sty [2006/12/27 v2.28 Cross-referencing by name of section] + \long\def\@caption#1[#2]{% + \def\@currentlabelname{#2}% + \NR@@caption{#1}[{#2}]% + }}% + \caption@CheckCommand\@caption{% + % nameref.sty [2009/11/27 v2.32 Cross-referencing by name of section] + \long\def\@caption#1[#2]{% + \NR@gettitle{#2}% + \NR@@caption{#1}[{#2}]% + }}% + \caption@CheckCommand\@caption{% + % subfigure.sty [2002/07/30 v2.1.4 subfigure package] + \long\def\@caption#1[#2]#3{% + \@ifundefined{if#1topcap}% + {\subfig@oldcaption{#1}[{#2}]{#3}}% + {\@nameuse{if#1topcap}% + \@listsubcaptions{#1}% + \subfig@oldcaption{#1}[{#2}]{#3}% + \else + \subfig@oldcaption{#1}[{#2}]{#3}% + \@listsubcaptions{#1}% + \fi}}}% + \caption@CheckCommand\@caption{% + % subfig.sty [2005/06/28 ver: 1.3 subfig package] + \def\@caption{\caption@}% + }% + \caption@CheckCommand\@caption{% + % chkfloat.sty [2012/08/19 v0.1 chkfloat: check for moved floats] + \def\@caption#1[#2]#3{\chkfloat@caption{#1}[#2]{#3}% + \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}% + }}% + \caption@CheckCommand\@caption{% + % chkfloat.sty [20??/??/?? v0.? chkfloat: check for moved floats] + \def\@caption#1[#2]#3{\chkfloat@caption{#1}[{#2}]{#3}% + \chkfloat@addcontentsline{#1}{#2}% + }}% + \caption@IfCheckCommand{}{% + \caption@InfoNoLine{% + Incompatible package detected (regarding \string\@caption).\MessageBreak + \string\@caption\space=\space\meaning\@caption}% + \caption@setbool{incompatible}{1}}% + \caption@ifundefined\caption@ifcompatibility + {\let\caption@ifcompatibility\caption@ifincompatible + \let\caption@tempa\caption@WarningNoLine}% + {\let\caption@tempa\@gobble}% suppress warning + \caption@ifcompatibility{% + \caption@tempa{% + \noexpand\caption will not be redefined since it's already\MessageBreak + redefined by a document class or package which is\MessageBreak + unknown to the caption package}% + \renewcommand*\caption@redefine{}% + \renewcommand*\caption@ContinuedFloatX[1]{% + \caption@Error{Not available in compatibility mode}}% + \caption@AtBeginDocument*{% + \let\caption@start\relax + \caption@ifundefined\caption@ORI@capstart{}{% + \caption@Debug{% + Restore hypcap definition of \string\capstart\@gobble}% + \let\capstart\caption@ORI@capstart}% + }% + \renewcommand*\caption@star[2]{#1#2}% + }{% + \caption@ifincompatible{% + \caption@WarningNoLine{% + Forced redefinition of \noexpand\caption since the\MessageBreak + unsupported(!) package option `compatibility=false'\MessageBreak + was given}% + }{}% + \renewcommand*\caption@redefine{% + \let\caption\caption@caption + \let\@caption\caption@@caption}% + \caption@redefine + }% + \caption@AtBeginDocument*{% + \let\caption@ORI@capstart\@undefined}% + \let\caption@ORI@xfloat\@xfloat + \def\@xfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}}% +} +\caption@AtBeginDocument{\caption@redefine} +\let\@makecaption\caption@makecaption +\newcommand\phantomcaption{% + \caption@iftype + {\caption@refstepcounter\@captype}% + {\caption@Error{\noexpand\phantomcaption outside float}}}% +\caption@AtBeginDocument{% + \DeclareCaptionOption{type}{\setcaptiontype{#1}}% + \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}% + \DeclareCaptionOptionNoValue{subtype}{\setcaptionsubtype\relax}% + \DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}% +} +\newcommand\setcaptiontype{% + \caption@boxrestore@mini + \caption@settype} +\newcommand\setcaptionsubtype{% + \caption@iftype + \caption@setsubtype + {\caption@Error{\noexpand\setcaptionsubtype outside float}}}% +\newcommand\caption@setsubtype{% + \@ifstar + {\caption@@settype{sub}*{sub\@captype}}% + {\caption@@settype{sub}{sub\@captype}}}% +\newcommand*\caption@settype{% + \caption@clrflags + \caption@set@type} +\newcommand*\caption@set@type{% + \caption@@settype{}} +\newcommand*\caption@@settype[1]{% + \caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo} +\newcommand*\caption@@@settype[3]{% + \caption@Debug{#1type=#3}% + \caption@checkgrouplevel{#1}{% + \captionsetup{#1type#2*\@empty=...}#2{ or + \@backslashchar#1captionof}{}}% + \edef\caption@tempa{#3}% + \expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else + \ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi + \fi + \expandafter\let\csname @#1captype\endcsname\caption@tempa + \@nameuse{caption@#1typehook}% + \caption@setoptions{#3}% + \ifx\caption@opt\relax + \@nameundef{caption@#1type@warning}% + \else + \@namedef{caption@#1type@warning}{\caption@Warning{% + The #1caption type was already set to + `\csname @#1captype\endcsname'\MessageBreak}}% + \fi + #2{}{% + \let\@currentlabel\caption@undefinedlabel + \ifx\caption@x@label\@undefined + \let\caption@x@label\label + \let\label\caption@xlabel + \fi + \caption@start}} +\newcommand*\caption@typehook{} +\newcommand*\caption@iftype{% + \caption@ifundefined\@captype\@secondoftwo\@firstoftwo} +\caption@ifeTeX{% + \newcommand*\caption@checkgrouplevel[2]{% + \@ifundefined{#1caption@grouplevel}{% + \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}% + \ifnum\currentgrouplevel>\caption@grouplevel\relax + \expandafter\edef\csname #1caption@grouplevel\endcsname{% + \the\currentgrouplevel}% + \else + \caption@Warning{\string#2\MessageBreak outside box or environment}% + \fi + }{}}% +}{% + \let\caption@checkgrouplevel\@gobbletwo +} +\newcommand*\caption@undefinedlabel{% + \protect\caption@xref{\caption@labelname}{\on@line}} +\DeclareRobustCommand*\caption@xref[2]{% + \caption@WarningNoLine{\noexpand\label without proper reference#2}% + \@setref\relax\@undefined{#1}} +\newcommand*\caption@labelname{??} +\newcommand*\caption@xlabel{% + \caption@withoptargs\caption@@xlabel} +\newcommand*\caption@@xlabel[2]{% + \caption@@@xlabel + \def\caption@labelname{#2}% + \caption@x@label#1{#2}} +\newcommand*\caption@@@xlabel{% + \global\let\caption@@@xlabel\@empty + \@bsphack + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@xref[2]{% + \string\@setref\string\relax\string\@undefined{\string##1}}}% + \@esphack} +\caption@AtBeginDocument{% + \def\captionof{\caption@teststar\caption@of{\caption*}\caption}} +\newcommand*\caption@of[2]{\setcaptiontype*{#2}#1} +\newcommand*\captionlistentry{% + \caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo} +\newcommand*\@captionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@captype} +\def\caption@listentry#1[#2]#3{% + \@bsphack + #1{\caption@gettitle{#3}}% + {\caption@refstepcounter{#2}% + \caption@makecurrent{#2}{#3}}% + \caption@addcontentsline{#2}{#3}% + \@esphack} +\newcommand*\captionbox{% + \caption@withoptargs{\caption@ibox\@gobble}} +\newcommand\caption@ibox[3]{% + \kernel@ifnextchar[%] + {\caption@iibox{#1}{#2}{#3}}% + {\caption@iibox@{#1}{#2}{#3}}} +\long\def\caption@iibox#1#2#3[#4]{% + \@testopt{\caption@iiibox{#1}{#2}{#3}[{#4}]}\captionbox@hj@default} +\long\def\caption@iibox@#1#2#3#4{% + \setbox\@tempboxa\hbox{#4}% + \caption@iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox@hj@default]{\unhbox\@tempboxa}} +\long\def\caption@iiibox#1{% + \caption@iiiibox{#1}\vbox\vtop} +\long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{% + \begingroup + #1*% set \caption@position + \caption@iftop{% + \endgroup + \parbox[t]{#6}{% + #1\relax + \caption@setposition t% + #2{\caption#4{#5}}% + \captionbox@hrule + \csname caption@hj@#7\endcsname + #8}% + }{% + \endgroup + \parbox[b]{#6}{% + #1\relax + \caption@setposition b% + \csname caption@hj@#7\endcsname + #8% + \captionbox@hrule + #3{\caption#4{#5}}}% + }} +\newcommand*\captionbox@hj@default{c} +\newcommand*\captionbox@hrule{\hrule\@height\z@\relax} +\providecommand*\caption@hj@c{\centering} +\providecommand*\caption@hj@l{\raggedright} +\providecommand*\caption@hj@r{\raggedleft} +\providecommand*\caption@hj@s{} +\def\ContinuedFloat{% + \caption@iftype + {\caption@ContinuedFloatX\@captype}% + {\caption@Error{\noexpand\ContinuedFloat outside float}}} +\newcommand*\caption@ContinuedFloatX[1]{% + \@ifstar + {\caption@@refstepcounter\@captype + \caption@@ContinuedFloat{#1}}% + {\caption@Continued@Float{#1}}} +\newcommand*\caption@Continued@Float[1]{% + \edef\caption@tempa{#1}% + \ifx\caption@tempa\caption@CFtype + \caption@restorecounters + \caption@@ContinuedFloat{#1}% + \else + \caption@Error{Continued `#1' after `\caption@CFtype'}% + \fi} +\newcommand*\caption@@ContinuedFloat{% + \caption@setflag1% ContinuedFloat + \caption@@@ContinuedFloat} +\newcommand*\caption@@@ContinuedFloat{% + \stepcounter{ContinuedFloat}% + \caption@@@@ContinuedFloat} +\newcommand*\caption@@@@ContinuedFloat[1]{% + \caption@setoptions{ContinuedFloat}% + \caption@setoptions{continued#1}% + \expandafter\l@addto@macro\csname the#1\endcsname\theContinuedFloat + \@ifundefined{theH#1}{}{% + \expandafter\l@addto@macro\csname theH#1\endcsname{% + \@alph\c@ContinuedFloat}}% + \let\caption@@@@ContinuedFloat\@gobble} +\newcommand*\caption@CFtype{??} +\newcounter{ContinuedFloat} +\let\theContinuedFloat\@empty +\def\caption@ContinuedFloat{% + \let\caption@resetContinuedFloat\@gobble + \caption@@@ContinuedFloat} +\newcommand*\caption@resetContinuedFloat[1]{% + \xdef\caption@CFtype{#1}% + \@stpelt{ContinuedFloat}} +\caption@ifundefined\donemaincaptionfalse{}{% + \g@addto@macro\donemaincaptionfalse\caption@savesubcounters} +\newcommand*\caption@refstepcounter[1]{% + \@ifundefined{c@#1}% + {\caption@Error{No float type '#1' defined}}% + {\caption@ref@stepcounter{#1}% + \caption@fixposition + \caption@iftop\caption@setflag\caption@clrflag2% caption + \caption@clrflag4% subcaption + \@nameuse{donemaincaptiontrue}}} +\newcommand*\caption@ref@stepcounter{% + \caption@ifflag1{% ContinuedFloat + \let\caption@tempa\caption@@refcounter + \caption@clrflag1% ContinuedFloat + }{% + \let\caption@tempa\caption@@refstepcounter + \caption@ifflag2{}{% caption + \caption@ifflag4{% subcaption + \let\caption@tempa\caption@@refcounter + }{}% + }% + }% + \caption@tempa} +\newcommand*\caption@@refcounter[1]{% + \let\caption@stepcounter@ORI\stepcounter + \def\stepcounter##1{% + \def\caption@tempa{#1}% + \def\caption@tempb{##1}% + \ifx\caption@tempa\caption@tempb \else + \caption@stepcounter@ORI{##1}% + \fi}% + \caption@@@refstepcounter{#1}% + \let\stepcounter\caption@stepcounter@ORI} +\newcommand*\caption@@refstepcounter[1]{% + \caption@prepare@stepcounter{#1}{ref}% + \caption@@@refstepcounter{#1}} +\newcommand*\caption@@stepcounter[1]{% + \caption@prepare@stepcounter{#1}{}% + \caption@@@stepcounter{#1}} +\newcommand*\caption@prepare@stepcounter[2]{% + \caption@addsubcontentslines{#2stepcounter}% + \caption@resetContinuedFloat{#1}} +\newcommand*\caption@@@refstepcounter{\refstepcounter} +\newcommand*\caption@@@stepcounter{\stepcounter} +\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{} +\newcommand\caption@dblarg[1]{% + \kernel@ifnextchar[{\caption@ydblarg{#1}}{\caption@xdblarg{#1}}} +\newcommand\caption@xdblarg[2]{% + #1[{#2\relax}]{#2}} +\long\def\caption@ydblarg#1[#2]#3{% + \caption@iflistheading{#1[{#3}]{#3}}{#1[{#2}]{#3}}} +\newcommand*\caption@begin[1]{% + \caption@fixposition + \begingroup + \caption@setfnum{#1}} +\newcommand\caption@beginex[3]{% + \caption@begin{#1}% + \let\lst@@caption\relax + \caption@addcontentsline{#1}{#2}% + \caption@ifempty{#3}{}} +\newcommand*\caption@end{% + \endgroup} +\newcommand*\caption@setfnum[1]{% + \@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}% + \@namedef{fnum@#1}{\caption@fnum{#1}}% + \fi} +\newcommand*\caption@boxrestore{% + \caption@parboxrestore{\@parboxrestore}{% + \let\if@nobreak\iffalse + \let\if@noskipsec\iffalse + \let\par\@@par + \parindent\z@ \parskip\z@skip + \everypar{}% + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip + \parfillskip\@flushglue \lineskip\normallineskip + \baselineskip\normalbaselineskip + \sloppy + \let\\\@normalcr + }} +\newcommand\caption@boxrestore@mini{% + \let\par\@@par + \parindent\z@ \parskip\z@skip + \sloppy} +\newcommand*\caption@normalsize{% + \caption@font*{\KV@caption@fnt@normal\@unused}} +\let\caption@setfloatcapt\@firstofone +\newcommand*\caption@makecurrent[1]{\caption@gettitle} +\let\caption@makeanchor\@firstofone +\let\caption@start\relax +\let\caption@@start\relax +\let\caption@freezeHref\relax +\let\caption@defrostHref\relax +\newcommand\caption@gettitle[1]{% + \caption@ifundefined\NR@gettitle + {\def\@currentlabelname{#1}}% + {\NR@gettitle{#1}}} +\def\caption@DeclareSubType sub#1\@nil{% + \caption@Debug{Initializing subtype for `#1'\@gobble}% + \@namedef{caption@beginsub#1}{\caption@beginsubfloat{#1}}} +\@onlypreamble\caption@DeclareSubType +\caption@For*{subtypelist}{\caption@DeclareSubType sub#1\@nil} +\caption@AtBeginDocument*{% + \caption@ifundefined\sf@counterlist{}{% + \@for\sf@temp:=\sf@counterlist\do{% + \expandafter\caption@DeclareSubType\sf@temp\@nil}}} +\newcommand*\caption@subtypehook{% + \ifx\caption\caption@subcaption \else + \caption@warmup + \caption@ifflag2{}{% caption + \let\caption@add@contentsline\caption@addsubcontentsline + \let\caption@addsubcontentslines\@gobble + \caption@ifflag4{}{% subcaption + \caption@ifflag1{% ContinuedFloat + \caption@clrflag1% + }{% + \caption@@stepcounter\@captype + }% + \caption@setflag4% subcaption + }% + }% + \c@ContinuedFloat=0\relax + \let\caption@setfloatcapt\@firstofone + \let\caption@chkfloat\@gobbletwo + \caption@setbox{none}% + \caption@clearmargin + \caption@iflist{}{\let\caption@setlist\@gobble}% + \caption@setoptions{sub}% + \caption@setoptions{subfloat}% for subfig-package compatibility + \def\caption@settype{\caption@withoptargs\caption@sub@settype}% + \def\caption@sub@settype##1##2{% + \def\caption@tempa{##2}% + \ifx\caption@tempa\@captype +%%% \caption@setsubtype##1\relax + \else + \caption@Error{##2 inside \@subcaptype}% + \fi}% + \let\caption\caption@subcaption + \let\phantomcaption\caption@subphantom + \let\captionlistentry\caption@sublistentry + \let\caption@refstepcounter\caption@@@refstepcounter + \if@subfloatrow + \caption@Debug{Keeping \string\@makecaption}% + \else + \let\@makecaption\caption@makecaption + \fi + \fi}% +\caption@AtBeginDocument{% + \caption@ifundefined\@subfloatrowtrue + {\newif\if@subfloatrow + \caption@ifundefined\subfloatrow{}% + {\caption@Debug{Patching subfloatrow environment}% + \g@addto@macro\capsubrowsettings{\@subfloatrowtrue}% + \g@addto@macro\killfloatstyle{% + \ifx\c@FRobj\c@FRsobj\@subfloatrowtrue\fi}}}% + {\caption@Debug{\string\if@subfloatrow is already defined}}}% +\newcommand*\caption@subcaption{% + \caption@checkgrouplevel{sub}\subcaption + \caption@star + {\caption@refstepcounter\@subcaptype}% + {\caption@dblarg{\@caption\@subcaptype}}} +\newcommand*\caption@subphantom{% + \caption@checkgrouplevel{sub}\phantomsubcaption + \caption@refstepcounter\@subcaptype} +\newcommand*\caption@sublistentry{% + \caption@teststar\@subcaptionlistentry\@firstoftwo\@secondoftwo} +\newcommand*\@subcaptionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@subcaptype} +\newcommand*\caption@clearsubcontentslines{% + \global\let\caption@subcontentslines\@empty} +\caption@clearsubcontentslines +\newcommand*\caption@addsubcontentsline[4]{% + \caption@Debug{\string\caption@addsubcontentsline{#1}{#2}}% + \begingroup + \let\label\caption@gobble + \let\index\caption@gobble + \let\glossary\caption@gobble + \protected@edef\@tempa{\endgroup + \noexpand\g@addto@macro\noexpand\caption@subcontentslines{% + \noexpand\@namedef{the#2}{\csname the#2\endcsname}% + \ifx\@currentHref\@undefined \else + \noexpand\def\noexpand\@currentHref{\@currentHref}% + \fi + \noexpand\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}% + \@tempa} +\newcommand*\flushsubcaptionlistentries{% + \caption@addsubcontentslines{user}} +\renewcommand*\caption@addsubcontentslines[1]{% + \caption@Debug{\string\flushsubcaptionlistentries (#1)}% + \begingroup + \caption@subcontentslines + \endgroup + \caption@clearsubcontentslines} +\AtBeginDocument{\caption@ifundefined\chapter{}{% + \let\caption@chapter@ORI\chapter + \def\chapter{% + \caption@addsubcontentslines{chapter}\caption@chapter@ORI}}} +\AtBeginDocument{\caption@ifundefined\appendix{}{% + \let\caption@appendix@ORI\appendix + \def\appendix{% + \caption@addsubcontentslines{appendix}\caption@appendix@ORI}}} +\AtEndDocument{% + \caption@addsubcontentslines{AtEndDocument}} +\caption@ifundefined\smf@makecaption{}{\let\smf@makecaption\@makecaption} +\@ifclassloaded{beamer}{% + \caption@InfoNoLine{beamer document class}% + \let\caption@ORI@figure\figure + \def\figure{\caption@settype{figure}\caption@ORI@figure} + \let\caption@ORI@table\figure + \def\table{\caption@settype{table}\caption@ORI@table} +}{} +\caption@ifundefined\scr@caption{}{% + \caption@AtBeginDocument{\let\scr@caption\caption}} +\@nameuse{caption@frenchb}\@nameundef{caption@frenchb} +\caption@AtBeginDocument{\caption@ifundefined\frenchTeXmods{}{% + \caption@InfoNoLine{frenchle/pro package is loaded}% + \let\captionfont@ORI\captionfont + \let\captionlabelfont@ORI\captionlabelfont + \let\@makecaption@ORI\@makecaption + + \caption@ifundefined\GOfrench + {\let\caption@tempa\@firstofone}% + {\def\caption@tempa{\g@addto@macro\GOfrench}}% + \caption@tempa{% + \let\captionfont\captionfont@ORI + \let\captionfont@ORI\@undefined + \let\captionlabelfont\captionlabelfont@ORI + \let\captionlabelfont@ORI\@undefined + \let\@makecaption\@makecaption@ORI + \let\@makecaption@ORI\@undefined + \let\@cnORI\caption + \let\caption@tcORI\@tablescaption + \def\@tablescaption{\caption@star\relax\caption@tcORI}% + \let\@eatDP\@undefined + \let\caption@tempa\@empty + \ifx\f@ffrench\fnum@figure + \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}% + \fi + \ifx\f@tfrench\fnum@table + \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}% + \fi + \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% + \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% + \caption@tempa + }% +}} +\def\caption@tempa#1{% + \@ifpackagewith{babel}{#1}{% + \caption@InfoNoLine{#1 babel option is loaded}% + \expandafter\addto\csname extras#1\endcsname{% + % reverse changes made by magyar.ldf + \let\@makecaption\caption@makecaption + \babel@save\@makecaption + \caption@redefine + \babel@save\@caption}% + }{}} +\caption@tempa{hungarian}% +\caption@tempa{magyar}% +\newcommand\caption@IfPackageLoaded[1]{% + \@testopt{\caption@@IfPackageLoaded{#1}}{}} +\@onlypreamble\caption@IfPackageLoaded +\long\def\caption@@IfPackageLoaded#1[#2]#3#4{% + \@ifpackageloaded{#1}\@firstofone{% + \caption@Debug{#1 package is not loaded (yet)\@gobble}% + \caption@AtBeginDocument}{% + \caption@If@Package@Loaded{#1}[{#2}]{#3}{#4}}} +\@onlypreamble\caption@@IfPackageLoaded +\long\def\caption@If@Package@Loaded#1[#2]{% + \@ifpackageloaded{#1}{% + \caption@InfoNoLine{#1 package is loaded}% + \@ifpackagelater{#1}{#2}\@firstoftwo{% + \caption@Error{% + For a successful cooperation we need at least version\MessageBreak + `#2' of package #1,\MessageBreak + but only version\MessageBreak + `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak + is available}% + \@secondoftwo}% + }{\@secondoftwo}} +\@onlypreamble\caption@If@Package@Loaded +\newcommand*\caption@clearmargin{% + \setcaptionmargin\z@ + \let\caption@minmargin\@undefined} +\caption@setbool{needfreeze}{0} +\caption@AtBeginDocument*{% + \caption@ifneedfreeze{% + \newcommand*\caption@freezetype[1]{% + \caption@settype*{#1}% + \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround! + \caption@freeze}% + \newcommand*\caption@freeze{% + \let\caption@frozen@ContinuedFloat\ContinuedFloat + \def\ContinuedFloat{% + \caption@@freeze{\caption@@@@ContinuedFloat\@captype}% + \caption@frozen@ContinuedFloat}% + \let\caption@frozen@setup\caption@setup + \def\caption@setup##1{% + \caption@@freeze{\caption@setup{##1}}% + \caption@frozen@setup{##1}}% + \let\caption@frozen@caption\caption + \def\caption{% + \def\caption{% + \caption@Error{% + Only one \noexpand\caption can be placed in this environment}% + \caption@gobble}% + \@ifstar + {\caption@SC@caption*}% + {\let\@currentlabel\caption@SClabel + \caption@withoptargs\caption@SC@caption}}% + \long\def\caption@SC@caption##1##2{% + \caption@@freeze{\caption##1{##2}}% + \ignorespaces}% + \let\caption@frozen@label\label + \def\label{% + \caption@withoptargs\caption@SC@label}% + \def\caption@SC@label##1##2{% + \ifx\@currentlabel\caption@SClabel + \@bsphack + \caption@freeze@label{##1}{##2}% + \@esphack + \else + \caption@frozen@label##1{##2}% + \fi}% + \def\caption@SClabel{\caption@undefinedlabel}% + \def\caption@freeze@label##1##2{% + \caption@@freeze{\label##1{##2}}}% + \global\let\caption@frozen@content\@empty + \long\def\caption@@freeze{% + \g@addto@macro\caption@frozen@content}% + \def\caption@warmup{% + \let\ContinuedFloat\caption@frozen@ContinuedFloat + \let\caption@setup\caption@frozen@setup + \let\caption\caption@frozen@caption + \let\label\caption@frozen@label}}% + \newcommand*\caption@prepare@defrost{% + \let\caption@settype\caption@set@type} + \newcommand*\caption@defrost{% + \ifx\caption@frozen@caption\@undefined + \caption@frozen@content + \else + \caption@Error{Internal Error:\MessageBreak + \noexpand\caption@defrost in same group as \string\caption@freeze}% + \fi}% + }{}% + \caption@undefbool{needfreeze}} +\let\caption@warmup\relax +\caption@IfPackageLoaded{chkfloat}[2012/08/19 v0.1]{% + \caption@ifundefined\chkfloat@addcontentsline{% + \renewcommand\caption@chkfloat[2]{% + \caption@ifundefined\chkfloat@page{}{% + \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}}}% + }{% + \renewcommand\caption@chkfloat{\chkfloat@addcontentsline}% + }% + }{}% +\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{% + \@ifpackageloaded{floatrow}{% + \caption@If@Package@Loaded{floatrow}[2007/08/24 v0.2a]{}{}% + }{% + \let\caption@ORI@float@setevery\@float@setevery + \def\@float@setevery#1{% + \float@ifcaption{#1}{% + \caption@setposition{\@fs@iftopcapt t\else b\fi}% + \renewcommand\caption@setfloatcapt[1]{% + \let\@makecaption\caption@@make + \global\setbox\@floatcapt\vbox{% + \color@begingroup ##1\color@endgroup}}% + \float@getstyle\float@style{#1}% + \caption@setstyle*\float@style + \caption@setoptions\float@style + }{}% + \caption@freezeHref % will be defrosted in \float@makebox + \caption@ORI@float@setevery{#1}}% + \caption@AtBeginDocument{\caption@ifcompatibility{}{% + \caption@ifundefined\HyOrg@float@makebox + {\let\caption@ORI@float@makebox\float@makebox}% + {\let\caption@ORI@float@makebox\HyOrg@float@makebox}% + \renewcommand\float@makebox[1]{% + \caption@ORI@float@makebox{#1\relax \caption@defrostHref}}% + }}% + \g@addto@macro\caption@typehook{% + \expandafter\ifx\csname #1name\endcsname\relax + \expandafter\let\csname #1name\expandafter\endcsname + \csname fname@#1\endcsname + \fi}% + \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% + \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% + \providecommand*\float@getstyle[2]{% + \edef#1{% + \noexpand\expandafter\noexpand\@gobblefour\noexpand\string + \expandafter\expandafter\expandafter\noexpand + \csname fst@#2\endcsname}% + \edef#1{#1}% + \caption@Debug{floatstyle{#2} = `#1'}}% + \providecommand*\float@ifcaption[1]{% + \expandafter\ifx\csname @float@c@#1\endcsname\float@caption + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}% +}}{% + \providecommand*\float@ifcaption[1]{\@secondoftwo}% +} +\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used +\caption@ifbool{ruled}{% + \captionsetup[ruled]{margin=0pt,minmargin=0,slc=0}% +}{% + \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% +} +\caption@undefbool{ruled} +\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{% + \let\caption@ORI@floatingfigure\floatingfigure + \def\floatingfigure{% + \caption@floatflt{figure}% + \caption@ORI@floatingfigure}% + \let\caption@ORI@floatingtable\floatingtable + \def\floatingtable{% + \caption@floatflt{table}% + \caption@ORI@floatingtable}% + \newcommand*\caption@floatflt[1]{% + \caption@settype{#1}% + \caption@clearmargin + \caption@setfullparboxrestore + \caption@setoptions{floating#1}}% +}{} +\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% + \caption@setbool{needfreeze}{1}% + \renewcommand\FP@positionLabel{% + FP\FP@captype-\number\value{FP@\FP@captype C}-pos}% + \renewcommand\FP@helpNote[2]{% + \begingroup % save \caption@thepage + \caption@pageref{#2}% + \typeout{FP#1 is inserted on page \caption@thepage!}% + \endgroup}% + \renewcommand*\FP@floatBegin[1]{% + \def\FP@captype{#1}% + \begin{lrbox}{\FP@floatCorpusBOX}% + \minipage\hsize % changes from LR mode to vertical mode + \caption@freezetype{#1}% + \ignorespaces}% + \renewcommand*\FP@floatEnd{% + \endminipage + \end{lrbox}% + \stepcounter{FP@\FP@captype C}% + \caption@label\FP@positionLabel + \FP@helpNote\FP@captype\FP@positionLabel + \FP@float + {\FP@positionLabel}% location label test + {\caption@prepare@defrost + \begin\FP@captype[p!]% + \usebox\FP@floatCorpusBOX + \end\FP@captype}% + {\@ifundefined{theH\FP@captype}{}{% + \expandafter\l@addto@macro\csname theH\FP@captype\endcsname{.FP}}}% + {\caption@prepare@defrost + \begin\FP@captype[b!]% + \let\FP@savedSetfnumCommand\caption@setfnum + \def\caption@setfnum##1{% + \FP@savedSetfnumCommand{##1}% + \ifx\FP@guide\@empty \else + \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}% + \fi}% + \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption + \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption + \caption@setoptions{FP\@captype}% + \FP@separatorCaption + \caption@defrost + \end\FP@captype}% + }% +}{% + \let\caption@ifFPlistcap\@undefined + \let\caption@ifFPrefcap\@undefined +} +\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{% + % Test if hyperref has stopped early + \caption@ifundefined\IfHyperBoolean{% + \caption@set@bool\caption@ifhyp@stoppedearly0% + \caption@ifundefined\H@refstepcounter + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\hyper@makecurrent + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\measuring@true + {\caption@set@bool\caption@ifhyp@stoppedearly1}{}}}% + }{% + \def\caption@ifhyp@stoppedearly{\IfHyperBoolean{stoppedearly}}% + }% + \caption@ifhyp@stoppedearly{% hyperref has stopped early + \caption@InfoNoLine{% + Hyperref support is turned off\MessageBreak + because hyperref has stopped early}% + }{% + \g@addto@macro\caption@prepareslc{\measuring@true}% + \renewcommand*\caption@@@refstepcounter{\H@refstepcounter}% + \renewcommand*\caption@makecurrent[2]{% + \caption@makecurrentHref{#1}% + \caption@Debug{hyperref current=\@currentHref}% + \caption@gettitle{#2}}% + \newcommand*\caption@makecurrentHref{\hyper@makecurrent}% + \renewcommand\caption@makeanchor[1]{% + \caption@Debug{hyperref anchor: \@currentHref}% + % If we cannot have nesting, the anchor is empty. + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#1}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }#1% + \fi}% + \g@addto@macro\caption@prepareslc{\let\caption@makeanchor\@firstofone}% + \newif\if@capstart + \def\caption@start{\caption@ifhypcap\caption@start@\relax}% + \def\caption@start@{% + \caption@makestart\@captype + \caption@startanchor\@currentHref + \global\@capstarttrue + \let\hc@currentHref\@currentHref + \def\caption@makecurrentHref##1{% + \global\@capstartfalse + \global\let\@currentHref\hc@currentHref}% + \let\caption@makeanchor\@firstofone + }% + \newcommand*\caption@makestart[1]{% + \begingroup + \Hy@hypertexnamesfalse + \hyper@makecurrent{#1.caption}% + \endgroup + \caption@Debug{hypcap start=\@currentHref}}% + \newcommand*\caption@startanchor[1]{% + \ifvmode\begingroup + \caption@Debug{hypcap anchor: #1 (vertical mode)}% + \@tempdima\prevdepth + \nointerlineskip + \vspace*{-\caption@hypcapspace}% + \caption@anchor{#1}% + \vspace*{\caption@hypcapspace}% + \prevdepth\@tempdima + \endgroup\else + \caption@Debug{hypcap anchor: #1 (horizontal mode)}% + \caption@anchor{#1}% + \fi}% + \newcommand*\caption@anchor[1]{% + \ifmeasuring@ \else + \caption@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}% + \fi}% + \ifx\HyperRaiseLinkLength\@tempdima + \def\caption@raisedlink#1{\ifvmode#1\else\Hy@raisedlink{#1}\fi}% + \else + \let\caption@raisedlink\Hy@raisedlink + \fi + \def\caption@@start{% + \caption@ifundefined\hc@currentHref{% + \caption@Warning{% + The option `hypcap=true' will be ignored for this\MessageBreak + particular \string\caption}}{}}% + \def\caption@freezeHref{% + \let\caption@ORI@start\caption@start + \def\caption@start{\let\caption@start\caption@ORI@start}% + \global\let\caption@currentHref\@undefined + \def\caption@@start{\global\let\caption@currentHref\@currentHref}% + \let\caption@ORI@setfloatcapt\caption@setfloatcapt + \renewcommand*\caption@setfloatcapt{% + \ifx\caption@currentHref\@undefined \else + \let\caption@makeanchor\@firstofone + \fi + \caption@ORI@setfloatcapt}}% + \def\caption@defrostHref{% + \ifx\caption@currentHref\@undefined \else + \caption@startanchor\caption@currentHref + \global\let\caption@currentHref\@undefined + \fi}% + }}{} +\caption@IfPackageLoaded{hypcap}{% v1.0 + \ifx\caption@start\relax \else % hyperref hasn't stopped early + \let\caption@ORI@capstart\capstart % save for compatibility mode + \caption@ifundefined\capstarttrue % check for v1.10 of hypcap package + {\def\capstart{\caption@start@}}% + {\def\capstart{\ifcapstart\caption@start@\fi}}% + \let\caption@start\relax + \let\caption@@start\relax + \caption@set@bool\caption@ifhypcap 1% + \renewcommand*\caption@hypcapspace{\hypcapspace}% + \fi}{} +\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% + \let\caption@ORI@lst@MakeCaption\lst@MakeCaption + \def\lst@MakeCaption#1{% #1 is `t' or `b' + \begingroup + \@tempdima\linewidth + \advance\@tempdima\lst@xleftmargin + \advance\@tempdima\lst@xrightmargin + \ifdim\hsize>\@tempdima + \hsize\@tempdima + \fi + \caption@setposition{#1}% + \caption@iftop{% + \@tempdima\belowcaptionskip + \belowcaptionskip\abovecaptionskip + \abovecaptionskip\@tempdima}{}% + \caption@setup{rule=0}% + \caption@setoptions{lstlisting}% + \caption@setautoposition{#1}% + \caption@begin{lstlisting}% + \caption@ORI@lst@MakeCaption{#1}% + \caption@end + \endgroup}% + \def\lst@makecaption{\caption@starfalse\@makecaption}% + \def\lst@maketitle{\caption@startrue\@makecaption\@empty}% + \providecommand*\ext@lstlisting{lol}% +}{} +\providecommand*\LTcaptype{table} +\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{% + \RequirePackage{ltcaption}[=2018/08/26]% + \let\LT@@makecaption\@undefined + \caption@AtBeginDocument{% + \let\caption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% + \global\let\caption@opt@@longtable\@undefined + \def\captionsetup{% + \noalign\bgroup + \@ifstar\@captionsetup\@captionsetup}% gobble * + \def\@captionsetup##1{\LT@captionsetup{##1}\egroup}% + \def\LT@captionsetup##1{% + \captionsetup@startrue\caption@setup@options[@longtable]{##1}% + \global\let\caption@opt@@longtable\caption@opt@@longtable}% + \def\@captionabovetrue{\LT@captionsetup{position=t}}% + \def\@captionabovefalse{\LT@captionsetup{position=b}}% + \def\captionlistentry{% + \noalign\bgroup + \@ifstar{\egroup\LT@listentry\LTcaptype}% gobble * + {\egroup\LT@listentry\LTcaptype}}% +%% \let\Hy@LT@currentHlabel\@currentHlabel +%% \let\@currentHlabel\Hy@LT@currentHlabel + \def\ContinuedFloat{\noalign{% + \caption@Error{\noexpand\ContinuedFloat outside float}}}% + \let\bicaption\LT@bicaption + \caption@ORI@LT@array}}% + \def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\caption@xdblarg{\LT@c@ption\@firstofone}}}% + \renewcommand\LT@makecaption[3]{% + \caption@LT@make{% + \caption@LT@settype\LTcaptype + \caption@LT@setup + \caption@setautoposition{\ifcase\LT@rows t\else b\fi}% + \caption@startrue#1\caption@starfalse + \caption@prepare@stepcounter\LTcaptype{LT}% + \caption@begin\LTcaptype + \caption@normalsize + \vskip-\ht\strutbox + \caption@ifundefined\FBifcaptop{}{% + \let\caption@belowskip\@empty}% + \caption@make@above + \caption@@make{#2}{#3}\endgraf + \caption@make@below + \caption@end}}% + \renewcommand*\LT@listentry[2]{% + \begingroup + \caption@LT@settype{#1}% + \caption@listentry\@firstoftwo[{#1}]{#2}% + \endgroup\ignorespaces}% + \newcommand*\caption@LT@settype[1]{% + \caption@settype*{#1}% + \ifdim\LTcapwidth=4in \else + \setcaptionwidth\LTcapwidth + \fi + \caption@setoptions{longtable}% + \caption@setoptions{@longtable}}% +}{} +\providecommand*\caption@LT@setup{} +\caption@IfPackageLoaded{picinpar}{% + \long\def\figwindow[#1,#2,#3,#4] {% + \caption@window{figure}% + \caption@setoptions{figwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \long\def\tabwindow[#1,#2,#3,#4] {% + \caption@window{table}% + \caption@setoptions{tabwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \newcommand*\caption@window[1]{% + \let\@makecaption\caption@@make + \caption@setautoposition b% + \caption@settype{#1}% + \caption@clearmargin + \caption@setfullparboxrestore}% + \newcommand\caption@wincaption[1]{% + \ifdim\picwd=\z@ + \let\caption@makecurrent\@gobbletwo + \let\caption@@start\relax + \caption@prepareslc + \else + \caption@setflag1% + \fi + \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% + \if\@tempa*% + \let\@tempa\@firstofone + \else\if\@tempa[%] + \let\@tempa\@firstofone + \else + \let\@tempa\@empty + \fi\fi + \expandafter\caption\@tempa{#1}}% +}{} +\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}} +\caption@IfPackageLoaded{picins}{% + \caption@ifundefined\@piccaptype{% + \caption@iftype{% + \let\@piccaptype\@captype + }{% + \def\@piccaptype{figure}% + }% + }{}% + \let\@captype\@undefined + \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}% + \let\caption@ORI@make@piccaption\make@piccaption + \def\make@piccaption{% + \let\caption@ORI\caption + \long\def\caption[##1]##2{% + \caption@freezeHref % will be defrosted in \ivparpic + \caption@settype\@piccaptype + \caption@clearmargin + \caption@setfullparboxrestore + \caption@setoptions{parpic}% + \caption@setautoposition b% + \expandafter\expandafter\expandafter\caption@ORI + \expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter{% + \expandafter##1\expandafter}\expandafter]\expandafter{##2}}% + \caption@ORI@make@piccaption + \let\caption\caption@ORI}% + + \let\caption@ORI@ivparpic\ivparpic + \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{% + \let\caption@ORI@noindent\noindent + \def\noindent{% + \caption@defrostHref + \let\noindent\caption@ORI@noindent + \noindent}% + \caption@ORI@ivparpic(#1,#2)(#3,#4)[{#5}][{#6}]{#7}% + \let\noindent\caption@ORI@noindent}% +}{% + \let\piccaptiontype\@undefined +} +\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{% + \def\rotcaption{\let\@makecaption\@makerotcaption\caption}% + \def\rotcaptionof{% + \caption@teststar\caption@of{\rotcaption*}\rotcaption}% + \long\def\@makerotcaption#1#2{% + \rotatebox{90}{% + \ifdim\captionwidth=\z@ + \setcaptionwidth{.8\vsize}% + \l@addto@macro\caption@singleline{% + \caption@setup{parbox=none}}% + \fi + \let\caption@calcmargin\relax + \caption@@make{#1}{#2}}% + \nobreak\hspace{12pt}}% +}{} +\caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{% + \caption@setbool{needfreeze}{1}% + \let\caption@ORI@SC@zfloat\SC@zfloat + \def\SC@zfloat#1#2#3[#4]{% + \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]% + \SC@RestoreCommands + \caption@freezetype{#2}% + \let\SC@label\label}% + \providecommand*\SC@RestoreCommands{% + \let\caption=\SC@orig@caption \let\label=\SC@orig@label}% + \let\caption@ORI@endSC@FLOAT\endSC@FLOAT + \def\endSC@FLOAT{% + \def\caption@setSC@justify{% + \caption@clearmargin + \ifx\SC@justify\@empty \else + \let\caption@hj\SC@justify + \let\SC@justify\@empty + \fi}% + \let\caption\SC@orig@caption + \def\SC@orig@caption[##1]##2{% + \caption@setSC@justify +%%% \caption@setoptions{SC}% + \caption@setoptions{SC\@captype}% + \caption@defrost}% + \caption@setSC@justify % for compatibility mode + \caption@prepare@defrost + \caption@ORI@endSC@FLOAT}% +}{} +\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{% + \def\sf@ifpositiontop{% + \ifx\@captype\@undefined + \expandafter\@gobbletwo + \else\ifx\@captype\relax + \expandafter\expandafter\expandafter\@gobbletwo + \else + \expandafter\expandafter\expandafter\sf@if@position@top + \fi\fi} + \def\sf@if@position@top{% + \@ifundefined{if\@captype topcap}% + {\@gobbletwo}% + {\@nameuse{if\@captype topcap}% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}} +}{} +\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[{#1}]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{supertabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end}% +}{} +\caption@IfPackageLoaded{xtab}[2000/04/09 v2.3]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[{#1}]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{xtabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% + \@initisotab + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end + \global\advance\ST@pageleft -\PWSTcapht + \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}% +}{} +\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{% + \let\caption@ORI@threeparttable\threeparttable + \renewcommand*\threeparttable{% + \caption@settype{\@ifundefined{@captype}{table}{\@captype}}% +%%% \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{threeparttable}% + \caption@ORI@threeparttable}% + \let\caption@ORI@measuredfigure\measuredfigure + \renewcommand*\measuredfigure{% + \caption@settype{\@ifundefined{@captype}{figure}{\@captype}}% +%%% \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{measuredfigure}% + \caption@ORI@measuredfigure}% + \def\TPT@caption#1[#2]#3{% + \gdef\TPT@docapt{% + \global\let\TPT@docapt\@undefined + \caption@setautoposition\caption@TPT@position + \TPT@LA@caption{#1}[{#2}]{#3}}% + \ifx\TPT@hsize\@empty + \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures + \gdef\caption@TPT@position{t}% + \g@addto@macro\TPT@docapt\caption@TPT@eatvskip + \else + \def\caption@TPT@position{b}% + \TPT@docapt + \fi + \ignorespaces}% + %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}% + \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}% +}{} +\caption@IfPackageLoaded{wrapfig}[2003/01/31 v3.6]{% + \renewcommand*\wrapfloat[1]{% + \def\@captype{#1}% + \@ifundefined{fst@#1}{}{% + \@nameuse{fst@#1}% + \def\WF@floatstyhook{\let\@currbox\WF@box + \global\setbox\WF@box\float@makebox{\wd\WF@box}}}% + \@ifnextchar[\WF@wr{\WF@wr[]}} + \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, + \gdef\WF@ovh{#1}% hold overhang for later, when \width is known + \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% + \expandafter\WF@captionstyhook\expandafter{\@captype}% <= new + \ifdim\hsize>\z@ \@parboxrestore \else + \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption + \ignorespaces \fi}% + \def\WF@captionstyhook#1{% + \let\@captype\@undefined + \@ifundefined{fst@#1}{}{\@float@setevery{#1}}% + \caption@settype{#1}% + \caption@clearmargin +%%% \caption@setoptions{wrap}% + \caption@setoptions{wrap#1}}% +}{} +\endinput +%% +%% End of file `caption_2019-09-01.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty b/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty new file mode 100644 index 00000000000..318253fe30b --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption_2020-07-29.sty @@ -0,0 +1,1504 @@ +%% +%% This is file `caption_2020-07-29.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.4/caption.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption}[2020/09/28 v3.4n Customizing captions (AR)] % Backport of commit 43567491e5b075d661c080bca298f5428f289758 from 2020/09/28 +\RequirePackage{caption3}[=2020/07/29] % needs v1.13 or newer +\caption@ifbool{documentclass}{}{% + \caption@WarningNoLine{% + Unknown document class (or package),\MessageBreak + standard defaults will be used}} +\@ifpackageloaded{caption2}{% + \caption@Error{% + You can't use both, the (obsolete) caption2 *and*\MessageBreak + the (current) caption package}% + \endinput +}{} +\caption@AtBeginDocument{% + \@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}% + \@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}% + \@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}} +\newcommand*\caption@DisablePositionOption[1]{% + \caption@InfoNoLine{% + `#1' package detected; setting `position=b' for compatibility reasons}% + \caption@setposition b% + \DeclareCaptionOption{position}{% + \caption@Error{Usage of the `position' option is incompatible\MessageBreak + to the `#1' package}}} +\@onlypreamble\caption@DisablePositionOption +\DeclareCaptionOption*{config}[caption]{% + \InputIfFileExists{#1.cfg}% + {\typeout{*** Local configuration file #1.cfg used ***}}% + {\caption@Warning{Configuration file #1.cfg not found}}} +\newcommand*\caption@selectlistentry[1]{% + \caption@ifinlist{#1}{heading}{% + \let\caption@iflistheading\@firstoftwo + }{\caption@ifinlist{#1}{default,list-entry,entry}{% + \let\caption@iflistheading\@secondoftwo + }{% + \caption@Error{Undefined list-entry selection `#1'}% + }}} +\DeclareCaptionOption{list-entry}{\caption@selectlistentry{#1}} +\captionsetup{list-entry=default} +\newcommand*\caption@setparboxrestore[1]{% + \caption@ifinlist{#1}{full}{% + \caption@setfullparboxrestore + }{\caption@ifinlist{#1}{default,light,partial}{% + \let\caption@parboxrestore\@secondoftwo + }{% + \caption@Error{Undefined parboxrestore `#1'}% + }}} +\newcommand*\caption@setfullparboxrestore{% + \let\caption@parboxrestore\@firstoftwo} +\DeclareCaptionOption{parboxrestore}{\caption@setparboxrestore{#1}} +\captionsetup{parboxrestore=default} +\DeclareCaptionOption{@minipage}{% + \caption@ifinlist{#1}{auto,default}% + {\let\caption@if@minipage\@gobbletwo}% + {\caption@set@bool\caption@if@minipage{#1}}} +\captionsetup{@minipage=default} +\DeclareCaptionOption{compatibility}[v1]{% + \caption@ifinlist{#1}{v1,1,true,yes,on}{% + \let\caption@ifcompatibility\@firstoftwo + }{\caption@ifinlist{#1}{v3,3,0,false,no,off}{% + \let\caption@ifcompatibility\@secondoftwo + }{% + \caption@Error{Undefined compatibility value `#1'}% + }}} +\@onlypreamble@key{caption}{compatibility} +\caption@setbool{compatibility}{0} % default: Try not to be compatible to v1.x +\newcommand*\caption@setincompatible[2]{% + #1{% + \caption@WarningNoLine{% + #2;\MessageBreak + Setting compatibility to v1}% + \caption@setbool{compatibility}{1}% + }{}} +\caption@AtBeginDocument{\caption@ifcompatibility{}{% + \caption@setincompatible{\@ifpackageloaded{captcont}}{captcont package is loaded}% +}} +\DeclareCaptionOptionNoValue*{normal}{% + \caption@setformat{plain}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{isu}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{hang}{% + \caption@setformat{hang}% + \caption@setjustification{justified}} +\DeclareCaptionOptionNoValue*{center}{% + \caption@setformat{plain}% + \caption@setjustification{centering}} +\DeclareCaptionOptionNoValue*{centerlast}{% + \caption@setformat{plain}% + \caption@setjustification{centerlast}} +\DeclareCaptionOptionNoValue*{scriptsize}{\def\captionfont{\scriptsize}} +\DeclareCaptionOptionNoValue*{footnotesize}{\def\captionfont{\footnotesize}} +\DeclareCaptionOptionNoValue*{small}{\def\captionfont{\small}} +\DeclareCaptionOptionNoValue*{normalsize}{\def\captionfont{\normalsize}} +\DeclareCaptionOptionNoValue*{large}{\def\captionfont{\large}} +\DeclareCaptionOptionNoValue*{Large}{\def\captionfont{\Large}} +\DeclareCaptionOptionNoValue*{up}{\l@addto@macro\captionlabelfont\upshape} +\DeclareCaptionOptionNoValue*{it}{\l@addto@macro\captionlabelfont\itshape} +\DeclareCaptionOptionNoValue*{sl}{\l@addto@macro\captionlabelfont\slshape} +\DeclareCaptionOptionNoValue*{sc}{\l@addto@macro\captionlabelfont\scshape} +\DeclareCaptionOptionNoValue*{md}{\l@addto@macro\captionlabelfont\mdseries} +\DeclareCaptionOptionNoValue*{bf}{\l@addto@macro\captionlabelfont\bfseries} +\DeclareCaptionOptionNoValue*{rm}{\l@addto@macro\captionlabelfont\rmfamily} +\DeclareCaptionOptionNoValue*{sf}{\l@addto@macro\captionlabelfont\sffamily} +\DeclareCaptionOptionNoValue*{tt}{\l@addto@macro\captionlabelfont\ttfamily} +\DeclareCaptionOptionNoValue*{nooneline}{\caption@setbool{slc}{0}} +\caption@setbool{ruled}{0} +\DeclareCaptionOptionNoValue*{ruled}{\caption@setbool{ruled}{1}} +\DeclareCaptionOptionNoValue*{flushleft}{% + \caption@setformat{plain}% + \caption@setjustification{raggedright}} +\DeclareCaptionOptionNoValue*{flushright}{% + \caption@setformat{plain}% + \caption@setjustification{raggedleft}} +\DeclareCaptionOptionNoValue*{oneline}{\caption@setbool{slc}{1}} +\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{% + \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}} +\DeclareCaptionOption*{caption}{% + \caption@setbool{temp}{#1}% + \caption@ifbool{temp}{}{% + \caption@Error{% + The package option `caption=#1' is obsolete.\MessageBreak + Please pass this option to the subfig package instead\MessageBreak + and do *not* load the caption package anymore}}} +\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}} +\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}} +\@onlypreamble@key{caption}{FPlist} +\@onlypreamble@key{caption}{FPref} +\newcommand*\caption@setFPoption[2]{% + \edef\caption@tempa{\@car#2\@nil}% + \caption@setbool{FP#1cap}{\if c\caption@tempa 1\else 0\fi}} +\@onlypreamble\caption@setFPoption +\captionsetup{FPlist=caption,FPref=figure} +\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}} +\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}} +\captionsetup{hypcap=1,hypcapspace=.5\baselineskip} +\caption@ifclassloaded{ams}{% + \caption@InfoNoLine{AMS or SMF document class}% + \setlength\belowcaptionskip{0pt}% set to 12pt by AMS class +}{} +\caption@ifclassloaded{koma}{% + \caption@InfoNoLine{KOMA-Script document class}% + \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}} + \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}} + \if@tablecaptionabove + \@tablecaptionabovetrue + \else + \@tablecaptionabovefalse + \fi + \caption@ifdefined\@figurecaptionabovetrue{% + \g@addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}} + \g@addto@macro\@figurecaptionabovefalse{\captionsetup*[figure]{position=b}} + \if@figurecaptionabove + \@figurecaptionabovetrue + \else + \@figurecaptionabovefalse + \fi + }{}% + \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo} + \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo} + \ifonelinecaptions + \onelinecaptionstrue + \else + \onelinecaptionsfalse + \fi + \g@addto@macro\@captionabovetrue{\let\caption@position\@firstoftwo} + \g@addto@macro\@captionabovefalse{\let\caption@position\@secondoftwo} + \DeclareCaptionOption{figureposition}{% + \caption@WarningNoLine{Option `figureposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}% + \captionsetup*[figure]{position=#1}} + \DeclareCaptionOption{tableposition}{% + \caption@WarningNoLine{Option `tableposition=#1' has no effect\MessageBreak + when used with a KOMA script document class}% + \captionsetup*[table]{position=#1}} + \let\caption@KOMA@setcapindent\@setcapindent + \renewcommand*\@setcapindent[1]{% + \caption@KOMA@setcapindent{#1}\caption@setcapindent} + \let\caption@KOMA@@setcapindent\@@setcapindent + \renewcommand*\@@setcapindent[1]{% + \caption@KOMA@@setcapindent{#1}\caption@setcapindent} + \newcommand*\caption@setcapindent{% + \captionsetup{indent=\ifdim\cap@indent<\z@\z@\else\cap@indent\fi}} + \caption@ifdefined\cap@indent{\caption@setcapindent}{} + \expandafter\let\expandafter\caption@KOMA@setcapwidth + \csname\string\setcapwidth\endcsname + \@namedef{\string\setcapwidth}[#1]#2{% + \caption@KOMA@setcapwidth[{#1}]{#2}\caption@setcapwidth{#1}} + \newcommand*\caption@setcapwidth[1]{% + \ifx\\#1\\\else + \caption@ifdefined\cap@margin{% + \def\@tempa{captionbeside}% + \ifx\@tempa\@currenvir\else\caption@Warning{% + Ignoring optional argument [#1] of \string\setcapwidth\MessageBreak}% + \fi}{}% + \fi + \captionsetup{width=\cap@width}} + \def\caption@tempa{\hsize}% + \ifx\caption@tempa\cap@width \else + \caption@setcapwidth{?} + \fi + \expandafter\let\expandafter\caption@KOMA@setcapmargin + \csname\string\@setcapmargin\endcsname + \@namedef{\string\@setcapmargin}[#1]#2{% + \caption@KOMA@setcapmargin[{#1}]{#2}\caption@setcapmargin} + \expandafter\let\expandafter\caption@KOMA@@setcapmargin + \csname\string\@@setcapmargin\endcsname + \@namedef{\string\@@setcapmargin}[#1]#2{% + \caption@KOMA@@setcapmargin[{#1}]{#2}\caption@setcapmargin} + \newcommand*\caption@setcapmargin{% + \begingroup + \let\onelinecaptionsfalse\relax + \def\@twoside{0}% + \def\if@twoside{\def\@twoside{1}\iffalse}% + \cap@margin + \def\@tempa{\endgroup}% + \ifx\cap@left\hfill\else\ifx\cap@right\hfill\else + \def\hspace##1##{\@firstofone}% + \edef\@tempa{\endgroup + \noexpand\captionsetup{% + twoside=\@twoside,slc=0,% + margin={\cap@left,\cap@right}}}% + \fi\fi + \@tempa} + \ifx\cap@margin\relax \else + \caption@setcapmargin + \fi +}{} +\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}} +\caption@ProcessOptions*{caption} +\newcounter{caption@flags} +\newcommand*\caption@ifflag[1]{% + \@tempcnta\c@caption@flags + \divide\@tempcnta #1\relax + \ifodd\@tempcnta + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\newcommand*\caption@clrflags{% + \setcounter{caption@flags}\z@} +\newcommand*\caption@clrflag[1]{% + \caption@ifflag{#1}{\caption@addtoflags{-#1}}{}} +\newcommand*\caption@setflag[1]{% + \caption@ifflag{#1}{}{\caption@addtoflags{#1}}} +\newcommand*\caption@addtoflags{% + \addtocounter{caption@flags}} +\def\caption@caption{% + \caption@iftype + {\caption@checkgrouplevel\@empty\caption + \caption@star + {\caption@refstepcounter\@captype}% + {\caption@dblarg{\@caption\@captype}}}% + {\caption@Error{\noexpand\caption outside float}% + \caption@gobble}} +\newcommand*\caption@star[2]{% + \@ifstar{\caption@startrue#2[]}{#1#2}} +\long\def\caption@@caption#1[#2]#3{% + \ifcaption@star \else + \caption@prepareanchor{#1}{#2}% + \memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}% + \@nameuse{nag@hascaptiontrue}% + \fi + \par + \caption@beginex{#1}{#2}{#3}% + \caption@setfloatcapt{% + \caption@boxrestore + \if@minipage + \@setminipage + \fi + \caption@normalsize + \ifcaption@star + \let\caption@makeanchor\@firstofone + \fi + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces\caption@makeanchor{#3}}\par + \caption@if@minipage\@minipagetrue\@minipagefalse}% + \caption@end} +\providecommand\M@gettitle[1]{} +\providecommand\memcaptioninfo[4]{} +\newcommand*\caption@prepareanchor[2]{% + \caption@makecurrent{#1}{#2}% + \caption@ifhypcap\caption@@start\relax + \M@gettitle{#2}} +\long\def\caption@makecaption#1#2{% + \caption@make@above + \caption@@make{#1}{#2}% + \caption@make@below} +\newcommand*\caption@make@above{% + \caption@iftop + \caption@belowskip + {\caption@rule\caption@aboveskip}} +\newcommand*\caption@make@below{% + \caption@iftop + {\caption@aboveskip\caption@rule}% + \caption@belowskip} +\newcommand*\caption@aboveskip{% + \vskip\abovecaptionskip} +\newcommand*\caption@belowskip{% + \vskip\belowcaptionskip} +\newcommand*\caption@redefine{} +\g@addto@macro\caption@redefine{% + \caption@ifcompatibility{% + \caption@InfoNoLine{ + \noexpand\caption will not be redefined since `compatibility' is set to v1}% + \renewcommand*\caption@redefine{}% + \renewcommand*\caption@continuedfloat[1]{% + \caption@Error{Not available in compatibility mode}}% + \caption@AtBeginDocument*{% + \let\caption@start\relax + \caption@ifdefined\caption@ORI@capstart{% + \caption@Debug{% + Restore hypcap definition of \string\capstart\@gobble}% + \let\capstart\caption@ORI@capstart}{}% + }% + \renewcommand*\caption@star[2]{#1#2}% + }{% + \renewcommand*\caption@redefine{% + \let\caption\caption@caption + \let\@caption\caption@@caption}% + }% + \caption@redefine + \caption@AtBeginDocument*{% + \let\caption@ORI@capstart\@undefined}% + \let\caption@ORI@xfloat\@xfloat + \def\@xfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}}% +} +\caption@AtBeginDocument{\caption@redefine} +\let\@makecaption\caption@makecaption +\newcommand\phantomcaption{% + \caption@iftype + {\caption@refstepcounter\@captype}% + {\caption@Error{\noexpand\phantomcaption outside float}}}% +\caption@AtBeginDocument{% + \DeclareCaptionOption{type}{\setcaptiontype{#1}}% + \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}% + \DeclareCaptionOptionNoValue{subtype}{\setcaptionsubtype\relax}% + \DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}% +} +\newcommand\setcaptiontype{% + \caption@boxrestore@mini + \caption@settype} +\newcommand\setcaptionsubtype{% + \caption@iftype + \caption@setsubtype + {\caption@Error{\noexpand\setcaptionsubtype outside float}}}% +\newcommand\caption@setsubtype{% + \@ifstar + {\caption@@settype{sub}*{sub\@captype}}% + {\caption@@settype{sub}{sub\@captype}}}% +\newcommand*\caption@settype{% + \caption@clrflags + \caption@set@type} +\newcommand*\caption@set@type{% + \caption@@settype{}} +\newcommand*\caption@@settype[1]{% + \caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo} +\newcommand*\caption@@@settype[3]{% + \caption@Debug{#1type=#3}% + \@nameuse{caption@check#1type}{#3}% + {\caption@checkgrouplevel{#1}{% + \captionsetup{#1type#2*\@empty=...}#2{ or + \@backslashchar#1captionof}{}}% + \edef\caption@tempa{#3}% + \expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else + \ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi + \fi + \expandafter\let\csname @#1captype\endcsname\caption@tempa + \@nameuse{caption@#1typehook}% + \caption@setoptions{#3}% + \ifx\caption@opt\relax + \@nameundef{caption@#1type@warning}% + \else + \@namedef{caption@#1type@warning}{\caption@Warning{% + The #1type was already set to + `\csname @#1captype\endcsname'\MessageBreak}}% + \fi + #2{}{% + \let\@currentlabel\caption@undefinedlabel + \ifx\caption@x@label\@undefined + \let\caption@x@label\label + \let\label\caption@xlabel + \fi + \caption@start}}} +\newcommand*\caption@iftype{\caption@ifdefined\@captype} +\newcommand*\caption@checktype[1]{% + \caption@ifsubtype{#1}\@firstoftwo{\caption@ifin@list\sf@counterlist{#1}}% + {\caption@Error{Should not be used with subtype `#1'}% + \@gobble}% + \@firstofone} +\newcommand*\caption@checksubtype[1]{% + \caption@ifsubtype{#1}% + \@firstofone + {\caption@ifin@list\sf@counterlist{#1}% + {\caption@Warning{% + \noexpand\setcaptionsubtype without \string\DeclareCaptionSubType.\MessageBreak + This is not designed to work; you could try replacing\MessageBreak + the `subfig' package with `subcaption' to resolve\MessageBreak + this problem which occurred}% + \@firstofone}% + {\caption@Error{Undefined subtype `#1'}% + \@gobble}}} +\caption@ifeTeX{% + \newcommand*\caption@checkgrouplevel[2]{% + \@ifundefined{#1caption@grouplevel}{% + \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}% + \ifnum\currentgrouplevel>\caption@grouplevel\relax + \expandafter\edef\csname #1caption@grouplevel\endcsname{% + \the\currentgrouplevel}% + \else + \caption@Warning{\string#2\MessageBreak outside box or environment}% + \fi + }{}}% +}{% + \let\caption@checkgrouplevel\@gobbletwo +} +\newcommand*\caption@undefinedlabel{% + \protect\caption@xref{\caption@labelname}{\on@line}} +\DeclareRobustCommand*\caption@xref[2]{% + \caption@WarningNoLine{\noexpand\label without proper reference#2}% + \@setref\relax\@undefined{#1}} +\newcommand*\caption@labelname{??} +\newcommand*\caption@xlabel{% + \caption@withoptargs\caption@@xlabel} +\newcommand*\caption@@xlabel[2]{% + \caption@@@xlabel + \def\caption@labelname{#2}% + \caption@x@label#1{#2}} +\newcommand*\caption@@@xlabel{% + \global\let\caption@@@xlabel\@empty + \@bsphack + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@xref[2]{% + \string\@setref\string\relax\string\@undefined{\string##1}}}% + \@esphack} +\caption@AtBeginDocument{% + \def\captionof{\caption@teststar\caption@of{\caption*}\caption}} +\newcommand*\caption@of[2]{\setcaptiontype*{#2}#1} +\newcommand*\captionlistentry{% + \caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo} +\newcommand*\@captionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@captype} +\def\caption@listentry#1[#2]#3{% + \@bsphack + #1{\caption@gettitle{#3}}% + {\caption@refstepcounter{#2}% + \caption@makecurrent{#2}{#3}}% + \caption@addcontentsline{#2}{#3}% + \@esphack} +\newcommand*\captionbox{% + \caption@withoptargs{\caption@ibox\@gobble}} +\newcommand\caption@ibox[3]{% + \kernel@ifnextchar[%] + {\caption@iibox{#1}{#2}{#3}}% + {\caption@iibox@{#1}{#2}{#3}}} +\long\def\caption@iibox#1#2#3[#4]{% + \@testopt{\caption@iiibox{#1}{#2}{#3}[{#4}]}\captionbox@innerpos@default} +\long\def\caption@iibox@#1#2#3#4{% + \setbox\@tempboxa\hbox{#4}% + \caption@iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox@innerpos@default]{\unhbox\@tempboxa}} +\long\def\caption@iiibox#1{% + \caption@iiiibox{#1}\vbox\vtop} +\long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{% + \begingroup + #1*% set \caption@position + \caption@iftop{% + \endgroup + \parbox[t]{#6}{% + #1\relax + \caption@setposition t% + #2{\caption#4{#5}}% + \captionbox@hrule + \csname caption@hj@#7\endcsname + #8}% + }{% + \endgroup + \parbox[b]{#6}{% + #1\relax + \caption@setposition b% + \csname caption@hj@#7\endcsname + #8% + \captionbox@hrule + #3{\caption#4{#5}}}% + }} +\newcommand*\captionbox@innerpos@default{c} +\newcommand*\captionbox@hrule{\hrule\@height\z@\relax} +\providecommand*\caption@hj@c{\centering} +\providecommand*\caption@hj@l{\raggedright} +\providecommand*\caption@hj@r{\raggedleft} +\providecommand*\caption@hj@s{} +\def\continuedfloat{% + \caption@iftype + {\caption@continuedfloat\@captype}% + {\caption@Error{\noexpand\continuedfloat outside float}}} +\newcommand*\caption@continuedfloat[1]{% + \@ifstar + {\caption@@refstepcounter\@captype + \caption@@continuedfloat{#1}}% + {\caption@continued@float{#1}}} +\newcommand*\caption@continued@float[1]{% + \edef\caption@tempa{#1}% + \ifx\caption@tempa\caption@CFtype + \caption@restorecounters + \caption@@continuedfloat{#1}% + \else + \caption@Error{Continued `#1' after `\caption@CFtype'}% + \fi} +\newcommand*\caption@@continuedfloat{% + \caption@setflag1% continued float + \caption@@@continuedfloat} +\newcommand*\caption@@@continuedfloat{% + \stepcounter{continuedfloat}% + \caption@@@@continuedfloat} +\newcommand*\caption@@@@continuedfloat[1]{% + \caption@setoptions{ContinuedFloat}% for compatibility reasons + \caption@setoptions{continuedfloat}% + \caption@setoptions{continued#1}% + \expandafter\l@addto@macro\csname the#1\endcsname\thecontinuedfloat + \@ifundefined{theH#1}{}{% + \expandafter\l@addto@macro\csname theH#1\endcsname{% + \@alph\c@continuedfloat}}% + \let\caption@@@@continuedfloat\@gobble} +\newcommand*\caption@CFtype{??} +\newcounter{continuedfloat} +\let\c@ContinuedFloat\c@continuedfloat % defined for compatibility reasons +\def\thecontinuedfloat{\theContinuedFloat} +\let\theContinuedFloat\@empty % defined for compatibility reasons +\newcommand*\caption@reset@continuedfloat[1]{% + \xdef\caption@CFtype{#1}% + \@stpelt{continuedfloat}} +\def\ContinuedFloat{\continuedfloat} % defined for compatibility reasons +\def\caption@ContinuedFloat{% + \let\caption@reset@continuedfloat\@gobble + \caption@@@continuedfloat} +\caption@ifdefined\donemaincaptionfalse{% + \g@addto@macro\donemaincaptionfalse\caption@savesubcounters}{} +\newcommand*\caption@refstepcounter[1]{% + \@ifundefined{c@#1}% + {\caption@Error{No float type '#1' defined}}% + {\caption@ref@stepcounter{#1}% + \caption@fixposition + \caption@iftop\caption@setflag\caption@clrflag2% caption + \caption@clrflag4% subcaption + \@nameuse{donemaincaptiontrue}}} +\newcommand*\caption@ref@stepcounter{% + \caption@ifflag1{% continued float + \let\caption@tempa\caption@@refcounter + \caption@clrflag1% continued float + }{% + \let\caption@tempa\caption@@refstepcounter + \caption@ifflag2{}{% caption + \caption@ifflag4{% subcaption + \let\caption@tempa\caption@@refcounter + }{}% + }% + }% + \caption@tempa} +\newcommand*\caption@@refcounter[1]{% + \let\caption@stepcounter@ORI\stepcounter + \def\stepcounter##1{% + \edef\caption@tempa{#1}% Backport of commit 43567491e5b075d661c080bca298f5428f289758 from 2020/09/28: \def -> \edef + \edef\caption@tempb{##1}% Backport of commit 43567491e5b075d661c080bca298f5428f289758 from 2020/09/28: \def -> \edef + \ifx\caption@tempa\caption@tempb \else + \caption@stepcounter@ORI{##1}% + \fi}% + \caption@@@refstepcounter{#1}% + \let\stepcounter\caption@stepcounter@ORI} +\newcommand*\caption@@refstepcounter[1]{% + \caption@prepare@stepcounter{#1}{ref}% + \caption@@@refstepcounter{#1}} +\newcommand*\caption@@stepcounter[1]{% + \caption@prepare@stepcounter{#1}{}% + \caption@@@stepcounter{#1}} +\newcommand*\caption@prepare@stepcounter[2]{% + \caption@addsubcontentslines{#2stepcounter}% + \caption@reset@continuedfloat{#1}} +\newcommand*\caption@@@refstepcounter{\refstepcounter} +\newcommand*\caption@@@stepcounter{\stepcounter} +\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{} +\newcommand\caption@dblarg[1]{% + \kernel@ifnextchar[{\caption@ydblarg{#1}}{\caption@xdblarg{#1}}} +\newcommand\caption@xdblarg[2]{% + #1[{#2\relax}]{#2}} +\long\def\caption@ydblarg#1[#2]#3{% + \caption@iflistheading{#1[{#3}]{#3}}{#1[{#2}]{#3}}} +\newcommand*\caption@begin[1]{% + \caption@fixposition + \begingroup + \caption@setfnum{#1}} +\newcommand\caption@beginex[3]{% + \caption@begin{#1}% + \let\lst@@caption\relax + \caption@addcontentsline{#1}{#2}% + \caption@ifempty{#3}{}} +\newcommand*\caption@end{% + \endgroup} +\newcommand*\caption@setfnum[1]{% + \@ifundefined{fnum@#1}{\iftrue}{\ifx\caption@lfmt\caption@lfmt@default\else}% + \@namedef{fnum@#1}{\caption@fnum{#1}}% + \fi} +\newcommand*\caption@boxrestore{% + \caption@parboxrestore{\@parboxrestore}{% + \let\if@nobreak\iffalse + \let\if@noskipsec\iffalse + \let\par\@@par + \parindent\z@ \parskip\z@skip + \everypar{}% + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip + \parfillskip\@flushglue \lineskip\normallineskip + \baselineskip\normalbaselineskip + \sloppy + \let\\\@normalcr + }} +\newcommand\caption@boxrestore@mini{% + \let\par\@@par + \parindent\z@ \parskip\z@skip + \sloppy} +\newcommand*\caption@normalsize{% + \caption@font*{\KV@caption@fnt@normal\@unused}} +\let\caption@setfloatcapt\@firstofone +\newcommand*\caption@makecurrent[1]{\caption@gettitle} +\let\caption@makeanchor\@firstofone +\let\caption@start\relax +\let\caption@@start\relax +\let\caption@freezeHref\relax +\let\caption@defrostHref\relax +\newcommand\caption@gettitle[1]{% + \caption@ifdefined\NR@gettitle + {\NR@gettitle{#1}}% + {\def\@currentlabelname{#1}}} +\newcommand*\caption@subtypehook{% + \ifx\caption\caption@subcaption \else + \caption@warmup + \caption@ifflag2{}{% caption + \let\caption@add@contentsline\caption@addsubcontentsline + \let\caption@addsubcontentslines\@gobble + \caption@ifflag4{}{% subcaption + \caption@ifflag1{% continued float + \caption@clrflag1% + }{% + \caption@@stepcounter\@captype + }% + \caption@setflag4% subcaption + }% + }% + \c@continuedfloat=0\relax + \let\caption@setfloatcapt\@firstofone + \let\caption@chkfloat\@gobbletwo + \caption@setbox{none}% + \caption@clearmargin + \caption@iflist{}{\let\caption@setlist\@gobble}% + \caption@setoptions{sub}% + \caption@setoptions{subfloat}% for subfig-package compatibility + \def\caption@settype{\caption@withoptargs\caption@sub@settype}% + \def\caption@sub@settype##1##2{% + \edef\caption@tempa{##2}% + \ifx\caption@tempa\@captype +%%% \caption@setsubtype##1\relax + \else + \caption@Error{##2 inside \@subcaptype}% + \fi}% + \let\caption\caption@subcaption + \let\@caption\caption@@caption + \let\phantomcaption\caption@subphantom + \let\captionlistentry\caption@sublistentry + \let\caption@refstepcounter\caption@@@refstepcounter + \if@subfloatrow + \caption@Debug{Keeping \string\@makecaption}% + \else + \let\@makecaption\caption@makecaption + \fi + \fi}% +\caption@AtBeginDocument{% + \caption@ifundefined\@subfloatrowtrue + {\newif\if@subfloatrow + \caption@ifundefined\subfloatrow{}% + {\caption@Debug{Patching subfloatrow environment}% + \g@addto@macro\capsubrowsettings{\@subfloatrowtrue}% + \g@addto@macro\killfloatstyle{% + \ifx\c@FRobj\c@FRsobj\@subfloatrowtrue\fi}}}% + {\caption@Debug{\string\if@subfloatrow is already defined}}}% +\newcommand*\caption@subcaption{% + \caption@checkgrouplevel{sub}\subcaption + \caption@star + {\caption@refstepcounter\@subcaptype}% + {\caption@dblarg{\@caption\@subcaptype}}} +\newcommand*\caption@subphantom{% + \caption@checkgrouplevel{sub}\phantomsubcaption + \caption@refstepcounter\@subcaptype} +\newcommand*\caption@sublistentry{% + \caption@teststar\@subcaptionlistentry\@firstoftwo\@secondoftwo} +\newcommand*\@subcaptionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@subcaptype} +\newcommand*\caption@clearsubcontentslines{% + \global\let\caption@subcontentslines\@empty} +\caption@clearsubcontentslines +\newcommand*\caption@addsubcontentsline[4]{% + \caption@Debug{\string\caption@addsubcontentsline{#1}{#2}}% + \begingroup + \let\label\caption@gobble + \let\index\caption@gobble + \let\glossary\caption@gobble + \protected@edef\@tempa{\endgroup + \noexpand\g@addto@macro\noexpand\caption@subcontentslines{% + \noexpand\@namedef{the#2}{\csname the#2\endcsname}% + \ifx\@currentHref\@undefined \else + \noexpand\def\noexpand\@currentHref{\@currentHref}% + \fi + \noexpand\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}% + \@tempa} +\newcommand*\flushsubcaptionlistentries{% + \caption@addsubcontentslines{user}} +\renewcommand*\caption@addsubcontentslines[1]{% + \caption@Debug{\string\flushsubcaptionlistentries (#1)}% + \begingroup + \caption@subcontentslines + \endgroup + \caption@clearsubcontentslines} +\AtBeginDocument{% + \caption@ifdefined\chapter{% + \let\caption@chapter@ORI\chapter + \def\chapter{% + \caption@addsubcontentslines{chapter}\caption@chapter@ORI}}{}% + \caption@ifdefined\appendix{% + \let\caption@appendix@ORI\appendix + \def\appendix{% + \caption@addsubcontentslines{appendix}\caption@appendix@ORI}}{}% + \caption@addsubcontentslines{AtEndDocument}% +} +\caption@ifdefined\smf@makecaption{\let\smf@makecaption\@makecaption}{} +\@ifclassloaded{beamer}{% + \caption@InfoNoLine{beamer document class}% + \let\caption@ORI@figure\figure + \def\figure{\caption@settype{figure}\caption@ORI@figure} + \let\caption@ORI@table\table + \def\table{\caption@settype{table}\caption@ORI@table} +}{} +\caption@ifdefined\scr@caption{% + \caption@AtBeginDocument{\let\scr@caption\caption}}{} +\@nameuse{caption@frenchb}\@nameundef{caption@frenchb} +\caption@AtBeginDocument{\caption@ifdefined\frenchTeXmods{% + \caption@InfoNoLine{frenchle/pro package is loaded}% + \let\captionfont@ORI\captionfont + \let\captionlabelfont@ORI\captionlabelfont + \let\@makecaption@ORI\@makecaption + + \caption@ifdefined\GOfrench + {\def\caption@tempa{\g@addto@macro\GOfrench}}% + {\let\caption@tempa\@firstofone}% + \caption@tempa{% + \let\captionfont\captionfont@ORI + \let\captionfont@ORI\@undefined + \let\captionlabelfont\captionlabelfont@ORI + \let\captionlabelfont@ORI\@undefined + \let\@makecaption\@makecaption@ORI + \let\@makecaption@ORI\@undefined + \let\@cnORI\caption + \let\caption@tcORI\@tablescaption + \def\@tablescaption{\caption@star\relax\caption@tcORI}% + \let\@eatDP\@undefined + \let\caption@tempa\@empty + \ifx\f@ffrench\fnum@figure + \l@addto@macro\caption@tempa{\let\fnum@figure\f@ffrench}% + \fi + \ifx\f@tfrench\fnum@table + \l@addto@macro\caption@tempa{\let\fnum@table\f@tfrench}% + \fi + \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% + \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% + \caption@tempa + }% +}{}} +\def\caption@tempa#1{% + \@ifpackagewith{babel}{#1}{% + \caption@InfoNoLine{#1 babel option is loaded}% + \expandafter\addto\csname extras#1\endcsname{% + % reverse changes made by magyar.ldf + \let\@makecaption\caption@makecaption + \babel@save\@makecaption + \caption@redefine + \babel@save\@caption}% + }{}} +\caption@tempa{hungarian}% +\caption@tempa{magyar}% +\newcommand\caption@IfPackageLoaded[1]{% + \@testopt{\caption@@IfPackageLoaded{#1}}{}} +\@onlypreamble\caption@IfPackageLoaded +\long\def\caption@@IfPackageLoaded#1[#2]#3#4{% + \@ifpackageloaded{#1}\@firstofone{% + \caption@Debug{#1 package is not loaded (yet)\@gobble}% + \caption@AtBeginDocument}{% + \caption@If@Package@Loaded{#1}[{#2}]{#3}{#4}}} +\@onlypreamble\caption@@IfPackageLoaded +\long\def\caption@If@Package@Loaded#1[#2]{% + \@ifpackageloaded{#1}{% + \caption@InfoNoLine{#1 package is loaded}% + \@ifpackagelater{#1}{#2}\@firstoftwo{% + \caption@Error{% + For a successful cooperation we need at least version\MessageBreak + `#2' of package #1,\MessageBreak + but only version\MessageBreak + `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak + is available}% + \@secondoftwo}% + }{\@secondoftwo}} +\@onlypreamble\caption@If@Package@Loaded +\newcommand*\caption@clearmargin{% + \setcaptionmargin\z@ + \let\caption@minmargin\@undefined} +\caption@setbool{needfreeze}{0} +\caption@AtBeginDocument*{% + \caption@ifneedfreeze{% + \newcommand*\caption@freezetype[1]{% + \caption@settype*{#1}% + \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround! + \caption@freeze}% + \newcommand*\caption@freeze{% + \let\caption@frozen@continuedfloat\continuedfloat + \def\continuedfloat{% + \caption@@freeze{\caption@@@@continuedfloat\@captype}% + \caption@frozen@continuedfloat}% + \let\caption@frozen@setup\caption@setup + \def\caption@setup##1{% + \caption@@freeze{\caption@setup{##1}}% + \caption@frozen@setup{##1}}% + \let\caption@frozen@caption\caption + \def\caption{% + \def\caption{% + \caption@Error{% + Only one \noexpand\caption can be placed in this environment}% + \caption@gobble}% + \@ifstar + {\caption@SC@caption*}% + {\let\@currentlabel\caption@SClabel + \caption@withoptargs\caption@SC@caption}}% + \long\def\caption@SC@caption##1##2{% + \caption@@freeze{\caption##1{##2}}% + \ignorespaces}% + \let\caption@frozen@label\label + \def\label{% + \caption@withoptargs\caption@SC@label}% + \def\caption@SC@label##1##2{% + \ifx\@currentlabel\caption@SClabel + \@bsphack + \caption@freeze@label{##1}{##2}% + \@esphack + \else + \caption@frozen@label##1{##2}% + \fi}% + \def\caption@SClabel{\caption@undefinedlabel}% + \def\caption@freeze@label##1##2{% + \caption@@freeze{\label##1{##2}}}% + \global\let\caption@frozen@content\@empty + \long\def\caption@@freeze{% + \g@addto@macro\caption@frozen@content}% + \def\caption@warmup{% + \let\continuedfloat\caption@frozen@continuedfloat + \let\caption@setup\caption@frozen@setup + \let\caption\caption@frozen@caption + \let\label\caption@frozen@label}}% + \newcommand*\caption@prepare@defrost{% + \let\caption@settype\caption@set@type} + \newcommand*\caption@defrost{% + \ifx\caption@frozen@caption\@undefined + \caption@frozen@content + \else + \caption@Error{Internal Error:\MessageBreak + \noexpand\caption@defrost in same group as \string\caption@freeze}% + \fi}% + }{}% + \caption@undefbool{needfreeze}} +\let\caption@warmup\relax +\caption@IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{% + \newdimen\caption@adjustwidth@hsize + \newdimen\caption@adjustwidth@linewidth + \providecommand*\caption@set@adjustwidth{% + \caption@adjustwidth@hsize\hsize + \caption@adjustwidth@linewidth\linewidth}% + \providecommand*\caption@patch@changepage[1]{% + \expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname + \expandafter\renewcommand\csname #1\endcsname[2]{% + \@nameuse{caption@#1}{##1}{##2}% + \caption@set@adjustwidth}}% + \caption@patch@changepage{adjustwidth}% + \caption@patch@changepage{adjustwidth*}% + \let\caption@patch@changepage\relax + \providecommand\caption@test@adjustwidth{% + \ifdim\hsize=\caption@adjustwidth@hsize + \ifdim\linewidth=\caption@adjustwidth@linewidth + \hsize=\linewidth + \fi + \fi}% + \AtBeginCaption{\caption@test@adjustwidth}% + }{}% +\caption@IfPackageLoaded{chkfloat}[2012/08/19 v0.1]{% + \caption@ifdefined\chkfloat@addcontentsline{% + \renewcommand\caption@chkfloat{\chkfloat@addcontentsline}% + }{% + \renewcommand\caption@chkfloat[2]{% + \caption@ifdefined\chkfloat@page{% + \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}% + }{}}% + }% + }{}% +\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{% + \@ifpackageloaded{floatrow}{% + \caption@If@Package@Loaded{floatrow}[2007/08/24 v0.2a]{}{}% + }{% + \let\caption@ORI@float@setevery\@float@setevery + \def\@float@setevery#1{% + \float@ifcaption{#1}{% + \caption@setposition{\@fs@iftopcapt t\else b\fi}% + \renewcommand\caption@setfloatcapt[1]{% + \let\@makecaption\caption@@make + \global\setbox\@floatcapt\vbox{% + \color@begingroup ##1\color@endgroup}}% + \float@getstyle\float@style{#1}% + \caption@setstyle*\float@style + \caption@setoptions\float@style + }{}% + \caption@float@setname{#1}% + \caption@freezeHref % will be defrosted in \float@makebox + \caption@ORI@float@setevery{#1}}% + \caption@AtBeginDocument{\caption@ifcompatibility{}{% + \caption@ifdefined\HyOrg@float@makebox + {\let\caption@ORI@float@makebox\HyOrg@float@makebox}% + {\let\caption@ORI@float@makebox\float@makebox}% + \renewcommand\float@makebox[1]{% + \caption@ORI@float@makebox{#1\relax \caption@defrostHref}}% + }}% + \newcommand*\caption@float@setname[1]{% + \expandafter\ifx\csname #1name\endcsname\relax + \expandafter\let\csname #1name\expandafter\endcsname + \csname fname@#1\endcsname + \fi}% + \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% + \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% + \providecommand*\float@getstyle[2]{% + \edef#1{% + \noexpand\expandafter\noexpand\@gobblefour\noexpand\string + \expandafter\expandafter\expandafter\noexpand + \csname fst@#2\endcsname}% + \edef#1{#1}% + \caption@Debug{floatstyle{#2} = `#1'}}% + \providecommand*\float@ifcaption[1]{% + \expandafter\ifx\csname @float@c@#1\endcsname\float@caption + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}% +}}{% + \providecommand*\float@ifcaption[1]{\@secondoftwo}% +} +\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used +\caption@ifbool{ruled}{% + \captionsetup[ruled]{margin=0pt,minmargin=0,slc=0}% +}{% + \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% +} +\caption@undefbool{ruled} +\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{% + \let\caption@ORI@floatingfigure\floatingfigure + \def\floatingfigure{% + \caption@floatflt{figure}% + \caption@ORI@floatingfigure}% + \let\caption@ORI@floatingtable\floatingtable + \def\floatingtable{% + \caption@floatflt{table}% + \caption@ORI@floatingtable}% + \newcommand*\caption@floatflt[1]{% + \caption@settype{#1}% + \caption@clearmargin + \caption@setfullparboxrestore + \caption@setoptions{floating#1}}% +}{} +\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% + \caption@setbool{needfreeze}{1}% + \renewcommand\FP@positionLabel{% + FP\FP@captype-\number\value{FP@\FP@captype C}-pos}% + \renewcommand\FP@helpNote[2]{% + \begingroup % save \caption@thepage + \caption@pageref{#2}% + \typeout{FP#1 is inserted on page \caption@thepage!}% + \endgroup}% + \renewcommand*\FP@floatBegin[1]{% + \def\FP@captype{#1}% + \begin{lrbox}{\FP@floatCorpusBOX}% + \minipage\hsize % changes from LR mode to vertical mode + \caption@freezetype{#1}% + \ignorespaces}% + \renewcommand*\FP@floatEnd{% + \endminipage + \end{lrbox}% + \stepcounter{FP@\FP@captype C}% + \caption@label\FP@positionLabel + \FP@helpNote\FP@captype\FP@positionLabel + \FP@float + {\FP@positionLabel}% location label test + {\caption@prepare@defrost + \begin\FP@captype[p!]% + \usebox\FP@floatCorpusBOX + \end\FP@captype}% + {\@ifundefined{theH\FP@captype}{}{% + \expandafter\l@addto@macro\csname theH\FP@captype\endcsname{.FP}}}% + {\caption@prepare@defrost + \begin\FP@captype[b!]% + \let\FP@savedSetfnumCommand\caption@setfnum + \def\caption@setfnum##1{% + \FP@savedSetfnumCommand{##1}% + \ifx\FP@guide\@empty \else + \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}% + \fi}% + \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption + \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption + \caption@setoptions{FP\@captype}% + \FP@separatorCaption + \caption@defrost + \end\FP@captype}% + }% +}{% + \let\caption@ifFPlistcap\@undefined + \let\caption@ifFPrefcap\@undefined +} +\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{% + % Test if hyperref has stopped early + \caption@ifundefined\IfHyperBoolean{% + \caption@set@bool\caption@ifhyp@stoppedearly0% + \caption@ifundefined\H@refstepcounter + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\hyper@makecurrent + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\measuring@true + {\caption@set@bool\caption@ifhyp@stoppedearly1}{}}}% + }{% + \def\caption@ifhyp@stoppedearly{\IfHyperBoolean{stoppedearly}}% + }% + \caption@ifhyp@stoppedearly{% hyperref has stopped early + \caption@InfoNoLine{% + Hyperref support is turned off\MessageBreak + because hyperref has stopped early}% + }{% + \g@addto@macro\caption@prepareslc{\measuring@true}% + \renewcommand*\caption@@@refstepcounter{\H@refstepcounter}% + \renewcommand*\caption@makecurrent[2]{% + \caption@makecurrentHref{#1}% + \caption@Debug{hyperref current=\@currentHref}% + \caption@gettitle{#2}}% + \newcommand*\caption@makecurrentHref{\hyper@makecurrent}% + \renewcommand\caption@makeanchor[1]{% + \caption@Debug{hyperref anchor: \@currentHref}% + % If we cannot have nesting, the anchor is empty. + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#1}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }#1% + \fi}% + \g@addto@macro\caption@prepareslc{\let\caption@makeanchor\@firstofone}% + \newif\if@capstart + \def\caption@start{\caption@ifhypcap\caption@start@\relax}% + \def\caption@start@{% + \caption@makestart\@captype + \caption@startanchor\@currentHref + \global\@capstarttrue + \let\hc@currentHref\@currentHref + \def\caption@makecurrentHref##1{% + \global\@capstartfalse + \global\let\@currentHref\hc@currentHref}% + \let\caption@makeanchor\@firstofone + }% + \newcommand*\caption@makestart[1]{% + \begingroup + \Hy@hypertexnamesfalse + \hyper@makecurrent{#1.caption}% + \endgroup + \caption@Debug{hypcap start=\@currentHref}}% + \newcommand*\caption@startanchor[1]{% + \ifvmode\begingroup + \caption@Debug{hypcap anchor: #1 (vertical mode)}% + \@tempdima\prevdepth + \nointerlineskip + \vspace*{-\caption@hypcapspace}% + \caption@anchor{#1}% + \vspace*{\caption@hypcapspace}% + \prevdepth\@tempdima + \endgroup\else + \caption@Debug{hypcap anchor: #1 (horizontal mode)}% + \caption@anchor{#1}% + \fi}% + \newcommand*\caption@anchor[1]{% + \ifmeasuring@ \else + \caption@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}% + \fi}% + \ifx\HyperRaiseLinkLength\@tempdima + \def\caption@raisedlink#1{\ifvmode#1\else\Hy@raisedlink{#1}\fi}% + \else + \let\caption@raisedlink\Hy@raisedlink + \fi + \def\caption@@start{% + \caption@ifundefined\hc@currentHref{% + \caption@Warning{% + The option `hypcap=true' will be ignored for this\MessageBreak + particular \string\caption}}{}}% + \def\caption@freezeHref{% + \let\caption@ORI@start\caption@start + \def\caption@start{\let\caption@start\caption@ORI@start}% + \global\let\caption@currentHref\@undefined + \def\caption@@start{\global\let\caption@currentHref\@currentHref}% + \let\caption@ORI@setfloatcapt\caption@setfloatcapt + \renewcommand*\caption@setfloatcapt{% + \ifx\caption@currentHref\@undefined \else + \let\caption@makeanchor\@firstofone + \fi + \caption@ORI@setfloatcapt}}% + \def\caption@defrostHref{% + \ifx\caption@currentHref\@undefined \else + \caption@startanchor\caption@currentHref + \global\let\caption@currentHref\@undefined + \fi}% + }}{} +\caption@IfPackageLoaded{hypcap}{% v1.0 + \ifx\caption@start\relax \else % hyperref hasn't stopped early + \let\caption@ORI@capstart\capstart % save for compatibility mode + \caption@ifundefined\capstarttrue % check for v1.10 of hypcap package + {\def\capstart{\caption@start@}}% + {\def\capstart{\ifcapstart\caption@start@\fi}}% + \let\caption@start\relax + \let\caption@@start\relax + \caption@set@bool\caption@ifhypcap 1% + \renewcommand*\caption@hypcapspace{\hypcapspace}% + \fi}{} +\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% + \caption@setbool{lst@Init}{0}% + \lst@AddToHook{Init}{\caption@setbool{lst@Init}{1}}% + \let\caption@ORI@lst@MakeCaption\lst@MakeCaption + \def\lst@MakeCaption#1{% #1 is `t' or `b' + \begingroup + \caption@iflst@Init{}{% + \edef\caption@lst@leftskip{\noexpand\hskip-\the\@totalleftmargin\noexpand\relax}% + \l@addto@macro\caption@beginhook\caption@lst@leftskip}% + \caption@setposition{#1}% + \caption@iftop{% + \@tempdima\belowcaptionskip + \belowcaptionskip\abovecaptionskip + \abovecaptionskip\@tempdima}{}% + \caption@setup{rule=0}% + \caption@setoptions{lstlisting}% + \caption@setautoposition{#1}% + \caption@begin{lstlisting}% + \caption@ORI@lst@MakeCaption{#1}% + \caption@end + \endgroup}% + \def\lst@makecaption{\caption@starfalse\@makecaption}% + \def\lst@maketitle{\caption@startrue\@makecaption\@empty}% + \providecommand*\ext@lstlisting{lol}% +}{} +\providecommand*\LTcaptype{table} +\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{% + \RequirePackage{ltcaption}[=2018/08/26]% + \let\LT@@makecaption\@undefined + \caption@AtBeginDocument{% + \let\caption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% + \global\let\caption@opt@@longtable\@undefined + \def\captionsetup{% + \noalign\bgroup + \@ifstar\@captionsetup\@captionsetup}% gobble * + \def\@captionsetup##1{\LT@captionsetup{##1}\egroup}% + \def\LT@captionsetup##1{% + \captionsetup@startrue\caption@setup@options[@longtable]{##1}% + \global\let\caption@opt@@longtable\caption@opt@@longtable}% + \def\@captionabovetrue{\LT@captionsetup{position=t}}% + \def\@captionabovefalse{\LT@captionsetup{position=b}}% + \def\captionlistentry{% + \noalign\bgroup + \@ifstar{\egroup\LT@listentry\LTcaptype}% gobble * + {\egroup\LT@listentry\LTcaptype}}% +%% \let\Hy@LT@currentHlabel\@currentHlabel +%% \let\@currentHlabel\Hy@LT@currentHlabel + \def\continuedfloat{\noalign{% + \caption@Error{\noexpand\continuedfloat outside float}}}% + \let\bicaption\LT@bicaption + \caption@ORI@LT@array}}% + \def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\caption@xdblarg{\LT@c@ption\@firstofone}}}% + \renewcommand\LT@makecaption[3]{% + \caption@LT@make{% + \caption@LT@settype\LTcaptype + \caption@LT@setup + \caption@setautoposition{\ifcase\LT@rows t\else b\fi}% + \caption@startrue#1\caption@starfalse + \caption@prepare@stepcounter\LTcaptype{LT}% + \caption@begin\LTcaptype + \caption@normalsize + \vskip-\ht\strutbox + \caption@ifdefined\FBifcaptop{% + \let\caption@belowskip\@empty}{}% + \caption@make@above + \caption@@make{#2}{#3}\endgraf + \caption@make@below + \caption@end}}% + \renewcommand*\LT@listentry[2]{% + \begingroup + \caption@LT@settype{#1}% + \caption@listentry\@firstoftwo[{#1}]{#2}% + \endgroup\ignorespaces}% + \newcommand*\caption@LT@settype[1]{% + \caption@settype*{#1}% + \ifdim\LTcapwidth=4in \else + \setcaptionwidth\LTcapwidth + \fi + \caption@setoptions{longtable}% + \caption@setoptions{@longtable}}% + \caption@AtBeginDocument{\caption@ifdefined\flrow@setlist@{% + \caption@InfoNoLine{Fixing longtable code of `floatrow' package}% + \let\caption@flrow@setlist@\flrow@setlist@ + \renewcommand\flrow@setlist@[1]{% + \def\caption@tempa{{table}{longtable}}% + \def\caption@tempb{#1}% + \ifx\caption@tempa\caption@tempb + \def\@captype{table}% + \fi + \caption@flrow@setlist@{#1}}% + }{}}% +}{} +\providecommand*\caption@LT@setup{} +\caption@IfPackageLoaded{picinpar}{% + \long\def\figwindow[#1,#2,#3,#4] {% + \caption@window{figure}% + \caption@setoptions{figwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \long\def\tabwindow[#1,#2,#3,#4] {% + \caption@window{table}% + \caption@setoptions{tabwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \newcommand*\caption@window[1]{% + \let\@makecaption\caption@@make + \caption@setautoposition b% + \caption@settype{#1}% + \caption@clearmargin + \caption@setfullparboxrestore}% + \newcommand\caption@wincaption[1]{% + \ifdim\picwd=\z@ + \let\caption@makecurrent\@gobbletwo + \let\caption@@start\relax + \caption@prepareslc + \else + \caption@setflag1% + \fi + \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% + \if\@tempa*% + \let\@tempa\@firstofone + \else\if\@tempa[%] + \let\@tempa\@firstofone + \else + \let\@tempa\@empty + \fi\fi + \expandafter\caption\@tempa{#1}}% +}{} +\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}} +\caption@IfPackageLoaded{picins}{% + \caption@ifundefined\@piccaptype{% + \caption@iftype{% + \let\@piccaptype\@captype + }{% + \def\@piccaptype{figure}% + }% + }{}% + \let\@captype\@undefined + \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}% + \let\caption@ORI@make@piccaption\make@piccaption + \def\make@piccaption{% + \let\caption@ORI\caption + \long\def\caption[##1]##2{% + \caption@freezeHref % will be defrosted in \ivparpic + \caption@settype\@piccaptype + \caption@clearmargin + \caption@setfullparboxrestore + \caption@setoptions{parpic}% + \caption@setautoposition b% + \expandafter\expandafter\expandafter\caption@ORI + \expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter{% + \expandafter##1\expandafter}\expandafter]\expandafter{##2}}% + \caption@ORI@make@piccaption + \let\caption\caption@ORI}% + + \let\caption@ORI@ivparpic\ivparpic + \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{% + \let\caption@ORI@noindent\noindent + \def\noindent{% + \caption@defrostHref + \let\noindent\caption@ORI@noindent + \noindent}% + \caption@ORI@ivparpic(#1,#2)(#3,#4)[{#5}][{#6}]{#7}% + \let\noindent\caption@ORI@noindent}% +}{% + \let\piccaptiontype\@undefined +} +\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{% + \def\rotcaption{\let\@makecaption\@makerotcaption\caption}% + \def\rotcaptionof{% + \caption@teststar\caption@of{\rotcaption*}\rotcaption}% + \long\def\@makerotcaption#1#2{% + \rotatebox{90}{% + \ifdim\captionwidth=\z@ + \setcaptionwidth{.8\vsize}% + \l@addto@macro\caption@singleline{% + \caption@setup{parbox=none}}% + \fi + \let\caption@calcmargin\relax + \caption@@make{#1}{#2}}% + \nobreak\hspace{12pt}}% +}{} +\caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{% + \caption@setbool{needfreeze}{1}% + \let\caption@ORI@SC@zfloat\SC@zfloat + \def\SC@zfloat#1#2#3[#4]{% + \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]% + \SC@RestoreCommands + \caption@freezetype{#2}% + \let\SC@label\label}% + \providecommand*\SC@RestoreCommands{% + \let\caption=\SC@orig@caption \let\label=\SC@orig@label}% + \let\caption@ORI@endSC@FLOAT\endSC@FLOAT + \def\endSC@FLOAT{% + \def\caption@setSC@justify{% + \caption@clearmargin + \ifx\SC@justify\@empty \else + \let\caption@hj\SC@justify + \let\SC@justify\@empty + \fi}% + \let\caption\SC@orig@caption + \def\SC@orig@caption[##1]##2{% + \caption@setSC@justify +%%% \caption@setoptions{SC}% + \caption@setoptions{SC\@captype}% + \caption@defrost}% + \caption@setSC@justify % for compatibility mode + \caption@prepare@defrost + \caption@ORI@endSC@FLOAT}% +}{} +\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{% + \def\sf@ifpositiontop{% + \ifx\@captype\@undefined + \expandafter\@gobbletwo + \else\ifx\@captype\relax + \expandafter\expandafter\expandafter\@gobbletwo + \else + \expandafter\expandafter\expandafter\sf@if@position@top + \fi\fi} + \def\sf@if@position@top{% + \@ifundefined{if\@captype topcap}% + {\@gobbletwo}% + {\@nameuse{if\@captype topcap}% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}} +}{} +\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[{#1}]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{supertabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end}% +}{} +\caption@IfPackageLoaded{xtab}[2000/04/09 v2.3]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[{#1}]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{xtabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% + \@initisotab + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end + \global\advance\ST@pageleft -\PWSTcapht + \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}% +}{} +\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{% + \let\caption@ORI@threeparttable\threeparttable + \renewcommand*\threeparttable{% + \caption@settype{\@ifundefined{@captype}{table}{\@captype}}% +%%% \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{threeparttable}% + \caption@ORI@threeparttable}% + \let\caption@ORI@measuredfigure\measuredfigure + \renewcommand*\measuredfigure{% + \caption@settype{\@ifundefined{@captype}{figure}{\@captype}}% +%%% \caption@setposition a% ? + \caption@clearmargin + \caption@setoptions{measuredfigure}% + \caption@ORI@measuredfigure}% + \def\TPT@caption#1[#2]#3{% + \gdef\TPT@docapt{% + \global\let\TPT@docapt\@undefined + \caption@setautoposition\caption@TPT@position + \TPT@LA@caption{#1}[{#2}]{#3}}% + \ifx\TPT@hsize\@empty + \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures + \gdef\caption@TPT@position{t}% + \g@addto@macro\TPT@docapt\caption@TPT@eatvskip + \else + \def\caption@TPT@position{b}% + \TPT@docapt + \fi + \ignorespaces}% + %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}% + \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}% +}{} +\caption@IfPackageLoaded{wrapfig}[2003/01/31 v3.6]{% + \renewcommand*\wrapfloat[1]{% + \def\@captype{#1}% + \@ifundefined{fst@#1}{}{% + \@nameuse{fst@#1}% + \def\WF@floatstyhook{\let\@currbox\WF@box + \global\setbox\WF@box\float@makebox{\wd\WF@box}}}% + \@ifnextchar[\WF@wr{\WF@wr[]}} + \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, + \gdef\WF@ovh{#1}% hold overhang for later, when \width is known + \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% + \expandafter\WF@captionstyhook\expandafter{\@captype}% <= new + \ifdim\hsize>\z@ \@parboxrestore \else + \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption + \ignorespaces \fi}% + \def\WF@captionstyhook#1{% + \let\@captype\@undefined + \@ifundefined{fst@#1}{}{\@float@setevery{#1}}% + \caption@settype{#1}% + \caption@clearmargin +%%% \caption@setoptions{wrap}% + \caption@setoptions{wrap#1}}% +}{} +\endinput +%% +%% End of file `caption_2020-07-29.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty b/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty new file mode 100644 index 00000000000..3de2631ae4c --- /dev/null +++ b/Master/texmf-dist/tex/latex/caption/caption_2020-10-26.sty @@ -0,0 +1,1383 @@ +%% +%% This is file `caption_2020-10-26.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% fallback/v3.5/caption.dtx (with options: `package') +%% +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% +%% https://gitlab.com/axelsommerfeldt/caption +%% +%% -------------------------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2003/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Axel Sommerfeldt. +%% +%% This work consists of the files +%% caption.ins, caption.dtx, caption-light.dtx, caption2.dtx, caption3.dtx, +%% caption-ams-smf.dtx, caption-beamer.dtx, caption-elsarticle.dtx, +%% caption-koma.dtx, caption-memoir.dtx, caption-ntg.dtx, +%% caption-thesis.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% the derived files +%% caption.sty, caption-light.sty, caption2.sty, caption3.sty, +%% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, +%% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. +%% +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{caption}[2020/10/26 v3.5g Customizing captions (AR)] +\RequirePackage{caption3}[=2020/10/06] % needs v2.2b or newer +\caption@ifbool{documentclass}{}{% + \caption@WarningNoLine{% + Unknown document class (or package),\MessageBreak + standard defaults will be used}} +\@ifpackageloaded{caption2}{% + \caption@Error{% + You can't use both, the (obsolete) caption2 *and*\MessageBreak + the (current) caption package}% + \endinput +}{} +\caption@AtBeginDocument{% + \@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}% + \@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}% + \@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}} +\newcommand*\caption@DisablePositionOption[1]{% + \caption@InfoNoLine{% + `#1' package detected; setting `position=b' for compatibility reasons}% + \caption@setposition b% + \DeclareCaptionOption{position}{% + \caption@Error{Usage of the `position' option is incompatible\MessageBreak + to the `#1' package}}} +\@onlypreamble\caption@DisablePositionOption +\DeclareCaptionOption*{config}[caption]{% + \InputIfFileExists{#1.cfg}% + {\typeout{*** Local configuration file #1.cfg used ***}}% + {\caption@Warning{Configuration file #1.cfg not found}}} +\newcommand*\caption@selectlistentry[1]{% + \caption@ifinlist{#1}{heading}{% + \let\caption@iflistheading\@firstoftwo + }{\caption@ifinlist{#1}{default,list-entry,entry}{% + \let\caption@iflistheading\@secondoftwo + }{% + \caption@Error{Undefined list-entry selection `#1'}% + }}} +\DeclareCaptionOption{list-entry}{\caption@selectlistentry{#1}} +\captionsetup{list-entry=default} +\newcommand\caption@declparboxrestore{% + \caption@decl{parboxrestore}} +\@onlypreamble\caption@declparboxrestore +\newcommand*\caption@setparboxrestore{% + \caption@set{parboxrestore}} +\caption@declparboxrestore{full}{% + \@parboxrestore} +\caption@declparboxrestore{partial}{% + \let\if@nobreak\iffalse + \let\if@noskipsec\iffalse + \let\par\@@par + \parindent\z@ \parskip\z@skip + \everypar{}% + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip + \parfillskip\@flushglue \lineskip\normallineskip + \baselineskip\normalbaselineskip + \sloppy + \let\\\@normalcr} +\caption@declparboxrestore{mini}{% + \let\par\@@par + \parindent\z@ \parskip\z@skip + \sloppy} +\SetCaptionDefault{parboxrestore}{full} +\DeclareCaptionOption{parboxrestore}{\caption@setparboxrestore{#1}} +\captionsetup{parboxrestore=default} +\DeclareCaptionOption{@minipage}{% + \caption@ifinlist{#1}{auto,default}% + {\let\caption@if@minipage\@gobbletwo}% + {\caption@set@bool\caption@if@minipage{#1}}} +\captionsetup{@minipage=default} +\DeclareCaptionOption{compatibility}[v1]{% + \caption@ifinlist{#1}{v1,1,true,yes,on}{% + \let\caption@ifcompatibility\@firstoftwo + }{\caption@ifinlist{#1}{v3,3,0,false,no,off}{% + \let\caption@ifcompatibility\@secondoftwo + }{% + \caption@Error{Undefined compatibility value `#1'}% + }}} +\@onlypreamble@key{caption}{compatibility} +\caption@setbool{compatibility}{0} % default: Try not to be compatible to v1.x +\newcommand*\caption@setincompatible[2]{% + #1{% + \caption@WarningNoLine{% + #2;\MessageBreak + Setting compatibility to v1}% + \caption@setbool{compatibility}{1}% + }{}} +\caption@AtBeginDocument{\caption@ifcompatibility{}{% + \caption@setincompatible{\@ifpackageloaded{captcont}}{captcont package is loaded}% +}} +\DeclareCaptionOptionNoValue*{normal}{% + \caption@setup{format=plain,justification=justified}} +\DeclareCaptionOptionNoValue*{isu}{% + \caption@setup{format=hang,justification=justified}} +\DeclareCaptionOptionNoValue*{hang}{% + \caption@setup{format=hang,justification=justified}} +\DeclareCaptionOptionNoValue*{center}{% + \caption@setup{format=plain,justification=centering}} +\DeclareCaptionOptionNoValue*{centerlast}{% + \caption@setup{format=plain,justification=centerlast}} +\DeclareCaptionOptionNoValue*{scriptsize}{\def\captionfont{\scriptsize}} +\DeclareCaptionOptionNoValue*{footnotesize}{\def\captionfont{\footnotesize}} +\DeclareCaptionOptionNoValue*{small}{\def\captionfont{\small}} +\DeclareCaptionOptionNoValue*{normalsize}{\def\captionfont{\normalsize}} +\DeclareCaptionOptionNoValue*{large}{\def\captionfont{\large}} +\DeclareCaptionOptionNoValue*{Large}{\def\captionfont{\Large}} +\DeclareCaptionOptionNoValue*{up}{\caption@setup{labelfont+=up}} +\DeclareCaptionOptionNoValue*{it}{\caption@setup{labelfont+=it}} +\DeclareCaptionOptionNoValue*{sl}{\caption@setup{labelfont+=sl}} +\DeclareCaptionOptionNoValue*{sc}{\caption@setup{labelfont+=sc}} +\DeclareCaptionOptionNoValue*{md}{\caption@setup{labelfont+=md}} +\DeclareCaptionOptionNoValue*{bf}{\caption@setup{labelfont+=bf}} +\DeclareCaptionOptionNoValue*{rm}{\caption@setup{labelfont+=rm}} +\DeclareCaptionOptionNoValue*{sf}{\caption@setup{labelfont+=sf}} +\DeclareCaptionOptionNoValue*{tt}{\caption@setup{labelfont+=tt}} +\DeclareCaptionOptionNoValue*{nooneline}{\caption@setup{slc=0}} +\caption@setbool{ruled}{0} +\DeclareCaptionOptionNoValue*{ruled}{\caption@setbool{ruled}{1}} +\DeclareCaptionOptionNoValue*{flushleft}{% + \caption@setup{format=plain,justification=raggedright}} +\DeclareCaptionOptionNoValue*{flushright}{% + \caption@setup{format=plain,justification=raggedleft}} +\DeclareCaptionOptionNoValue*{oneline}{\caption@setup{slc=1}} +\DeclareCaptionOptionNoValue*{ignoreLTcapwidth}{% + \caption@WarningNoLine{Obsolete option `ignoreLTcapwidth' ignored}} +\DeclareCaptionOption*{caption}{% + \caption@setbool{temp}{#1}% + \caption@ifbool{temp}{}{% + \caption@Error{% + The package option `caption=#1' is obsolete.\MessageBreak + Please pass this option to the subfig package instead\MessageBreak + and do *not* load the caption package anymore}}} +\DeclareCaptionOption{FPlist}[1]{\caption@setFPoption{list}{#1}} +\DeclareCaptionOption{FPref}[1]{\caption@setFPoption{ref}{#1}} +\@onlypreamble@key{caption}{FPlist} +\@onlypreamble@key{caption}{FPref} +\newcommand*\caption@setFPoption[2]{% + \edef\caption@tempa{\@car#2\@nil}% + \caption@setbool{FP#1cap}{\if c\caption@tempa 1\else 0\fi}} +\@onlypreamble\caption@setFPoption +\captionsetup{FPlist=caption,FPref=figure} +\DeclareCaptionOption{hypcap}[1]{\caption@setbool{hypcap}{#1}} +\DeclareCaptionOption{hypcapspace}{\def\caption@hypcapspace{#1}} +\captionsetup{hypcap=1,hypcapspace=.5\baselineskip} +\caption@documentclass@code +\let\caption@documentclass@code\@undefined +\let\AtCaptionPackage\@firstofone +\caption@SetupOptions{caption}{\caption@setkeys{#1}{#2}} +\caption@ProcessOptions*{caption} +\newcounter{caption@flags} +\newcommand*\caption@ifflag[1]{% + \@tempcnta\c@caption@flags + \divide\@tempcnta #1\relax + \ifodd\@tempcnta + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} +\newcommand*\caption@clrflags{% + \setcounter{caption@flags}\z@} +\newcommand*\caption@clrflag[1]{% + \caption@ifflag{#1}{\caption@addtoflags{-#1}}{}} +\newcommand*\caption@setflag[1]{% + \caption@ifflag{#1}{}{\caption@addtoflags{#1}}} +\newcommand*\caption@addtoflags{% + \addtocounter{caption@flags}} +\def\caption@caption{% + \caption@iftype + {\caption@checkgrouplevel\@empty\caption + \caption@star + {\caption@refstepcounter\@captype}% + {\caption@dblarg{\@caption\@captype}}}% + {\caption@Error{\noexpand\caption outside float}% + \caption@gobble}} +\newcommand*\caption@star[2]{% + \@ifstar{\caption@startrue#2[]}{#1#2}} +\long\def\caption@@caption#1[#2]#3{% + \ifcaption@star \else + \caption@prepareanchor{#1}{#2}% + \memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}% + \@nameuse{nag@hascaptiontrue}% + \fi + \par + \caption@beginex{#1}{#2}{#3}% + \caption@setfloatcapt{% + \caption@parboxrestore + \if@minipage + \@setminipage + \fi + \caption@normalsize + \ifcaption@star + \let\caption@makeanchor\@firstofone + \fi + \@makecaption{\csname fnum@#1\endcsname}% + {\ignorespaces\caption@makeanchor{#3}}\par + \caption@if@minipage\@minipagetrue\@minipagefalse}% + \caption@end} +\providecommand\memcaptioninfo[4]{} +\newcommand*\caption@prepareanchor[2]{% + \caption@makecurrent{#1}{#2}% + \caption@ifhypcap\caption@@start\relax + \M@gettitle{#2}} +\providecommand\M@gettitle[1]{} +\long\def\caption@makecaption#1#2{% + \caption@make@above + \caption@@make{#1}{#2}% + \caption@make@below} +\newcommand*\caption@make@above{% + \caption@iftop + \caption@belowskip + {\caption@rule\caption@aboveskip}} +\newcommand*\caption@make@below{% + \caption@iftop + {\caption@aboveskip\caption@rule}% + \caption@belowskip} +\newcommand*\caption@redefine{} +\g@addto@macro\caption@redefine{% + \caption@ifcompatibility{% + \caption@InfoNoLine{ + \noexpand\caption will not be redefined since `compatibility' is set to v1}% + \renewcommand*\caption@redefine{}% + \renewcommand*\caption@continuedfloat[1]{% + \caption@Error{Not available with option `compatibility=v1'}}% + \caption@AtBeginDocument*{% + \let\caption@start\relax + \caption@ifdefined\caption@ORI@capstart{% + \caption@Debug{% + Restore hypcap definition of \string\capstart\@gobble}% + \let\capstart\caption@ORI@capstart}{}% + }% + \renewcommand*\caption@star[2]{#1#2}% + }{% + \renewcommand*\caption@redefine{% + \let\caption\caption@caption + \let\@caption\caption@@caption}% + }% + \caption@redefine + \caption@AtBeginDocument*{% + \let\caption@ORI@capstart\@undefined}% + \let\caption@ORI@xfloat\@xfloat + \def\@xfloat#1[#2]{% + \caption@ORI@xfloat{#1}[#2]% + \caption@settype{#1}% + \caption@xfloat@hook}% + \newcommand*\caption@xfloat@hook{}% + \let\caption@ORI@xdblfloat\@xdblfloat + \def\@xdblfloat#1[#2]{% + \caption@ORI@xdblfloat{#1}[#2]% expands to \@xfloat{#1}[#2] + extra stuff + \caption@setoptions{#1*}% + \caption@xdblfloat@hook}% + \newcommand*\caption@xdblfloat@hook{}% +} +\caption@AtBeginDocument{\caption@redefine} +\let\@makecaption\caption@makecaption +\newcommand\phantomcaption{% + \caption@iftype + {\caption@refstepcounter\@captype}% + {\caption@Error{\noexpand\phantomcaption outside float}}}% +\caption@AtBeginDocument{% + \DeclareCaptionOption{type}{\setcaptiontype{#1}}% + \DeclareCaptionOption{type*}{\setcaptiontype*{#1}}% + \DeclareCaptionOptionNoValue{subtype}{\setcaptionsubtype\relax}% + \DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}% +} +\def\setcaptiontype{% + \caption@parboxrestore@mini + \caption@settype} +\newcommand\setcaptionsubtype{% + \caption@iftype + \caption@setsubtype + {\caption@Error{\noexpand\setcaptionsubtype outside float}}}% +\newcommand\caption@setsubtype{% + \caption@teststar\caption@@setsubtype\@firstoftwo\@secondoftwo} +\newcommand*\caption@@setsubtype[1]{% + \caption@@@settype{sub}{#1}{sub\@captype}} +\newcommand*\caption@settype{% + \caption@clrflags + \caption@set@type} +\newcommand*\caption@set@type{% + \caption@teststar\caption@@settype\@firstoftwo\@secondoftwo} +\newcommand*\caption@@settype{% + \caption@@@settype{}} +\newcommand*\caption@@@settype[3]{% + \caption@Debug{#1type=#3}% + \@nameuse{caption@check#1type}{#3}% + {\caption@checkgrouplevel{#1}{% + \captionsetup{#1type#2*\@empty=...}#2{ or + \@backslashchar#1captionof}{}}% + \edef\caption@tempa{#3}% + \expandafter\ifx\csname @#1captype\endcsname\caption@tempa \else + \ifcaptionsetup@star\else\@nameuse{caption@#1type@warning}\fi + \fi + \expandafter\let\csname @#1captype\endcsname\caption@tempa + \@nameuse{caption@#1typehook}% + \caption@setoptions{#3}% + \ifx\caption@opt\relax + \@nameundef{caption@#1type@warning}% + \else + \@namedef{caption@#1type@warning}{\caption@Warning{% + The #1type was already set to + `\csname @#1captype\endcsname'\MessageBreak}}% + \fi + #2{}{% + \let\@currentlabel\caption@undefinedlabel + \ifx\caption@x@label\@undefined + \let\caption@x@label\label + \let\label\caption@xlabel + \fi + \caption@start}}} +\newcommand*\caption@iftype{\caption@ifdefined\@captype} +\newcommand*\caption@checktype[1]{% + \caption@ifsubtype{#1}\@firstoftwo{\caption@ifin@list\sf@counterlist{#1}}% + {\caption@Error{Should not be used with subtype `#1'}% + \@gobble}% + \@firstofone} +\newcommand*\caption@checksubtype[1]{% + \caption@ifsubtype{#1}% + \@firstofone + {\caption@ifin@list\sf@counterlist{#1}% + {\caption@Warning{% + \noexpand\setcaptionsubtype without \string\DeclareCaptionSubType.\MessageBreak + This is not designed to work; you could try replacing\MessageBreak + the `subfig' package with `subcaption' to resolve\MessageBreak + this problem which occurred}% + \@firstofone}% + {\caption@Error{Undefined subtype `#1'}% + \@gobble}}} +\newcommand*\caption@checkgrouplevel[2]{% + \@ifundefined{#1caption@grouplevel}{% + \caption@ifundefined\caption@grouplevel{\let\caption@grouplevel\z@}{}% + \ifnum\currentgrouplevel>\caption@grouplevel\relax + \expandafter\edef\csname #1caption@grouplevel\endcsname{% + \the\currentgrouplevel}% + \else + \caption@Warning{\string#2\MessageBreak outside box or environment}% + \fi + }{}}% +\newcommand*\caption@undefinedlabel{% + \protect\caption@xref{\caption@labelname}{\on@line}} +\DeclareRobustCommand*\caption@xref[2]{% + \caption@WarningNoLine{\noexpand\label without proper reference#2}% + \@setref\relax\@undefined{#1}} +\newcommand*\caption@labelname{??} +\newcommand*\caption@xlabel{% + \caption@withoptargs\caption@@xlabel} +\newcommand*\caption@@xlabel[2]{% + \caption@@@xlabel + \def\caption@labelname{#2}% + \caption@x@label#1{#2}} +\newcommand*\caption@@@xlabel{% + \global\let\caption@@@xlabel\@empty + \@bsphack + \protected@write\@auxout{}% + {\string\providecommand*\string\caption@xref[2]{% + \string\@setref\string\relax\string\@undefined{\string##1}}}% + \@esphack} +\caption@AtBeginDocument{% + \def\captionof{\caption@teststar\caption@of{\caption*}\caption}} +\providecommand*\caption@of[2]{\setcaptiontype*{#2}#1} +\newcommand*\captionlistentry{% + \caption@teststar\@captionlistentry\@firstoftwo\@secondoftwo} +\newcommand*\@captionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@captype} +\def\caption@listentry#1[#2]#3{% + \@bsphack + #1{\caption@gettitle{#3}}% + {\caption@refstepcounter{#2}% + \caption@makecurrent{#2}{#3}}% + \caption@addcontentsline{#2}{#3}% + \@esphack} +\newcommand*\captionbox{% + \caption@withoptargs{\caption@ibox\@gobble}} +\newcommand\caption@ibox[3]{% + \kernel@ifnextchar[%] + {\caption@iibox{#1}{#2}{#3}}% + {\caption@iibox@{#1}{#2}{#3}}} +\long\def\caption@iibox#1#2#3[#4]{% + \@testopt{\caption@iiibox{#1}{#2}{#3}[{#4}]}\captionbox@innerpos@default} +\long\def\caption@iibox@#1#2#3#4{% + \setbox\@tempboxa\hbox{#4}% + \caption@iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox@innerpos@default]{\unhbox\@tempboxa}} +\long\def\caption@iiibox#1{% + \caption@iiiibox{#1}\vbox\vtop} +\long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{% + \begingroup + #1*% set \caption@position + \caption@iftop{% + \endgroup + \parbox[t]{#6}{% + #1\relax + \caption@setposition t% + #2{\caption#4{#5}}% + \captionbox@hrule + \csname caption@justification@#7\endcsname + #8}% + }{% + \endgroup + \parbox[b]{#6}{% + #1\relax + \caption@setposition b% + \csname caption@justification@#7\endcsname + #8% + \captionbox@hrule + #3{\caption#4{#5}}}% + }} +\newcommand*\captionbox@innerpos@default{c} +\newcommand*\captionbox@hrule{\hrule\@height\z@\relax} +\providecommand*\caption@justification@c{\centering} +\providecommand*\caption@justification@l{\raggedright} +\providecommand*\caption@justification@r{\raggedleft} +\providecommand*\caption@justification@s{} +\def\continuedfloat{% + \caption@iftype + {\caption@continuedfloat\@captype}% + {\caption@Error{\noexpand\continuedfloat outside float}}} +\newcommand*\caption@continuedfloat[1]{% + \@ifstar + {\caption@@refstepcounter\@captype + \caption@@continuedfloat{#1}}% + {\caption@continued@float{#1}}} +\newcommand*\caption@continued@float[1]{% + \edef\caption@tempa{#1}% + \ifx\caption@tempa\caption@CFtype + \caption@@continuedfloat{#1}% + \else + \caption@Error{Continued `#1' after `\caption@CFtype'}% + \fi} +\newcommand*\caption@@continuedfloat{% + \caption@setflag1% continued float + \caption@@@continuedfloat} +\newcommand*\caption@@@continuedfloat{% + \stepcounter{continuedfloat}% + \caption@@@@continuedfloat} +\newcommand*\caption@@@@continuedfloat[1]{% + \caption@setoptions{ContinuedFloat}% for compatibility reasons + \caption@setoptions{continuedfloat}% + \caption@setoptions{continued#1}% + \expandafter\l@addto@macro\csname the#1\endcsname\thecontinuedfloat + \@ifundefined{theH#1}{}{% + \expandafter\l@addto@macro\csname theH#1\endcsname{% + \@alph\c@continuedfloat}}% + \let\caption@@@@continuedfloat\@gobble} +\newcommand*\caption@CFtype{??} +\newcounter{continuedfloat} +\let\c@ContinuedFloat\c@continuedfloat % defined for compatibility reasons +\def\thecontinuedfloat{\theContinuedFloat} +\let\theContinuedFloat\@empty % defined for compatibility reasons +\newcommand*\caption@reset@continuedfloat[1]{% + \xdef\caption@CFtype{#1}% + \@stpelt{continuedfloat}} +\def\ContinuedFloat{\continuedfloat} % defined for compatibility reasons +\def\caption@ContinuedFloat{% + \let\caption@reset@continuedfloat\@gobble + \caption@@@continuedfloat} +\newcommand*\caption@refstepcounter[1]{% + \@ifundefined{c@#1}% + {\caption@Error{No float type '#1' defined}}% + {\caption@ref@stepcounter{#1}% + \caption@fixposition % TODO: Make this independant on the "position" setting + \caption@iftop\caption@setflag\caption@clrflag2% caption + \caption@clrflag4% subcaption + \@nameuse{donemaincaptiontrue}}} +\newcommand*\caption@ref@stepcounter{% + \caption@ifflag1{% continued float + \let\caption@tempa\caption@@refcounter + \caption@clrflag1% continued float + }{% + \let\caption@tempa\caption@@refstepcounter + \caption@ifflag2{}{% caption + \caption@ifflag4{% subcaption + % Counter was already incremented by content, so we suppress \stepcounter{#1} here + \let\caption@tempa\caption@@refcounter + }{}% + }% + }% + \caption@tempa} +\newcommand*\caption@@refcounter[1]{% + \let\caption@stepcounter@ORI\stepcounter + \def\stepcounter##1{% + \edef\caption@tempa{#1}% + \edef\caption@tempb{##1}% + \ifx\caption@tempa\caption@tempb \else + \caption@stepcounter@ORI{##1}% + \fi}% + \caption@@@refstepcounter{#1}% + \let\stepcounter\caption@stepcounter@ORI} +\newcommand*\caption@@refstepcounter[1]{% + \caption@prepare@stepcounter{#1}{ref}% + \caption@@@refstepcounter{#1}} +\newcommand*\caption@@stepcounter[1]{% + \caption@prepare@stepcounter{#1}{}% + \caption@@@stepcounter{#1}} +\newcommand*\caption@prepare@stepcounter[2]{% + \caption@addsubcontentslines{#2stepcounter}% + \caption@reset@continuedfloat{#1}} +\newcommand*\caption@@@refstepcounter{\refstepcounter} +\newcommand*\caption@@@stepcounter{\stepcounter} +\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{} +\newcommand\caption@dblarg[1]{% + \kernel@ifnextchar[{\caption@ydblarg{#1}}{\caption@xdblarg{#1}}} +\newcommand\caption@xdblarg[2]{% + #1[{#2\relax}]{#2}} +\long\def\caption@ydblarg#1[#2]#3{% + \caption@iflistheading{#1[{#3}]{#3}}{#1[{#2}]{#3}}} +\newcommand*\caption@begin[1]{% + \caption@fixposition + \begingroup + \caption@setfnum{#1}} +\newcommand\caption@beginex[3]{% + \caption@begin{#1}% + \let\lst@@caption\relax + \caption@addcontentsline{#1}{#2}% + \caption@ifempty{#3}{}} +\newcommand*\caption@end{% + \endgroup} +\newcommand*\caption@setfnum[1]{% + \@ifundefined{caption@fnum@#1}% + {\expandafter\let\csname caption@fnum@#1\expandafter\endcsname\csname fnum@#1\endcsname + \@namedef{fnum@#1}{\caption@fnum{#1}}}% + {}} +\newcommand*\caption@normalsize{% + \caption@font@normal\@unused} +\let\caption@setfloatcapt\@firstofone +\newcommand*\caption@makecurrent[1]{\caption@gettitle} +\let\caption@makeanchor\@firstofone +\let\caption@start\relax +\let\caption@@start\relax +\let\caption@freezeHref\relax +\let\caption@defrostHref\relax +\newcommand\caption@gettitle[1]{% + \caption@ifdefined\NR@gettitle + {\NR@gettitle{#1}}% + {\def\@currentlabelname{#1}}} +\newcommand*\caption@subtypehook{% + \ifx\caption\caption@subcaption \else + \caption@warmup + \caption@ifflag2{}{% caption + \let\caption@add@contentsline\caption@addsubcontentsline + \let\caption@addsubcontentslines\@gobble + \caption@ifflag4{}{% subcaption + \caption@ifflag1{% continued float + \caption@clrflag1% + }{% + \caption@@stepcounter\@captype + }% + \caption@setflag4% subcaption + }% + }% + \c@continuedfloat=0\relax + \let\caption@setfloatcapt\@firstofone + \let\caption@chkfloat\@gobbletwo + \caption@set{box}{none}% + \caption@clearmargin + \caption@iflist{}{\let\caption@setlist\@gobble}% + \caption@setoptions{sub}% + \caption@setoptions{subfloat}% for subfig-package compatibility + \def\caption@settype{\caption@withoptargs\caption@sub@settype}% + \def\caption@sub@settype##1##2{% + \edef\caption@tempa{##2}% + \ifx\caption@tempa\@captype +%%% \caption@setsubtype##1\relax + \else + \caption@Error{##2 inside \@subcaptype}% + \fi}% + \let\caption\caption@subcaption + \let\@caption\caption@@caption + \let\phantomcaption\caption@subphantom + \let\captionlistentry\caption@sublistentry + \let\caption@refstepcounter\caption@@@refstepcounter + \if@subfloatrow + \caption@Debug{Keeping \string\@makecaption}% + \else + \let\@makecaption\caption@makecaption + \fi + \fi}% +\caption@AtBeginDocument{% + \caption@ifundefined\@subfloatrowtrue + {\newif\if@subfloatrow + \caption@ifundefined\subfloatrow + {}% + {\caption@Debug{Patching subfloatrow environment}% + \g@addto@macro\capsubrowsettings{\@subfloatrowtrue}% + \g@addto@macro\killfloatstyle{% + \ifx\c@FRobj\c@FRsobj\@subfloatrowtrue\fi}}}% + {\caption@Debug{\string\if@subfloatrow is already defined}}}% +\newcommand*\caption@subcaption{% + \caption@checkgrouplevel{sub}\subcaption + \caption@star + {\caption@refstepcounter\@subcaptype}% + {\caption@dblarg{\@caption\@subcaptype}}} +\newcommand*\caption@subphantom{% + \caption@checkgrouplevel{sub}\phantomsubcaption + \caption@refstepcounter\@subcaptype} +\newcommand*\caption@sublistentry{% + \caption@teststar\@subcaptionlistentry\@firstoftwo\@secondoftwo} +\newcommand*\@subcaptionlistentry[1]{% + \@testopt{\caption@listentry{#1}}\@subcaptype} +\newcommand*\caption@clearsubcontentslines{% + \global\let\caption@subcontentslines\@empty} +\caption@clearsubcontentslines +\newcommand*\caption@addsubcontentsline[4]{% + \caption@Debug{\string\caption@addsubcontentsline{#1}{#2}}% + \begingroup + \let\label\caption@gobble + \let\index\caption@gobble + \let\glossary\caption@gobble + \protected@edef\@tempa{\endgroup + \noexpand\g@addto@macro\noexpand\caption@subcontentslines{% + \noexpand\@namedef{the#2}{\csname the#2\endcsname}% + \ifx\@currentHref\@undefined \else + \noexpand\def\noexpand\@currentHref{\@currentHref}% + \fi + \noexpand\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}% + \@tempa} +\newcommand*\flushsubcaptionlistentries{% + \caption@addsubcontentslines{user}} +\renewcommand*\caption@addsubcontentslines[1]{% + \caption@Debug{\string\flushsubcaptionlistentries (#1)}% + \begingroup + \caption@subcontentslines + \endgroup + \caption@clearsubcontentslines} +\AtBeginDocument{% + \caption@ifdefined\chapter{% + \let\caption@chapter@ORI\chapter + \def\chapter{% + \caption@addsubcontentslines{chapter}\caption@chapter@ORI}}{}% + \caption@ifdefined\appendix{% + \let\caption@appendix@ORI\appendix + \def\appendix{% + \caption@addsubcontentslines{appendix}\caption@appendix@ORI}}{}% + \caption@addsubcontentslines{AtEndDocument}% +} +\caption@IfBabelArabi{% + \let\@makecaption\caption@makecaption + \def\fnum@figure{\figurename\nobreakspace\thefigure}% + \def\fnum@table{\tablename\nobreakspace\thetable}% +}{} +\caption@IfFrenchLe{% + \def\f@ffrench{\ifx\listoffigures\relax\else\figurename~\thefigure\fi}% + \def\f@tfrench{\ifx\listoftables\relax\else\tablename~\thetable\fi}% + \let\@eatDP\@undefined + \caption@AtBeginDocument{% + \let\caption@original@makecaption\@makecaption}% + \g@addto@macro\GOfrench{% + \let\@makecaption\caption@original@makecaption}% +}{} +\caption@IfBabelHungarian{% + \caption@AtBeginDocument{% + \let\caption@original@makecaption\@makecaption}% + \caption@ifdefined\extrashungarian{% + \addto\extrashungarian{% + \let\@makecaption\caption@original@makecaption}}{}% + \caption@ifdefined\extrasmagyar{% + \addto\extrasmagyar{% + \let\@makecaption\caption@original@makecaption}}{}% +}{} +\caption@IfBabelLatvian{% + \let\@makecaption\caption@makecaption +}{} +\newcommand\caption@IfPackageLoaded[1]{% + \@testopt{\caption@@IfPackageLoaded{#1}}{}} +\@onlypreamble\caption@IfPackageLoaded +\long\def\caption@@IfPackageLoaded#1[#2]#3#4{% + \@ifpackageloaded{#1}\@firstofone{% + \caption@Debug{#1 package is not loaded (yet)\@gobble}% + \caption@AtBeginDocument}{% + \caption@If@Package@Loaded{#1}[{#2}]{#3}{#4}}} +\@onlypreamble\caption@@IfPackageLoaded +\long\def\caption@If@Package@Loaded#1[#2]{% + \@ifpackageloaded{#1}{% + \caption@InfoNoLine{#1 package is loaded}% + \@ifpackagelater{#1}{#2}\@firstoftwo{% + \caption@Error{% + For a successful cooperation we need at least version\MessageBreak + `#2' of package #1,\MessageBreak + but only version\MessageBreak + `\csname ver@#1.\@pkgextension\endcsname'\MessageBreak + is available}% + \@secondoftwo}% + }{\@secondoftwo}} +\@onlypreamble\caption@If@Package@Loaded +\newcommand*\caption@clearmargin{% + \setcaptionmargin\z@ + \let\caption@minmargin\@undefined} +\caption@setbool{needfreeze}{0} +\caption@AtBeginDocument*{% + \caption@ifneedfreeze{% + \newcommand*\caption@freezetype[1]{% + \caption@settype*{#1}% + \captionsetup*[sub]{hypcap=true}% Note: This is just a (q&d) workaround! + \caption@freeze}% + \newcommand*\caption@freeze{% + \let\caption@frozen@continuedfloat\continuedfloat + \def\continuedfloat{% + \caption@@freeze{\caption@@@@continuedfloat\@captype}% + \caption@frozen@continuedfloat}% + \let\caption@frozen@setup\caption@setup + \def\caption@setup##1{% + \caption@@freeze{\caption@setup{##1}}% + \caption@frozen@setup{##1}}% + \let\caption@frozen@caption\caption + \def\caption{% + \def\caption{% + \caption@Error{% + Only one \noexpand\caption can be placed in this environment}% + \caption@gobble}% + \@ifstar + {\caption@SC@caption*}% + {\let\@currentlabel\caption@SClabel + \caption@withoptargs\caption@SC@caption}}% + \long\def\caption@SC@caption##1##2{% + \caption@@freeze{\caption##1{##2}}% + \ignorespaces}% + \let\caption@frozen@label\label + \def\label{% + \caption@withoptargs\caption@SC@label}% + \def\caption@SC@label##1##2{% + \ifx\@currentlabel\caption@SClabel + \@bsphack + \caption@freeze@label{##1}{##2}% + \@esphack + \else + \caption@frozen@label##1{##2}% + \fi}% + \def\caption@SClabel{\caption@undefinedlabel}% + \def\caption@freeze@label##1##2{% + \caption@@freeze{\label##1{##2}}}% + \global\let\caption@frozen@content\@empty + \long\def\caption@@freeze{% + \g@addto@macro\caption@frozen@content}% + \def\caption@warmup{% + \let\continuedfloat\caption@frozen@continuedfloat + \let\caption@setup\caption@frozen@setup + \let\caption\caption@frozen@caption + \let\label\caption@frozen@label}}% + \newcommand*\caption@prepare@defrost{% + \let\caption@settype\caption@set@type} + \newcommand*\caption@defrost{% + \ifx\caption@frozen@caption\@undefined + \caption@frozen@content + \else + \caption@Error{Internal Error:\MessageBreak + \noexpand\caption@defrost in same group as \string\caption@freeze}% + \fi}% + }{}% + \caption@undefbool{needfreeze}} +\let\caption@warmup\relax +\caption@IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{% + \newdimen\caption@adjustwidth@hsize + \newdimen\caption@adjustwidth@linewidth + \providecommand*\caption@set@adjustwidth{% + \caption@adjustwidth@hsize\hsize + \caption@adjustwidth@linewidth\linewidth}% + \providecommand*\caption@patch@changepage[1]{% + \expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname + \expandafter\renewcommand\csname #1\endcsname[2]{% + \@nameuse{caption@#1}{##1}{##2}% + \caption@set@adjustwidth}}% + \caption@patch@changepage{adjustwidth}% + \caption@patch@changepage{adjustwidth*}% + \let\caption@patch@changepage\relax + \providecommand\caption@test@adjustwidth{% + \ifdim\hsize=\caption@adjustwidth@hsize + \ifdim\linewidth=\caption@adjustwidth@linewidth + \hsize=\linewidth + \fi + \fi}% + \AtBeginCaption{\caption@test@adjustwidth}% + }{}% +\caption@IfPackageLoaded{chkfloat}[2012/08/19 v0.1]{% + \caption@ifdefined\chkfloat@addcontentsline{% + \renewcommand\caption@chkfloat{\chkfloat@addcontentsline}% + }{% + \renewcommand\caption@chkfloat[2]{% + \caption@ifdefined\chkfloat@page{% + \addtocontents{fof}{\protect\chkfloat@{\thepage}{\chkfloat@page}{\csname fnum@#1\endcsname: #2}}% + }{}}% + }% + }{}% +\caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{% + \@ifpackageloaded{floatrow}{% + \caption@If@Package@Loaded{floatrow}[2007/08/24 v0.2a]{}{}% + }{% + \let\caption@ORI@float@setevery\@float@setevery + \def\@float@setevery#1{% + \float@ifcaption{#1}{% + \caption@setposition{\@fs@iftopcapt t\else b\fi}% + \renewcommand\caption@setfloatcapt[1]{% + \let\@makecaption\caption@@make + \global\setbox\@floatcapt\vbox{% + \color@begingroup ##1\color@endgroup}}% + \float@getstyle\float@style{#1}% + \caption@setstyle*\float@style + \caption@setoptions\float@style + }{}% + \caption@float@setname{#1}% + \caption@freezeHref % will be defrosted in \float@makebox + \caption@ORI@float@setevery{#1}}% + \caption@AtBeginDocument{\caption@ifcompatibility{}{% + \caption@ifdefined\HyOrg@float@makebox + {\let\caption@ORI@float@makebox\HyOrg@float@makebox}% + {\let\caption@ORI@float@makebox\float@makebox}% + \renewcommand\float@makebox[1]{% + \caption@ORI@float@makebox{#1\relax \caption@defrostHref}}% + }}% + \newcommand*\caption@float@setname[1]{% + \expandafter\ifx\csname #1name\endcsname\relax + \expandafter\let\csname #1name\expandafter\endcsname\csname fname@#1\endcsname + \fi}% + \g@addto@macro\fs@plaintop{\def\@fs@mid{\vspace\abovecaptionskip\relax}}% + \g@addto@macro\fs@boxed{\def\@fs@mid{\kern\abovecaptionskip\relax}}% + \providecommand*\float@getstyle[2]{% + \edef#1{% + \noexpand\expandafter\noexpand\@gobblefour\noexpand\string + \expandafter\expandafter\expandafter\noexpand + \csname fst@#2\endcsname}% + \edef#1{#1}% + \caption@Debug{floatstyle{#2} = `#1'}}% + \providecommand*\float@ifcaption[1]{% + \expandafter\ifx\csname @float@c@#1\endcsname\float@caption + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}% +}}{% + \providecommand*\float@ifcaption[1]{\@secondoftwo}% +} +\captionsetup[boxed]{skip=2pt} % do not issue a warning when not used +\caption@ifbool{ruled}{% + \captionsetup[ruled]{margin=0pt,minmargin=0,slc=0}% +}{% + \DeclareCaptionStyle{ruled}{labelfont=bf,labelsep=space,strut=0}% +} +\caption@undefbool{ruled} +\caption@IfPackageLoaded{floatflt}[1996/02/27 v1.3]{% + \let\caption@ORI@floatingfigure\floatingfigure + \def\floatingfigure{% + \caption@floatflt{figure}% + \caption@ORI@floatingfigure}% + \let\caption@ORI@floatingtable\floatingtable + \def\floatingtable{% + \caption@floatflt{table}% + \caption@ORI@floatingtable}% + \newcommand*\caption@floatflt[1]{% + \caption@settype{#1}% + \caption@clearmargin + \caption@setparboxrestore{full}% + \caption@setoptions{floating#1}}% +}{} +\caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% + \caption@setbool{needfreeze}{1}% + \renewcommand\FP@positionLabel{% + FP\FP@captype-\number\value{FP@\FP@captype C}-pos}% + \renewcommand\FP@helpNote[2]{% + \begingroup % save \caption@thepage + \caption@pageref{#2}% + \typeout{FP#1 is inserted on page \caption@thepage!}% + \endgroup}% + \renewcommand*\FP@floatBegin[1]{% + \def\FP@captype{#1}% + \begin{lrbox}{\FP@floatCorpusBOX}% + \minipage\hsize % changes from LR mode to vertical mode + \caption@freezetype{#1}% + \ignorespaces}% + \renewcommand*\FP@floatEnd{% + \endminipage + \end{lrbox}% + \stepcounter{FP@\FP@captype C}% + \caption@label\FP@positionLabel + \FP@helpNote\FP@captype\FP@positionLabel + \FP@float + {\FP@positionLabel}% location label test + {\caption@prepare@defrost + \begin\FP@captype[p!]% + \usebox\FP@floatCorpusBOX + \end\FP@captype}% + {\@ifundefined{theH\FP@captype}{}{% + \expandafter\l@addto@macro\csname theH\FP@captype\endcsname{.FP}}}% + {\caption@prepare@defrost + \begin\FP@captype[b!]% + \let\FP@savedSetfnumCommand\caption@setfnum + \def\caption@setfnum##1{% + \FP@savedSetfnumCommand{##1}% + \ifx\FP@guide\@empty \else + \expandafter\l@addto@macro\csname fnum@##1\endcsname{\ {\FP@guide}}% + \fi}% + \setlength\abovecaptionskip{2pt plus 2pt minus 1pt}% length above caption + \setlength\belowcaptionskip{2pt plus 2pt minus 1pt}% length below caption + \caption@setoptions{FP\@captype}% + \FP@separatorCaption + \caption@defrost + \end\FP@captype}% + }% +}{% + \let\caption@ifFPlistcap\@undefined + \let\caption@ifFPrefcap\@undefined +} +\caption@IfPackageLoaded{hyperref}[2003/11/30 v6.74m]{% + % Test if hyperref has stopped early + \caption@ifundefined\IfHyperBoolean{% + \caption@set@bool\caption@ifhyp@stoppedearly0% + \caption@ifundefined\H@refstepcounter + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\hyper@makecurrent + {\caption@set@bool\caption@ifhyp@stoppedearly1}{% + \caption@ifundefined\measuring@true + {\caption@set@bool\caption@ifhyp@stoppedearly1}{}}}% + }{% + \def\caption@ifhyp@stoppedearly{\IfHyperBoolean{stoppedearly}}% + }% + \caption@ifhyp@stoppedearly{% hyperref has stopped early + \caption@InfoNoLine{% + Hyperref support is turned off\MessageBreak + because hyperref has stopped early}% + }{% + \g@addto@macro\caption@prepareslc{\measuring@true}% + \renewcommand*\caption@@@refstepcounter{\H@refstepcounter}% + \renewcommand*\caption@makecurrent[2]{% + \caption@makecurrentHref{#1}% + \caption@Debug{hyperref current=\@currentHref}% + \caption@gettitle{#2}}% + \newcommand*\caption@makecurrentHref{\hyper@makecurrent}% + \renewcommand\caption@makeanchor[1]{% + \caption@Debug{hyperref anchor: \@currentHref}% + % If we cannot have nesting, the anchor is empty. + \ifHy@nesting + \expandafter\hyper@@anchor\expandafter{\@currentHref}{#1}% + \else + \Hy@raisedlink{% + \expandafter\hyper@@anchor\expandafter{\@currentHref}{\relax}% + }#1% + \fi}% + \g@addto@macro\caption@prepareslc{\let\caption@makeanchor\@firstofone}% + \newif\if@capstart + \def\caption@start{\caption@ifhypcap\caption@start@\relax}% + \def\caption@start@{% + \caption@makestart\@captype + \caption@startanchor\@currentHref + \global\@capstarttrue + \let\hc@currentHref\@currentHref + \def\caption@makecurrentHref##1{% + \global\@capstartfalse + \global\let\@currentHref\hc@currentHref}% + \let\caption@makeanchor\@firstofone + }% + \newcommand*\caption@makestart[1]{% + \begingroup + \Hy@hypertexnamesfalse + \hyper@makecurrent{#1.caption}% + \endgroup + \caption@Debug{hypcap start=\@currentHref}}% + \newcommand*\caption@startanchor[1]{% + \ifvmode\begingroup + \caption@Debug{hypcap anchor: #1 (vertical mode)}% + \@tempdima\prevdepth + \nointerlineskip + \vspace*{-\caption@hypcapspace}% + \caption@anchor{#1}% + \vspace*{\caption@hypcapspace}% + \prevdepth\@tempdima + \endgroup\else + \caption@Debug{hypcap anchor: #1 (horizontal mode)}% + \caption@anchor{#1}% + \fi}% + \newcommand*\caption@anchor[1]{% + \ifmeasuring@ \else + \caption@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}% + \fi}% + \ifx\HyperRaiseLinkLength\@tempdima + \def\caption@raisedlink#1{\ifvmode#1\else\Hy@raisedlink{#1}\fi}% + \else + \let\caption@raisedlink\Hy@raisedlink + \fi + \def\caption@@start{% + \caption@ifundefined\hc@currentHref{% + \caption@Warning{% + The option `hypcap=true' will be ignored for this\MessageBreak + particular \string\caption}}{}}% + \def\caption@freezeHref{% + \let\caption@ORI@start\caption@start + \def\caption@start{\let\caption@start\caption@ORI@start}% + \global\let\caption@currentHref\@undefined + \def\caption@@start{\global\let\caption@currentHref\@currentHref}% + \let\caption@ORI@setfloatcapt\caption@setfloatcapt + \renewcommand*\caption@setfloatcapt{% + \ifx\caption@currentHref\@undefined \else + \let\caption@makeanchor\@firstofone + \fi + \caption@ORI@setfloatcapt}}% + \def\caption@defrostHref{% + \ifx\caption@currentHref\@undefined \else + \caption@startanchor\caption@currentHref + \global\let\caption@currentHref\@undefined + \fi}% + }}{} +\caption@IfPackageLoaded{hypcap}{% v1.0 + \ifx\caption@start\relax \else % hyperref hasn't stopped early + \let\caption@ORI@capstart\capstart % save for compatibility mode + \caption@ifundefined\capstarttrue % check for v1.10 of hypcap package + {\def\capstart{\caption@start@}}% + {\def\capstart{\ifcapstart\caption@start@\fi}}% + \let\caption@start\relax + \let\caption@@start\relax + \caption@set@bool\caption@ifhypcap 1% + \renewcommand*\caption@hypcapspace{\hypcapspace}% + \fi}{} +\caption@IfPackageLoaded{listings}[2004/02/13 v1.2]{% + \caption@setbool{lst@Init}{0}% + \lst@AddToHook{Init}{\caption@setbool{lst@Init}{1}}% + \let\caption@ORI@lst@MakeCaption\lst@MakeCaption + \def\lst@MakeCaption#1{% #1 is `t' or `b' + \begingroup + \caption@iflst@Init{}{% + \edef\caption@lst@leftskip{\noexpand\hskip-\the\@totalleftmargin\noexpand\relax}% + \l@addto@macro\caption@beginhook\caption@lst@leftskip}% + \caption@setposition{#1}% + \caption@iftop{% + \@tempdima\belowcaptionskip + \belowcaptionskip\abovecaptionskip + \abovecaptionskip\@tempdima}{}% + \caption@setup{rule=0}% + \caption@setoptions{lstlisting}% + \caption@setautoposition{#1}% + \caption@begin{lstlisting}% + \caption@ORI@lst@MakeCaption{#1}% + \caption@end + \endgroup}% + \def\lst@makecaption{\caption@starfalse\@makecaption}% + \def\lst@maketitle{\caption@startrue\@makecaption\@empty}% + \providecommand*\ext@lstlisting{lol}% +}{} +\providecommand*\LTcaptype{table} +\providecommand*\caption@LT@array{} +\newcommand\caption@AtBeginLongtable{% + \g@addto@macro\caption@LT@array} +\caption@IfPackageLoaded{longtable}[1995/05/24 v3.14]{% + \RequirePackage{ltcaption}[=2018/08/26]% + \let\LT@@makecaption\@undefined + \caption@AtBeginDocument{% + \let\caption@ORI@LT@array\LT@array + \renewcommand*\LT@array{% + \caption@LT@array + \caption@ORI@LT@array}}% + \caption@AtBeginLongtable{% + \global\let\caption@opt@@longtable\@undefined + \def\captionsetup{% + \noalign\bgroup + \@ifstar\@captionsetup\@captionsetup}% gobble * + \def\@captionsetup#1{\LT@captionsetup{#1}\egroup}% + \def\LT@captionsetup#1{% + \captionsetup@startrue\caption@setup@options[@longtable]{#1}% + \global\let\caption@opt@@longtable\caption@opt@@longtable}% + \def\captionlistentry{% + \noalign\bgroup + \@ifstar{\egroup\LT@listentry\LTcaptype}% gobble * + {\egroup\LT@listentry\LTcaptype}}% +%% \let\Hy@LT@currentHlabel\@currentHlabel +%% \let\@currentHlabel\Hy@LT@currentHlabel + \def\continuedfloat{\noalign{% + \caption@Error{\noexpand\continuedfloat outside float}}}% + \let\bicaption\LT@bicaption + }% + \def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\caption@xdblarg{\LT@c@ption\@firstofone}}}% + \renewcommand\LT@makecaption[3]{% + \caption@LT@make{% + \caption@LT@settype\LTcaptype + \caption@LT@setup + \caption@setautoposition{\ifcase\LT@rows t\else b\fi}% + \caption@startrue#1\caption@starfalse + \caption@prepare@stepcounter\LTcaptype{LT}% + \caption@begin\LTcaptype + \caption@normalsize + \vskip-\ht\strutbox + \caption@ifdefined\FBifcaptop{% + \let\caption@belowskip\@empty}{}% + \caption@make@above + \caption@@make{#2}{#3}\endgraf + \caption@make@below + \caption@end}}% + \renewcommand*\LT@listentry[2]{% + \begingroup + \caption@LT@settype{#1}% + \caption@listentry\@firstoftwo[{#1}]{#2}% + \endgroup\ignorespaces}% + \newcommand*\caption@LT@settype[1]{% + \caption@settype*{#1}% + \ifdim\LTcapwidth=4in \else + \setcaptionwidth\LTcapwidth + \fi + \caption@setoptions{longtable}% + \caption@setoptions{@longtable}}% + \caption@AtBeginDocument{\caption@ifdefined\flrow@setlist@{% + \caption@InfoNoLine{Fixing longtable code of `floatrow' package}% + \let\caption@flrow@setlist@\flrow@setlist@ + \renewcommand\flrow@setlist@[1]{% + \def\caption@tempa{{table}{longtable}}% + \def\caption@tempb{#1}% + \ifx\caption@tempa\caption@tempb + \def\@captype{table}% + \fi + \caption@flrow@setlist@{#1}}% + }{}}% +}{% + \let\caption@AtBeginLongtable\@gobble + \let\caption@LT@array\@undefined +} +\providecommand*\caption@LT@setup{} +\caption@IfPackageLoaded{picinpar}{% + \long\def\figwindow[#1,#2,#3,#4] {% + \caption@window{figure}% + \caption@setoptions{figwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \long\def\tabwindow[#1,#2,#3,#4] {% + \caption@window{table}% + \caption@setoptions{tabwindow}% + \begin{window}[#1,#2,{#3},\caption@wincaption{#4}] }% + \newcommand*\caption@window[1]{% + \let\@makecaption\caption@@make + \caption@setautoposition b% + \caption@settype{#1}% + \caption@clearmargin + \caption@setparboxrestore{full}}% + \newcommand\caption@wincaption[1]{% + \ifdim\picwd=\z@ + \let\caption@makecurrent\@gobbletwo + \let\caption@@start\relax + \caption@prepareslc + \else + \caption@setflag1% + \fi + \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% + \if\@tempa*% + \let\@tempa\@firstofone + \else\if\@tempa[%] + \let\@tempa\@firstofone + \else + \let\@tempa\@empty + \fi\fi + \expandafter\caption\@tempa{#1}}% +}{} +\newcommand*\piccaptiontype[1]{\def\@piccaptype{#1}} +\caption@IfPackageLoaded{picins}{% + \caption@ifundefined\@piccaptype{% + \caption@iftype{% + \let\@piccaptype\@captype + }{% + \def\@piccaptype{figure}% + }% + }{}% + \let\@captype\@undefined + \def\piccaption{\caption@star\relax{\caption@dblarg\@piccaption}}% + \let\caption@ORI@make@piccaption\make@piccaption + \def\make@piccaption{% + \let\caption@ORI\caption + \long\def\caption[##1]##2{% + \caption@freezeHref % will be defrosted in \ivparpic + \caption@settype\@piccaptype + \caption@clearmargin + \caption@setparboxrestore{full}% + \caption@setoptions{parpic}% + \caption@setautoposition b% + \expandafter\expandafter\expandafter\caption@ORI + \expandafter\expandafter\expandafter[% + \expandafter\expandafter\expandafter{% + \expandafter##1\expandafter}\expandafter]\expandafter{##2}}% + \caption@ORI@make@piccaption + \let\caption\caption@ORI}% + + \let\caption@ORI@ivparpic\ivparpic + \def\ivparpic(#1,#2)(#3,#4)[#5][#6]#7{% + \let\caption@ORI@noindent\noindent + \def\noindent{% + \caption@defrostHref + \let\noindent\caption@ORI@noindent + \noindent}% + \caption@ORI@ivparpic(#1,#2)(#3,#4)[{#5}][{#6}]{#7}% + \let\noindent\caption@ORI@noindent}% +}{% + \let\piccaptiontype\@undefined +} +\caption@IfPackageLoaded{rotating}[1995/08/22 v2.10]{% + \def\rotcaption{\let\@makecaption\@makerotcaption\caption}% + \def\rotcaptionof{% + \caption@teststar\caption@of{\rotcaption*}\rotcaption}% + \long\def\@makerotcaption#1#2{% + \rotatebox{90}{% + \ifdim\captionwidth=\z@ + \setcaptionwidth{.8\vsize}% + \l@addto@macro\caption@singleline{% + \caption@setup{parbox=none}}% + \fi + \let\caption@calcmargin\relax + \caption@@make{#1}{#2}}% + \nobreak\hspace{12pt}}% +}{} +\caption@IfPackageLoaded{sidecap}[2003/06/06 v1.6f]{% + \caption@setbool{needfreeze}{1}% + \let\caption@ORI@SC@zfloat\SC@zfloat + \def\SC@zfloat#1#2#3[#4]{% + \caption@ORI@SC@zfloat{#1}{#2}{#3}[#4]% + \SC@RestoreCommands + \caption@freezetype{#2}% + \let\SC@label\label}% + \providecommand*\SC@RestoreCommands{% + \let\caption=\SC@orig@caption \let\label=\SC@orig@label}% + \let\caption@ORI@endSC@FLOAT\endSC@FLOAT + \def\endSC@FLOAT{% + \def\caption@setSC@justify{% + \caption@clearmargin + \ifx\SC@justify\@empty \else + \let\caption@justification\SC@justify + \let\SC@justify\@empty + \fi}% + \let\caption\SC@orig@caption + \def\SC@orig@caption[##1]##2{% + \caption@setSC@justify +%%% \caption@setoptions{SC}% + \caption@setoptions{SC\@captype}% + \caption@defrost}% + \caption@setSC@justify % for compatibility mode + \caption@prepare@defrost + \caption@ORI@endSC@FLOAT}% +}{} +\caption@IfPackageLoaded{subfigure}[2002/01/23 v2.1]{% + \def\sf@ifpositiontop{% + \ifx\@captype\@undefined + \expandafter\@gobbletwo + \else\ifx\@captype\relax + \expandafter\expandafter\expandafter\@gobbletwo + \else + \expandafter\expandafter\expandafter\sf@if@position@top + \fi\fi} + \def\sf@if@position@top{% + \@ifundefined{if\@captype topcap}% + {\@gobbletwo}% + {\@nameuse{if\@captype topcap}% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi}} +}{} +\caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[{#1}]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{supertabular}% + \caption@setposition{\if@topcaption t\else b\fi}% + \caption@beginex{#1}{#2}{#3}% + \caption@parboxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end}% +}{} +\caption@IfPackageLoaded{xtab}[2000/04/09 v2.3]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \caption@gettitle{#2}% + \caption@ORI@xtablecaption[{#1}]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{xtabular}% + \caption@set{position}{\if@topcaption t\else b\fi}% + \@initisotab + \caption@beginex{#1}{#2}{#3}% + \caption@parboxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end + \global\advance\ST@pageleft -\PWSTcapht + \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}% +}{} +\caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{% + \let\caption@ORI@threeparttable\threeparttable + \renewcommand*\threeparttable{% + \caption@settype{\@ifundefined{@captype}{table}{\@captype}}% +%%% \caption@setposition{auto}% ? + \caption@clearmargin + \caption@setoptions{threeparttable}% + \caption@ORI@threeparttable}% + \let\caption@ORI@measuredfigure\measuredfigure + \renewcommand*\measuredfigure{% + \caption@settype{\@ifundefined{@captype}{figure}{\@captype}}% +%%% \caption@setposition{auto}% ? + \caption@clearmargin + \caption@setoptions{measuredfigure}% + \caption@ORI@measuredfigure}% + \def\TPT@caption#1[#2]#3{% + \gdef\TPT@docapt{% + \global\let\TPT@docapt\@undefined + \caption@setautoposition\caption@TPT@position + \TPT@LA@caption{#1}[{#2}]{#3}}% + \ifx\TPT@hsize\@empty + \let\label\TPT@gatherlabel % Bug: does not work for measuredfigures + \gdef\caption@TPT@position{t}% + \g@addto@macro\TPT@docapt\caption@TPT@eatvskip + \else + \def\caption@TPT@position{b}% + \TPT@docapt + \fi + \ignorespaces}% + %\newcommand*\caption@TPT@eatvskip{\vskip-.2\baselineskip}% + \def\caption@TPT@eatvskip#1\vskip{#1\@tempdima=}% +}{} +\caption@IfPackageLoaded{wrapfig}[2003/01/31 v3.6]{% + \renewcommand*\wrapfloat[1]{% + \def\@captype{#1}% + \@ifundefined{fst@#1}{}{% + \@nameuse{fst@#1}% + \def\WF@floatstyhook{\let\@currbox\WF@box + \global\setbox\WF@box\float@makebox{\wd\WF@box}}}% + \@ifnextchar[\WF@wr{\WF@wr[]}} + \def\WF@rapt[#1]#2{% final two args: #1 = overhang, #2 = width, + \gdef\WF@ovh{#1}% hold overhang for later, when \width is known + \global\setbox\WF@box\vtop\bgroup \setlength\hsize{#2}% + \expandafter\WF@captionstyhook\expandafter{\@captype}% <= new + \ifdim\hsize>\z@ \@parboxrestore \else + \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf@caption + \ignorespaces \fi}% + \def\WF@captionstyhook#1{% + \let\@captype\@undefined + \@ifundefined{fst@#1}{}{\@float@setevery{#1}}% + \caption@settype{#1}% + \caption@clearmargin +%%% \caption@setoptions{wrap}% + \caption@setoptions{wrap#1}}% +}{} +\caption@endtitles@code +\let\caption@endtitles@code\@undefined +\let\AfterCaptionPackage\@firstofone +\endinput +%% +%% End of file `caption_2020-10-26.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty index dcad4344f7a..6fbf7b28cdd 100644 --- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty @@ -6,7 +6,7 @@ %% %% ltcaption.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,12 +33,13 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{ltcaption}[2020/05/30 v1.4b longtable captions (AR)] +\providecommand\DeclareRelease[3]{} +\providecommand\DeclareCurrentRelease[2]{} +\DeclareCurrentRelease{v1}{2007-04-15} +\ProvidesPackage{ltcaption}[2021/01/08 v1.4c longtable captions (AR)] \@ifpackageloaded{longtable}{}{% \PackageError{ltcaption}{longtable package not loaded, aborting}{RTFM}} \providecommand*\LTcaptype{table} @@ -171,7 +172,7 @@ \def\LT@c@ption##1[##2]##3{% \ifx##1\@firstofone \PackageError{ltcaption}% - {Not allowed in longtable* environment}% + {\noexpand\caption is not available in longtable* environment}% {If you do not understand this error, please take a closer look\MessageBreak at the documentation of the `ltcaption' package.\MessageBreak \@ehc}% diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty index 5e69f382328..01eaf2de762 100644 --- a/Master/texmf-dist/tex/latex/caption/subcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty @@ -6,7 +6,7 @@ %% %% subcaption.dtx (with options: `package') %% -%% Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2022 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -33,21 +33,25 @@ %% caption.sty, caption-light.sty, caption2.sty, caption3.sty, %% caption-ams-smf.sto, caption-beamer.sto, caption-elsarticle.sto, %% caption-koma.sto, caption-memoir.sto, caption-ntg.sto, -%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty, -%% and the user manuals -%% caption-deu.tex, caption-eng.tex, caption-rus.tex. +%% caption-thesis.sto, bicaption.sty, ltcaption.sty, subcaption.sty. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{subcaption}[2020/10/07 v1.3j Sub-captions (AR)] -\RequirePackage{caption}[2020/09/28] % needs v3.5c or newer +\providecommand\DeclareRelease[3]{} +\providecommand\DeclareCurrentRelease[2]{} +\DeclareCurrentRelease{v1}{2007/12/06} +\ProvidesPackage{subcaption}[2022/01/07 v1.5 Sub-captions (AR)] +\RequirePackage{caption}[2010/01/09] % we need at least v3.1m +\newcommand*\subcaption@Warning{% + \PackageWarning{subcaption}} \newcommand*\subcaption@Error[1]{% \PackageError{subcaption}{#1}{\caption@@eh{subcaption}}} +\providecommand*\caption@@eh[1]{% + If you do not understand this error, please take a closer look\MessageBreak + at the documentation of the `#1' package, especially the\MessageBreak + section about errors.\MessageBreak\@ehc} +\newcommand*\subcaption@OutsideFloat[1]{% + \subcaption@Error{\string#1 outside float}} \newcommand*\subcaption@CheckCompatibility{% - \caption@ifcompatibility{% - \subcaption@Error - {This package does not work with\MessageBreak - caption option `compatibility=v1'}% - \endinput}{}% \@ifpackageloaded{subfigure}{% \subcaption@Error {This package can't be used in cooperation\MessageBreak @@ -63,33 +67,30 @@ \caption@AtBeginDocument{% \subcaption@CheckCompatibility \let\subcaption@CheckCompatibility\@undefined} -\def\subcaption{% - \caption@iftype - {\setcaptionsubtype*\caption}% - {\subcaption@Error{\noexpand\subcaption outside float}% - \caption@gobble}}% -\g@addto@macro\caption@subtypehook{% - \let\subcaption\caption} -\newcommand*\phantomsubcaption{% +\providecommand\setcaptionsubtype{% \caption@iftype - {\setcaptionsubtype*\phantomcaption}% - {\subcaption@Error{\noexpand\phantomsubcaption outside float}}}% -\g@addto@macro\caption@subtypehook{% - \let\phantomsubcaption\phantomcaption} -\ForEachCaptionSubType{% - \newenvironment{#1}% - {\@ifnextchar[%] - \subcaption@iminipage - {\subcaption@iminipage[c]}}% - {\subcaption@endminipage - \endminipage}} + {\@ifstar{\captionsetup{subtype*}}{\captionsetup{subtype}}}% + {\subcaption@OutsideFloat\setcaptionsubtype}} +\newenvironment{subcaptiongroup} + {\caption@iftype + {\setcaptionsubtype\relax}% + {\subcaption@OutsideFloat{subcaptiongroup}}} + {} +\newenvironment{subcaptiongroup*} + {\caption@iftype + {\setcaptionsubtype*}% + {\subcaption@OutsideFloat{subcaptiongroup*}}} + {} +\newcommand*\subcaption@minipage{% + \@testopt\subcaption@iminipage b} \def\subcaption@iminipage[#1]{% - \caption@withoptargs{\subcaption@iiminipage{#1}}} + \def\subcaption@tempa{\subcaption@iiminipage{#1}}% + \caption@withoptargs\subcaption@tempa} \newcommand*\subcaption@iiminipage[3]{% - \let\subcaption@endminipage\@empty + \let\subcaption@endminipage@hook\@empty \if#1B% \minipage[b]#2{#3}% - \def\subcaption@endminipage{\vspace{0pt}}% + \def\subcaption@endminipage@hook{\vspace{0pt}}% \else\if#1T% \minipage[t]#2{#3}% \vspace{0pt}% @@ -98,9 +99,84 @@ \fi\fi \@subfloatboxreset \setcaptionsubtype\relax} +\newcommand*\subcaption@endminipage{% + \subcaption@endminipage@hook + \endminipage} \providecommand*\@subfloatboxreset{} -\newcommand*\subcaptionbox{% - \caption@withoptargs{\caption@ibox\setcaptionsubtype}} +\newenvironment{subcaptionblock}{\subcaption@minipage}{\subcaption@endminipage} +\newcommand*\subcaption@newminipage[1]{% + \newenvironment{#1}{\subcaption@minipage@{#1}}{\subcaption@endminipage}} +\newcommand*\subcaption@minipage@[1]{% + \caption@iftype + {\edef\caption@tempa{#1}% + \edef\caption@tempb{sub\@captype}% + \ifx\caption@tempa\caption@tempb \else + \subcaption@Warning{% + `\caption@tempa' is treated as `\caption@tempb'\MessageBreak}% + \fi}% + {\subcaption@OutsideFloat{#1}}% + \subcaption@minipage} +\@ifundefined{ForEachCaptionSubType} % caption3 v1.13 + {\caption@For{subtypelist}{\subcaption@newminipage{sub#1}}} + {\ForEachCaptionSubType{\subcaption@newminipage{#1}}} +\@ifundefined{caption@ibox}{% + \newcommand*\subcaptionbox{% caption v3.1 + \def\subcaption@tempa{\caption@ibox\setcaptionsubtype\relax}% + \caption@withoptargs\subcaption@tempa} + \newcommand\caption@ibox[3]{% + \kernel@ifnextchar[%] + {\caption@iibox{#1}{#2}{#3}}% + {\caption@iibox@{#1}{#2}{#3}}} + \long\def\caption@iibox#1#2#3[#4]{% + \@testopt{\caption@iiibox{#1}{#2}{#3}[{#4}]}\captionbox@innerpos@default} + \long\def\caption@iibox@#1#2#3#4{% + \setbox\@tempboxa\hbox{#4}% + \caption@iiibox{#1}{#2}{#3}% + [\wd\@tempboxa]% + [\captionbox@innerpos@default]% + {\unhbox\@tempboxa}} + \long\def\caption@iiibox#1{% + \caption@iiiibox{#1}\vbox\vtop} + \long\def\caption@iiiibox#1#2#3#4#5[#6][#7]#8{% + \@ifundefined{caption@hj@#7}% + {\subcaption@Error{Undefined justification `#7'}\@gobble}% + {\@firstofone}% + {\begingroup + #1*% set \caption@position so \caption@iftop expands correctly + \caption@iftop{% + \endgroup + \parbox[t]{#6}{% + #1\relax + \caption@setposition t% + #2{\caption#4{#5}}% + \captionbox@hrule + \csname caption@hj@#7\endcsname + #8}% + }{% + \endgroup + \parbox[b]{#6}{% + #1\relax + \caption@setposition b% + \csname caption@hj@#7\endcsname + #8% + \captionbox@hrule + #3{\caption#4{#5}}}% + }}} + \newcommand*\captionbox@innerpos@default{c} + \newcommand*\captionbox@hrule{\hrule\@height\z@\relax} + \providecommand*\caption@hj@c{\centering} + \providecommand*\caption@hj@l{\raggedright} + \providecommand*\caption@hj@r{\raggedleft} + \providecommand*\caption@hj@s{} +}{\@ifundefined{caption@iiibox}{% + \newcommand*\subcaptionbox{% caption v3.2 + \def\captionbox@type{subtype}% + \let\captionbox@settype\setcaptionsubtype + \caption@withoptargs\caption@box} +}{% + \newcommand*\subcaptionbox{% caption >= v3.3 + \caption@withoptargs{\caption@ibox\setcaptionsubtype}} +}} \g@addto@macro\caption@subtypehook{% \ifx\label\subcaption@label \else \let\subcaption@ORI@label\label @@ -110,17 +186,22 @@ \caption@withoptargs\subcaption@@label} \newcommand*\subcaption@@label[2]{% \@bsphack\begingroup + \let\@bsphack\relax + \let\@esphack\relax \subcaption@ORI@label#1{#2}% - \let\SK@\@gobbletwo + \subcaption@prepare@label \protected@edef\@currentlabel{\csname thesub\@captype\endcsname}% - \subcaption@ORI@label#1{sub@#2}% + \subcaption@ORI@label{sub@#2}% \endgroup\@esphack} +\newcommand*\subcaption@prepare@label{% + \let\SK@\@gobbletwo + \def\SL@showlabels##1{\@nameuse{SL@orig##1}}} \DeclareRobustCommand*\subref{% \@ifstar {\caption@withoptargs\subcaption@ref*}% {\caption@withoptargs\@subref}} \newcommand*\@subref[2]{% - \caption@ifundefined\hyperref + \@ifundefined{hyperref}% {\subcaption@ref{#1}{#2}}% {\hyperref[{#2}]{\subcaption@ref{*#1}{#2}}}} \newcommand*\subcaption@ref[2]{% @@ -131,31 +212,65 @@ \newcommand*\p@subref{} \DeclareCaptionOption{subrefformat}{\subcaption@setrefformat{#1}} \newcommand*\subcaption@setrefformat[1]{% - \@ifundefined{caption@labelformat@#1}% - {\subcaption@Error{Undefined label format `#1'}}% + \@ifundefined{caption@labelformat@#1}% caption3 v2.x + {\@ifundefined{caption@lfmt@#1}% caption3 v1.x + {\subcaption@Error{Undefined label format `#1'}}% + {\expandafter\let\expandafter\subcaption@reffmt\csname caption@lfmt@#1\endcsname}}% {\expandafter\let\expandafter\subcaption@reffmt\csname caption@labelformat@#1\endcsname}} \subcaption@setrefformat{simple} \DeclareCaptionLabelFormat{subsimple}{#2} \DeclareCaptionLabelFormat{subparens}{(#2)} -\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}% -\caption@ExecuteOptions{subcaption}{% - font+=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0} +\let\caption@setkeys@ORI\caption@setkeys +\@ifundefined{caption@SetupOptions} % caption3 v1.3 + {\renewcommand\caption@setkeys[2]{\captionsetup[sub]{#2}}} + {\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}} +\@ifundefined{caption@smaller} % caption3 v1.7-169 + {\caption@ExecuteOptions{subcaption}{% + font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}} + {\caption@ExecuteOptions{subcaption}{% + font+=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0}} \caption@ProcessOptions*{subcaption} -\ForEachCaptionType{\DeclareCaptionSubType{#1}} -\caption@AtBeginDocument{\providecommand*\subfloat{% - \@ifnextchar[%] - \subcaption@subfloat - \subcaption@subfloat@}} +\let\caption@setkeys\caption@setkeys@ORI +\let\caption@setkeys@ORI\@undefined +\@ifundefined{ForEachCaptionType} % caption3 v1.13 + {\@ifundefined{caption@ForEachType} % caption3 v1.4a + {\@ifundefined{c@figure}{}{\DeclareCaptionSubType{figure}}% + \@ifundefined{c@table}{}{\DeclareCaptionSubType{table}}% + \caption@For{typelist}{\DeclareCaptionSubType{#1}}} + {\caption@ForEachType{\DeclareCaptionSubType{#1}}}} + {\ForEachCaptionType{\DeclareCaptionSubType{#1}}} +\newcommand*\subcaption@newabbreviation[3]{% + \newcommand*{#1}{% + \caption@iftype + {\setcaptionsubtype*#2}% + {\subcaption@OutsideFloat#1#3}}% + \g@addto@macro\caption@subtypehook{\let#1#2}}% needed for caption < 3.6 +\@onlypreamble\subcaption@newabbreviation +\@ifundefined{caption@gobble}{% + \DeclareRobustCommand*\caption@gobble{% caption3 < v1.4 + \caption@withoptargs\@gobbletwo}% +}{} +\@ifclassloaded{memoir}{\let\subcaption\undefined}{} +\subcaption@newabbreviation\subcaption\caption\caption@gobble +\subcaption@newabbreviation\phantomsubcaption\phantomcaption\relax +\subcaption@newabbreviation\subcaptionlistentry\captionlistentry\caption@gobble +\subcaption@newabbreviation\subcaptiontext\captiontext\caption@gobble +\@ifclassloaded{memoir}{\let\subfloat\undefined\let\endsubfloat\undefined}{} +\caption@AtBeginDocument{% + \providecommand*\subfloat{% + \kernel@ifnextchar[%] + \subcaption@subfloat + \subcaption@subfloat@}} \long\def\subcaption@subfloat[#1]{% - \@ifnextchar[%] + \kernel@ifnextchar[%] {\subcaption@@subfloat{#1}}% {\subcaption@@@subfloat\subcaptionbox{#1}}} \long\def\subcaption@@subfloat#1[#2]{% \subcaption@@@subfloat{\subcaptionbox[{#1}]}{#2}} \long\def\subcaption@@@subfloat#1#2#3{% - \caption@getlabel{#3}% + \subcaption@getlabel{#3}% #1{#2\caption@thelabel}{\let\label\caption@gobble#3}% - \global\let\caption@thelabel\relax + \subcaption@clrlabel \ignorespaces} \def\subcaption@subfloat@#1{% \setbox\@tempboxa\hbox{#1}% @@ -167,6 +282,22 @@ [\wd\@tempboxa][\captionbox@innerpos@default]% {\unhbox\@tempboxa}% \ignorespaces} +\@ifundefined{caption@getlabel}{% + \newcommand\subcaption@getlabel[1]{% caption3 < v1.7 + \subcaption@Error{\noexpand\subfloat needs at least caption v3.4}% + \let\caption@thelabel\relax} +}{\@ifundefined{caption@@@@getlabel}{% + \newcommand\subcaption@getlabel[1]{% caption3 >= v1.7 + \caption@getlabel#1\label{}\@nil} +}{% + \newcommand*\subcaption@getlabel{% caption3 >= v2.0 + \caption@getlabel} +}} +\@ifundefined{caption@clrlabel}{% + \newcommand*\subcaption@clrlabel{\let\caption@thelabel\relax} % caption3 < v2.3 +}{% + \newcommand*\subcaption@clrlabel{\caption@clrlabel} % caption3 >= v2.3 +} \endinput %% %% End of file `subcaption.sty'. -- cgit v1.2.3