diff options
author | Karl Berry <karl@freefriends.org> | 2012-02-16 00:08:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-02-16 00:08:14 +0000 |
commit | 22c52d8f8c1c659c2fa41aeb08bf3948b709ec91 (patch) | |
tree | bd2bc6eeb40852a9be72303ab35491e05f650319 /Master/texmf-dist/tex/latex/cleveref | |
parent | 45b7e9c3a88f678a54912c0c76959d7d1dd23181 (diff) |
cleveref 0.18.4 (15feb12)
git-svn-id: svn://tug.org/texlive/trunk@25401 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cleveref')
-rw-r--r-- | Master/texmf-dist/tex/latex/cleveref/cleveref.sty | 119 |
1 files changed, 56 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/latex/cleveref/cleveref.sty b/Master/texmf-dist/tex/latex/cleveref/cleveref.sty index 2c84707b70e..1b82c4e1957 100644 --- a/Master/texmf-dist/tex/latex/cleveref/cleveref.sty +++ b/Master/texmf-dist/tex/latex/cleveref/cleveref.sty @@ -11,8 +11,8 @@ %% Copyright (C) 2006 Toby Cubitt %% See the files README and COPYING. %% -\def\packagedate{2012/01/18} -\def\packageversion{0.18.3} +\def\packagedate{2012/02/15} +\def\packageversion{0.18.4} %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.2 %% of this license or (at your option) any later version. @@ -51,13 +51,13 @@ \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}} \def\refstepcounter@optarg[#1]#2{% \cref@old@refstepcounter{#2}% \cref@constructprefix{#2}{\cref@result}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [#1][\arabic{#2}][\cref@result]% \csname p@#2\endcsname\csname the#2\endcsname}} \AtBeginDocument{% @@ -68,32 +68,25 @@ \@bsphack% \cref@old@label{#1}% \protected@write\@auxout{}% - {\string\newlabel{cref@#1}{{\cref@currentlabel}{\thepage}}}% + {\string\newlabel{#1@cref}{{\cref@currentlabel}{\thepage}}}% \@esphack}% \def\label@optarg[#1]#2{% \@bsphack% \cref@old@label{#2}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% \expandafter\cref@override@label@type% \cref@currentlabel\@nil{#1}}% \protected@write\@auxout{}% - {\string\newlabel{cref@#2}{{\cref@currentlabel}{\thepage}}}% + {\string\newlabel{#2@cref}{{\cref@currentlabel}{\thepage}}}% \@esphack} }% end of AtBeginDocument -\let\cref@old@footnotetext\@footnotetext -\let\cref@old@mpfootnotetext\@mpfootnotetext -\def\@footnotetext{% +\let\cref@old@makefntext\@makefntext +\long\def\@makefntext#1{% \cref@constructprefix{footnote}{\cref@result}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [footnote][\arabic{footnote}][\cref@result]% \p@footnote\@thefnmark}% - \cref@old@footnotetext} -\def\@mpfootnotetext#1{% - \cref@constructprefix{mpfootnote}{\cref@result}% - \protected@xdef\cref@currentlabel{% - [footnote][\arabic{mpfootnote}][\cref@result]% - \p@footnote\@thefnmark}% - \cref@old@mpfootnotetext{#1}} + \cref@old@makefntext{#1}} \let\cref@old@othm\@othm \def\@othm#1[#2]#3{% \edef\@tempa{\expandafter\noexpand% @@ -179,28 +172,28 @@ \def\@tempa{##1}% \def\@tempb{section}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [appendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{subsection}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{subsubsection}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subsubappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \@ifundefined{cref@##1@alias}% {\def\@tempa{##1}}% {\def\@tempa{\csname cref@##1@alias\endcsname}}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [\@tempa][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname} \fi% @@ -218,35 +211,35 @@ \def\@tempa{##1}% \def\@tempb{chapter}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [appendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{section}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{subsection}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subsubappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{subsubsection}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subsubsubappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \@ifundefined{cref@##1@alias}% {\def\@tempa{##1}}% {\def\@tempa{\csname cref@##1@alias\endcsname}}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [\@tempa][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname} \fi% @@ -263,13 +256,13 @@ \edef\act{\noexpand#1={\the#1\the\toks0}}% \act}% \def\cref@getref#1#2{% - \expandafter\let\expandafter#2\csname r@cref@#1\endcsname% + \expandafter\let\expandafter#2\csname r@#1@cref\endcsname% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter\@firstoftwo#2}} \def\cref@getpageref#1#2{% - \expandafter\let\expandafter#2\csname r@cref@#1\endcsname% + \expandafter\let\expandafter#2\csname r@#1@cref\endcsname% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% @@ -458,10 +451,10 @@ \ifx\@tempa\@empty% \def\cref@result{2}% \else% - \expandafter\ifx\csname r@cref@#1\endcsname\relax% + \expandafter\ifx\csname r@#1@cref\endcsname\relax% \def\cref@result{2}% \else% - \expandafter\ifx\csname r@cref@#2\endcsname\relax% + \expandafter\ifx\csname r@#2@cref\endcsname\relax% \def\cref@result{1}% \else% \cref@getcounter{#1}{\@countera}% @@ -530,10 +523,10 @@ \ifx\@tempa\@empty% \def\cref@result{2}% \else% - \expandafter\ifx\csname r@cref@#1\endcsname\relax% + \expandafter\ifx\csname r@#1@cref\endcsname\relax% \def\cref@result{2}% \else% - \expandafter\ifx\csname r@cref@#2\endcsname\relax% + \expandafter\ifx\csname r@#2@cref\endcsname\relax% \def\cref@result{1}% \else% \cref@getpageref{#1}{\@tempa}% @@ -733,7 +726,7 @@ \expandafter\endgroup\@after} \def\cref@processgroup#1#2{% \edef\@nextref{\cref@stack@top{#1}}% - \expandafter\ifx\csname r@cref@\@nextref\endcsname\relax% + \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \def\@grouptype{\@undefined}% \def\@groupformat{\@undefined}% \else% @@ -759,7 +752,7 @@ \let\@nexttype\@grouptype% \let\@nextforamt\@groupformat% \else% - \expandafter\ifx\csname r@cref@\@nextref\endcsname\relax% + \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \def\@nexttype{\@undefined}% \def\@nextformat{\@undefined}% \else% @@ -782,7 +775,7 @@ \def\cref@processgroupall#1#2{% \cref@stack@init{\@tempstack}% \edef\@nextref{\cref@stack@top{#1}}% - \expandafter\ifx\csname r@cref@\@nextref\endcsname\relax% + \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \def\@grouptype{\@undefined}% \def\@groupformat{\@undefined}% \else% @@ -807,7 +800,7 @@ \let\@nextformat\relax% \fi% \else% - \expandafter\ifx\csname r@cref@\@nextref\endcsname\relax% + \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \def\@nexttype{\@undefined}% \def\@nextformat{\@undefined}% \else% @@ -849,7 +842,7 @@ \let#3\relax% \edef\@nextref{\cref@stack@top{#1}}% #4=1\relax% - \expandafter\ifx\csname r@cref@#2\endcsname\relax% + \expandafter\ifx\csname r@#2@cref\endcsname\relax% \@cref@refconsecutivefalse% \else% \ifx\@nextref\@empty% @@ -863,7 +856,7 @@ \edef\@nextref{\cref@stack@top{#1}}% \fi}% \else% - \expandafter\ifx\csname r@cref@\@nextref\endcsname\relax% + \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \@cref@refconsecutivefalse% \else% \edef\@tempa{{#2}{\@nextref}}% @@ -891,7 +884,7 @@ \edef\@nextref{\cref@stack@top{#1}}% \fi}% \else% - \expandafter\ifx\csname r@cref@\@nextref\endcsname\relax% + \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \@cref@refconsecutivefalse% \else% \edef\@tempa{{#3}{\@nextref}}% @@ -1047,7 +1040,7 @@ }% end loop over main reference stack \endgroup} \def\@setcref#1#2#3{% - \expandafter\ifx\csname r@cref@#1\endcsname\relax% + \expandafter\ifx\csname r@#1@cref\endcsname\relax% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#1' on page \thepage \space undefined}% @@ -1073,11 +1066,11 @@ \def\@@setcref#1#2{\cref@getlabel{#2}{\@templabel}#1{\@templabel}{}{}} \def\@setcrefrange#1#2#3#4{% \begingroup% - \expandafter\ifx\csname r@cref@#1\endcsname\relax% + \expandafter\ifx\csname r@#1@cref\endcsname\relax% \protect\G@refundefinedtrue% \@latex@warning{Reference `#1' on page \thepage \space% undefined}% - \expandafter\ifx\csname r@cref@#2\endcsname\relax% + \expandafter\ifx\csname r@#2@cref\endcsname\relax% \nfss@text{\reset@font\bfseries ??}--% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#2' on page \thepage \space% @@ -1087,7 +1080,7 @@ \nfss@text{\reset@font\bfseries ??}--\@labelb% \fi% \else% - \expandafter\ifx\csname r@cref@#2\endcsname\relax% + \expandafter\ifx\csname r@#2@cref\endcsname\relax% \protect\G@refundefinedtrue% \cref@getlabel{#1}{\@labela}% \@labela--\nfss@text{\reset@font\bfseries ??}% @@ -1147,7 +1140,7 @@ \DeclareRobustCommand{\lcnamecrefs}[1]{% \@setnamecref{Cref}{#1}{@plural}{\MakeLowercase}} \def\@setnamecref#1#2#3#4{% - \expandafter\ifx\csname r@cref@#2\endcsname\relax% + \expandafter\ifx\csname r@#2@cref\endcsname\relax% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#1' on page \thepage \space undefined}% @@ -1212,8 +1205,8 @@ \count@consecutive=1\relax% \fi% \ifx\@endref\relax\else% - \expandafter\ifx\csname r@cref@\@beginref\endcsname\relax\else% - \expandafter\ifx\csname r@cref@\@endref\endcsname\relax\else% + \expandafter\ifx\csname r@\@beginref @cref\endcsname\relax\else% + \expandafter\ifx\csname r@\@endref @cref\endcsname\relax\else% \cref@getpageref{\@beginref}{\@tempa}% \cref@getpageref{\@endref}{\@tempb}% \ifx\@tempa\@tempb\relax% @@ -1276,7 +1269,7 @@ }% end loop over reference stack \endgroup} \def\@setcpageref#1#2#3{% - \expandafter\ifx\csname r@cref@#1\endcsname\relax% + \expandafter\ifx\csname r@#1@cref\endcsname\relax% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#1' on page \thepage \space undefined}% @@ -1302,11 +1295,11 @@ \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}} \def\@setcpagerefrange#1#2#3#4{% \begingroup% - \expandafter\ifx\csname r@cref@#1\endcsname\relax% + \expandafter\ifx\csname r@#1@cref\endcsname\relax% \protect\G@refundefinedtrue% \@latex@warning{Reference `#1' on page \thepage \space% undefined}% - \expandafter\ifx\csname r@cref@#2\endcsname\relax% + \expandafter\ifx\csname r@#2@cref\endcsname\relax% \nfss@text{\reset@font\bfseries ??}--% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#2' on page \thepage \space% @@ -1316,7 +1309,7 @@ \nfss@text{\reset@font\bfseries ??}--\@pageb% \fi% \else% - \expandafter\ifx\csname r@cref@#2\endcsname\relax% + \expandafter\ifx\csname r@#2@cref\endcsname\relax% \protect\G@refundefinedtrue% \cref@getpageref{#1}{\@pagea}% \@pagea--\nfss@text{\reset@font\bfseries ??}% @@ -1962,13 +1955,13 @@ \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}} \let\refstepcounter@noarg\cref@old@refstepcounter% \def\refstepcounter@optarg[#1]#2{% \cref@old@refstepcounter{#2}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% \expandafter\cref@override@label@type% \cref@currentlabel\@nil{#1}}} \@ifundefined{appendix}{}{% @@ -1986,28 +1979,28 @@ \def\@tempa{##1}% \def\@tempb{section}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [appendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{subsection}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{subsubsection}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subsubappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \@ifundefined{cref@##1@alias}% {\def\@tempa{##1}}% {\def\@tempa{\csname cref@##1@alias\endcsname}}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [\@tempa][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname} \fi% @@ -2025,35 +2018,35 @@ \def\@tempa{##1}% \def\@tempb{chapter}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [appendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{section}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{subsection}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subsubappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \def\@tempa{##1}% \def\@tempb{subsubsection}% \ifx\@tempa\@tempb% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [subsubsubappendix][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname}% \else% \@ifundefined{cref@##1@alias}% {\def\@tempa{##1}}% {\def\@tempa{\csname cref@##1@alias\endcsname}}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [\@tempa][\arabic{##1}][\cref@result]% \csname p@##1\endcsname\csname the##1\endcsname} \fi% @@ -2165,7 +2158,7 @@ \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% - \protected@xdef\cref@currentlabel{% + \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}}% \fi% |