diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-04-07 13:23:56 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-04-07 13:23:56 +0000 |
commit | f3293da79b2d98143874b2594dac2dbafa167d1c (patch) | |
tree | 6815bade64d06cf7c97c28304e756fc25bf38035 /Master/texmf-dist/tex/latex/caption | |
parent | 41fdc70e57b74afa2a63e751e435055e5dfe7c58 (diff) |
The caption package v3.1h
git-svn-id: svn://tug.org/texlive/trunk@7346 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption.sty | 92 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption3.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/ltcaption.sty | 11 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/subcaption.sty | 28 |
4 files changed, 78 insertions, 55 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index 3836fa359dc..3c68e16ad11 100644 --- a/Master/texmf-dist/tex/latex/caption/caption.sty +++ b/Master/texmf-dist/tex/latex/caption/caption.sty @@ -28,10 +28,10 @@ %% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2008/03/20 v3.1g Customizing captions (AR)] +\ProvidesPackage{caption}[2008/04/01 v3.1h Customizing captions (AR)] \newcommand*\caption@Info[1]{\PackageInfo{caption}{#1\@gobble}} \@onlypreamble\caption@Info -\RequirePackage{caption3}[2008/03/01] % needs v3.1g +\RequirePackage{caption3}[2008/03/20] % needs v3.1g or newer \@ifpackageloaded{caption2}{% \caption@Error{% You can't use both, the (obsolete) caption2 *and*\MessageBreak @@ -39,28 +39,17 @@ \endinput }{} \caption@AtBeginDocument{% - \@ifpackageloaded{ftcap}{% - \caption@IncompatiblePackage{ftcap}{}% - }{}% - \@ifpackageloaded{nonfloat}{% - \caption@IncompatiblePackage{nonfloat}{.\MessageBreak - Furthermore you should use \noexpand\captionof instead of\MessageBreak - \noexpand\figcaption or \string\tabcaption}% - }{}% - \@ifpackageloaded{topcapt}{% - \caption@IncompatiblePackage{topcapt}{}% - }{}% -} -\newcommand*\caption@IncompatiblePackage[2]{% - \PackageWarningNoLine{caption}{% - Usage of the #1 package together with the\MessageBreak - caption package is strongly not recommended.\MessageBreak - Instead of loading the #1 package you should\MessageBreak - use the caption package option\MessageBreak - \space\space`tableposition=top'#2}% - \caption@Info{Setting position=b for compatibility reasons}% - \caption@setposition b} -\@onlypreamble\caption@IncompatiblePackage + \@ifpackageloaded{ftcap}{\caption@DisablePositionOption{ftcap}}{}% + \@ifpackageloaded{nonfloat}{\caption@DisablePositionOption{nonfloat}}{}% + \@ifpackageloaded{topcapt}{\caption@DisablePositionOption{topcapt}}{}} +\newcommand*\caption@DisablePositionOption[1]{% + \caption@Info{% + `#1' package detected; setting `position=b' for compatibility reasons}% + \caption@setposition b% + \DeclareCaptionOption{position}{% + \caption@Error{Usage of the `position' option is incompatible\MessageBreak + to the `#1' package}}} +\@onlypreamble\caption@DisablePositionOption \caption@ifbool{documentclass}{}{% \PackageWarningNoLine{caption}{% Unsupported document class (or package) detected,\MessageBreak @@ -76,15 +65,6 @@ \g@addto@macro\@tablecaptionabovetrue{\captionsetup*[table]{position=t}} \g@addto@macro\@tablecaptionabovefalse{\captionsetup*[table]{position=b}} \if@tablecaptionabove - \caption@AtBeginDocument{% - \def\caption@tempa#1{% - \@ifpackageloaded{#1}{\caption@Error{% - You can't use the global option\MessageBreak - \space\space`tablecaptionabove'\MessageBreak - and use the #1 package, too}}{}}% - \caption@tempa{ftcap}% - \caption@tempa{nonfloat}% - \caption@tempa{topcapt}}% \@tablecaptionabovetrue \else \@tablecaptionabovefalse @@ -155,15 +135,6 @@ \captionsetup*[figure]{position=#1}} \@onlypreamble@key{caption}{figureposition} \DeclareCaptionOption{tableposition}{% - \caption@AtBeginDocument{% - \def\caption@tempa##1{% - \@ifpackageloaded{##1}{\caption@Error{% - You can't use the caption package option\MessageBreak - \space\space`tableposition=#1'\MessageBreak - and use the ##1 package, too}}{}}% - \caption@tempa{ftcap}% - \caption@tempa{nonfloat}% - \caption@tempa{topcapt}}% \captionsetup*[table]{position=#1}} \@onlypreamble@key{caption}{tableposition} \DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}} @@ -1387,8 +1358,14 @@ \fi}} }{} \caption@IfPackageLoaded{supertabular}[2002/07/19 v4.1e]{% - \let\caption@ORI@tablecaption\tablecaption - \def\tablecaption{\caption@star\relax\caption@ORI@tablecaption}% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \def\@currentlabelname{#2}% + \caption@ORI@xtablecaption[#1]{#2}}% \long\def\ST@caption#1[#2]#3{\par% \caption@settype*{#1}% \caption@setoptions{supertabular}% @@ -1399,9 +1376,30 @@ \caption@normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \caption@end}% -}{% - \let\caption@setSTposition\@undefined -} +}{} +\caption@IfPackageLoaded{xtab}[2000/04/09 v2.3]{% + \renewcommand*\tablecaption{% + \caption@star + {\refstepcounter{table}}% + {\caption@dblarg{\@xtablecaption}}}% + \let\caption@ORI@xtablecaption\@xtablecaption + \long\def\@xtablecaption[#1]#2{% + \def\@currentlabelname{#2}% + \caption@ORI@xtablecaption[#1]{#2}}% + \long\def\ST@caption#1[#2]#3{\par% + \caption@settype*{#1}% + \caption@setoptions{xtabular}% + \def\caption@fixposition{% + \caption@setposition{\if@topcaption t\else b\fi}}% + \@initisotab + \caption@beginex{#1}{#2}{#3}% + \caption@boxrestore + \caption@normalsize + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \caption@end + \global\advance\ST@pageleft -\PWSTcapht + \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}}% +}{} \caption@IfPackageLoaded{threeparttable}[2003/06/13 v3.0]{% \let\caption@ORI@threeparttable\threeparttable \renewcommand*\threeparttable{% diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index c6a6a36cd42..1b468ec5d50 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -28,7 +28,7 @@ %% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2008/03/20 v3.1g caption3 kernel (AR)] +\ProvidesPackage{caption3}[2008/03/20 v3.1h caption3 kernel (AR)] \providecommand*\@nameundef[1]{% \expandafter\let\csname #1\endcsname\@undefined} \providecommand\l@addto@macro[2]{% diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty index 046cc927990..073a52f626e 100644 --- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty @@ -28,14 +28,14 @@ %% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{ltcaption}[2008/03/21 v1.1a longtable captions (AR)] +\ProvidesPackage{ltcaption}[2008/03/28 v1.2 longtable captions (AR)] \providecommand*\LTcaptype{table} \providecommand*\ext@table{lot} \@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{% \@ifpackageloaded{listings}{% - \providecommand*\ext@lstlisting{lol}% - }{}} + \providecommand*\ext@lstlisting{lol}}{}} \@ifpackageloaded{caption}{}{% + \newskip\LTcapskip \LTcapskip=\abovecaptionskip \newskip\LTcapleft \LTcapleft=\fill \newskip\LTcapright \LTcapright=\fill \newif\ifLTcapmargins \LTcapmarginstrue @@ -55,8 +55,7 @@ \def\hyper@makecurrent{% \caption@LTtype\caption@LT@makecurrent}% \def\lst@@caption{\relax}% - \ltcaption@ORI@LT@array}% -} + \ltcaption@ORI@LT@array}} \newcommand*\caption@LTtype[2]{% \edef\caption@LT@tempa{#2}% \ifx\caption@LT@tempa\caption@LT@table @@ -83,7 +82,7 @@ \else \hbox to\hsize{\hfil\box\@tempboxa\hfil}% \fi - \endgraf\vskip\baselineskip}} + \endgraf\vskip\LTcapskip}} \newcommand\LT@@makecaption[1]{% \caption@LT@make{\hb@xt@\hsize{% \ifLTcapmargins diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty index 5944c6d8759..c5af2ecf25e 100644 --- a/Master/texmf-dist/tex/latex/caption/subcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/subcaption.sty @@ -28,7 +28,7 @@ %% user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{subcaption}[2007/12/06 v0.3 Adding subcaptions (AR)] +\ProvidesPackage{subcaption}[2008/03/16 v1.0 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}{% @@ -86,6 +86,32 @@ \providecommand*\caption@hj@r{\raggedleft} \providecommand*\caption@hj@s{} \newcommand*\subcaptionbox@hj@default{c} +\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{\hrule\@height\z@}{}% + \csname caption@hj@#3\endcsname + \unhbox\@tempboxa + \caption@iftop{}{\hrule\@height\z@}}}% \g@addto@macro\caption@subtypehook{% \ifx\label\subcaption@label \else \let\subcaption@ORI@label\label |