From 743d65ddc6fa01add37aa1136fba86d3adddb577 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 1 Sep 2019 21:35:52 +0000
Subject: caption (1sep19)

git-svn-id: svn://tug.org/texlive/trunk@52008 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/caption/caption.sty | 44 +++++++++++--------------
 1 file changed, 20 insertions(+), 24 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/caption/caption.sty')

diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty
index e667b34e08c..fe21decf4e4 100644
--- a/Master/texmf-dist/tex/latex/caption/caption.sty
+++ b/Master/texmf-dist/tex/latex/caption/caption.sty
@@ -37,8 +37,8 @@
 %%   caption-deu.tex, caption-eng.tex, and caption-rus.tex.
 %% 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2019/08/29 v3.3b Customizing captions (AR)]
-\RequirePackage{caption3}[2018/09/12] % needs v1.8c or newer
+\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
@@ -886,31 +886,33 @@
     {\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}
+  \@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#2#3#4[#5]#6{%
+  \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]{#4}{%
+    \parbox[t]{#6}{%
       #1\relax
       \caption@setposition t%
-      \vbox{\caption#2{#3}}%
+      #2{\caption#4{#5}}%
       \captionbox@hrule
-      \csname caption@hj@#5\endcsname
-      #6}%
+      \csname caption@hj@#7\endcsname
+      #8}%
   }{%
     \endgroup
-    \parbox[b]{#4}{%
+    \parbox[b]{#6}{%
       #1\relax
       \caption@setposition b%
-      \csname caption@hj@#5\endcsname
-      #6%
+      \csname caption@hj@#7\endcsname
+      #8%
       \captionbox@hrule
-      \vtop{\caption#2{#3}}}%
+      #3{\caption#4{#5}}}%
   }}
 \newcommand*\captionbox@hj@default{c}
 \newcommand*\captionbox@hrule{\hrule\@height\z@\relax}
@@ -1163,16 +1165,10 @@
 \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}}
+  \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}}
@@ -1700,7 +1696,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
-- 
cgit v1.2.3

