diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/caption.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption.sty | 62 |
1 files changed, 34 insertions, 28 deletions
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 |