diff options
author | Karl Berry <karl@freefriends.org> | 2015-09-17 23:49:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-09-17 23:49:07 +0000 |
commit | 9fd7d087755d8f3890acd6ca639d5a725ed3b176 (patch) | |
tree | 766d2dfd21af44a1422fc88f130525e752ac712d /Master/texmf-dist/tex/latex/caption/caption3.sty | |
parent | 6aabc6a32e1008cffcec6edce62975ba5f015436 (diff) |
caption (17sep15)
git-svn-id: svn://tug.org/texlive/trunk@38393 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/caption/caption3.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/caption/caption3.sty | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/caption/caption3.sty b/Master/texmf-dist/tex/latex/caption/caption3.sty index c621116bf6e..43fa98f09f7 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-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +%% Copyright (C) 1994-2015 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) %% %% http://sourceforge.net/projects/latex-caption/ %% @@ -39,8 +39,8 @@ \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: caption3.dtx 88 2013-05-02 05:15:09Z sommerfeldt $ -\ProvidesPackage{caption3}[\caption@tempa v1.6-\caption@tempb caption3 kernel (AR)] +\caption@tempa $Id: caption3.sty 111 2015-09-17 09:48:20Z sommerfeldt $ +\ProvidesPackage{caption3}[\caption@tempa v1.7-\caption@tempb caption3 kernel (AR)] \providecommand*\@nameundef[1]{% \expandafter\let\csname #1\endcsname\@undefined} \begingroup\expandafter\expandafter\expandafter\endgroup @@ -647,6 +647,7 @@ \DeclareCaptionLabelFormat{simple}{\bothIfFirst{#1}{\nobreakspace}#2} \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{\nobreakspace}(#2)} \DeclareCaptionLabelFormat{brace}{\bothIfFirst{#1}{\nobreakspace}#2)} +\DeclareCaptionLabelFormat{autodot}{\bothIfFirst{#1}{\nobreakspace}\autodot} \def\caption@lfmt@default{\caption@lfmt@simple} \newcommand\DeclareCaptionLabelSeparator{% \caption@teststar\caption@declarelabelseparator\@gobble\@firstofone} @@ -696,10 +697,44 @@ \@ifundefined{caption@tfmt@#1}% {\caption@Error{Undefined text format `#1'}}% {\expandafter\let\expandafter\caption@tfmt\csname caption@tfmt@#1\endcsname}} -\DeclareCaptionTextFormat{empty}{} +\DeclareCaptionTextFormat{empty}{% + \caption@get@label#1\caption@makeanchor{}\@nil + \caption@thelabel} +\long\def\caption@get@label#1\caption@makeanchor#2#3\@nil{% + \def\caption@tempa{#2}% + \ifx\caption@tempa\@empty + \caption@getlabel#1\label{}\@nil + \else + \caption@getlabel#2\label{}\@nil + \fi} \DeclareCaptionTextFormat{simple}{#1} \DeclareCaptionTextFormat{period}{#1.} \def\caption@tfmt@default{\caption@tfmt@simple} +\long\def\caption@getlabel#1\label#2#3\@nil{% + \def\@tempa{#2}% + \ifx\@tempa\@empty + \let\caption@thelabel\relax + \else + \def\@tempb{*}% + \ifx\@tempa\@tempb + \def\caption@thelabel{\label*}% + \caption@@getlabel#3\@nil + \else + \def\caption@thelabel{\label}% + \caption@@getlabel{#2}#3\@nil + \fi + \fi} +\long\def\caption@@getlabel#1#2\@nil{% + \def\@tempa{#1}% + \def\@tempb{[}% + \ifx\@tempa\@tempb + \caption@@@getlabel#1#2\@nil + \else + \l@addto@macro\caption@thelabel{{#1}}% + \fi} +\long\def\caption@@@getlabel[#1]#2\@nil{% + \l@addto@macro\caption@thelabel{[{#1}]}% + \caption@@getlabel#2\@nil} \newcommand*\DeclareCaptionFont[2]{% \define@key{caption@fnt}{#1}[]{\l@addto@macro\caption@fnt{#2}}} \@onlypreamble\DeclareCaptionFont @@ -915,7 +950,7 @@ \newcommand*\caption@setlisttype@ext{% \caption@@setlisttype\caption@listtype@ext} \newcommand*\DeclareCaptionListFormat[2]{% - \global\@namedef{caption@lstfmt@#1}##1##2{#2}} + \global\@namedef{caption@lstfmt@#1}##1##2##3{#2}} \@onlypreamble\DeclareCaptionListFormat \DeclareCaptionOption{listformat}{\caption@setlistformat{#1}} \newcommand*\caption@setlistformat[1]{% @@ -1307,7 +1342,7 @@ {\caption@add@contentsline {\csname ext@#1\endcsname}% {#1}% - {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}}% + {\caption@lstfmt{\@nameuse{p@#1}}{\@nameuse{the#1}}{#1}}% {\ignorespaces #2}}}} \newcommand*\caption@add@contentsline{% \caption@@@addcontentsline} @@ -1564,15 +1599,18 @@ \@onlypreamble\caption@@@@declaresublistentry \newcommand*\caption@@@@@declaresublistentry[4]{% \@namedef{l@sub#2}{#1{2}{#3}{#4}}% - \caption@@@@@@declaresublistentry#1{c@\csname ext@#2\endcsname depth}} + \expandafter\caption@@@@@@declaresublistentry + \expandafter#1\expandafter{\csname ext@#2\endcsname depth}} \@onlypreamble\caption@@@@@declaresublistentry \newcommand*\caption@@@@@@declaresublistentry[2]{ \ifx#1\relax \def#1##1{% \def\next{\@dottedtocline{##1}}% - \@ifundefined{#2}{}{% - \ifnum ##1>\@nameuse{#2}\relax + \@ifundefined{c@#2}{}{% + \ifnum ##1>\@nameuse{c@#2}\relax \let\next\@gobblefour + \else + \c@tocdepth=\@nameuse{c@#2}\relax \fi}% \next}% \fi} |