diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-24 23:35:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-24 23:35:21 +0000 |
commit | e2f9be67491d459d2e361029e5df9da8c0f17ee9 (patch) | |
tree | ad6b3eb14941756b2f1ac1b21d08bdd01b1cb10b /Master/texmf-dist/tex/latex/cleveref | |
parent | f794e99605085b9f6cef922ba918d6f87cbb76f3 (diff) |
cleveref 0.17.1 (24jun10)
git-svn-id: svn://tug.org/texlive/trunk@19140 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 | 426 |
1 files changed, 309 insertions, 117 deletions
diff --git a/Master/texmf-dist/tex/latex/cleveref/cleveref.sty b/Master/texmf-dist/tex/latex/cleveref/cleveref.sty index a8699ee5913..3f1997989fb 100644 --- a/Master/texmf-dist/tex/latex/cleveref/cleveref.sty +++ b/Master/texmf-dist/tex/latex/cleveref/cleveref.sty @@ -22,7 +22,7 @@ %% version 1999/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{cleveref} - [2010/06/07 v0.17 Intelligent cross-referencing] + [2010/06/24 v0.17.1 Intelligent cross-referencing] %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -284,7 +284,7 @@ \crcr \if@fleqn \hskip-\@mathmargin - \def\multline@indent{\hskip\@mathmargin}% put it back + \def\multline@indent{\hskip\@mathmargin}% \else \hfilneg \def\multline@indent{\hskip\multlinegap}% @@ -320,6 +320,73 @@ \fi #1% } +\def\mmeasure@#1{% + \begingroup + \measuring@true + \def\label{% <<< cleveref modification + \@ifnextchar[\label@in@mmeasure@optarg%] + \label@in@mmeasure@noarg}% + \def\math@cr@@@{\cr}% + \let\shoveleft\@iden \let\shoveright\@iden + \savecounters@ + \global\row@\z@ + \setbox\@ne\vbox{% + \global\let\df@tag\@empty + \halign{% + \setboxz@h{\@lign$\m@th\displaystyle{}##$}% + \iftagsleft@ + \ifnum\row@=\@ne + \global\totwidth@\wdz@ + \global\lineht@\ht\z@ + \fi + \else + \global\totwidth@\wdz@ + \global\lineht@\dp\z@ + \fi + \crcr + #1% + \crcr + }% + }% + \ifx\df@tag\@empty\else\global\tag@true\fi + \if@eqnsw\global\tag@true\fi + \iftag@ + \setboxz@h{% + \if@eqnsw + \stepcounter{equation}% + \tagform@\theequation + \else + \df@tag + \fi + }% + \global\tagwidth@\wdz@ + \dimen@\totwidth@ + \advance\dimen@\tagwidth@ + \advance\dimen@\multlinetaggap + \iftagsleft@\else + \if@fleqn + \advance\dimen@\@mathmargin + \fi + \fi + \ifdim\dimen@>\displaywidth + \global\shifttag@true + \else + \global\shifttag@false + \fi + \fi + \restorecounters@ + \endgroup +} +\def\label@in@mmeasure@noarg#1{% + \begingroup% + \measuring@false% + \cref@old@label@in@display{{#1}}% + \endgroup} +\def\label@in@mmeasure@optarg[#1]#2{% + \begingroup% + \measuring@false% + \cref@old@label@in@display{[#1]{#2}}% + \endgroup} \let\cref@old@subequations\subequations% \let\cref@old@endsubequations\endsubequations% \cref@resetby{equation}{\@result}% @@ -1162,6 +1229,16 @@ \cref@isstackfull{\@refsubstack}% }% end loop over reference substack \cref@isstackfull{\@refstack}% + \if@cref@stackfull% + \def\@tmpa{#1}\def\@tmpb{labelcref}% + \ifx\@tmpa\@tmpb\relax% + \protect\G@refundefinedtrue% + \nfss@text{\reset@font\bfseries\space ??}% + \@latex@warning{References in label reference on page \thepage + \space have different types}% + \@cref@stackfullfalse% + \fi% + \fi% }% end loop over main reference stack \endgroup} \def\@setcref#1#2#3{% @@ -1173,10 +1250,16 @@ \cref@gettype{#1}{\@temptype}% puts label type in \@temptype \cref@getlabel{#1}{\@templabel}% puts label in \@templabel \expandafter\ifx\csname #2@\@temptype @format#3\endcsname\relax% - \protect\G@refundefinedtrue% - \nfss@text{\reset@font\bfseries ??}~\@templabel% - \@latex@warning{\string\Cref \space reference format for label - type `\@temptype' undefined}% + \edef\@tmpa{#2}\def\@tmpb{labelcref}% + \ifx\@tmpa\@tmpb\relax% + \expandafter\@@setcref\expandafter% + {\csname #2@default@format#3\endcsname}{#1}% + \else% + \protect\G@refundefinedtrue% + \nfss@text{\reset@font\bfseries ??}~\@templabel% + \@latex@warning{#2 \space reference format for label type + `\@temptype' undefined}% + \fi% \else% \expandafter\@@setcref\expandafter% {\csname #2@\@temptype @format#3\endcsname}{#1}% @@ -1215,18 +1298,24 @@ \edef\@formatb{\expandafter\noexpand% \csname #3range@\@typeb @format#4\endcsname}% \expandafter\ifx\@formata\relax% - \protect\G@refundefinedtrue% - \nfss@text{\reset@font\bfseries ??}~\@labela--\@labelb% - \@latex@warning{#3\space reference range format for label - type `\@typea' undefined}% + \edef\@tmpa{#3}\def\@tmpb{labelcref}% + \ifx\@tmpa\@tmpb\relax% + \expandafter\@@setcrefrange\expandafter% + {\csname #3range@default@format#4\endcsname}{#1}{#2}% + \else% + \protect\G@refundefinedtrue% + \nfss@text{\reset@font\bfseries ??}~\@labela--\@labelb% + \@latex@warning{#3\space reference range format for label + type `\@typea' undefined}% + \fi% \else% \ifx\formata\formatb% \expandafter\@@setcrefrange\expandafter{\@formata}{#1}{#2}% \else% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}~\@labela--\@labelb% - \@latex@warning{Types inconsistent in reference range for - references `#1' and `#2' on page \thepage}% + \@latex@warning{References `#1' and `#2' in reference range + on page \thepage have different types}% \fi% \fi% \fi% @@ -1239,6 +1328,7 @@ \def\@setcref@pairgroupconjunction{\crefpairgroupconjunction} \def\@setcref@middlegroupconjunction{\crefmiddlegroupconjunction} \def\@setcref@lastgroupconjunction{\creflastgroupconjunction} +\DeclareRobustCommand{\labelcref}[1]{\@cref{labelcref}{#1}} \DeclareRobustCommand{\namecref}[1]{% \expandafter\ifx\csname r@cref@#1\endcsname\relax% \protect\G@refundefinedtrue% @@ -1312,48 +1402,46 @@ \newcommand{\Crefname@preamble}[3]{% \@crefname{Cref}{#1}{#2}{#3}{@preamble}} \def\@crefname#1#2#3#4#5{% - \begingroup% - \expandafter\gdef\csname #1@#2@name#5\endcsname{#3}% - \expandafter\gdef\csname #1@#2@name@plural#5\endcsname{#4}% - \def\@tmpa##1##2\@nil{% - \if##1c% - \def\@other{C##2}% - \def\@changecase{\expandafter\MakeUppercase}% + \expandafter\def\csname #1@#2@name#5\endcsname{#3}% + \expandafter\def\csname #1@#2@name@plural#5\endcsname{#4}% + \def\@tmpa##1##2\@nil{% + \if##1c% + \def\@other{C##2}% + \def\@tmpc{\expandafter\MakeUppercase}% + \else% + \def\@other{c##2}% + \if@cref@capitalise% + \def\@tmpc{}% \else% - \def\@other{c##2}% - \if@cref@capitalise% - \def\@changecase{}% - \else% - \def\@changecase{\MakeLowercase}% - \fi% - \fi}% - \@tmpa#1\@nil% - \@ifundefined{\@other @#2@name#5}{% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpa% - \expandafter\expandafter\expandafter{% - \csname#1@#2@name\endcsname}% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpb% - \expandafter\expandafter\expandafter{% - \csname#1@#2@name@plural\endcsname}% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpa% - \expandafter\expandafter\expandafter{% - \expandafter\@changecase\@tmpa}% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpb% - \expandafter\expandafter\expandafter{% - \expandafter\@changecase\@tmpb}% - \toksdef\@toksa=0% - \@toksa={% - \expandafter\gdef\csname\@other @#2@name#5\endcsname}% - \expandafter\the\expandafter\@toksa\expandafter{\@tmpa}% - \@toksa={% - \expandafter\gdef\csname\@other @#2@name@plural#5\endcsname}% - \expandafter\the\expandafter\@toksa\expandafter{\@tmpb}% - }{}% - \endgroup% + \def\@tmpc{\MakeLowercase}% + \fi% + \fi}% + \@tmpa#1\@nil% + \@ifundefined{\@other @#2@name#5}{% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@tmpa% + \expandafter\expandafter\expandafter{% + \csname#1@#2@name\endcsname}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@tmpb% + \expandafter\expandafter\expandafter{% + \csname#1@#2@name@plural\endcsname}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@tmpa% + \expandafter\expandafter\expandafter{% + \expandafter\@tmpc\@tmpa}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@tmpb% + \expandafter\expandafter\expandafter{% + \expandafter\@tmpc\@tmpb}% + \toksdef\@toksa=0% + \@toksa={% + \expandafter\def\csname\@other @#2@name#5\endcsname}% + \expandafter\the\expandafter\@toksa\expandafter{\@tmpa}% + \@toksa={% + \expandafter\def\csname\@other @#2@name@plural#5\endcsname}% + \expandafter\the\expandafter\@toksa\expandafter{\@tmpb}% + }{}% \cref@stack@add{#2}{\cref@label@types}} \def\@crefconstructcomponents#1{% \@ifundefined{cref@#1@label}{% @@ -1384,16 +1472,8 @@ \expandafter\def\expandafter\@tmprangelabel\expandafter{% \@tmprangelabel{########1}{########2}{########3}% {########4}{########5}{########6}}% - % \expandafter\expandafter\expandafter\def% - % \expandafter\expandafter\expandafter\@tmpname% - % \expandafter\expandafter\expandafter{% - % \csname cref@#1@name\endcsname}% \expandafter\def\expandafter\@tmpname\expandafter{% \csname cref@#1@name\endcsname}% - % \expandafter\expandafter\expandafter\def% - % \expandafter\expandafter\expandafter\@tmpName% - % \expandafter\expandafter\expandafter{% - % \csname Cref@#1@name\endcsname}% \expandafter\def\expandafter\@tmpName\expandafter{% \csname Cref@#1@name\endcsname}% \expandafter\def\expandafter\@tmpnameplural\expandafter{% @@ -1412,11 +1492,15 @@ \expandafter\expandafter\expandafter\@tmpFirst% \expandafter\expandafter\expandafter{% \expandafter\@tmpName\expandafter~\@tmplabel}% + \expandafter\def\expandafter\@tmplabel\expandafter{\@tmplabel}% \toksdef\@toksa=0% \@toksa={\crefformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{\@tmpfirst}% \@toksa={\Crefformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{\@tmpFirst}% + \@ifundefined{cref@#1@label}{}{% + \@toksa={\labelcrefformat{#1}}% + \expandafter\the\expandafter\@toksa\expandafter{\@tmplabel}}% \endgroup} \def\@crefrangedefineformat#1{% \begingroup% @@ -1429,11 +1513,21 @@ \expandafter\expandafter\expandafter\@tmpFirst% \expandafter\expandafter\expandafter{% \expandafter\@tmpNameplural\expandafter~\@tmprangelabel}% + \expandafter\def\expandafter\@tmprangelabel% + \expandafter{\@tmprangelabel}% \toksdef\@toksa=0% \@toksa={\crefrangeformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{\@tmpfirst}% \@toksa={\Crefrangeformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{\@tmpFirst}% + \@ifundefined{cref@#1@rangelabel}{% + \@ifundefined{cref@#1@label}{\let\@tmpa\relax}{\def\@tmpa{}}}% + {\def\@tmpa{}}% + \ifx\@tmpa\@empty\relax% + \@toksa={\labelcrefrangeformat{#1}}% + \expandafter\the\expandafter\@toksa\expandafter{% + \@tmprangelabel}% + \fi% \endgroup} \def\@crefdefinemultiformat#1{% \begingroup% @@ -1446,24 +1540,13 @@ \expandafter\expandafter\expandafter\@tmpFirst% \expandafter\expandafter\expandafter{% \expandafter\@tmpNameplural\expandafter~\@tmplabel}% - % \expandafter\expandafter\expandafter\def% - % \expandafter\expandafter\expandafter\@tmpsecond% - % \expandafter\expandafter\expandafter{% - % \expandafter\crefpairconjunction\@tmplabel}% \expandafter\def\expandafter\@tmpsecond\expandafter{% \expandafter\crefpairconjunction\@tmplabel}% - % \expandafter\expandafter\expandafter\def% - % \expandafter\expandafter\expandafter\@tmpmiddle% - % \expandafter\expandafter\expandafter{% - % \expandafter\crefmiddleconjunction\@tmplabel}% \expandafter\def\expandafter\@tmpmiddle\expandafter{% \expandafter\crefmiddleconjunction\@tmplabel}% - % \expandafter\expandafter\expandafter\def% - % \expandafter\expandafter\expandafter\@tmplast% - % \expandafter\expandafter\expandafter{% - % \expandafter\creflastconjunction\@tmplabel}% \expandafter\def\expandafter\@tmplast\expandafter{% \expandafter\creflastconjunction\@tmplabel}% + \expandafter\def\expandafter\@tmplabel\expandafter{\@tmplabel}% \toksdef\@toksa=0% \toksdef\@toksb=1% \@toksb={}% @@ -1488,6 +1571,18 @@ \expandafter{\@tmplast}}% \@toksa={\Crefmultiformat{#1}}% \expandafter\the\expandafter\@toksa\the\@toksb% + \@ifundefined{cref@#1@label}{}{% + \@toksb={}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmplabel}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmpsecond}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmpmiddle}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmplast}}% + \@toksa={\labelcrefmultiformat{#1}}% + \expandafter\the\expandafter\@toksa\the\@toksb}% \endgroup} \def\@crefrangedefinemultiformat#1{% \begingroup% @@ -1500,24 +1595,14 @@ \expandafter\expandafter\expandafter\@tmpFirst% \expandafter\expandafter\expandafter{% \expandafter\@tmpNameplural\expandafter~\@tmprangelabel}% - % \expandafter\expandafter\expandafter\def% - % \expandafter\expandafter\expandafter\@tmpsecond% - % \expandafter\expandafter\expandafter{% - % \expandafter\crefpairconjunction\@tmprangelabel}% \expandafter\def\expandafter\@tmpsecond\expandafter{% \expandafter\crefpairconjunction\@tmprangelabel}% - % \expandafter\expandafter\expandafter\def% - % \expandafter\expandafter\expandafter\@tmpmiddle% - % \expandafter\expandafter\expandafter{% - % \expandafter\crefmiddleconjunction\@tmprangelabel}% \expandafter\def\expandafter\@tmpmiddle\expandafter{% \expandafter\crefmiddleconjunction\@tmprangelabel}% - % \expandafter\expandafter\expandafter\def% - % \expandafter\expandafter\expandafter\@tmplast% - % \expandafter\expandafter\expandafter{% - % \expandafter\creflastconjunction\@tmprangelabel}% \expandafter\def\expandafter\@tmplast\expandafter{% \expandafter\creflastconjunction\@tmprangelabel}% + \expandafter\def\expandafter\@tmprangelabel% + \expandafter{\@tmprangelabel}% \toksdef\@toksa=0% \toksdef\@toksb=1% \@toksb={}% @@ -1542,6 +1627,85 @@ \expandafter{\@tmplast}}% \@toksa={\Crefrangemultiformat{#1}}% \expandafter\the\expandafter\@toksa\the\@toksb% + \@ifundefined{cref@#1@rangelabel}{% + \@ifundefined{cref@#1@label}{\let\@tmpa\relax}{\def\@tmpa{}}}% + {\def\@tmpa{}}% + \ifx\@tmpa\@empty\relax% + \@toksb={}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmprangelabel}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmpsecond}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmpmiddle}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmplast}}% + \@toksa={\labelcrefrangemultiformat{#1}}% + \expandafter\the\expandafter\@toksa\the\@toksb% + \fi% + \endgroup} +\def\@labelcrefdefinedefaultformats{% + \begingroup% + \toksdef\@toksa=0% + \toksdef\@toksb=1% + \let\@tmplabel\cref@default@label% + \expandafter\def\expandafter\@tmpa\expandafter{% + \@tmplabel{####1}{####3}{####4}}% + \expandafter\def\expandafter\@tmpb\expandafter{% + \@tmplabel{####2}{####5}{####6}}% + \@toksa={\def\@tmprangelabel##1##2##3##4##5##6}% + \expandafter\expandafter\expandafter\the% + \expandafter\expandafter\expandafter\@toksa% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter\crefrangepreconjunction% + \expandafter\@tmpa\expandafter\crefrangeconjunction\@tmpb% + \crefrangepostconjunction}% + \expandafter\def\expandafter\@tmplabel\expandafter{% + \@tmplabel{########1}{########2}{########3}}% + \expandafter\def\expandafter\@tmprangelabel\expandafter{% + \@tmprangelabel{########1}{########2}{########3}% + {########4}{########5}{########6}}% + \expandafter\def\expandafter\@tmpsecond\expandafter{% + \expandafter\crefpairconjunction\@tmplabel}% + \expandafter\def\expandafter\@tmpmiddle\expandafter{% + \expandafter\crefmiddleconjunction\@tmplabel}% + \expandafter\def\expandafter\@tmplast\expandafter{% + \expandafter\creflastconjunction\@tmplabel}% + \expandafter\def\expandafter\@tmprangesecond\expandafter{% + \expandafter\crefpairconjunction\@tmprangelabel}% + \expandafter\def\expandafter\@tmprangemiddle\expandafter{% + \expandafter\crefmiddleconjunction\@tmprangelabel}% + \expandafter\def\expandafter\@tmprangelast\expandafter{% + \expandafter\creflastconjunction\@tmprangelabel}% + \expandafter\def\expandafter\@tmplabel\expandafter{\@tmplabel}% + \expandafter\def\expandafter\@tmprangelabel% + \expandafter{\@tmprangelabel}% + \@toksa={\labelcrefformat{default}}% + \expandafter\the\expandafter\@toksa\expandafter{\@tmplabel}% + \@toksa={\labelcrefrangeformat{default}}% + \expandafter\the\expandafter\@toksa\expandafter{\@tmprangelabel}% + \@toksb={}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmplabel}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmpsecond}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmpmiddle}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmplast}}% + \@toksa={\labelcrefmultiformat{default}}% + \expandafter\the\expandafter\@toksa\the\@toksb% + \@toksb={}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmprangelabel}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmpsecond}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmpmiddle}}% + \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% + \expandafter{\@tmplast}}% + \@toksa={\labelcrefrangemultiformat{default}}% + \expandafter\the\expandafter\@toksa\the\@toksb% \endgroup} \def\@crefdefineallformats#1{% \@crefdefineformat{#1}% @@ -1560,6 +1724,29 @@ \@crefrangemultiformat{crefrange}{#1}{#2}{#3}{#4}{#5}} \newcommand{\Crefrangemultiformat}[5]{% \@crefrangemultiformat{Crefrange}{#1}{#2}{#3}{#4}{#5}} +\newcommand{\labelcrefformat}[2]{% + \expandafter\gdef\csname labelcref@#1@format\endcsname##1##2##3{#2}} +\newcommand{\labelcrefrangeformat}[2]{% + \expandafter\gdef\csname labelcrefrange@#1@format\endcsname% + ##1##2##3##4##5##6{#2}} +\newcommand{\labelcrefmultiformat}[5]{% + \expandafter\gdef\csname labelcref@#1@format@first\endcsname% + ##1##2##3{#2}% + \expandafter\gdef\csname labelcref@#1@format@second\endcsname% + ##1##2##3{#3}% + \expandafter\gdef\csname labelcref@#1@format@middle\endcsname% + ##1##2##3{#4}% + \expandafter\gdef\csname labelcref@#1@format@last\endcsname% + ##1##2##3{#5}} +\newcommand{\labelcrefrangemultiformat}[5]{% + \expandafter\gdef\csname labelcrefrange@#1@format@first\endcsname% + ##1##2##3##4##5##6{#2}% + \expandafter\gdef\csname labelcrefrange@#1@format@second\endcsname% + ##1##2##3##4##5##6{#3}% + \expandafter\gdef\csname labelcrefrange@#1@format@middle\endcsname% + ##1##2##3##4##5##6{#4}% + \expandafter\gdef\csname labelcrefrange@#1@format@last\endcsname% + ##1##2##3##4##5##6{#5}} \def\@crefformat#1#2#3{% \begingroup% \expandafter\gdef\csname #1@#2@format\endcsname##1##2##3{#3}% @@ -2035,7 +2222,7 @@ \@ifpackageloaded{varioref}{% \PackageInfo{cleveref}{`varioref' support loaded} \PackageInfo{cleveref}{`cleveref' supersedes `varioref's % - $\backslash$labelformat command, which will not work} + \string\labelformat command} \AtBeginDocument{% \def\cref@vref#1#2{% \if@cref@legacyvarioref% @@ -2138,16 +2325,16 @@ \@cref@switched@languagetrue% \cref@writelanguagerules% \cref@old@select@language} - \let\cref@old@forreign@language\forreign@language - \def\forreign@language{% + \let\cref@old@foreign@language\foreign@language + \def\foreign@language{% \@cref@switched@languagetrue% \cref@writelanguagerules% - \cref@old@forreign@language} + \cref@old@foreign@language} \edef\cref@inputlineno{\the\inputlineno}}% }{} \AtEndDocument{% \let\select@language\cref@old@select@language% - \let\forreign@language\cref@old@forreign@language% + \let\foreign@language\cref@old@foreign@language% \cref@writelanguagerules} \def\cref@writelanguagerules{% \begingroup% @@ -2499,7 +2686,8 @@ \def\cref@vrefrange#1#2#3{% \gdef\cref@poorman@text{}% \@setcrefrange{#2}{#3}{#1}{} \vpagerefrange[\unskip]{#2}{#3}% - \g@addto@macro\cref@poorman@text{ \vpagerefrange[\unskip]{#2}{#3}}% + \g@addto@macro\cref@poorman@text% + { \vpagerefrange[\unskip]{#2}{#3}}% \def\@tmpa##1##2\@nil{% \if##1c% \if@crefstarred% @@ -2652,6 +2840,7 @@ \@cref@capitalisetrue} \crefdefaultlabelformat{#2#1#3} \creflabelformat{equation}{\textup{(#2#1#3)}} +\@labelcrefdefinedefaultformats \def\cref@addto#1#2{% \@temptokena{#2}% \ifx#1\undefined% @@ -4013,11 +4202,11 @@ {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname{subsection}% - {\CYRP\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% - {\CYRP\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% + {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% + {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname{subsubsection}% - {\CYRP\cyro\cyrd\cyrp\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% - {\CYRP\cyro\cyrd\cyrp\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% + {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% + {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% @@ -4102,11 +4291,11 @@ {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsection}% - {\CYRP\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% - {\CYRP\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% + {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% + {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsubsection}% - {\CYRP\cyro\cyrd\cyrp\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% - {\CYRP\cyro\cyrd\cyrp\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% + {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% + {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% @@ -4174,16 +4363,18 @@ {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \else% \crefname{equation}{\cyrf-\cyrl.}{\cyrf-\cyrl.}% - \crefname{chapter}{\cyrg\cyrl\cyra\cyrv.}{\cyrg\cyrl\cyra\cyrv.}% + \crefname{chapter}% + {\cyrg\cyrl\cyra\cyrv.}% + {\cyrg\cyrl\cyra\cyrv.}% \crefname{section}% {\cyrr\cyra\cyrz\cyrd.}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname{subsection}% - {\cyrp\cyro\cyrd\cyrr\cyra\cyrz\cyrd.}% - {\cyrp\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% + {\cyrr\cyra\cyrz\cyrd.}% + {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname{subsubsection}% - {\cyrp\cyro\cyrd\cyrp\cyro\cyrd\cyrr\cyra\cyrz\cyrd.}% - {\cyrp\cyro\cyrd\cyrp\cyro\cyrd\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% + {\cyrr\cyra\cyrz\cyrd.}% + {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname{appendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% @@ -4452,11 +4643,11 @@ {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname{subsection}% - {\CYRP\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% - {\CYRP\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% + {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% + {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname{subsubsection}% - {\CYRP\cyrii\cyrd\cyrp\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% - {\CYRP\cyrii\cyrd\cyrp\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% + {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% + {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% @@ -4541,11 +4732,11 @@ {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsection}% - {\CYRP\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% - {\CYRP\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% + {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% + {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsubsection}% - {\CYRP\cyrii\cyrd\cyrp\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% - {\CYRP\cyrii\cyrd\cyrp\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% + {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% + {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% @@ -4620,11 +4811,11 @@ {\cyrr\cyro\cyrz\cyrd.}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname{subsection}% - {\cyrp\cyrii\cyrd\cyrr\cyro\cyrz\cyrd.}% - {\cyrp\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% + {\cyrr\cyro\cyrz\cyrd.}% + {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname{subsubsection}% - {\cyrp\cyrii\cyrd\cyrp\cyrii\cyrd\cyrr\cyro\cyrz\cyrd.}% - {\cyrp\cyrii\cyrd\cyrp\cyrii\cyrd\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% + {\cyrr\cyro\cyrz\cyrd.}% + {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname{appendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% @@ -4879,7 +5070,8 @@ \expandafter\@crefdefinemultiformat\expandafter{\@tmpa}}}{}% \@ifundefined{crefrange@\@tmpa @format@first}{% \@ifundefined{cref@\@tmpa @name@plural}{}{% - \expandafter\@crefrangedefinemultiformat\expandafter{\@tmpa}}}{}% + \expandafter\@crefrangedefinemultiformat% + \expandafter{\@tmpa}}}{}% \cref@stack@pop{\@tmpstack}% \cref@isstackfull{\@tmpstack}}% \@ifundefined{cref@subsection@name}{% |