summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/caption/caption.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 06:32:18 +0000
committerNorbert Preining <norbert@preining.info>2019-09-02 06:32:18 +0000
commitb1f0911e7afee09bb21000ac59dab2a0efc2c1e5 (patch)
tree4d476b8abbc5b5b2d78d49885644b01306a1bd9a /macros/latex/contrib/caption/caption.dtx
parentf14a361bc56a46f4453b22584ae25043e1e83397 (diff)
CTAN sync 201909020632
Diffstat (limited to 'macros/latex/contrib/caption/caption.dtx')
-rw-r--r--macros/latex/contrib/caption/caption.dtx64
1 files changed, 34 insertions, 30 deletions
diff --git a/macros/latex/contrib/caption/caption.dtx b/macros/latex/contrib/caption/caption.dtx
index 5b838318d9..89abe25309 100644
--- a/macros/latex/contrib/caption/caption.dtx
+++ b/macros/latex/contrib/caption/caption.dtx
@@ -2,7 +2,7 @@
%
% This is file `caption.dtx'.
%
-% Copyright (C) 1994-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -25,7 +25,7 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
-% \CheckSum{3702}
+% \CheckSum{3694}
%
% \iffalse
%<*driver>
@@ -220,13 +220,13 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2019/08/29 v3.3b Customizing captions (AR)]
+\ProvidesPackage{caption}[2019/09/01 v3.3d Customizing captions (AR)]
% \end{macrocode}
%
% \subsection{Loading the kernel}
%
% \begin{macrocode}
-\RequirePackage{caption3}[2018/09/12] % needs v1.8c or newer
+\RequirePackage{caption3}[2019/09/01] % needs v1.8d or newer
% \end{macrocode}
%
% \subsection{Check against incompatible document classes}
@@ -1914,6 +1914,7 @@
% \changes{v3.2a}{2011/08/16}{\cs{captionsetup} replaces with \cs{captionbox@settype} and \cs{caption@setposition}}
% \changes{v3.3}{2012/04/09}{Adapted to revised version of \cs{caption@withoptargs}}
% \changes{v3.3}{2017/03/19}{When used with fixed witdh the content will not be hboxed anymore}
+% \changes{v3.3c}{2019/09/01}{Adapted so it could be used by \cs{subfloat} offered by \package{subcaption}}
% A |\parbox| with contents and caption, separated by an invisible |\hrule|.
% \begin{macrocode}
\newcommand*\captionbox{%
@@ -1927,35 +1928,39 @@
% \end{macrocode}
% \begin{macrocode}
\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}
% \end{macrocode}
% \begin{macrocode}
\long\def\caption@iibox@#1#2#3#4{%
\setbox\@tempboxa\hbox{#4}%
- \caption@iiibox{#1}{#2}{#3}{\wd\@tempboxa}[\captionbox@hj@default]{\unhbox\@tempboxa}}
+ \caption@iiibox{#1}{#2}{#3}[\wd\@tempboxa][\captionbox@hj@default]{\unhbox\@tempboxa}}
% \end{macrocode}
% \begin{macrocode}
-\long\def\caption@iiibox#1#2#3#4[#5]#6{%
+\long\def\caption@iiibox#1{%
+ \caption@iiiibox{#1}\vbox\vtop}
+% \end{macrocode}
+% \begin{macrocode}
+\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}}}%
}}
% \end{macrocode}
% \begin{macrocode}
@@ -2642,25 +2647,23 @@
%
% \begin{macro}{\figure}
% \changes{v3.1f}{2007/12/17}{This re-definition for \class{beamer} document class added}
-% \begin{macro}{\table}
-% \changes{v3.1f}{2007/12/17}{This re-definition for \class{beamer} document class added}
-% We redefine |figure| \& |table| so our type-specific options will be used etc.
+% \changes{v3.3d}{2019/09/01}{This re-definition for \class{beamer} document class revised}
+% We redefine |figure| so our type-specific options will be used etc.
% \begin{macrocode}
- \expandafter\let\expandafter\caption@ORI@figure
- \csname\string\figure\endcsname
- \@namedef{\string\figure}[#1]{%
- \caption@ORI@figure[#1]%
- \caption@settype{figure}}
+ \let\caption@ORI@figure\figure
+ \def\figure{\caption@settype{figure}\caption@ORI@figure}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\table}
+% \changes{v3.1f}{2007/12/17}{This re-definition for \class{beamer} document class added}
+% \changes{v3.3d}{2019/09/01}{This re-definition for \class{beamer} document class revised}
+% We redefine |table| so our type-specific options will be used etc.
% \begin{macrocode}
- \expandafter\let\expandafter\caption@ORI@table
- \csname\string\table\endcsname
- \@namedef{\string\table}[#1]{%
- \caption@ORI@table[#1]%
- \caption@settype{table}}
+ \let\caption@ORI@table\figure
+ \def\table{\caption@settype{table}\caption@ORI@table}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macrocode}
}{}
@@ -4309,6 +4312,7 @@
%
% \begin{macro}{\ivparpic}
+% \changes{v3.3}{2018/12/26}{Bugfix: Missing curly braces added}
% We need to set our \package{hyperref} anchor here.
% Not bullet-proof since we have to redefine |\noindent| here!
% \begin{macrocode}
@@ -4319,7 +4323,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}%
% \end{macrocode}
% \end{macro}