From 9cb823777741267aa9b1dc0a77508da79eb86025 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 15 Mar 2012 22:55:09 +0000 Subject: caption 3.2 (15mar12) git-svn-id: svn://tug.org/texlive/trunk@25657 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/caption/bicaption.sty | 2 +- Master/texmf-dist/tex/latex/caption/caption.sty | 62 +++++++++------- Master/texmf-dist/tex/latex/caption/caption2.sty | 2 +- Master/texmf-dist/tex/latex/caption/caption3.sty | 86 ++++++++++++---------- Master/texmf-dist/tex/latex/caption/ltcaption.sty | 2 +- Master/texmf-dist/tex/latex/caption/newfloat.sty | 16 ++-- Master/texmf-dist/tex/latex/caption/subcaption.sty | 9 ++- 7 files changed, 100 insertions(+), 79 deletions(-) (limited to 'Master/texmf-dist/tex/latex/caption') diff --git a/Master/texmf-dist/tex/latex/caption/bicaption.sty b/Master/texmf-dist/tex/latex/caption/bicaption.sty index b1a0c37f5e0..1f3e8f7841c 100644 --- a/Master/texmf-dist/tex/latex/caption/bicaption.sty +++ b/Master/texmf-dist/tex/latex/caption/bicaption.sty @@ -6,7 +6,7 @@ %% %% bicaption.dtx (with options: `package') %% -%% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% -------------------------------------------------------------------------- %% diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index 70e6762193a..324e981af4f 100644 --- a/Master/texmf-dist/tex/latex/caption/caption.sty +++ b/Master/texmf-dist/tex/latex/caption/caption.sty @@ -6,7 +6,7 @@ %% %% caption.dtx (with options: `package') %% -%% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% -------------------------------------------------------------------------- %% @@ -29,7 +29,7 @@ %% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption}[2011/11/10 v3.2e Customizing captions (AR)] +\ProvidesPackage{caption}[2012/02/19 v3.2f Customizing captions (AR)] \RequirePackage{caption3}[2011/08/30] % needs v1.4 or newer \caption@ifbool{documentclass}{}{% \caption@WarningNoLine{% @@ -62,15 +62,19 @@ \captionsetup*[table]{position=#1}} \@onlypreamble@key{caption}{tableposition} \DeclareCaptionOption{figurename}{\caption@SetName{figure}{#1}} +\@onlypreamble@key{caption}{figurename} \DeclareCaptionOption{tablename}{\caption@SetName{table}{#1}} +\@onlypreamble@key{caption}{tablename} \DeclareCaptionOption{name}{\caption@setname\@captype{#1}} \DeclareCaptionOption{listfigurename}{\caption@SetName{listfigure}{#1}} +\@onlypreamble@key{caption}{listfigurename} \DeclareCaptionOption{listtablename}{\caption@SetName{listtable}{#1}} -\newcommand*\caption@SetName{% - \RequirePackage{newfloat}% - \newfloat@setname} -\newcommand*\caption@setname[2]{\@namedef{#1name}{#2}} -\caption@AtBeginDocument{\let\caption@SetName\caption@setname} +\@onlypreamble@key{caption}{listtablename} +\newcommand*\caption@SetName[2]{% + \caption@NewFloat{\newfloat@setname{#1}{#2}}} +\@onlypreamble\caption@SetName +\newcommand*\caption@setname[2]{% + \@namedef{#1name}{#2}} \newcommand*\caption@DeclareWithinOption[1]{% \DeclareCaptionOption{#1within}{\caption@Within{#1}{##1}}% \DeclareCaptionOptionNoValue{#1without}{\caption@Within{#1}{none}}} @@ -78,14 +82,17 @@ \caption@DeclareWithinOption{figure} \caption@DeclareWithinOption{table} \DeclareCaptionOption{within}{% - \RequirePackage{newfloat}% - \newfloatsetup{within=#1}} + \caption@NewFloat{\newfloatsetup{within=#1}}} \DeclareCaptionOptionNoValue{without}{% - \RequirePackage{newfloat}% - \newfloatsetup{without}} -\newcommand*\caption@Within{% - \RequirePackage{newfloat}% - \newfloat@setwithin} + \caption@NewFloat{\newfloatsetup{without}}} +\newcommand*\caption@Within[2]{% + \caption@NewFloat{\newfloat@setwithin{#1}{#2}}} +\newcommand*\caption@NewFloat[1]{% + \let\KV@prefix@ORI\KV@prefix + \let\@tempc@ORI\@tempc + \caption@ifpackageloaded{newfloat}{#1}{}% + \let\@tempc\@tempc@ORI + \let\KV@prefix\KV@prefix@ORI} \DeclareCaptionOption*{config}[caption]{% \InputIfFileExists{#1.cfg}% {\typeout{*** Local configuration file #1.cfg used ***}}% @@ -270,7 +277,6 @@ \long\def\caption@@caption#1[#2]#3{% \ifcaption@star \else \caption@prepareanchor{#1}{#2}% - \M@gettitle{#2}% \memcaptioninfo{#1}{\csname the#1\endcsname}{#2}{#3}% \fi \par @@ -292,7 +298,8 @@ \providecommand\memcaptioninfo[4]{} \newcommand*\caption@prepareanchor[2]{% \caption@makecurrent{#1}{#2}% - \caption@ifhypcap\caption@@start{}} + \caption@ifhypcap\caption@@start{}% + \M@gettitle{#2}} \long\def\caption@makecaption#1#2{% \caption@iftop {\vskip\belowcaptionskip}% @@ -795,9 +802,6 @@ \providecommand*\caption@hj@r{\raggedleft} \providecommand*\caption@hj@s{} \def\ContinuedFloat{% - \@ifnextchar[\@Continued@Float\@ContinuedFloat} -\def\@Continued@Float[#1]{\addtocounter{#1}\m@ne} -\def\@ContinuedFloat{% \caption@iftype {\addtocounter\@captype\m@ne \caption@ContinuedFloat\@captype}% @@ -831,7 +835,10 @@ \newcounter{ContinuedFloat} \let\theContinuedFloat\@empty \newcommand*\caption@resetContinuedFloat[1]{% - \@stpelt{ContinuedFloat}\xdef\caption@CFtype{#1}} + \@stpelt{ContinuedFloat}% + \xdef\caption@CFtype{#1}% + \def\ContinuedFloat{\caption@Error{% + \noexpand\ContinuedFloat must be placed at the top of the environment}}} \newcommand\phantomcaption{% \caption@iftype {\caption@refstepcounter\@captype}% @@ -885,7 +892,7 @@ \newcommand*\caption@normalsize{% \caption@font*{\KV@caption@fnt@normal\@unused}} \let\caption@setfloatcapt\@firstofone -\newcommand*\caption@makecurrent[2]{} +\newcommand*\caption@makecurrent[1]{\caption@gettitle} \let\caption@makeanchor\@firstofone \let\caption@start\relax \let\caption@@start\relax @@ -1057,12 +1064,9 @@ \@ifpackageloaded{#1}\@firstofone{% \caption@Debug{#1 package is not loaded (yet)\@gobble}% \caption@AtBeginDocument}{% - \caption@@ifpackageloaded{#1}[#2]{#3}{#4}}} + \caption@If@Package@Loaded{#1}[#2]{#3}{#4}}} \@onlypreamble\caption@@IfPackageLoaded -\newcommand\caption@ifpackageloaded[1]{% - \@testopt{\caption@@ifpackageloaded{#1}}{}} -\@onlypreamble\caption@ifpackageloaded -\long\def\caption@@ifpackageloaded#1[#2]{% +\long\def\caption@If@Package@Loaded#1[#2]{% \@ifpackageloaded{#1}{% \caption@InfoNoLine{#1 package is loaded}% \@ifpackagelater{#1}{#2}\@firstoftwo{% @@ -1074,7 +1078,7 @@ is available}% \@secondoftwo}% }{\@secondoftwo}} -\@onlypreamble\caption@@ifpackageloaded +\@onlypreamble\caption@If@Package@Loaded \newcommand*\caption@clearmargin{% \setcaptionmargin\z@ \let\caption@minmargin\@undefined} @@ -1149,7 +1153,7 @@ \let\caption@warmup\relax \caption@IfPackageLoaded{float}[2001/11/08 v1.3d]{% \@ifpackageloaded{floatrow}{% - \caption@ifpackageloaded{floatrow}[2007/08/24 v0.2a]{}{}% + \caption@If@Package@Loaded{floatrow}[2007/08/24 v0.2a]{}{}% }{% \let\caption@ORI@float@setevery\@float@setevery \def\@float@setevery#1{% @@ -1222,6 +1226,7 @@ \renewcommand*\FP@floatBegin[1]{% \def\FP@captype{#1}% \begin{lrbox}{\FP@floatCorpusBOX}% + \minipage\hsize % changes from LR mode to vertical mode \caption@settype*{#1}% \caption@freeze \global\let\FP@Label\@empty @@ -1231,6 +1236,7 @@ \g@addto@macro\FP@Label{\FP@label##1{##2}}}}% \ignorespaces}% \renewcommand*\FP@floatEnd{% + \endminipage \end{lrbox}% \stepcounter{FP@\FP@captype C}% \caption@label\FP@positionLabel diff --git a/Master/texmf-dist/tex/latex/caption/caption2.sty b/Master/texmf-dist/tex/latex/caption/caption2.sty index 377f1c1f548..0cf8f362070 100644 --- a/Master/texmf-dist/tex/latex/caption/caption2.sty +++ b/Master/texmf-dist/tex/latex/caption/caption2.sty @@ -6,7 +6,7 @@ %% %% caption2.dtx (with options: `package') %% -%% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% -------------------------------------------------------------------------- %% diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index 6bfa4f541a9..1187760af37 100644 --- a/Master/texmf-dist/tex/latex/caption/caption3.sty +++ b/Master/texmf-dist/tex/latex/caption/caption3.sty @@ -6,7 +6,7 @@ %% %% caption3.dtx (with options: `package') %% -%% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% -------------------------------------------------------------------------- %% @@ -29,7 +29,7 @@ %% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{caption3}[2011/11/01 v1.4a caption3 kernel (AR)] +\ProvidesPackage{caption3}[2012/01/12 v1.4b caption3 kernel (AR)] \providecommand*\@nameundef[1]{% \expandafter\let\csname #1\endcsname\@undefined} \providecommand\l@addto@macro[2]{% @@ -284,15 +284,12 @@ }}% \@esphack} \DeclareCaptionOption{options}{\caption@setoptions{#1}} -\DeclareCaptionOption{options*}{\caption@setoptions*{#1}} -\newcommand*\caption@setoptions{% - \caption@teststar\caption@set@options\@gobble\@firstofone} -\newcommand*\caption@set@options[2]{% - \caption@Debug{options=#2}% - \expandafter\let\expandafter\caption@opt\csname caption@opt@#2\endcsname +\newcommand*\caption@setoptions[1]{% + \caption@Debug{options=#1}% + \expandafter\let\expandafter\caption@opt\csname caption@opt@#1\endcsname \ifx\caption@opt\relax \else \caption@xsetup\caption@opt - #1{\caption@clearsetup{#2}}% #1 = \@firstofone -or- \@gobble + \caption@clearsetup{#1}% \fi} \newcommand*\caption@xsetup[1]{\expandafter\caption@setup\expandafter{#1}} \newcommand*\caption@addtooptlist[1]{% @@ -751,34 +748,48 @@ \caption@ragged\RaggedLeft\raggedleft} \DeclareCaptionJustification{RaggedRight}{% \caption@ragged\RaggedRight\raggedright} -\newcommand*\caption@ragged{% - \caption@Debug{We need ragged2e}% - \protected@write\@auxout{}{\string\caption@newlabel{ragged2e}{}}% - \global\let\caption@ragged\caption@@ragged - \caption@ragged} -\caption@AtBeginDocument{% - \@ifundefined{caption@r@ragged2e}{% - \newcommand*\caption@@ragged{% - \caption@Warning{% - `ragged2e' support has been changed.\MessageBreak - Rerun to get captions right}% - \global\let\caption@ragged\@secondoftwo % suppress further warnings - \caption@ragged}% - }{% - \caption@Debug{We load ragged2e}% - \IfFileExists{ragged2e.sty}{% - \RequirePackage{ragged2e}% - \let\caption@@ragged\@firstoftwo - }{% - \newcommand*\caption@@ragged[2]{% - \@ifundefined{caption\string#1}{% - \caption@Warning{% - `ragged2e' package not loaded, therefore\MessageBreak - substituting \string#2 for \string#1\MessageBreak}% - \global\@namedef{caption\string#1}}{}% - #2}% - }% - }} +\newcommand*\caption@ragged{\caption@ifpackageloaded{ragged2e}} +\newcommand*\caption@ifpackageloaded[1]{% + \@ifundefined{caption@ifpkg@#1}% + {\caption@RequirePackage{#1}% + \caption@pkg@true{#1}}% + {}% + \caption@ifpkg{#1}} +\AtBeginDocument{\renewcommand*\caption@ifpackageloaded[1]{% + \@ifundefined{caption@ifpkg@#1}% + {\caption@addto@pkg@list{#1}% + \caption@pkg@false{#1}% + \caption@Warning{% + `#1' support has been changed.\MessageBreak + Rerun to get captions right}}% + {}% + \caption@ifpkg{#1}}} +\newcommand*\caption@ifpkg[1]{% + \csname caption@ifpkg@#1\endcsname} +\newcommand*\caption@pkg@true[1]{% + \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@firstoftwo} +\newcommand*\caption@pkg@false[1]{% + \global\expandafter\let\csname caption@ifpkg@#1\endcsname\@secondoftwo} +\newcommand*\caption@pkg@list{} +\newcommand*\caption@addto@pkg@list[1]{% + \protected@write\@auxout{}{% + \string\@cons\string\caption@pkg@list{{#1}}}} +\AtBeginDocument{% + \def\caption@tempa{\endgroup}% + \begingroup + \def\@elt#1{% + \g@addto@macro\caption@tempa{% + \caption@RequirePackage{#1}% + \@namedef{caption@ifpkg@#1}{% + \caption@addto@pkg@list{#1}% + \caption@pkg@true{#1}% + \caption@ifpkg{#1}}}}% + \caption@pkg@list + \caption@tempa} +\newcommand*\caption@RequirePackage[1]{% + \caption@Info{We need package `#1'}% + \RequirePackage{#1}} +\@onlypreamble\caption@RequirePackage \caption@ifundefined\abovecaptionskip{% \newlength\abovecaptionskip\setlength\abovecaptionskip{10\p@}}{} \caption@ifundefined\belowcaptionskip{% @@ -1536,6 +1547,7 @@ \endgroup} \def\sf@NEW@subfloat{% \begingroup + \@nameuse{caption@warmup}% \caption@setfloattype\@captype \sf@ifpositiontop{% \maincaptiontoptrue diff --git a/Master/texmf-dist/tex/latex/caption/ltcaption.sty b/Master/texmf-dist/tex/latex/caption/ltcaption.sty index 3619423a779..20778a3fc41 100644 --- a/Master/texmf-dist/tex/latex/caption/ltcaption.sty +++ b/Master/texmf-dist/tex/latex/caption/ltcaption.sty @@ -6,7 +6,7 @@ %% %% ltcaption.dtx (with options: `package') %% -%% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% -------------------------------------------------------------------------- %% diff --git a/Master/texmf-dist/tex/latex/caption/newfloat.sty b/Master/texmf-dist/tex/latex/caption/newfloat.sty index dcee36a3233..b4ccd4b4610 100644 --- a/Master/texmf-dist/tex/latex/caption/newfloat.sty +++ b/Master/texmf-dist/tex/latex/caption/newfloat.sty @@ -6,7 +6,7 @@ %% %% newfloat.dtx (with options: `package') %% -%% Copyright (C) 1994-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% -------------------------------------------------------------------------- %% @@ -29,7 +29,7 @@ %% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{newfloat}[2011/10/30 v1.0 Defining new floating environments (AR)] +\ProvidesPackage{newfloat}[2011/11/16 v1.0a Defining new floating environments (AR)] \newcommand*\newfloat@Info[1]{% \PackageInfo{newfloat}{#1}} \newcommand*\newfloat@Error[1]{% @@ -80,6 +80,7 @@ \fi \expandafter\newcommand\csname list#2name\endcsname{}% \expandafter\xdef\csname list#2name\endcsname{List of \newfloat@Type s}% + \expandafter\let\csname fst@#2\endcsname\@undefined \newfloat@setplacement{#2}{tbp}% \newfloat@setfileext{#2}{lo#2}% \newfloat@setoptions*{#2}{#1}% @@ -113,7 +114,7 @@ \newcommand*\newfloat@@setoptions[3]{% \let\newfloat@within@value\@undefined \let\newfloat@chapterlistsgaps@value\@undefined - #1{\KV@@newfloat@within\newfloat@within@default}% set default value + #1{\KV@@newfloat@within\newfloat@within@default}% set default value for new floats \def\newfloat@type{#2}% \setkeys{@newfloat}{#3}% \ifx\newfloat@within@value\@undefined \else @@ -145,6 +146,7 @@ \fi \fi \endgroup} +%%\AtBeginDocument{\let\newfloat@setname\newfloat@@setname} \newcommand*\newfloat@@setname[2]{% \@namedef{#1name}{#2}} \define@key{@newfloat}{name}{% @@ -631,11 +633,11 @@ \edef\@tempa{% \noexpand\float@exts{\the\float@exts\float@do{\@nameuse{ext@#1}}}}% \@tempa}} -\newfloat@ForEachNew[FPfigure]{% +\newfloat@ForEachNew[FP@floatBegin]{% \newcounter{FP@#1C}% \newenvironment{FP#1}{\FP@floatBegin{#1}}{\FP@floatEnd}} \providecommand*\ext@lstlisting{lol}% -\newfloat@ForEachNew[sidewaysfigure]{% +\newfloat@ForEachNew[@rotfloat]{% \newenvironment{sideways#1}{\@rotfloat{#1}}{\end@rotfloat}% \newenvironment{sideways#1*}{\@rotdblfloat{#1}}{\end@rotdblfloat}} \newcommand*\newfloat@For@SC[2]{% @@ -645,9 +647,9 @@ \newenvironment{SC#2*}% {\SC@dblfloat[#1]{#2}}{\endSC@dblfloat}} \@onlypreamble\newfloat@For@SC -\newfloat@ForEachNew[SCfigure]{% +\newfloat@ForEachNew[SC@float]{% \expandafter\newfloat@For@SC\csname SC@#1@vpos\endcsname{#1}} -\newfloat@ForEachNew[wrapfigure]{% +\newfloat@ForEachNew[wrapfloat]{% \newenvironment{wrap#1}{\wrapfloat{#1}}{\endwrapfloat}} \endinput %% diff --git a/Master/texmf-dist/tex/latex/caption/subcaption.sty b/Master/texmf-dist/tex/latex/caption/subcaption.sty index 66dae89eef4..13cfa8b6b71 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-2011 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2012 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% -------------------------------------------------------------------------- %% @@ -29,7 +29,7 @@ %% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/12/01] -\ProvidesPackage{subcaption}[2011/10/30 v1.1c Sub-captions (AR)] +\ProvidesPackage{subcaption}[2012/01/12 v1.1d Sub-captions (AR)] \RequirePackage{caption}[2011/08/18] % needs v3.2b or newer \caption@AtBeginDocument{\caption@ifcompatibility{% \caption@Error{% @@ -87,7 +87,8 @@ \protected@edef\@currentlabel{\csname thesub\@captype\endcsname}% \subcaption@ORI@label#1{sub@#2}% \endgroup\@esphack} -\DeclareRobustCommand*\subref{\@ifstar{\subcaption@ref*}\@subref} +\DeclareRobustCommand*\subref{% + \@ifstar{\subcaption@ref*}\@subref} \newcommand*\@subref{% \caption@withoptargs\@@subref} \newcommand*\@@subref[2]{% @@ -98,7 +99,7 @@ \caption@withoptargs\subcaption@@ref} \newcommand*\subcaption@@ref[2]{% \begingroup - \caption@setoptions*{sub}% + \caption@setoptions{sub}% \subcaption@reffmt\p@subref{\ref#1{sub@#2}}% \endgroup} \newcommand*\p@subref{} -- cgit v1.2.3