diff options
author | Karl Berry <karl@freefriends.org> | 2011-08-12 00:23:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-08-12 00:23:55 +0000 |
commit | 5351150bc318eded08bb95323545f9279454652d (patch) | |
tree | 9b7d4f49e73c61aba13f984f8f1d3507d6d74988 /Master/texmf-dist/tex/latex/caption/subcaption.sty | |
parent | fe1d1302556e0520cfc543b149bb0b27b06cb2de (diff) |
caption (11aug11)
git-svn-id: svn://tug.org/texlive/trunk@23505 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/subcaption.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/subcaption.sty | 95 |
1 files changed, 21 insertions, 74 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty index a56cba74719..9469cf5863b 100644 --- a/Master/texmf-dist/tex/latex/caption/subcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty @@ -6,7 +6,7 @@ %% %% subcaption.dtx (with options: `package') %% -%% Copyright (C) 1994-2010 Axel Sommerfeldt (caption@sommerfee.de) +%% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% -------------------------------------------------------------------------- %% @@ -23,26 +23,28 @@ %% This Current Maintainer of this work is Axel Sommerfeldt. %% %% This work consists of the files caption.ins, caption.dtx, caption2.dtx, -%% ltcaption.dtx, and subcaption.dtx, the derived files caption.sty, -%% caption2.sty, caption3.sty, ltcaption.sty, and subcaption.sty, and the -%% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +%% caption3.dtx, bicaption.dtx, ltcaption.dtx, and subcaption.dtx, +%% the derived files caption.sty, caption2.sty, caption3.sty, bicaption.sty, +%% ltcaption.sty, and subcaption.sty, and the user manuals caption-deu.tex, +%% caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{subcaption}[2008/08/31 v1.0b Adding subcaptions (AR)] -\@ifundefined{caption@subtypehook}{% we need caption v3.1f or newer - \PackageError{subcaption}{`caption' package not loaded\MessageBreak - (which is needed by this package)\@gobble}{% - If you do not understand this error, please take a closer look\MessageBreak - at the documentation of the `subcaption' package.\MessageBreak - \@ehc}% - \endinput}{} -\let\caption@setkeys@ORI\caption@setkeys -\renewcommand\caption@setkeys[2]{\captionsetup[sub]{#2}} +\ProvidesPackage{subcaption}[2011/01/22 v1.0c Adding subcaptions (AR)] +\@ifundefined{subfigure}{}{% + \PackageError{subcaption}{% + This package can't be used in cooperation\MessageBreak + with the subfigure package}% + \endinput} +\@ifundefined{subfloat}{}{% + \PackageError{subcaption}{% + This package can't be used in cooperation\MessageBreak + with the subfig package}% + \endinput} +\RequirePackage{caption}[2010/12/01] % needs v3.2 or newer +\caption@SetupOptions{subcaption}{\captionsetup[sub]{#2}}% \caption@ExecuteOptions{subcaption}{% font+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0} \caption@ProcessOptions*{subcaption} -\let\caption@setkeys\caption@setkeys@ORI -\let\caption@setkeys@ORI\@undefined \@ifundefined{c@figure}{}{\DeclareCaptionSubType{figure}} \@ifundefined{c@table}{}{\DeclareCaptionSubType{table}} \caption@For{typelist}{\DeclareCaptionSubType{#1}} @@ -55,64 +57,9 @@ \newcommand*\subcaption@minipage[2]{% \minipage#1{#2}% \captionsetup{subtype}} -\newcommand*\subcaptionbox{\caption@withoptargs\subcaption@box} -\newcommand\subcaption@box[2]{% - \@testopt{\subcaption@ibox{#1}{#2}}{\wd\@tempboxa}} -\long\def\subcaption@ibox#1#2[#3]{% - \@testopt{\subcaption@iibox{#1}{#2}{#3}}\subcaptionbox@hj@default} -\long\def\subcaption@iibox#1#2#3[#4]#5{% - \setbox\@tempboxa\hbox{#5}% - \begingroup - \captionsetup{subtype*}% set \caption@position - \caption@iftop{% - \endgroup - \parbox[t]{#3}{% - \captionsetup{subtype,position=t}% - \vbox{\caption#1{#2}}% - \subcaption@hrule - \csname caption@hj@#4\endcsname - \unhbox\@tempboxa}% - }{% - \endgroup - \parbox[b]{#3}{% - \captionsetup{subtype,position=b}% - \csname caption@hj@#4\endcsname - \unhbox\@tempboxa - \subcaption@hrule - \vtop{\caption#1{#2}}}% - }} -\providecommand*\caption@hj@c{\centering} -\providecommand*\caption@hj@l{\raggedright} -\providecommand*\caption@hj@r{\raggedleft} -\providecommand*\caption@hj@s{} -\newcommand*\subcaptionbox@hj@default{c} -\newcommand*\subcaption@hrule{\hrule\@height\z@} -\newcommand*\subfloat{% - \@ifnextchar[\@subfloat\subfloat@} -\long\def\@subfloat[#1]{% - \@ifnextchar[{\@@subfloat{#1}}{\subcaptionbox{#1}}} -\long\def\@@subfloat#1[#2]{\subcaptionbox[{#1}]{#2}} -\newcommand*\subfloat@{% - \caption@teststar\subfloat@@\@firstoftwo\@secondoftwo} -\newcommand\subfloat@@[2]{% - \setbox\@tempboxa\hbox{#2}% - \begingroup - \captionsetup{subtype*}% set \caption@position - \caption@iftop{\subfloat@@@ t}{\subfloat@@@ b}% - {#1}\subcaptionbox@hj@default} -\newcommand\subfloat@@@[3]{% - \endgroup - \parbox[#1]{\wd\@tempboxa}{% - #2% \@firstoftwo in star form, \@secondoftwo otherwise - {\captionsetup{subtype*,position=#1}}% - {\captionsetup{subtype,position=#1}% - \caption@refstepcounter\@subcaptype - \caption@prepareanchor\@subcaptype{}% - \caption@makeanchor{}}% - \caption@iftop\subcaption@hrule\@empty - \csname caption@hj@#3\endcsname - \unhbox\@tempboxa - \caption@iftop\@empty\subcaption@hrule}}% +\newcommand*\subcaptionbox{% + \def\captionbox@type{subtype}% + \caption@withoptargs\caption@box} \g@addto@macro\caption@subtypehook{% \ifx\label\subcaption@label \else \let\subcaption@ORI@label\label |