From 4e320246605fb61cf69b3ce53fa9c4a2a9bce1d8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 28 Aug 2019 23:41:01 +0000 Subject: caption (29aug19) git-svn-id: svn://tug.org/texlive/trunk@51973 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/caption/bicaption.sty | 45 +++++-- Master/texmf-dist/tex/latex/caption/caption.sty | 54 ++++---- Master/texmf-dist/tex/latex/caption/caption2.sty | 2 +- Master/texmf-dist/tex/latex/caption/ltcaption.sty | 2 +- Master/texmf-dist/tex/latex/caption/newfloat.sty | 139 ++++++++++++++------- Master/texmf-dist/tex/latex/caption/subcaption.sty | 39 ++++-- 6 files changed, 190 insertions(+), 91 deletions(-) (limited to 'Master/texmf-dist/tex/latex/caption') diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty index 8177a7a3f93..49579629b62 100644 --- a/Master/texmf-dist/tex/latex/caption/bicaption.sty +++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty @@ -37,8 +37,8 @@ %% caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{bicaption}[2018/08/26 v1.1-159 Bilingual Captions (AR)] -\RequirePackage{caption}[2016/02/01] % needs v3.3-134 or newer +\ProvidesPackage{bicaption}[2016/03/27 v1.2 Bilingual Captions (AR)] +\RequirePackage{caption}[2018/05/11] % needs v3.4 or newer \caption@AtBeginDocument{\caption@ifcompatibility{% \caption@Error{% The `bicaption' package does not work correctly\MessageBreak @@ -77,39 +77,58 @@ \caption@set@bool\bicaption@ifswap{#1}} \DeclareCaptionOption{lang}{% \caption@ifundefined\bicaption@language - {\let\KV@bicaption@name\KV@caption@name - \def\KV@caption@name{\bicaption@KV{name}}}% - {}% + \bicaption@language@setupkeys + \relax \def\bicaption@language{#1}% - \let\bicaption@language@options\@empty} + \let\bicaption@language@setoptions\@empty} \let\KV@caption@language\KV@caption@lang +\newcommand*\bicaption@language@keylist{} +\newcommand*\DeclareCaptionLangOption[1]{% + \@ifundefined{KV@caption@#1}% + {\bicaption@Error{Undefined caption option `#1'}}% + {\@cons\bicaption@language@keylist{{#1}}}} +\let\DeclareCaptionLanguageOption\DeclareCaptionLangOption +\newcommand*\bicaption@language@setupkeys{% + \def\@elt##1{% + \expandafter\let\csname KV@bicaption@##1\expandafter\endcsname + \csname KV@caption@##1\endcsname + \@namedef{KV@caption@##1}{\bicaption@KV{##1}}}% + \bicaption@language@keylist + \let\@elt\relax} \newcommand\bicaption@KV[2]{% \@bicaption@KV{#1}{#2}% - \l@addto@macro\bicaption@language@options{\@bicaption@KV{#1}{#2}}} + \l@addto@macro\bicaption@language@setoptions{% + \@bicaption@KV{#1}{#2}}} \newcommand\@bicaption@KV[1]{% \@nameuse{KV@bicaption@#1}} +\DeclareCaptionLangOption{name} \newcommand*\bicaption@selectlanguage[1]{% \caption@ifundefined\bicaption@language{}{% - \expandafter\selectcaptionlanguage\expandafter#1\expandafter{\bicaption@language}% - \bicaption@language@options}} + \expandafter\selectcaptionlanguage\expandafter#1\expandafter + {\bicaption@language}% + \bicaption@language@setoptions}} \g@addto@macro\caption@beginhook{% \bicaption@selectlanguage\@firstoftwo} \providecommand*\selectcaptionlanguage[1]{% #1\select@language\selectlanguage} \caption@ExecuteOptions{caption}{bi-lang=0,bi-slc=1,bi-swap=0} \ifcsname captionmainlanguage\endcsname - \bicaption@InfoNoLine{main language is set to \captionmainlanguage} + \bicaption@InfoNoLine{% + main language is set to \captionmainlanguage} \else\ifcsname bbl@main@language\endcsname - \bicaption@InfoNoLine{babel found, main language is \bbl@main@language} + \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} + \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}} + \edef\@tempa{% + \noexpand\captionsetup[bi-first]{lang=\captionmainlanguage}} \@tempa \fi \caption@SetupOptions{bicaption}{\captionsetup[bi-second]{#2}}% diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index ebff7ded1b4..f2579c08c20 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-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -37,7 +37,7 @@ %% caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2018/10/06 v3.3-154 Customizing captions (AR)] +\ProvidesPackage{caption}[2019/04/01 v3.3a Customizing captions (AR)] \RequirePackage{caption3}[2018/09/12] % needs v1.8c or newer \caption@ifbool{documentclass}{}{% \caption@WarningNoLine{% @@ -244,7 +244,7 @@ \expandafter\let\expandafter\caption@KOMA@setcapwidth \csname\string\setcapwidth\endcsname \@namedef{\string\setcapwidth}[#1]#2{% - \caption@KOMA@setcapwidth[#1]{#2}\caption@setcapwidth{#1}} + \caption@KOMA@setcapwidth[{#1}]{#2}\caption@setcapwidth{#1}} \newcommand*\caption@setcapwidth[1]{% \ifx\\#1\\\else \caption@ifundefined\cap@margin{}{% @@ -261,11 +261,11 @@ \expandafter\let\expandafter\caption@KOMA@setcapmargin \csname\string\@setcapmargin\endcsname \@namedef{\string\@setcapmargin}[#1]#2{% - \caption@KOMA@setcapmargin[#1]{#2}\caption@setcapmargin} + \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} + \caption@KOMA@@setcapmargin[{#1}]{#2}\caption@setcapmargin} \newcommand*\caption@setcapmargin{% \begingroup \let\onelinecaptionsfalse\relax @@ -342,13 +342,21 @@ \caption@ifhypcap\caption@@start\relax \M@gettitle{#2}} \long\def\caption@makecaption#1#2{% - \caption@iftop - {\vskip\belowcaptionskip}% - {\caption@rule\vskip\abovecaptionskip}% + \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 - {\vskip\abovecaptionskip\caption@rule}% - {\vskip\belowcaptionskip}} + {\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}% @@ -718,7 +726,7 @@ }}% \caption@CheckCommand\@caption{% % chkfloat.sty [20??/??/?? v0.? chkfloat: check for moved floats] - \def\@caption#1[#2]#3{\chkfloat@caption{#1}[#2]{#3}% + \def\@caption#1[#2]#3{\chkfloat@caption{#1}[{#2}]{#3}% \chkfloat@addcontentsline{#1}{#2}% }}% \caption@IfCheckCommand{}{% @@ -762,7 +770,7 @@ \let\caption@ORI@capstart\@undefined}% \let\caption@ORI@xfloat\@xfloat \def\@xfloat#1[#2]{% - \caption@ORI@xfloat{#1}[#2]% + \caption@ORI@xfloat{#1}[{#2}]% \caption@settype{#1}}% } \caption@AtBeginDocument{\caption@redefine} @@ -1158,12 +1166,12 @@ \expandafter\let\expandafter\caption@ORI@figure \csname\string\figure\endcsname \@namedef{\string\figure}[#1]{% - \caption@ORI@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@ORI@table[{#1}]% \caption@settype{table}} }{} \caption@ifundefined\scr@caption{}{% @@ -1220,7 +1228,7 @@ \@ifpackageloaded{#1}\@firstofone{% \caption@Debug{#1 package is not loaded (yet)\@gobble}% \caption@AtBeginDocument}{% - \caption@If@Package@Loaded{#1}[#2]{#3}{#4}}} + \caption@If@Package@Loaded{#1}[{#2}]{#3}{#4}}} \@onlypreamble\caption@@IfPackageLoaded \long\def\caption@If@Package@Loaded#1[#2]{% \@ifpackageloaded{#1}{% @@ -1604,14 +1612,16 @@ \caption@begin\LTcaptype \caption@normalsize \vskip-\ht\strutbox - \caption@iftop{\vskip\belowcaptionskip}{\vskip\abovecaptionskip}% + \caption@ifundefined\FBifcaptop{}{% + \let\caption@belowskip\@empty}% + \caption@make@above \caption@@make{#2}{#3}\endgraf - \caption@iftop{\vskip\abovecaptionskip}{\vskip\belowcaptionskip}% + \caption@make@below \caption@end}}% \renewcommand*\LT@listentry[2]{% \begingroup \caption@LT@settype{#1}% - \caption@listentry\@firstoftwo[#1]{#2}% + \caption@listentry\@firstoftwo[{#1}]{#2}% \endgroup\ignorespaces}% \newcommand*\caption@LT@settype[1]{% \caption@settype*{#1}% @@ -1690,7 +1700,7 @@ \caption@defrostHref \let\noindent\caption@ORI@noindent \noindent}% - \caption@ORI@ivparpic(#1,#2)(#3,#4)[#5][#6]{#7}% + \caption@ORI@ivparpic(#1,#2)(#3,#4)[{#5}][{#6}]{#7}% \let\noindent\caption@ORI@noindent}% }{% \let\piccaptiontype\@undefined @@ -1714,7 +1724,7 @@ \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]% + \caption@ORI@SC@zfloat{#1}{#2}{#3}[{#4}]% \SC@RestoreCommands \caption@freezetype{#2}% \let\SC@label\label}% @@ -1764,7 +1774,7 @@ \let\caption@ORI@xtablecaption\@xtablecaption \long\def\@xtablecaption[#1]#2{% \caption@gettitle{#2}% - \caption@ORI@xtablecaption[#1]{#2}}% + \caption@ORI@xtablecaption[{#1}]{#2}}% \long\def\ST@caption#1[#2]#3{\par% \caption@settype*{#1}% \caption@setoptions{supertabular}% @@ -1784,7 +1794,7 @@ \let\caption@ORI@xtablecaption\@xtablecaption \long\def\@xtablecaption[#1]#2{% \caption@gettitle{#2}% - \caption@ORI@xtablecaption[#1]{#2}}% + \caption@ORI@xtablecaption[{#1}]{#2}}% \long\def\ST@caption#1[#2]#3{\par% \caption@settype*{#1}% \caption@setoptions{xtabular}% diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty index 18b758bf411..e8095fa6c3a 100644 --- a/Master/texmf-dist/tex/latex/caption/caption2.sty +++ b/Master/texmf-dist/tex/latex/caption/caption2.sty @@ -37,7 +37,7 @@ %% caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption2}[2015/09/15 v2.2-100 Customising captions (AR)] +\ProvidesPackage{caption2}[2015/09/15 v2.2d Customising captions (AR)] \PackageWarning{caption2}{% ****************************************************\MessageBreak THIS PACKAGE IS OBSOLETE:\MessageBreak diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty index 662eb7dfeee..29cb3172678 100644 --- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty @@ -37,7 +37,7 @@ %% caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{ltcaption}[2018/08/26 v1.4-95 longtable captions (AR)] +\ProvidesPackage{ltcaption}[2018/08/26 v1.4a longtable captions (AR)] \@ifpackageloaded{longtable}{}{% \PackageError{ltcaption}{longtable package not loaded, aborting}{RTFM}} \providecommand*\LTcaptype{table} diff --git a/Master/texmf-dist/tex/latex/caption/newfloat.sty b/Master/texmf-dist/tex/latex/caption/newfloat.sty index 8ba1c48f15c..259ad4f685c 100644 --- a/Master/texmf-dist/tex/latex/caption/newfloat.sty +++ b/Master/texmf-dist/tex/latex/caption/newfloat.sty @@ -6,7 +6,7 @@ %% %% newfloat.dtx (with options: `package') %% -%% Copyright (C) 1994-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% https://gitlab.com/axelsommerfeldt/caption %% @@ -37,7 +37,7 @@ %% caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{newfloat}[2018/03/04 v1.1a Defining new floating environments (AR)] +\ProvidesPackage{newfloat}[2019/08/28 v1.1g Defining new floating environments (AR)] \newcommand*\newfloat@Info[1]{% \PackageInfo{newfloat}{#1}} \newcommand*\newfloat@InfoNoLine[1]{% @@ -78,17 +78,18 @@ \addtocounter{float@type}{\value{float@type}}}% \newfloat@Info{float type `#2'=\@nameuse{ftype@#2}}% \newfloat@def{fnum@#2}% - {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}\@nameuse{autodot}}% + {\@nameuse{#2name}\nobreakspace\@nameuse{the#2}% + \ifdefined\autodot\expandafter\autodot\fi}% \newfloat@capitalize\newfloat@Type{#2}% \newfloat@let{#2name}{\newfloat@Type}% \newfloat@def{fleg#2}{\@nameuse{#2name}}% legend naming (memoir) \newfloat@ifundefined{flegtoc#2}{\@namedef{flegtoc#2}##1{}}% \ifcsname @tufte@float\endcsname \newenvironment{#2}[1][htbp]% - {\begin{@tufte@float}[##1]{#2}{}}% + {\begin{@tufte@float}[{##1}]{#2}{}}% {\end{@tufte@float}}% \newenvironment{#2*}[1][htbp]% - {\begin{@tufte@float}[##1]{#2}{star}}% + {\begin{@tufte@float}[{##1}]{#2}{star}}% {\end{@tufte@float}}% \else \newenvironment{#2}{\@float{#2}}{\end@float}% @@ -126,8 +127,12 @@ \noexpand\g@addto@macro\noexpand#1{\@cdr#2\@nil}}% \newfloat@tempa} \newcommand*\newfloat@listof[1]{% - \@expandtwoargs\newfloat@list@of{#1}{\@nameuse{ext@#1}}} -\newcommand*\newfloat@list@of[2]{% + \@ifstar + {\newfloat@list@of{#1}*}% + {\newfloat@list@of{#1}\relax}} +\newcommand*\newfloat@list@of[1]{% + \@expandtwoargs\newfloat@list@of@{#1}{\@nameuse{ext@#1}}} +\newcommand*\newfloat@list@of@[3]{% \begingroup \expandafter\let\expandafter\listfigurename\csname list#1name\endcsname \def\ext@figure{#2}% @@ -136,7 +141,7 @@ \let\newfloat@listoftoc\listoftoc \def\listoftoc##1{\newfloat@listoftoc{#2}}% \@nameuse{newfloat@listof#1@hook}% - \listoffigures + \listoffigures#3% \endgroup} \newcommand*\newfloat@setoptions{% \@ifstar @@ -397,24 +402,27 @@ \@expandtwoargs\setkeys{newfloat}{planb,\@ptionlist{\@currname.\@currext}}% \AtEndOfPackage{\let\@unprocessedoptions\relax} \newcommand*\newfloatsetup{\setkeys{newfloat}} -\newcommand\newfloat@replace@chapter[2]{% +\newcommand\newfloat@replace@chapter[3]{% \begingroup \let\if@twocolumn\iffalse \let\if@mainmatter\iffalse \let\if@thema\iffalse - \def\@tempa[##1]##2{#1}% + \def\@tempa[##1]##2{#2}% \ifx\@tempa\@chapter - \gdef\@chapter[##1]##2{#2}% - \global\let\newfloat@replace@chapter\@gobbletwo + \newfloat@InfoNoLine{Document class `#1' detected}% + \gdef\@chapter[##1]##2{#3}% + \global\let\newfloat@replace@chapter\newfloat@dont@replace@chapter \else\ifx\@tempa\Hy@org@chapter - \gdef\Hy@org@chapter[##1]##2{#2}% - \global\let\newfloat@replace@chapter\@gobbletwo + \newfloat@InfoNoLine{Document class `#1' detected (Hy)}% + \gdef\Hy@org@chapter[##1]##2{#3}% + \global\let\newfloat@replace@chapter\newfloat@dont@replace@chapter \fi\fi \endgroup} +\newcommand\newfloat@dont@replace@chapter[3]{} \ifcsname @chapter\endcsname \else - \let\newfloat@replace@chapter\@gobbletwo + \let\newfloat@replace@chapter\newfloat@dont@replace@chapter \fi -\newfloat@replace@chapter{% +\newfloat@replace@chapter{report}{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{chapter}% \typeout{\@chapapp\space\thechapter.}% @@ -449,7 +457,7 @@ \@makechapterhead{#2}% \@afterheading \fi} -\newfloat@replace@chapter{% +\newfloat@replace@chapter{book}{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter \refstepcounter{chapter}% @@ -492,7 +500,7 @@ \@makechapterhead{#2}% \@afterheading \fi} -\newfloat@replace@chapter{% +\newfloat@replace@chapter{amsbook}{% \refstepcounter{chapter}% \ifnum\c@secnumdepth<\z@ \let\@secnumber\@empty \else \let\@secnumber\thechapter \fi @@ -516,12 +524,12 @@ \@addchapterlistsgaps \@makechapterhead{#2}\@afterheading} \@ifpackageloaded{tocbasic}{% - \let\newfloat@replace@chapter\@gobbletwo}{} + \let\newfloat@replace@chapter\newfloat@dont@replace@chapter}{} \ifcsname insertchapterspace\endcsname \renewcommand*\insertchapterspace{\@addchapterlistsgaps} - \let\newfloat@replace@chapter\@gobbletwo + \let\newfloat@replace@chapter\newfloat@dont@replace@chapter \fi -\newfloat@replace@chapter{% +\newfloat@replace@chapter{rapport}{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{chapter}% \typeout{\@chapapp\space\thechapter.}% @@ -557,7 +565,7 @@ \@afterheading \fi} % boek(3).cls [2004/06/07 v2.1a NTG LaTeX document class] -\newfloat@replace@chapter{% +\newfloat@replace@chapter{boek}{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter \refstepcounter{chapter}% @@ -600,7 +608,7 @@ \@makechapterhead{#2}% \@afterheading \fi} -\newfloat@replace@chapter{% +\newfloat@replace@chapter{thesis}{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter \refstepcounter{chapter}% @@ -665,13 +673,55 @@ \@makechapterhead{#2}% \@afterheading \fi} -\ifx\newfloat@replace@chapter\@gobbletwo \else +\newfloat@replace@chapter{svmono}{% + \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \if@mainmatter + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{\protect + \numberline{\thechapter\thechapterend}#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}{% + \if@chapnum % war mal \ifnum \c@secnumdepth >\m@ne + \refstepcounter{chapter}% + \if@mainmatter + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{\protect + \numberline{\thechapter\thechapterend}#1}% + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \else + \addcontentsline{toc}{chapter}{#1}% + \fi + \chaptermark{#1}% + \@addchapterlistsgaps + \if@twocolumn + \@topnewpage[\@makechapterhead{#2}]% + \else + \@makechapterhead{#2}% + \@afterheading + \fi} +\ifx\newfloat@replace@chapter\newfloat@dont@replace@chapter \else \newfloat@InfoNoLine{% - Unsupported document class, or \noexpand\@chapter\MessageBreak - was already redefined by another package} + Unsupported document class, or \noexpand\@chapter\MessageBreak + was already redefined by another package} \newfloat@InfoNoLine{\string\@chapter\space=\space\meaning\@chapter} \newfloat@InfoNoLine{\string\Hy@org@chapter\space=\space\meaning\Hy@org@chapter} - \newfloat@ifplanb{% + \newfloat@ifplanb{\AtBeginDocument{% \newfloat@InfoNoLine{Trying Plan B..}% \let\newfloat@addtocontents@ORI\addtocontents \long\def\addtocontents#1#2{% @@ -692,41 +742,46 @@ \@addchapterlistsgaps \endgroup \fi - \fi}} + \fi}}} \fi -\newcommand\newfloat@ForEachNew[2][newfloat@@list]{% - \AtBeginDocument{% - \ifcsname#1\endcsname - \def\@elt##1{#2}% - \newfloat@@list - \let\@elt\relax - \fi}}% +\newcommand\newfloat@ForEachNew[2]{% + \ifcsname#1\endcsname + \ForEachFloatingEnvironment{#2}% + \else + \AtBeginDocument{% + \ifcsname#1\endcsname + \ForEachFloatingEnvironment{#2}% + \fi}% + \fi}% \@onlypreamble\newfloat@ForEachNew %% \begin{macrocode} -\newfloat@ForEachNew[float@exts]{% +\newfloat@ForEachNew{float@exts}{% \@nameuse{@ifchapterlistsgap@#1}{% if switched on \let\float@do=\relax \edef\@tempa{% \noexpand\float@exts{\the\float@exts\float@do{\@nameuse{ext@#1}}}}% \@tempa}} -\newfloat@ForEachNew[FP@floatBegin]{% +\newfloat@ForEachNew{FP@floatBegin}{% \newcounter{FP@#1C}% \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}} \providecommand*\ext@lstlisting{lol}% -\newfloat@ForEachNew[@rotfloat]{% +\newfloat@ForEachNew{@rotfloat}{% \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}% \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}} \newcommand*\newfloat@For@SC[2]{% \def#1{b}% = \sidecaptionvpos{#2}{b} (v1.6) \newenvironment{SC#2}% - {\SC@float[#1]{#2}}{\endSC@float}% + {\SC@float[{#1}]{#2}}{\endSC@float}% \newenvironment{SC#2*}% - {\SC@dblfloat[#1]{#2}}{\endSC@dblfloat}} + {\SC@dblfloat[{#1}]{#2}}{\endSC@dblfloat}} \@onlypreamble\newfloat@For@SC -\newfloat@ForEachNew[SC@float]{% +\newfloat@ForEachNew{SC@float}{% \expandafter\newfloat@For@SC\csname SC@#1@vpos\endcsname{#1}} -\newfloat@ForEachNew[wrapfloat]{% +\newfloat@ForEachNew{wrapfloat}{% \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}} +\newfloat@ForEachNew{plist@figure}{% + \expandafter\newcommand\csname plist@#1\endcsname{% + \@nameuse{#1name}\space}} \endinput %% %% End of file `newfloat.sty'. diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty index 8c4c9ec95c3..72d1c2e4768 100644 --- a/Master/texmf-dist/tex/latex/caption/subcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty @@ -37,9 +37,14 @@ %% caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{subcaption}[2018/05/01 v1.1-162 Sub-captions (AR)] -\RequirePackage{caption}[2018/05/01] % needs v3.3-147 or newer +\ProvidesPackage{subcaption}[2018/05/13 v1.2 Sub-captions (AR)] +\RequirePackage{caption}[2018/05/11] % needs v3.4 or newer \newcommand\subcaption@CheckCompatibility{% + \@ifundefined{caption@ifcompatibility}{}{% + \caption@ifcompatibility{% + \caption@Error{% + The `subcaption' package does not work correctly\MessageBreak + in compatibility mode}}{}}% \@ifpackageloaded{subfigure}{% \PackageError{subcaption}% {This package can't be used in cooperation\MessageBreak @@ -59,17 +64,13 @@ section about errors.\MessageBreak\@ehc} \subcaption@CheckCompatibility \caption@AtBeginDocument{% - \caption@ifcompatibility{% - \caption@Error{% - The `subcaption' package does not work correctly\MessageBreak - in compatibility mode}}{}% \subcaption@CheckCompatibility \let\subcaption@CheckCompatibility\@undefined \let\subcaption@EH\@undefined } \caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}% \caption@ExecuteOptions{subcaption}{% - font+=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0} + size=smaller,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0} \caption@ProcessOptions*{subcaption} \caption@ForEachType{\DeclareCaptionSubType{#1}} \caption@ifundefined\newsubfloat{}{% @@ -89,10 +90,24 @@ \let\phantomsubcaption\phantomcaption} \caption@For{subtypelist}{% \newenvironment{sub#1}% - {\caption@withoptargs\subcaption@minipage}% - {\endminipage}}% -\newcommand*\subcaption@minipage[2]{% - \minipage#1{#2}% + {\@ifnextchar[%] + \subcaption@iminipage + {\subcaption@iminipage[c]}}% + {\subcaption@endminipage + \endminipage}}% +\def\subcaption@iminipage[#1]{% + \caption@withoptargs{\subcaption@iiminipage{#1}}} +\newcommand*\subcaption@iiminipage[3]{% + \let\subcaption@endminipage\@empty + \if#1B% + \minipage[b]#2{#3}% + \def\subcaption@endminipage{\vspace{0pt}}% + \else\if#1T% + \minipage[t]#2{#3}% + \vspace{0pt}% + \else + \minipage[#1]#2{#3}% + \fi\fi \setcaptionsubtype\relax} \newcommand*\subcaptionbox{% \caption@withoptargs{\caption@ibox\setcaptionsubtype}} @@ -117,7 +132,7 @@ \newcommand*\@subref[2]{% \caption@ifundefined\hyperref {\subcaption@ref{#1}{#2}}% - {\hyperref[#2]{\subcaption@ref{*#1}{#2}}}} + {\hyperref[{#2}]{\subcaption@ref{*#1}{#2}}}} \newcommand*\subcaption@ref[2]{% \begingroup \caption@setoptions{sub}% -- cgit v1.2.3