diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-15 22:23:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-15 22:23:40 +0000 |
commit | c55f2ef12e38e9282affe822bee7b395651844b7 (patch) | |
tree | bc0e3a9621623275ab3a0336937e0afffb018a19 /Master/texmf-dist/tex/latex/caption/caption.sty | |
parent | 0639a522410335d1b0ada2c404a8e8b7b6b408c6 (diff) |
caption (15apr13)
git-svn-id: svn://tug.org/texlive/trunk@29955 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/caption.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption.sty | 76 |
1 files changed, 54 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption.sty b/Master/texmf-dist/tex/latex/caption/caption.sty index 8e6755e630d..efabb8d19d0 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-2013 Axel Sommerfeldt +%% Copyright (C) 1994-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% http://sourceforge.net/projects/latex-caption/ %% @@ -24,17 +24,23 @@ %% %% This Current Maintainer of this work is Axel Sommerfeldt. %% -%% This work consists of the files caption.ins, caption.dtx, caption2.dtx, -%% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx, -%% the derived files caption.sty, caption2.sty, caption3.sty, -%% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, -%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex. +%% This work consists of the files +%% CHANGELOG, README, SUMMARY, caption.ins, +%% caption.dtx, caption2.dtx, caption3.dtx, +%% bicaption.dtx, ltcaption.dtx, subcaption.dtx, +%% newfloat.dtx, and totalcount.dtx +%% the derived files +%% caption.sty, caption2.sty, caption3.sty, +%% bicaption.sty, ltcaption.sty, subcaption.sty, +%% newfloat.sty, and totalcount.sty +%% and the user manuals +%% caption-deu.tex, caption-eng.tex, and caption-rus.tex. %% % bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty, \NeedsTeXFormat{LaTeX2e}[1994/12/01] \def\caption@tempa$Id: #1 #2 #3-#4-#5 #6${% \def\caption@tempa{#3/#4/#5 }\def\caption@tempb{#2 }} -\caption@tempa $Id: caption.sty 65 2013-02-03 15:09:48Z sommerfeldt $ +\caption@tempa $Id: caption.sty 73 2013-04-14 19:40:46Z sommerfeldt $ \ProvidesPackage{caption}[\caption@tempa v3.3-\caption@tempb Customizing captions (AR)] \RequirePackage{caption3}[2012/12/26] % needs v1.5 or newer \caption@ifbool{documentclass}{}{% @@ -206,6 +212,15 @@ \else \@tablecaptionabovefalse \fi + \caption@ifundefined\@figurecaptionabovetrue{}{% + \g@addto@macro\@figurecaptionabovetrue{\captionsetup*[figure]{position=t}} + \g@addto@macro\@figurecaptionabovefalse{\captionsetup*[figure]{position=b}} + \if@figurecaptionabove + \@figurecaptionabovetrue + \else + \@figurecaptionabovefalse + \fi + }% \g@addto@macro\onelinecaptionstrue{\let\caption@ifslc\@firstoftwo} \g@addto@macro\onelinecaptionsfalse{\let\caption@ifslc\@secondoftwo} \ifonelinecaptions @@ -279,6 +294,18 @@ \newif\ifcaption@caption \newif\ifcaption@subcaption \newif\ifcaption@ContinuedFloat +\newcommand*\caption@clrflag[1]{% + \caption@chgflag{#1}{false}} +\newcommand*\caption@setflag[1]{% + \caption@chgflag{#1}{true}} +\newcommand*\caption@chgflag[2]{% + \global\csname caption@#1#2\endcsname} +\caption@AtBeginDocument{% + \caption@ifundefined\FR@loc@{}{% + \caption@InfoNoLine{floatrow package is loaded}% + \g@addto@macro\FR@loc@{% + \renewcommand*\caption@chgflag[2]{% + \csname caption@#1#2\endcsname}}}} \def\caption@caption{% \caption@iftype {\caption@checkgrouplevel\@empty\caption @@ -700,9 +727,9 @@ {\caption@@settype{sub}*{sub\@captype}}% {\caption@@settype{sub}{sub\@captype}}}% \newcommand*\caption@settype{% - \global\caption@captionfalse - \global\caption@subcaptionfalse - \global\caption@ContinuedFloatfalse + \caption@clrflag{caption}% + \caption@clrflag{subcaption}% + \caption@clrflag{ContinuedFloat}% \caption@set@type} \newcommand*\caption@set@type{% \caption@@settype{}} @@ -839,7 +866,7 @@ \caption@Error{Continued `#1' after `\caption@CFtype'}% \fi} \newcommand*\caption@@ContinuedFloat[1]{% - \global\caption@ContinuedFloattrue + \caption@setflag{ContinuedFloat}% \stepcounter{ContinuedFloat}% \caption@@@ContinuedFloat{#1}} \newcommand*\caption@@@ContinuedFloat[1]{% @@ -865,13 +892,13 @@ {\caption@Error{No float type '#1' defined}}% {\caption@ref@stepcounter{#1}% \caption@fixposition - \caption@iftop{\global\caption@captiontrue}{\global\caption@captionfalse}% - \global\caption@subcaptionfalse + \caption@iftop\caption@setflag\caption@clrflag{caption}% + \caption@clrflag{subcaption}% \@nameuse{donemaincaptiontrue}}} \newcommand*\caption@ref@stepcounter{% \ifcaption@ContinuedFloat \let\caption@tempa\caption@@refcounter - \global\caption@ContinuedFloatfalse + \caption@clrflag{ContinuedFloat}% \else \let\caption@tempa\caption@@refstepcounter \ifcaption@caption \else @@ -898,7 +925,7 @@ \caption@prepare@stepcounter{#1}{}% \caption@@@stepcounter{#1}} \newcommand*\caption@prepare@stepcounter[2]{% - \flushsubcaptionlistentries[#2stepcounter]% + \caption@addsubcontentslines{#2stepcounter}% \caption@resetContinuedFloat{#1}} \newcommand*\caption@@@refstepcounter{\refstepcounter} \newcommand*\caption@@@stepcounter{\stepcounter} @@ -968,13 +995,14 @@ \caption@warmup \ifcaption@caption \else \let\caption@add@contentsline\caption@addsubcontentsline + \let\caption@addsubcontentslines\@gobble \ifcaption@subcaption \else \ifcaption@ContinuedFloat - \global\caption@ContinuedFloatfalse + \caption@clrflag{ContinuedFloat}% \else \caption@@stepcounter\@captype \fi - \global\caption@subcaptiontrue + \caption@setflag{subcaption}% \fi \fi \c@ContinuedFloat=0\relax @@ -1024,9 +1052,11 @@ \ifx\@currentHref\@undefined \else \noexpand\def\noexpand\@currentHref{\@currentHref}% \fi - \protect\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}% + \noexpand\caption@@@addcontentsline{#1}{#2}{#3}{#4}}}% \@tempa} -\newcommand*\flushsubcaptionlistentries[1][user]{% +\newcommand*\flushsubcaptionlistentries{% + \caption@addsubcontentslines{user}} +\renewcommand*\caption@addsubcontentslines[1]{% \caption@Debug{\string\flushsubcaptionlistentries (#1)}% \begingroup \caption@subcontentslines @@ -1035,13 +1065,13 @@ \AtBeginDocument{\caption@ifundefined\chapter{}{% \let\caption@chapter@ORI\chapter \def\chapter{% - \flushsubcaptionlistentries[chapter]\caption@chapter@ORI}}} + \caption@addsubcontentslines{chapter}\caption@chapter@ORI}}} \AtBeginDocument{\caption@ifundefined\appendix{}{% \let\caption@appendix@ORI\appendix \def\appendix{% - \flushsubcaptionlistentries[appendix]\caption@appendix@ORI}}} + \caption@addsubcontentslines{appendix}\caption@appendix@ORI}}} \AtEndDocument{% - \flushsubcaptionlistentries[AtEndDocument]} + \caption@addsubcontentslines{AtEndDocument}} \caption@ifundefined\smf@makecaption{}{\let\smf@makecaption\@makecaption} \@ifclassloaded{beamer}{% \caption@InfoNoLine{beamer document class}% @@ -1510,6 +1540,8 @@ \let\caption@makecurrent\@gobbletwo \let\caption@@start\relax \caption@prepareslc + \else + \caption@ContinuedFloattrue \fi \edef\@tempa{\expandafter\noexpand\@car#1\@nil}% \if\@tempa*% |