summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-07-28 20:40:52 +0000
committerKarl Berry <karl@freefriends.org>2023-07-28 20:40:52 +0000
commitdf3f95283d73be1771c5845189ff909264dcbbc1 (patch)
treeb2100d6576a0cc997d1da3bc93e9287b7bd7715c /Master/texmf-dist/tex/latex/caption
parent1b338d91912c64276dedc954b5d70994112d8bc1 (diff)
caption (28jul23)
git-svn-id: svn://tug.org/texlive/trunk@67752 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption')
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty34
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty44
-rw-r--r--Master/texmf-dist/tex/latex/caption/subcaption.sty13
3 files changed, 54 insertions, 37 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 656d39a32db..09cc1b6bf98 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -46,12 +46,13 @@
\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}[2023/03/12 v3.6j Customizing captions (AR)]
-\RequirePackage{caption3}[2022/04/06] % needs v2.4 or newer
-\caption@ifbool{documentclass}{}{%
- \caption@WarningNoLine{%
- Unknown document class (or package),\MessageBreak
- standard defaults will be used}}
+\ProvidesPackage{caption}[2023/07/28 v3.6m Customizing captions (AR)]
+\RequirePackage{caption3}[2023/07/28] % needs v2.4c or newer
+\caption@ifdocumentclass{unknown}%
+ {\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
@@ -629,6 +630,12 @@
\caption@ifdefined\NR@gettitle
{\NR@gettitle{#1}}%
{\def\@currentlabelname{#1}}}
+\newcommand*\subcaptionsetup{%
+ \caption@teststar\@subcaptionsetup*{}}
+\newcommand*\@subcaptionsetup[1]{%
+ \@testopt{\captionsetup@sub{#1}}{}}
+\def\captionsetup@sub#1[#2]#3{%
+ \captionsetup#1[sub#2]{#3}}
\newcommand*\caption@subtypehook{%
\ifx\caption\caption@subcaption \else
\caption@warmup
@@ -675,9 +682,7 @@
\newcommand*\caption@addsubcontentsline[4]{%
\caption@Debug{\string\caption@addsubcontentsline{#1}{#2}}%
\begingroup
- \let\label\caption@gobble
- \let\index\caption@gobble
- \let\glossary\caption@gobble
+ \caption@prepareslc
\protected@edef\@tempa{\endgroup
\noexpand\g@addto@macro\noexpand\caption@subcontentslines{%
\noexpand\@namedef{the#2}{\csname the#2\endcsname}%
@@ -1291,12 +1296,11 @@
\caption@@make{#1}{#2}}%
\nobreak\hspace{12pt}}%
}{}
-\caption@ifdefined\scr@caption{%
- \long\def\caption@IfKomaPackageLoaded#1[#2]#3#4{%
- \caption@InfoNoLine{KOMA-Script #1 package detected}
- #3}}{%
- \let\caption@IfKomaPackageLoaded\caption@IfPackageLoaded
- }
+\caption@ifdocumentclass{koma}%
+ {\long\def\caption@IfKomaPackageLoaded#1[#2]#3#4{%
+ \caption@InfoNoLine{KOMA-Script #1 package detected}%
+ #3}}%
+ {\let\caption@IfKomaPackageLoaded\caption@IfPackageLoaded}
\caption@IfKomaPackageLoaded{scrextend}[2002/07/01 v3.0]{%
\let\caption@addmargin@env\@addmargin
\renewcommand*\@addmargin{%
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index 1957aa5167c..f02d4dca24b 100644
--- a/Master/texmf-dist/tex/latex/caption/caption3.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption3.sty
@@ -45,7 +45,7 @@
\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}[2023/03/12 v2.4 caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2023/07/28 v2.4c caption3 kernel (AR)]
\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{}
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
@@ -591,7 +591,7 @@
\newcommand*\caption@pageref[1]{%
\expandafter\ifx\csname caption@r@#1\endcsname\relax
\G@refundefinedtrue % => 'There are undefined references.'
- \@latex@warning{Reference `caption@#1' on page \thepage \space undefined}%
+ \@latex@warning{Reference `caption #1' on page \thepage \space undefined}%
\else
\expandafter\let\expandafter\caption@thepage\csname caption@r@#1\endcsname
\fi}
@@ -1122,7 +1122,6 @@
\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}%
@@ -1150,6 +1149,7 @@
\caption@InfoNoLine{thesis document class detected}%
\def\caption@documentclass{thesis}%
}{%
+ \def\caption@documentclass{standard}%
\ifx\@makecaption\@undefined
\caption@InfoNoLine{Document class w/o caption stuff detected}%
\else
@@ -1166,14 +1166,22 @@
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
+ \def\caption@documentclass{unknown}%
\fi
\fi
\fi
\fi
- \let\caption@documentclass\@empty % don't load adaption code later on
}}}}}}}%
}{}
+\newcommand*\caption@ifdocumentclass[1]{%
+ \begingroup
+ \edef\caption@tempa{\caption@documentclass}%
+ \edef\caption@tempb{#1}%
+ \ifx\caption@tempa\caption@tempb
+ \endgroup\expandafter\@firstoftwo
+ \else
+ \endgroup\expandafter\@secondoftwo
+ \fi}
\newcommand*\AtCaptionPackage{%
\g@addto@macro\caption@documentclass@code}
\@onlypreamble\AtCaptionPackage
@@ -1586,7 +1594,11 @@
\g@addto@macro\caption@prepareslc}
\providecommand*\caption@prepareslc{}
\AtCaptionSingleLineCheck{%
+ \let\caption@protect\protect
+ \caption@ifdefined\GTS@DisablePredefinedCmds\GTS@DisablePredefinedCmds\relax
\let\label\caption@gobble
+ \let\index\caption@gobble
+ \let\glossary\caption@gobble
\let\hypertarget\@gobbletwo
\let\footnote\caption@footnote
\let\footnotemark\caption@footnotemark
@@ -1605,6 +1617,8 @@
\let\acused\@gobble
\let\AC@placelabel\@gobble
\let\glsunset\@gobble
+ \caption@ifdefined\GTS@DisableHook\GTS@DisableHook\relax
+ \let\protect\caption@protect
}
\newcommand*\caption@footnote{%
\kernel@ifnextchar[%]
@@ -1859,16 +1873,16 @@
\renewcommand*\@memresetsubcounter[1]{%
\caption@ifdefined@subtype{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
+\caption@ifdocumentclass{unknown}{}{%
+ \caption@ifdocumentclass{standard}{}{%
+ \@pushfilename
+ \edef\@currname{caption-\caption@documentclass}
+ \edef\@currext{sto}
+ \InputIfFileExists
+ {\@currname.\@currext}%
+ {}%
+ {\@missingfileerror\@currname\@currext}%
+ \@popfilename}}
\captionsetup{style=default,position=default,listformat=default}
\ProcessOptions*
\endinput
diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty
index b55af9c980f..d19dbadfd86 100644
--- a/Master/texmf-dist/tex/latex/caption/subcaption.sty
+++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty
@@ -39,7 +39,7 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
\DeclareCurrentRelease{v1}{2007/12/06}
-\ProvidesPackage{subcaption}[2023/02/19 v1.6 Sub-captions (AR)]
+\ProvidesPackage{subcaption}[2023/07/28 v1.6b Sub-captions (AR)]
\RequirePackage{caption}[2010/01/09] % we need at least v3.1m
\newcommand*\subcaption@Info{%
\PackageInfo{subcaption}}
@@ -53,8 +53,6 @@
section about errors.\MessageBreak\@ehc}
\newcommand*\subcaption@OutsideFloat[1]{%
\subcaption@Error{\string#1 outside float}}
-\newcommand*\subcaptionsetup[1][]{%
- \@ifstar{\captionsetup*[{sub#1}]}{\captionsetup[{sub#1}]}}
\providecommand\setcaptionsubtype{%
\caption@iftype
{\@ifstar{\captionsetup{subtype*}}{\captionsetup{subtype}}}%
@@ -206,16 +204,17 @@
\newcommand*\subcaption@setrefformat[1]{%
\@ifundefined{caption@labelformat@#1}% caption3 v2.x
{\@ifundefined{caption@lfmt@#1}% caption3 v1.x
- {\subcaption@Error{Undefined label format `#1'}}%
+ {\@ifundefined{caption@subreffmt@#1}{\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}}
+ {\expandafter\let\expandafter\subcaption@reffmt\csname caption@labelformat@#1\endcsname}%
+ \@ifundefined{caption@subreffmt@#1}{}{\caption@setsubrefformat{#1}}} % subfig v1.3
\subcaption@setrefformat{simple}
\DeclareCaptionLabelFormat{subsimple}{#2}
\DeclareCaptionLabelFormat{subparens}{(#2)}
\let\caption@setkeys@ORI\caption@setkeys
\@ifundefined{caption@SetupOptions} % caption3 v1.3
- {\renewcommand\caption@setkeys[2]{\subcaptionsetup{#2}}}
- {\caption@SetupOptions{subcaption}{\subcaptionsetup{#2}}}
+ {\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}}