summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/caption/subcaption.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/subcaption.sty')
-rw-r--r--Master/texmf-dist/tex/latex/caption/subcaption.sty39
1 files changed, 27 insertions, 12 deletions
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}%