summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-08-01 20:06:37 +0000
committerKarl Berry <karl@freefriends.org>2023-08-01 20:06:37 +0000
commitaa4205eda62d389efe98e62be726166b9e574637 (patch)
treef5af8e829d06d5cd387fc6b815a216af1db4e896 /Master/texmf-dist/tex/latex/caption
parent4f1cabae3381cd17b21ca6e7c89156edd09e23d5 (diff)
caption (1aug23)
git-svn-id: svn://tug.org/texlive/trunk@67788 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption')
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption.sty6
-rw-r--r--Master/texmf-dist/tex/latex/caption/caption3.sty40
2 files changed, 19 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index 09cc1b6bf98..d1b54cae5e0 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -46,8 +46,8 @@
\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/07/28 v3.6m Customizing captions (AR)]
-\RequirePackage{caption3}[2023/07/28] % needs v2.4c or newer
+\ProvidesPackage{caption}[2023/07/31 v3.6n Customizing captions (AR)]
+\RequirePackage{caption3}[2023/07/31] % needs v2.4d or newer
\caption@ifdocumentclass{unknown}%
{\caption@WarningNoLine{%
Unknown document class (or package),\MessageBreak
@@ -602,7 +602,7 @@
{\caption@ydblarg{#1}}%
{\caption@xdblarg{#1}}}
\newcommand\caption@xdblarg[2]{%
- #1[{#2\relax}]{#2}}
+ \caption@iftokens{#2}{#1[{#2}]{#2}}{#1[\relax]{}}}
\long\def\caption@ydblarg#1[#2]#3{%
\caption@iflistheading{#1[{#3}]{#3}}{#1[{#2}]{#3}}}
\newcommand*\caption@begin[1]{%
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty
index f02d4dca24b..aa618a68df9 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/07/28 v2.4c caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2023/07/31 v2.4d caption3 kernel (AR)]
\@ifundefined{kernel@ifnextchar}{\let\kernel@ifnextchar\@ifnextchar}{}
\providecommand*\@nameundef[1]{%
\expandafter\let\csname #1\endcsname\@undefined}
@@ -167,6 +167,12 @@
\expandafter\caption@tempb\expandafter{\caption@tempa}}
\DeclareRobustCommand*\caption@gobble{%
\caption@withoptargs\@gobbletwo}
+\newcommand\caption@iftokens[1]{%
+ \if\relax\detokenize{#1}\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
\let\caption@begindocumenthook\@empty
\let\caption@@begindocumenthook\@empty
\def\caption@AtBeginDocument{%
@@ -540,18 +546,12 @@
#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}
+ \caption@iftokens{#1#2}%
+ {\caption@@@@@setmargin{left}{#1}%
+ \caption@@@@@setmargin{right}{#2}}%
+ {\caption@Error{Missing number}}}
\newcommand*\caption@@@@@setmargin[2]{%
- \def\caption@tempa{#2}%
- \ifx\caption@tempa\@empty \else
- \caption@setlength{#1margin}{#2}%
- \fi}
+ \caption@iftokens{#2}{\caption@setlength{#1margin}{#2}}{}}
\newcommand*\caption@setwidth{%
\caption@resetcalcmargin
\caption@@setwidth}
@@ -788,12 +788,7 @@
\caption@get@label#1\caption@makeanchor{}\@nil
\caption@thelabel\caption@clrlabel}
\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}
+ \caption@iftokens{#2}{\caption@getlabel{#2}}{\caption@getlabel{#1}}}
\DeclareCaptionTextFormat{simple}{#1}
\DeclareCaptionTextFormat{period}{#1.}
\SetCaptionDefault{textformat}{simple}
@@ -1818,12 +1813,9 @@
\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}
+ \caption@iftokens{#1}%
+ {\caption@@@@declaresublistentry{#3}@{3.8em}{3.2em}\caption@nil}%
+ {\caption@@@@declaresublistentry{#3}#2\caption@nil}}
\@onlypreamble\caption@@@declaresublistentry
\def\caption@@@@declaresublistentry#1#2#3#4#5\caption@nil{%
\expandafter\caption@@@@@declaresublistentry\expandafter