diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/bicaption.sty | 22 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption-koma.sto | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption-memoir.sto | 22 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption.sty | 91 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption2.sty | 40 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption3.sty | 139 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/subcaption.sty | 51 |
7 files changed, 209 insertions, 160 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty index 4c2b2b3bab7..4be2e5578bc 100644 --- a/Master/texmf-dist/tex/latex/caption/bicaption.sty +++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty @@ -38,7 +38,7 @@ %% caption-deu.tex, caption-eng.tex, caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{bicaption}[2020/08/23 v1.2a Bilingual Captions (AR)] +\ProvidesPackage{bicaption}[2020/10/25 v1.3 Bilingual Captions (AR)] \RequirePackage{caption}[2020/08/23] % needs v3.5 or newer \newcommand*\bicaption@Info[1]{% \PackageInfo{bicaption}{#1}} @@ -82,6 +82,16 @@ \caption@set@bool\bicaption@ifslc{#1}} \DeclareCaptionOption{bi-swap}[1]{% \caption@set@bool\bicaption@ifswap{#1}} +\DeclareCaptionOption{bi-separator}[1]{% + \caption@set{biseparator}{#1}} +\newcommand\DeclareBiCaptionSeparator[2]{% + \caption@decl{biseparator}{#1}{#2}} +\@onlypreamble\DeclareBiCaptionSeparator +\DeclareBiCaptionSeparator{none}{} +\DeclareBiCaptionSeparator{smallskip}{\smallskip} +\DeclareBiCaptionSeparator{medskip}{\medskip} +\DeclareBiCaptionSeparator{bigskip}{\bigskip} +\SetCaptionDefault{biseparator}{none} \DeclareCaptionOption{lang}{% \caption@ifundefined\bicaption@language \bicaption@language@setupkeys @@ -118,7 +128,7 @@ \bicaption@selectlanguage\@firstoftwo} \providecommand*\selectcaptionlanguage[1]{% #1\select@language\selectlanguage} -\caption@ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0} +\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} @@ -184,27 +194,31 @@ \caption@setoptions{bi}% \ifnum\bicaption@lang=0\relax \bicaption@ifslc - {\caption@slc{#2}{#3}{}{\KV@caption@singlelinecheck0}% - \caption@slc{#2}{#1}{}{\KV@caption@singlelinecheck0}}% + {\caption@slc{#2}{#3}{}{\caption@setsinglelinecheck0}% + \caption@slc{#2}{#1}{}{\caption@setsinglelinecheck0}}% {}% \fi \ifnum\bicaption@lang=2\relax \caption@thelabel \global\let\caption@thelabel\relax + \let\bicaption@tempa\relax \else \begingroup \caption@setoptions{bi-first}% \caption@@make@{#2}{#3}% \endgroup + \def\bicaption@tempa{\bicaption@separator\caption@biseparator}% \fi \ifnum\bicaption@lang=1\relax \else + \bicaption@tempa \begingroup \caption@setoptions{bi-second}% \caption@@make@{#2}{#1}% \endgroup \fi } +\newcommand*\bicaption@separator{\par} \newcommand\bicaption{\@bicaption\caption} \newcommand\bicaptionbox{\@bicaption\captionbox} \newcommand\bisubcaption{\@bicaption\subcaption} diff --git a/Master/texmf-dist/tex/latex/caption/caption-koma.sto b/Master/texmf-dist/tex/latex/caption/caption-koma.sto index 3a89f0355df..38b3c5ef297 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-koma.sto +++ b/Master/texmf-dist/tex/latex/caption/caption-koma.sto @@ -38,7 +38,7 @@ %% caption-deu.tex, caption-eng.tex, caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption-koma.sto}[2020/09/12 v2.0a Adaption of the caption package to the KOMA-Script document classes (AR)] +\ProvidesFile{caption-koma.sto}[2020/09/21 v2.0b Adaption of the caption package to the KOMA-Script document classes (AR)] \expandafter\let\expandafter\caption@koma@setcapwidth \csname\string\setcapwidth\endcsname \@namedef{\string\setcapwidth}[#1]#2{% @@ -133,7 +133,7 @@ \fi\fi #3\par \fi} -\SetCaptionDefault{labelformat}{autodot} +\SetCaptionFallback{labelformat}{autodot} \DeclareCaptionLabelSeparator{default}{\captionformat} \DeclareCaptionFont{scr@font}{\scr@fnt@caption} \DeclareCaptionFont{scr@labelfont}{\scr@fnt@captionlabel} diff --git a/Master/texmf-dist/tex/latex/caption/caption-memoir.sto b/Master/texmf-dist/tex/latex/caption/caption-memoir.sto index 3d0d9184a2f..d74cdddae99 100644 --- a/Master/texmf-dist/tex/latex/caption/caption-memoir.sto +++ b/Master/texmf-dist/tex/latex/caption/caption-memoir.sto @@ -38,9 +38,29 @@ %% caption-deu.tex, caption-eng.tex, caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesFile{caption-memoir.sto}[2020/07/31 v2.0 Adaption of the caption package to the memoir document class (AR)] +\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{% \let\pagenote\caption@gobble} +\DeclareCaptionLabelSeparator{@contdelim}{\@contdelim} +\SetCaptionDefault{labelseparator}{@contdelim} +\let\caption@memoir@delim\captiondelim +\renewcommand\captiondelim{% + \captionsetup{labelsep=@contdelim}% + \caption@memoir@delim} +\DeclareCaptionLabelSeparator{gobble}{} +\DeclareCaptionFont{@contnfont}{\@contnfont} +\SetCaptionDefault{labelfont}{@contnfont} +\DeclareCaptionFont{@conttfont}{\@conttfont} +\SetCaptionDefault{textfont}{@conttfont} +\let\caption@memoir@namefont\captionnamefont +\renewcommand\captionnamefont{% + \captionsetup{labelfont=@contnfont}% + \caption@memoir@namefont} +\let\caption@memoir@titlefont\captiontitlefont +\renewcommand\captiontitlefont{% + \captionsetup{textfont=@conttfont}% + \caption@memoir@titlefont} +\AtCaptionPackage{\setlength\belowcaptionskip{0pt}} \endinput %% %% End of file `caption-memoir.sto'. diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index 8cfb55e3e1b..ea101edc13e 100644 --- a/Master/texmf-dist/tex/latex/caption/caption.sty +++ b/Master/texmf-dist/tex/latex/caption/caption.sty @@ -38,8 +38,8 @@ %% caption-deu.tex, caption-eng.tex, caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2020/09/12 v3.5b Customizing captions (AR)] -\RequirePackage{caption3}[2020/09/12] % needs v2.1 or newer +\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 @@ -76,16 +76,29 @@ }}} \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} +\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}{% @@ -208,7 +221,7 @@ \par \caption@beginex{#1}{#2}{#3}% \caption@setfloatcapt{% - \caption@boxrestore + \caption@parboxrestore \if@minipage \@setminipage \fi @@ -288,23 +301,23 @@ \DeclareCaptionOptionNoValue{subtype*}{\setcaptionsubtype*}% } \def\setcaptiontype{% - \caption@boxrestore@mini + \caption@parboxrestore@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}}}% + \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@@settype{}} -\newcommand*\caption@@settype[1]{% - \caption@teststar{\caption@@@settype{#1}}\@firstoftwo\@secondoftwo} + \caption@teststar\caption@@settype\@firstoftwo\@secondoftwo} +\newcommand*\caption@@settype{% + \caption@@@settype{}} \newcommand*\caption@@@settype[3]{% \caption@Debug{#1type=#3}% \@nameuse{caption@check#1type}{#3}% @@ -446,7 +459,6 @@ \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'}% @@ -478,8 +490,6 @@ \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}}% @@ -496,6 +506,7 @@ \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 }{}% }% @@ -504,8 +515,8 @@ \newcommand*\caption@@refcounter[1]{% \let\caption@stepcounter@ORI\stepcounter \def\stepcounter##1{% - \def\caption@tempa{#1}% - \def\caption@tempb{##1}% + \edef\caption@tempa{#1}% + \edef\caption@tempb{##1}% \ifx\caption@tempa\caption@tempb \else \caption@stepcounter@ORI{##1}% \fi}% @@ -545,23 +556,6 @@ {\expandafter\let\csname caption@fnum@#1\expandafter\endcsname\csname fnum@#1\endcsname \@namedef{fnum@#1}{\caption@fnum{#1}}}% {}} -\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@normal\@unused} \let\caption@setfloatcapt\@firstofone @@ -620,7 +614,8 @@ \caption@AtBeginDocument{% \caption@ifundefined\@subfloatrowtrue {\newif\if@subfloatrow - \caption@ifundefined\subfloatrow{}% + \caption@ifundefined\subfloatrow + {}% {\caption@Debug{Patching subfloatrow environment}% \g@addto@macro\capsubrowsettings{\@subfloatrowtrue}% \g@addto@macro\killfloatstyle{% @@ -888,7 +883,7 @@ \newcommand*\caption@floatflt[1]{% \caption@settype{#1}% \caption@clearmargin - \caption@setfullparboxrestore + \caption@setparboxrestore{full}% \caption@setoptions{floating#1}}% }{} \caption@IfPackageLoaded{fltpage}[1998/10/29 v.0.3]{% @@ -1166,7 +1161,7 @@ \caption@setautoposition b% \caption@settype{#1}% \caption@clearmargin - \caption@setfullparboxrestore}% + \caption@setparboxrestore{full}}% \newcommand\caption@wincaption[1]{% \ifdim\picwd=\z@ \let\caption@makecurrent\@gobbletwo @@ -1203,7 +1198,7 @@ \caption@freezeHref % will be defrosted in \ivparpic \caption@settype\@piccaptype \caption@clearmargin - \caption@setfullparboxrestore + \caption@setparboxrestore{full}% \caption@setoptions{parpic}% \caption@setautoposition b% \expandafter\expandafter\expandafter\caption@ORI @@ -1300,7 +1295,7 @@ \caption@setoptions{supertabular}% \caption@setposition{\if@topcaption t\else b\fi}% \caption@beginex{#1}{#2}{#3}% - \caption@boxrestore + \caption@parboxrestore \caption@normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \caption@end}% @@ -1320,7 +1315,7 @@ \caption@set{position}{\if@topcaption t\else b\fi}% \@initisotab \caption@beginex{#1}{#2}{#3}% - \caption@boxrestore + \caption@parboxrestore \caption@normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \caption@end diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty index 09ff40ad551..3cd97c1ee5e 100644 --- a/Master/texmf-dist/tex/latex/caption/caption2.sty +++ b/Master/texmf-dist/tex/latex/caption/caption2.sty @@ -38,7 +38,7 @@ %% caption-deu.tex, caption-eng.tex, caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption2}[2020/01/02 v2.2e Customising captions (AR)] +\ProvidesPackage{caption2}[2020/09/28 v2.2f Customising captions (AR)] \PackageWarning{caption2}{% ****************************************************\MessageBreak THIS PACKAGE IS OBSOLETE:\MessageBreak @@ -48,16 +48,18 @@ NOT be used for NEW documents! New documents should\MessageBreak use the regular `caption' package v3.x instead.\MessageBreak ****************************************************\@gobbletwo}% -\RequirePackage{caption3}[2019/12/31] % should be used with v1.8f or newer +\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 +\newcommand*\captiontwo@Error[2][]{% + \PackageError{caption2}{#2}{#1\caption@@eh{caption2}}} \@ifpackageloaded{caption}{% - \PackageError{caption2}{% + \captiontwo@Error{% You can't use both, the (current) caption *and*\MessageBreak - the (obsolete) caption2 package}\caption@eh + the (obsolete) caption2 package}% \endinput }{} \newcommand*\captionlabeldelim{} @@ -94,13 +96,13 @@ \expandafter\ifx\csname caption@@#1\endcsname\relax \expandafter\defcaptionstyle \else - \PackageError{caption2}{Caption style `#1' already defined}{\caption@eh}% + \captiontwo@Error{Caption style `#1' already defined}% \expandafter\@gobbletwo \fi {#1}} \newcommand*\renewcaptionstyle[1]{% \expandafter\ifx\csname caption@@#1\endcsname\relax - \PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}% + \captiontwo@Error{Caption style `#1' undefined}% \expandafter\@gobbletwo \else \expandafter\defcaptionstyle @@ -110,17 +112,17 @@ \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}% + \captiontwo@Error + [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]% + {You can't use the caption style `#1' directy}% \else #2\usecaptionstyle\caption@style \fi}} \newcommand*\captionstyle[1]{% \expandafter\ifx\csname caption@@#1\endcsname\relax - \PackageError{caption2}{Undefined caption style `#1'}{\caption@eh}% + \captiontwo@Error{Undefined caption style `#1'}% \else \def\caption@style{#1}% \fi} @@ -255,14 +257,14 @@ \fi\next} \newcommand*\usecaptionstyle[1]{% \caption@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} + \captiontwo@Error + [The usage of \protect#1 is only + allowed inside code declared with\MessageBreak \protect\defcaptionstyle, + \protect\newcaptionstyle \space or \protect\renewcaptionstyle.\space]% + {You can't use \protect#1 in normal text}% }{% \@ifundefined{caption@@#1}% - {\PackageError{caption2}{Caption style `#1' undefined}{\caption@eh}}% + {\captiontwo@Error{Caption style `#1' undefined}}% {\let\caption@make\caption@makecaption \@nameuse{caption@@#1}}% }} @@ -440,7 +442,7 @@ \newcommand*\subcaplabeldelim{} \newcommand*\subcapstyle[1]{% \expandafter\ifx\csname caption@@#1\endcsname\relax - \PackageError{caption2}{Undefined caption style `#1'}{\caption@eh}% + \captiontwo@Error{Undefined caption style `#1'}% \else \def\caption@substyle{#1}% \fi} diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index 278723d83dc..adb7324f1a1 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -38,21 +38,24 @@ %% caption-deu.tex, caption-eng.tex, caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2020/09/17 v2.1b caption3 kernel (AR)] +\ProvidesPackage{caption3}[2020/10/21 v2.2e 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{% - \protected@edef\caption@tempa{#1}% - \ifx\caption@tempa\@empty \else - #1#2% - \fi} -\def\bothIfSecond#1#2{% - \protected@edef\caption@tempa{#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 - #1#2% + #2% \fi} +\providecommand*\caption@prepare@bothif{} +\g@addto@macro\caption@prepare@bothif{% + \let\inputencoding\@gobble} \newcommand*\caption@ifundefined[1]{% \ifdefined#1% \ifx#1\relax @@ -183,10 +186,10 @@ \newcommand*\caption@wh{% See the caption package documentation for explanation.} \newcommand*\caption@Error[1]{% - \PackageError{caption}{#1}\caption@eh} -\newcommand*\caption@eh{% + \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 `caption' package, especially the\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] @@ -435,9 +438,10 @@ \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[1]{% +\newcommand*\caption@ifdefault{\caption@ifequal{default}} +\newcommand*\caption@ifequal[2]{% \edef\caption@tempa{#1}% - \def\caption@tempb{default}% + \edef\caption@tempb{#2}% \ifx\caption@tempa\caption@tempb \expandafter\@firstoftwo \else @@ -460,6 +464,14 @@ \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}}% @@ -543,7 +555,7 @@ \newcommand*\caption@thecounter{0} \newcommand*\caption@stepthecounter{% \@tempcnta\caption@thecounter - \advance\@tempcnta\@ne + \advance\@tempcnta\@ne\relax \xdef\caption@thecounter{\the\@tempcnta}} \newcommand*\caption@newlabel{\@newl@bel{caption@r}} \newcommand*\caption@thepage{\the\c@page} @@ -654,8 +666,8 @@ \colorbox{\caption@boxcolor}{% \setlength\caption@tempdima{#1}% \addtolength\caption@tempdima{-2\fboxsep}% - \linewidth\caption@tempdima - \hsize\caption@tempdima + \linewidth\caption@tempdima\relax + \hsize\caption@tempdima\relax #2}} \DeclareCaptionOption{boxcolor}{\def\caption@boxcolor{#1}} \DeclareCaptionOption{boxsep}{\setlength\fboxsep{#1}} @@ -685,8 +697,8 @@ The option `labelsep=\caption@labelsep@name' does not work\MessageBreak with `format=hang'}}% {\@hangfrom{#1#2}% - \advance\caption@parindent\hangindent - \advance\caption@hangindent\hangindent + \advance\caption@parindent\hangindent\relax + \advance\caption@hangindent\hangindent\relax \caption@@par#3\par}} \SetCaptionDefault{format}{plain} \newcommand*\DeclareCaptionLabelFormat[2]{% @@ -702,8 +714,9 @@ \DeclareCaptionLabelFormat{original}{% \caption@ifdefined\caption@original@fnum {\caption@original@fnum}% - {\caption@labelformat@simple{#1}{#2}}} + {\caption@labelformat@fallback{#1}{#2}}} \SetCaptionDefault{labelformat}{original} +\SetCaptionFallback{labelformat}{simple} \newcommand\DeclareCaptionLabelSeparator{% \@ifstar \DeclareCaptionLabelSeparator@ @@ -742,6 +755,8 @@ \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]{% @@ -854,6 +869,10 @@ \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 @@ -1160,7 +1179,10 @@ \providecommand*\caption@ifbabel@french{true} \caption@IfBabelFrench{% \providecommand\caption@french@labelseparator{\CaptionSeparator}% - \DeclareCaptionLabelSeparator{colon}{\autospace@beforeFDP : }% + \ifFB@active@punct + \DeclareCaptionLabelSeparator{colon}{% + \ifFBfrench\penalty\@M\FBcolonspace\fi : }% + \fi \ifFBOldFigTabCaptions \caption@ifdefined\extrasfrench{% \addto\extrasfrench{% @@ -1257,18 +1279,6 @@ \RequirePackage{#1}\relax} \caption@AtBeginDocument{% \let\caption@@loadpackage\caption@@requirepackage} -\caption@AtBeginDocument{% - \def\@tempa{2008/08/02 v0.3b floatrow: float package extension}% - \expandafter\ifx\csname ver@floatrow.sty\endcsname\@tempa - \caption@InfoNoLine{floatrow package v0.3b is loaded}% - \renewcommand\captionlabel[1]{{% l.559 - \def\FR@tmp{\@captype}% - \ifnum\floatbox@depth>\@ne - \def\FR@tmp{sub\@captype}\caption@setsubtype*{\FR@tmp}\stepcounter{\FR@tmp}% - \fi - \caption@format % <= This line added - \caption@@@make{\caption@fnum\FR@tmp}{#1}}} - \fi} \newcommand*\caption@newfloat[2]{% \IfCaptionOptionCheck {\caption@requirepackage{newfloat}{#1}}% @@ -1318,6 +1328,7 @@ \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 @@ -1348,7 +1359,7 @@ \let\sf@oldlabel=\label \let\label=\subfloat@label \ifmaincaptiontop\else - \advance\@nameuse{c@\@captype}\@ne + \advance\@nameuse{c@\@captype}\@ne\relax \fi \refstepcounter{sub\@captype}% \setcounter{sub\@captype @save}{\value{sub\@captype}}% @@ -1422,12 +1433,12 @@ \caption@calcmargin \caption@tempdima\captionmargin \ifdim\captionmargin@=\z@ \else - \caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@}% + \caption@ifoddpage{}{\advance\caption@tempdima\captionmargin@\relax}% \fi - \caption@ifhmode{\advance\caption@tempdima\caption@indent}% + \caption@ifhmode{\advance\caption@tempdima\caption@indent\relax}% \hspace\caption@tempdima \caption@tempdima\captionwidth - \caption@ifhmode{\advance\caption@tempdima-\caption@indent}% + \caption@ifhmode{\advance\caption@tempdima-\caption@indent\relax}% \caption@parbox\caption@tempdima{% \caption@ifhmode{% \ifdim\caption@indent=\z@ @@ -1438,7 +1449,7 @@ \caption@@@make{#1}{#2}}% \caption@tempdima\captionmargin \ifdim\captionmargin@=\z@ \else - \caption@ifoddpage{\advance\caption@tempdima\captionmargin@}{}% + \caption@ifoddpage{\advance\caption@tempdima\captionmargin@\relax}{}% \fi \hspace\caption@tempdima }% @@ -1458,14 +1469,14 @@ \fi \fi \ifdim\captionwidth=\z@ - \captionwidth\hsize - \advance\captionwidth by -2\captionmargin - \advance\captionwidth by -\captionmargin@ + \captionwidth\hsize\relax + \advance\captionwidth by -2\captionmargin\relax + \advance\captionwidth by -\captionmargin@\relax \else - \captionmargin\hsize - \advance\captionmargin by -\captionwidth - \divide\captionmargin by 2 - \captionmargin@\z@ + \captionmargin\hsize\relax + \advance\captionmargin by -\captionwidth\relax + \divide\captionmargin by 2\relax + \captionmargin@\z@\relax \fi \caption@Debug{% \string\hsize=\the\hsize, @@ -1537,9 +1548,23 @@ \newcommand*\caption@applyfont{% \caption@justification\captionfont\captionsize} \newcommand\caption@@@make[2]{% - \sbox\@tempboxa{#1}% + \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@ - \caption@set{labelseparator}{none}% + \gdef\caption@tempa{none}% + \fi + \ifx\caption@tempa\@undefined \else + \@expandtwoargs\caption@set{labelseparator}{\caption@tempa}% \fi \caption@ifempty{#2}{% \caption@set{labelseparator}{none}% @@ -1552,7 +1577,7 @@ {\ifcaption@star\else \begingroup \captionlabelfont - #1% + #1\relax\relax \endgroup \fi}% {\ifcaption@star\else @@ -1647,7 +1672,7 @@ {\caption@@@declaresubtype{#1}{#2}{#3}{sub#3}}} \@onlypreamble\caption@@declaresubtype \newcommand*\caption@@@declaresubtype[4]{% - \caption@ifin@list\caption@subtypelist{#4}% + \caption@ifsubtype{#4}% {\caption@Debug{Modify subtype `#4'}}% {\caption@Debug{New subtype `#4'}% \newcounter{#4}[{#3}]% @@ -1723,17 +1748,11 @@ \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{} +\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} diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty index 1ccc6590fee..5e69f382328 100644 --- a/Master/texmf-dist/tex/latex/caption/subcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty @@ -38,50 +38,42 @@ %% caption-deu.tex, caption-eng.tex, caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{subcaption}[2020/08/23 v1.3g Sub-captions (AR)] -\RequirePackage{caption}[2020/08/23] % needs v3.5 or newer +\ProvidesPackage{subcaption}[2020/10/07 v1.3j Sub-captions (AR)] +\RequirePackage{caption}[2020/09/28] % needs v3.5c or newer +\newcommand*\subcaption@Error[1]{% + \PackageError{subcaption}{#1}{\caption@@eh{subcaption}}} \newcommand*\subcaption@CheckCompatibility{% \caption@ifcompatibility{% - \PackageError{subcaption}% + \subcaption@Error {This package does not work with\MessageBreak caption option `compatibility=v1'}% - {\subcaption@eh}% \endinput}{}% \@ifpackageloaded{subfigure}{% - \PackageError{subcaption}% + \subcaption@Error {This package can't be used in cooperation\MessageBreak with the subfigure package}% - {\subcaption@eh}% \endinput}{}% \@ifpackageloaded{subfig}{% - \PackageError{subcaption}% + \subcaption@Error {This package can't be used in cooperation\MessageBreak with the subfig package}% - {\subcaption@eh}% \endinput}{}% } -\newcommand*\subcaption@eh{% - If you do not understand this error, please take a closer look\MessageBreak - at the documentation of the `subcaption' package, especially the\MessageBreak - section about errors.\MessageBreak\@ehc} \subcaption@CheckCompatibility \caption@AtBeginDocument{% \subcaption@CheckCompatibility \let\subcaption@CheckCompatibility\@undefined} -\ForEachCaptionType{\DeclareCaptionSubType{#1}} -\caption@ifundefined\newsubfloat{}{% - \renewcommand*\newsubfloat{\DeclareCaptionSubType}} \def\subcaption{% \caption@iftype {\setcaptionsubtype*\caption}% - {\caption@Error{\noexpand\subcaption outside float}% + {\subcaption@Error{\noexpand\subcaption outside float}% \caption@gobble}}% \g@addto@macro\caption@subtypehook{% \let\subcaption\caption} \newcommand*\phantomsubcaption{% \caption@iftype {\setcaptionsubtype*\phantomcaption}% - {\caption@Error{\noexpand\phantomsubcaption outside float}}}% + {\subcaption@Error{\noexpand\phantomsubcaption outside float}}}% \g@addto@macro\caption@subtypehook{% \let\phantomsubcaption\phantomcaption} \ForEachCaptionSubType{% @@ -140,25 +132,32 @@ \DeclareCaptionOption{subrefformat}{\subcaption@setrefformat{#1}} \newcommand*\subcaption@setrefformat[1]{% \@ifundefined{caption@labelformat@#1}% - {\caption@Error{Undefined label format `#1'}}% + {\subcaption@Error{Undefined label format `#1'}}% {\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} \caption@ProcessOptions*{subcaption} -\def\subfloat{% - \@ifnextchar[\@subfloat\subfloat@} -\long\def\@subfloat[#1]{% - \@ifnextchar[{\@@subfloat{#1}}{\@@@subfloat\subcaptionbox{#1}}} -\long\def\@@subfloat#1[#2]{% - \@@@subfloat{\subcaptionbox[{#1}]}{#2}} -\long\def\@@@subfloat#1#2#3{% +\ForEachCaptionType{\DeclareCaptionSubType{#1}} +\caption@AtBeginDocument{\providecommand*\subfloat{% + \@ifnextchar[%] + \subcaption@subfloat + \subcaption@subfloat@}} +\long\def\subcaption@subfloat[#1]{% + \@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}% #1{#2\caption@thelabel}{\let\label\caption@gobble#3}% \global\let\caption@thelabel\relax \ignorespaces} -\def\subfloat@#1{% +\def\subcaption@subfloat@#1{% \setbox\@tempboxa\hbox{#1}% \caption@iiiibox \setcaptionsubtype |