From 0622731eb4278fed01effd61c773cad94f60573a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 6 May 2009 15:04:02 +0000 Subject: cleveref update (30apr09) git-svn-id: svn://tug.org/texlive/trunk@12950 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/cleveref/cleveref.sty | 3505 +++++++++++++++------ 1 file changed, 2611 insertions(+), 894 deletions(-) (limited to 'Master/texmf-dist/tex/latex/cleveref') diff --git a/Master/texmf-dist/tex/latex/cleveref/cleveref.sty b/Master/texmf-dist/tex/latex/cleveref/cleveref.sty index 9c571406374..5dc50fcd937 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} - [2009/11/02 v0.12 Intelligent cross-referencing] + [2009/17/04 v0.13 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 @@ -44,16 +44,13 @@ } \def\refstepcounter@noarg#1{% \cref@old@refstepcounter{#1}% - \cref@resetby{#1}{\@result}% - \ifx\@result\relax\def\@result{}% - \else\edef\@result{\csname the\@result\endcsname}\fi% + \cref@constructprefix{#1}{\@result}% \protected@edef\@currentlabel{% - [#1][\arabic{#1}][\@result]\@currentlabel}} + [#1][\arabic{#1}][\@result]% + \csname p@#1\endcsname\csname the#1\endcsname}} \def\refstepcounter@optarg[#1]#2{% \cref@old@refstepcounter{#2}% - \cref@resetby{#2}{\@result}% - \ifx\@result\relax\def\@result{}% - \else\edef\@result{\csname the\@result\endcsname}\fi% + \cref@constructprefix{#2}{\@result}% \protected@edef\@currentlabel{% [#1][\arabic{#2}][\@result]\@currentlabel}} \def\cref@override@label@type[#1][#2][#3]#4\@nil#5{[#5][#2][#3]#4} @@ -65,14 +62,22 @@ \expandafter\cref@override@label@type\@currentlabel\@nil{#1}}% \cref@old@label}% \@ifpackageloaded{amsmath}{% - \let\cref@label\label% - \let\cref@old@label@in@display\label@in@display% + \let\cref@label\label + \let\cref@old@label@in@display\label@in@display \def\label@in@display{% \@ifnextchar[\label@in@display@optarg\label@in@display@noarg}%] \def\label@in@display@noarg#1{\cref@old@label@in@display{{#1}}} \def\label@in@display@optarg[#1]#2{% \cref@old@label@in@display{[#1]{#2}}} - \def\ltx@label#1{\cref@label#1}% + \def\ltx@label#1{\cref@label#1} + \let\cref@old@make@df@tag@@\make@df@tag@@ + \def\make@df@tag@@#1{% + \gdef\df@tag{\maketag@@@{#1}% + \def\@currentlabel{[equation][][]#1}}} + \def\make@df@tag@@@#1{% + \gdef\df@tag{\tagform@{#1}% + \toks@\@xp{\p@equation{#1}}% + \edef\@currentlabel{[equation][][]\the\toks@}}} }{}% } \def\cref@reflabel#1#2{\@result} @@ -90,34 +95,70 @@ \renewcommand\appendix{% \cref@old@appendix% \@ifundefined{chapter}{% - \def\refstepcounter@noarg##1{% + \gdef\refstepcounter@noarg##1{% \cref@old@refstepcounter{##1}% - \cref@resetby{##1}{\@result}% - \ifx\@result\relax\def\@result{}% - \else\edef\@result{\csname the\@result\endcsname}\fi% - \def\@tmpa{##1} + \cref@constructprefix{##1}{\@result}% + \edef\@result{{2147483647}\@result}% + \def\@tmpa{##1}% \def\@tmpb{section}% \ifx\@tmpa\@tmpb% \protected@edef\@currentlabel{% [appendix][\arabic{##1}][\@result]\@currentlabel}% - \else - \protected@edef\@currentlabel{% - [##1][\arabic{##1}][\@result]\@currentlabel} - \fi} + \else% + \def\@tmpa{##1}% + \def\@tmpb{subsection}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subappendix][\arabic{##1}][\@result]\@currentlabel}% + \else% + \def\@tmpa{##1}% + \def\@tmpb{subsubsection}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subsubappendix][\arabic{##1}][\@result]% + \@currentlabel}% + \else% + \protected@edef\@currentlabel{% + [##1][\arabic{##1}][\@result]\@currentlabel}% + \fi% + \fi% + \fi}% }{% \def\refstepcounter@noarg##1{% \cref@old@refstepcounter{##1}% - \cref@resetby{##1}{\@result}% - \ifx\@result\relax\def\@result{}% - \else\edef\@result{\csname the\@result\endcsname}\fi% - \def\@tmpa{##1} + \cref@constructprefix{##1}{\@result}% + \edef\@result{{2147483647}\@result}% + \def\@tmpa{##1}% \def\@tmpb{chapter}% \ifx\@tmpa\@tmpb% \protected@edef\@currentlabel{% [appendix][\arabic{##1}][\@result]\@currentlabel}% - \else - \protected@edef\@currentlabel{% - [##1][\arabic{##1}][\@result]\@currentlabel} + \else% + \def\@tmpa{##1}% + \def\@tmpb{section}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subappendix][\arabic{##1}][\@result]\@currentlabel}% + \else% + \def\@tmpa{##1}% + \def\@tmpb{subsection}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subsubappendix][\arabic{##1}][\@result]% + \@currentlabel}% + \else% + \def\@tmpa{##1}% + \def\@tmpb{subsubsection}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subsubsubappendix][\arabic{##1}]% + [\@result]\@currentlabel}% + \else% + \protected@edef\@currentlabel{% + [##1][\arabic{##1}][\@result]\@currentlabel}% + \fi% + \fi% + \fi% \fi}% }% } @@ -149,19 +190,127 @@ \def\@cref@getprefix{\@ifnextchar[%] \@@cref@getprefix{\@@cref@getprefix[][][]}} \def\@@cref@getprefix[#1][#2][#3]#4\@nil#5{\def#5{#3}} +\def\cref@constructprefix#1#2{% + \edef\@tmpa{\noexpand{\noexpand}\noexpand{#1\noexpand}}% + \expandafter\def\expandafter\@tmpa\expandafter{\@tmpa{#2}}% + \expandafter\@cref@constructprefix\@tmpa} +\def\@cref@constructprefix#1#2#3{% + \cref@resetby{#2}{#3}% + \ifx#3\relax% + \edef#3{#1}% + \else% + \edef\@tmpa{{{\the\csname c@#3\endcsname}#1}{#3}}% + \expandafter\expandafter\expandafter\@cref@constructprefix% + \expandafter\@tmpa\expandafter{\expandafter#3\expandafter}% + \fi} +\def\cref@counter@first#1#2\@nil{#1} +\def\cref@counter@rest#1#2\@nil{#2} +\def\cref@countercmp#1#2#3{% + \begingroup% + \def\@tmpa{#1}% + \ifx\@tmpa\@empty% + \def\@result{1}% + \else% + \def\@tmpa{#2}% + \ifx\@tmpa\@empty% + \def\@result{2}% + \else% + \expandafter\ifx\csname r@#1\endcsname\relax% + \def\@result{2}% + \else% + \expandafter\ifx\csname r@#2\endcsname\relax% + \def\@result{1}% + \else% + \cref@getcounter{#1}{\@countera}% + \cref@getprefix{#1}{\@prefixa}% + \cref@getcounter{#2}{\@counterb}% + \cref@getprefix{#2}{\@prefixb}% + \edef\@tmpa{{\@prefixa{\@countera}}{\@prefixb{\@counterb}}}% + \expandafter\@cref@countercmp\@tmpa% + \fi% + \fi% + \fi% + \fi% + \expandafter\endgroup\expandafter% + \chardef\expandafter#3\expandafter=\@result\relax} +\def\@cref@countercmp#1#2{% + \let\@iterate\relax% + \def\@counta{#1}% + \def\@countb{#2}% + \ifx\@counta\@empty% + \ifx\@countb\@empty% + \def\@result{0}% + \else% + \def\@result{1}% + \fi% + \else% + \ifx\@countb\@empty% + \def\@result{2}% + \else% + \edef\@counta{\cref@counter@first#1\@nil}% + \edef\@countb{\cref@counter@first#2\@nil}% + \ifnum\@counta<\@countb\relax% + \def\@result{1}% + \else% + \ifnum\@counta>\@countb\relax% + \def\@result{2}% + \else% + \edef\@counta{\cref@counter@rest#1\@nil}% + \edef\@countb{\cref@counter@rest#2\@nil}% + \edef\@counta{{\@counta}{\@countb}}% + \expandafter\def\expandafter\@iterate\expandafter{% + \expandafter\@cref@countercmp\@counta}% + \fi% + \fi% + \fi% + \fi% + \@iterate} \def\cref@append@toks#1#2{\toks0={#2}% \edef\act{\noexpand#1={\the#1\the\toks0}}% \act}% \def\cref@stack@init#1{\def#1{\@nil}} -\def\cref@stack@top#1{\expandafter\cref@stack@top@aux#1} -\def\cref@stack@top@aux#1,#2\@nil{#1} -\def\cref@stack@pop#1{\expandafter\cref@stack@pop@aux#1#1} -\def\cref@stack@pop@aux#1,#2\@nil#3{\def#3{#2\@nil}} +\def\cref@stack@top#1{\expandafter\@cref@stack@top#1} +\def\@cref@stack@top#1,#2\@nil{#1} +\def\cref@stack@pop#1{\expandafter\@cref@stack@pop#1#1} +\def\@cref@stack@pop#1,#2\@nil#3{\def#3{#2\@nil}} \def\cref@stack@push#1#2{% - \expandafter\cref@stack@push@aux\expandafter{#2}{#1}{#2}} -\def\cref@stack@push@aux#1#2#3{\def#3{#2,#1}} -\def\cref@stack@pull#1#2{\expandafter\cref@stack@pull@aux#2{#1}{#2}} -\def\cref@stack@pull@aux#1\@nil#2#3{\def#3{#1#2,\@nil}} + \expandafter\@cref@stack@push\expandafter{#2}{#1}{#2}} +\def\@cref@stack@push#1#2#3{\def#3{#2,#1}} +\def\cref@stack@pull#1#2{\expandafter\@cref@stack@pull#2{#1}{#2}} +\def\@cref@stack@pull#1\@nil#2#3{\def#3{#1#2,\@nil}} +\def\cref@stack@topandbottom#1#2#3{% + \def#2{}% + \def#3{}% + \cref@isstackfull{#1}% + \if@cref@stackfull% + \edef#2{\cref@stack@top{#1}}% + \cref@stack@pop{#1}% + \cref@isstackfull{#1}% + \@whilesw\if@cref@stackfull\fi{% + \edef#3{\cref@stack@top{#1}}% + \cref@stack@pop{#1}% + \cref@isstackfull{#1}}% + \fi} +\def\cref@stack@add#1#2{% + \begingroup% + \def\@arg1{#1}% + \let\@tmpstack#2% + \newif\if@notthere% + \@nottheretrue% + \cref@isstackfull{\@tmpstack}% + \@whilesw\if@cref@stackfull\fi{% + \edef\@tmpb{\cref@stack@top{\@tmpstack}}% + \def\@tmpa{#1}% + \ifx\@tmpa\@tmpb% + \@cref@stackfullfalse% + \@nottherefalse% + \else% + \cref@stack@pop{\@tmpstack}% + \cref@isstackfull{\@tmpstack}% + \fi + }% + \expandafter\endgroup% + \if@notthere\cref@stack@push{#1}{#2}\fi} \newif\if@cref@stackempty \newif\if@cref@stackfull \def\cref@isstackempty#1{% @@ -172,54 +321,156 @@ \def\@tmpa{\@nil}% \ifx#1\@tmpa\@cref@stackfullfalse% \else\@cref@stackfulltrue\fi} +\def\cref@stack@sort#1#2{% + \begingroup% + \cref@stack@init{\@sortstack}% + \edef\@element{\cref@stack@top{#1}}% + \expandafter\cref@stack@push\expandafter{\@element}{\@sortstack}% + \cref@stack@pop{#1}% + \cref@isstackfull{#1}% + \if@cref@stackfull% + \edef\@tmpa{\cref@stack@top{#1}}% + \@whilesw\ifx\@tmpa\@empty\fi{% + \cref@stack@pull{}{\@sortstack}% + \cref@stack@pop{#1}% + \cref@isstackempty{#1}% + \if@cref@stackempty% + \let\@tmpa\relax% + \else% + \edef\@tmpa{\cref@stack@top{#1}}% + \fi}% + \fi% + \cref@isstackfull{#1}% + \@whilesw\if@cref@stackfull\fi{% + \edef\@element{\cref@stack@top{#1}}% + \cref@stack@pop{#1}% + \def\@empties{}% + \cref@isstackfull{#1}% + \if@cref@stackfull% + \edef\@tmpa{\cref@stack@top{#1}}% + \@whilesw\ifx\@tmpa\@empty\fi{% + \edef\@empties{\@empties,}% + \cref@stack@pop{#1}% + \cref@isstackempty{#1}% + \if@cref@stackempty% + \let\@tmpa\relax% + \else% + \edef\@tmpa{\cref@stack@top{#1}}% + \fi}% + \fi% + \edef\@tmpa{{\expandafter\noexpand\@element}% + {\expandafter\noexpand\@empties}% + {\noexpand\@sortstack}{\noexpand#2}}% + \expandafter\cref@stack@insert\@tmpa% + \cref@isstackfull{#1}}% + \expandafter\endgroup\expandafter% + \def\expandafter#1\expandafter{\@sortstack}} +\def\cref@stack@insert#1#2#3#4{% + \let\@cmp#4% + \@cref@stack@insert{}{#1}{#2}{#3}% + \cref@stack@pop{#3}} +\def\@cref@stack@insert#1#2#3#4{% + \let\@iterate\relax% + \cref@isstackempty{#4}% + \if@cref@stackempty% + \cref@stack@push{#1,#2#3}{#4}% + \else% + \edef\@tmpa{\cref@stack@top{#4}}% + \expandafter\@cmp\expandafter{\@tmpa}{#2}{\@result}% + \ifnum\@result=2\relax% + \cref@stack@push{#1,#2#3}{#4}% + \else% + \cref@stack@pop{#4}% + \edef\@tmpa{{\noexpand#1,\@tmpa}{\noexpand#2}% + {\noexpand#3}{\noexpand#4}}% + \expandafter\def\expandafter\@iterate\expandafter% + {\expandafter\@cref@stack@insert\@tmpa}% + \fi% + \fi% + \@iterate} \newif\if@cref@inresetlist \def\cref@isinresetlist#1#2{% - \def\@counter{#1}% \begingroup% + \def\@counter{#1}% \def\@elt##1{##1,}% \expandafter\ifx\csname cl@#2\endcsname\relax% - \gdef\cref@resetstack{,\@nil}% + \def\cref@resetstack{,\@nil}% \else% - \xdef\cref@resetstack{\csname cl@#2\endcsname\noexpand\@nil}% + \edef\cref@resetstack{\csname cl@#2\endcsname\noexpand\@nil}% \fi% - \endgroup% - \cref@isstackfull{\cref@resetstack}% - \@whilesw\if@cref@stackfull\fi{% - \edef\@nextcounter{\cref@stack@top{\cref@resetstack}}% - \ifx\@nextcounter\@counter% - \@cref@stackfullfalse% + \let\@nextcounter\relax% + \cref@isstackfull{\cref@resetstack}% + \@whilesw\if@cref@stackfull\fi{% + \edef\@nextcounter{\cref@stack@top{\cref@resetstack}}% + \ifx\@nextcounter\@counter% + \@cref@stackfullfalse% + \else% + \let\@nextcounter\relax% + \cref@stack@pop{\cref@resetstack}% + \cref@isstackfull{\cref@resetstack}% + \fi}% + \ifx\@nextcounter\relax% + \def\@next{\@cref@inresetlistfalse}% \else% - \let\@nextcounter\relax% - \cref@stack@pop{\cref@resetstack}% - \cref@isstackfull{\cref@resetstack}% - \fi}% - \ifx\@nextcounter\relax% - \@cref@inresetlistfalse% - \else% - \@cref@inresetlisttrue% - \fi} + \def\@next{\@cref@inresetlisttrue}% + \fi% + \expandafter% + \endgroup% + \@next} \def\cref@resetby#1#2{% - \cref@isinresetlist{#1}{subsubsubsection}% - \if@cref@inresetlist% - \def#2{subsubsubsection}% - \else% - \cref@isinresetlist{#1}{subsubsection}% + \let#2\relax% + \def\@tmpa{#1}% + \def\@tmpb{subfigure}% + \ifx\@tmpa\@tmpb% + \cref@isinresetlist{#1}{figure}% + \if@cref@inresetlist% + \def#2{figure}% + \fi% + \fi% + \def\@tmpa{#1}% + \def\@tmpb{subtable}% + \ifx\@tmpa\@tmpb% + \cref@isinresetlist{#1}{table}% \if@cref@inresetlist% - \def#2{subsubsection}% + \def#2{table}% + \fi% + \fi% + \def\@tmpa{#1}% + \def\@tmpb{enumii}% + \ifx\@tmpa\@tmpb% + \def#2{enum}% + \fi% + \def\@tmpb{enumiii}% + \ifx\@tmpa\@tmpb% + \def#2{enum}% + \fi% + \def\@tmpb{enumiv}% + \ifx\@tmpa\@tmpb% + \def#2{enum}% + \fi% + \def\@tmpb{enumv}% + \ifx\@tmpa\@tmpb% + \def#2{enum}% + \fi% + \def\@tmpb{enum}% + \ifx#2\@tmpb% + \cref@isinresetlist{#1}{enumiv}% + \if@cref@inresetlist% + \def#2{enumiv}% \else% - \cref@isinresetlist{#1}{subsection}% + \cref@isinresetlist{#1}{enumiii}% \if@cref@inresetlist% - \def#2{subsection}% + \def#2{enumiii}% \else% - \cref@isinresetlist{#1}{section}% + \cref@isinresetlist{#1}{enumii}% \if@cref@inresetlist% - \def#2{section}% + \def#2{enumii}% \else% - \cref@isinresetlist{#1}{chapter}% + \cref@isinresetlist{#1}{enumi}% \if@cref@inresetlist% - \def#2{chapter}% + \def#2{enumi}% \else% - \cref@isinresetlist{#1}{part}% + \cref@isinresetlist{#1}{part}% \if@cref@inresetlist% \def#2{part}% \else% @@ -229,251 +480,353 @@ \fi% \fi% \fi% + \fi% + \ifx#2\relax% + \cref@isinresetlist{#1}{table}% + \if@cref@inresetlist% + \def#2{table}% + \else% + \cref@isinresetlist{#1}{subsubsection}% + \if@cref@inresetlist% + \def#2{subsubsection}% + \else% + \cref@isinresetlist{#1}{subsection}% + \if@cref@inresetlist% + \def#2{subsection}% + \else% + \cref@isinresetlist{#1}{section}% + \if@cref@inresetlist% + \def#2{section}% + \else% + \cref@isinresetlist{#1}{chapter}% + \if@cref@inresetlist% + \def#2{chapter}% + \else% + \cref@isinresetlist{#1}{part}% + \if@cref@inresetlist% + \def#2{part}% + \else% + \let#2\relax% + \fi% + \fi% + \fi% + \fi% + \fi% + \fi% \fi} -\DeclareRobustCommand{\cref}[1]{\@cref{cref}{#1}} -\DeclareRobustCommand{\Cref}[1]{\@cref{Cref}{#1}} -\DeclareRobustCommand{\crefrange}[2]{\@setcrefrange{#1}{#2}{cref}{}} -\DeclareRobustCommand{\Crefrange}[2]{\@setcrefrange{#1}{#2}{Cref}{}} -\def\@cref#1#2{% +\newif\if@cref@refconsecutive% +\def\cref@isrefconsecutive#1#2{% \begingroup% - \countdef\count@consecutive=0% - \def\@empty{}% - \newif\if@firstgroup% - \newif\if@secondgroup% - \newif\if@secondref% - \cref@stack@init{\@refstack}% - \cref@stack@push{#2}{\@refstack}% - \@firstgrouptrue% - \@secondgroupfalse% - \cref@isstackfull{\@refstack}% - \@whilesw\if@cref@stackfull\fi{% - \cref@stack@init{\@refsubstack}% - \edef\@nextref{\cref@stack@top{\@refstack}}% - \expandafter\ifx\csname r@\@nextref\endcsname\relax% - \def\@currenttype{\@undefined}% - \else% - \expandafter\cref@gettype\expandafter{\@nextref}{\@currenttype}% + \countdef\refa@counter=0% + \countdef\refb@counter=1% + \cref@getcounter{#1}{\@result}% + \refa@counter=\@result% + \cref@getcounter{#2}{\@result}% + \refb@counter=\@result% + \cref@getprefix{#1}{\refa@prefix}% + \cref@getprefix{#2}{\refb@prefix}% + \def\@after{\@cref@refconsecutivefalse}% + \ifx\refa@prefix\refb@prefix% + \ifnum\refa@counter=\refb@counter\relax% + \def\@after{\@cref@refconsecutivetrue}% + \else% + \advance\refa@counter 1\relax% + \ifnum\refa@counter=\refb@counter\relax% + \def\@after{\@cref@refconsecutivetrue}% + \fi% + \fi% \fi% - \let\@nexttype\@currenttype% - \@whilesw\ifx\@nexttype\@currenttype\fi{% - \expandafter\cref@stack@pull\expandafter% - {\@nextref}{\@refsubstack}% - \cref@stack@pop{\@refstack}% - \cref@isstackempty{\@refstack}% - \if@cref@stackempty% - \def\@nexttype{\relax}% + \expandafter\endgroup\@after} +\def\cref@processgroup#1#2{% + \edef\@nextref{\cref@stack@top{#1}}% + \expandafter\ifx\csname r@\@nextref\endcsname\relax% + \def\@grouptype{\@undefined}% + \def\@groupformat{\@undefined}% + \else% + \expandafter\cref@gettype\expandafter{\@nextref}{\@grouptype}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@groupformat% + \expandafter\expandafter\expandafter{% + \csname cref@\@grouptype @format\endcsname% + {\@dummya}{\@dummyb}{\@dummyc}}% + \fi% + \let\@nexttype\@grouptype% + \let\@nextformat\@groupformat% + \@whilesw\ifx\@nextformat\@groupformat\fi{% + \expandafter\cref@stack@pull\expandafter{\@nextref}{#2}% + \cref@stack@pop{#1}% + \cref@isstackempty{#1}% + \if@cref@stackempty% + \let\@nexttype\relax% + \let\@nextformat\relax% + \else% + \edef\@nextref{\cref@stack@top{#1}}% + \ifx\@nextref\@empty% + \let\@nexttype\@grouptype% + \let\@nextforamt\@groupformat% \else% - \edef\@nextref{\cref@stack@top{\@refstack}}% - \ifx\@nextref\@empty% - \let\@currenttype\@nexttype% + \expandafter\ifx\csname r@\@nextref\endcsname\relax% + \def\@nexttype{\@undefined}% + \def\@nextformat{\@undefined}% \else% - \expandafter\ifx\csname r@\@nextref\endcsname\relax% - \def\@currenttype{\@undefined}% + \expandafter\cref@gettype\expandafter% + {\@nextref}{\@nexttype}% + \def\@tmpa{\@undefined}% + \ifx\@nexttype\@tmpa% + \def\@nextformat{\@undefined}% \else% - \expandafter\cref@gettype\expandafter% - {\@nextref}{\@currenttype}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@nextformat% + \expandafter\expandafter\expandafter{% + \csname cref@\@nexttype @format\endcsname% + {\@dummya}{\@dummyb}{\@dummyc}}% \fi% \fi% - \fi}% - \if@firstgroup% - \@firstgroupfalse% - \@secondgrouptrue% + \fi% + \fi}% +} +\def\cref@processgroupall#1#2{% + \cref@stack@init{\@tmpstack}% + \edef\@nextref{\cref@stack@top{#1}}% + \expandafter\ifx\csname r@\@nextref\endcsname\relax% + \def\@grouptype{\@undefined}% + \def\@groupformat{\@undefined}% + \else% + \expandafter\cref@gettype\expandafter{\@nextref}{\@grouptype}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@groupformat% + \expandafter\expandafter\expandafter{% + \csname cref@\@grouptype @format\endcsname% + {\@dummya}{\@dummyb}{\@dummyc}}% + \fi% + \let\@lasttype\@grouptype% + \let\@lastformat\@groupformat% + \cref@isstackfull{#1}% + \@whilesw\if@cref@stackfull\fi{% + \edef\@nextref{\cref@stack@top{#1}}% + \ifx\@nextref\@empty% + \ifx\@lastformat\@groupformat% + \let\@nexttype\@grouptype% + \let\@nextformat\@groupformat% + \else% + \let\@nexttype\relax% + \let\@nextformat\relax% + \fi% \else% - \cref@isstackfull{\@refstack}% - \if@cref@stackfull% - \@setcref@middlegroupconjunction% + \expandafter\ifx\csname r@\@nextref\endcsname\relax% + \def\@nexttype{\@undefined}% + \def\@nextformat{\@undefined}% \else% - \if@secondgroup% - \@setcref@pairgroupconjunction% + \expandafter\cref@gettype\expandafter% + {\@nextref}{\@nexttype}% + \def\@tmpa{\@undefined}% + \ifx\@nexttype\@tmpa% + \def\@nextformat{\@undefined}% \else% - \@setcref@lastgroupconjunction% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@nextformat% + \expandafter\expandafter\expandafter{% + \csname cref@\@nexttype @format\endcsname% + {\@dummya}{\@dummyb}{\@dummyc}}% \fi% \fi% - \@secondgroupfalse% \fi% - \edef\@nextref{\cref@stack@top{\@refsubstack}}% - \cref@stack@pop{\@refsubstack}% - \cref@isstackempty{\@refsubstack}% - \if@cref@stackempty% - \expandafter\@setcref\expandafter{\@nextref}{#1}{}% + \ifx\@nextformat\@groupformat% + \expandafter\cref@stack@pull\expandafter{\@nextref}{#2}% \else% - \edef\@beginref{\@nextref}% - \let\@endref\relax% - \edef\@nextref{\cref@stack@top{\@refsubstack}}% - \count@consecutive=1% - \expandafter\ifx\csname r@\@beginref\endcsname\relax% + \expandafter\cref@stack@pull\expandafter{\@nextref}{\@tmpstack}% + \fi% + \cref@stack@pop{#1}% + \let\@lasttype\@nexttype% + \let\@lastformat\@nextformat% + \cref@isstackfull{#1}}% + \let#1\@tmpstack} +\def\cref@processconsecutive#1#2#3#4{% + #4=0% + \edef\@nextref{\cref@stack@top{#1}}% + \cref@stack@pop{#1}% + \cref@isstackempty{#1}% + \if@cref@stackempty% + \edef#2{\@nextref}% + \let#3\relax% + #4=1\relax% + \else% + \edef#2{\@nextref}% + \let#3\relax% + \edef\@nextref{\cref@stack@top{#1}}% + #4=1\relax% + \expandafter\ifx\csname r@#2\endcsname\relax% + \@cref@refconsecutivefalse% + \else% + \ifx\@nextref\@empty% + \@cref@refconsecutivefalse% + \@whilesw\ifx\@nextref\@empty\fi{% + \cref@stack@pop{#1}% + \cref@isstackempty{#1}% + \if@cref@stackempty% + \let\@nextref\relax% + \else% + \edef\@nextref{\cref@stack@top{#1}}% + \fi}% + \else% + \expandafter\ifx\csname r@\@nextref\endcsname\relax% + \@cref@refconsecutivefalse% + \else% + \edef\@tmpa{{#2}{\@nextref}}% + \expandafter\cref@isrefconsecutive\@tmpa% + \fi% + \fi% + \fi% + \@whilesw\if@cref@refconsecutive\fi{% + \advance#4 1% + \let#3\@nextref% + \cref@stack@pop{#1}% + \cref@isstackempty{#1}% + \if@cref@stackempty% \@cref@refconsecutivefalse% \else% + \edef\@nextref{\cref@stack@top{#1}}% \ifx\@nextref\@empty% \@cref@refconsecutivefalse% \@whilesw\ifx\@nextref\@empty\fi{% - \cref@stack@pop{\@refsubstack}% - \cref@isstackempty{\@refsubstack}% + \cref@stack@pop{#1}% + \cref@isstackempty{#1}% \if@cref@stackempty% \let\@nextref\relax% \else% - \edef\@nextref{\cref@stack@top{\@refsubstack}}% - \fi% - }% - \ifnum\count@consecutive=2% - \edef\@endref{\@endref,}% - \fi% + \edef\@nextref{\cref@stack@top{#1}}% + \fi}% \else% \expandafter\ifx\csname r@\@nextref\endcsname\relax% \@cref@refconsecutivefalse% \else% - \edef\@tmpa{{\@beginref}{\@nextref}}% + \edef\@tmpa{{#3}{\@nextref}}% \expandafter\cref@isrefconsecutive\@tmpa% \fi% \fi% + \fi}% + \fi} +\DeclareRobustCommand{\cref}[1]{\@cref{cref}{#1}} +\DeclareRobustCommand{\Cref}[1]{\@cref{Cref}{#1}} +\DeclareRobustCommand{\crefrange}[2]{\@setcrefrange{#1}{#2}{cref}{}} +\DeclareRobustCommand{\Crefrange}[2]{\@setcrefrange{#1}{#2}{Cref}{}} +\def\@cref#1#2{% + \begingroup% + \countdef\count@consecutive=0% + \countdef\count@group=1% + \count@group=1% + \newif\if@secondref% + \cref@stack@init{\@refstack}% + \cref@stack@push{#2}{\@refstack}% + \cref@isstackfull{\@refstack}% + \@whilesw\if@cref@stackfull\fi{% + \cref@stack@init{\@refsubstack}% + \if@cref@sort% + \cref@processgroupall{\@refstack}{\@refsubstack}% + \cref@stack@sort{\@refsubstack}{\cref@countercmp}% + \else% + \cref@processgroup{\@refstack}{\@refsubstack}% + \fi% + \ifnum\count@group=1\relax% + \advance\count@group 1% + \else% + \cref@isstackfull{\@refstack}% + \if@cref@stackfull% + \@setcref@middlegroupconjunction% + \else% + \ifnum\count@group=2\relax% + \@setcref@pairgroupconjunction% + \else% + \@setcref@lastgroupconjunction% + \fi% \fi% - \@whilesw\if@cref@refconsecutive\fi{% - \advance\count@consecutive 1% - \let\@endref\@nextref% + \advance\count@group 1% + \fi% + \if@cref@compress% + \cref@processconsecutive% + {\@refsubstack}{\@beginref}{\@endref}{\count@consecutive}% + \else% + \edef\@beginref{\cref@stack@top{\@refsubstack}}% + \cref@stack@pop{\@refsubstack}% + \@whilesw\ifx\@beginref\@empty\fi{% \cref@stack@pop{\@refsubstack}% \cref@isstackempty{\@refsubstack}% \if@cref@stackempty% - \@cref@refconsecutivefalse% + \let\@beginref\relax% \else% - \edef\@nextref{\cref@stack@top{\@refsubstack}}% - \ifx\@nextref\@empty% - \@cref@refconsecutivefalse% - \@whilesw\ifx\@nextref\@empty\fi{% - \cref@stack@pop{\@refsubstack}% - \cref@isstackempty{\@refsubstack}% - \if@cref@stackempty% - \let\@nextref\relax% - \else% - \edef\@nextref{\cref@stack@top{\@refsubstack}}% - \fi% - }% - \ifnum\count@consecutive=2% - \edef\@endref{\@endref,}% - \fi% - \else% - \expandafter\ifx\csname r@\@nextref\endcsname\relax% - \@cref@refconsecutivefalse% - \else% - \edef\@tmpa{{\@endref}{\@nextref}}% - \expandafter\cref@isrefconsecutive\@tmpa% - \fi% - \fi% + \edef\@beginref{\cref@stack@top{\@refsubstack}}% \fi}% - \ifx\@endref\relax% + \let\@endref\relax% + \count@consecutive=1\relax% + \fi% + \ifnum\count@consecutive=1\relax% + \cref@isstackfull{\@refsubstack}% + \if@cref@stackfull% \expandafter\@setcref\expandafter{\@beginref}{#1}{@first}% \else% - \ifnum\count@consecutive=2% - \expandafter\@setcref\expandafter{\@beginref}{#1}{@first}% - \expandafter\cref@stack@push\expandafter% - {\@endref}{\@refsubstack}% + \expandafter\@setcref\expandafter{\@beginref}{#1}{}% + \fi% + \else% + \ifnum\count@consecutive=2\relax% + \expandafter\@setcref\expandafter{\@beginref}{#1}{@first}% + \expandafter\cref@stack@push\expandafter% + {\@endref,}{\@refsubstack}% + \else% + \edef\@tmpa{{\@beginref}{\@endref}}% + \if@cref@stackempty% + \expandafter\@setcrefrange\@tmpa{#1}{}% \else% - \edef\@tmpa{{\@beginref}{\@endref}}% - \if@cref@stackempty% - \expandafter\@setcrefrange\@tmpa{#1}{}% - \else% - \expandafter\@setcrefrange\@tmpa{#1}{@first}% - \fi% + \expandafter\@setcrefrange\@tmpa{#1}{@first}% \fi% \fi% - \@secondreftrue% - \cref@isstackfull{\@refsubstack}% - \@whilesw\if@cref@stackfull\fi{% + \fi% + \@secondreftrue% + \cref@isstackfull{\@refsubstack}% + \@whilesw\if@cref@stackfull\fi{% + \if@cref@compress% + \cref@processconsecutive% + {\@refsubstack}{\@beginref}{\@endref}{\count@consecutive}% + \else% \edef\@beginref{\cref@stack@top{\@refsubstack}}% \cref@stack@pop{\@refsubstack}% - \let\@endref\relax% - \cref@isstackempty{\@refsubstack}% - \if@cref@stackempty% - \if@secondref% - \expandafter\@setcref\expandafter{\@beginref}{#1}{@second}% - \else% - \expandafter\@setcref\expandafter{\@beginref}{#1}{@last}% - \fi% - \else% - \edef\@nextref{\cref@stack@top{\@refsubstack}}% - \count@consecutive=1% - \ifx\@nextref\@empty% - \@cref@refconsecutivefalse% - \@whilesw\ifx\@nextref\@empty\fi{% - \cref@stack@pop{\@refsubstack}% - \cref@isstackempty{\@refsubstack}% - \if@cref@stackempty% - \let\@nextref\relax% - \else% - \edef\@nextref{\cref@stack@top{\@refsubstack}}% - \fi% - }% - \ifnum\count@consecutive=2% - \edef\@endref{\@endref,}% - \fi% - \else% - \expandafter\ifx\csname r@\@nextref\endcsname\relax% - \@cref@refconsecutivefalse% - \else% - \edef\@tmpa{{\@beginref}{\@nextref}}% - \expandafter\cref@isrefconsecutive\@tmpa% - \fi% - \fi% - \@whilesw\if@cref@refconsecutive\fi{% - \advance\count@consecutive 1% - \let\@endref\@nextref% - \cref@stack@pop{\@refsubstack}% - \cref@isstackempty{\@refsubstack}% - \if@cref@stackempty% - \@cref@refconsecutivefalse% - \else% - \edef\@nextref{\cref@stack@top{\@refsubstack}}% - \ifx\@nextref\@empty% - \@cref@refconsecutivefalse% - \@whilesw\ifx\@nextref\@empty\fi{% - \cref@stack@pop{\@refsubstack}% - \cref@isstackempty{\@refsubstack}% - \if@cref@stackempty% - \let\@nextref\relax% - \else% - \edef\@nextref{\cref@stack@top{\@refsubstack}}% - \fi% - }% - \ifnum\count@consecutive=2% - \edef\@endref{\@endref,}% - \fi% - \else% - \expandafter\ifx\csname r@\@nextref\endcsname\relax% - \@cref@refconsecutivefalse% - \else% - \edef\@tmpa{{\@endref}{\@nextref}}% - \expandafter\cref@isrefconsecutive\@tmpa% - \fi% - \fi% - \fi}% + \@whilesw\ifx\@beginref\@empty\fi{% + \cref@stack@pop{\@refsubstack}% \cref@isstackempty{\@refsubstack}% \if@cref@stackempty% - \if@secondref% - \def\@pos{@second}% - \else% - \def\@pos{@last}% - \fi% + \let\@beginref\relax% \else% - \def\@pos{@middle}% - \fi% - \ifx\@endref\relax% - \edef\@tmpa{{\@beginref}{#1}{\@pos}}% - \expandafter\@setcref\@tmpa% - \else% - \ifnum\count@consecutive=2% - \expandafter\@setcref\expandafter% - {\@beginref}{#1}{@middle}% - \expandafter\cref@stack@push\expandafter% - {\@endref}{\@refsubstack}% - \else% - \edef\@tmpa{{\@beginref}{\@endref}{#1}{\@pos}}% - \expandafter\@setcrefrange\@tmpa% - \fi% - \fi% + \edef\@beginref{\cref@stack@top{\@refsubstack}}% + \fi}% + \let\@endref\relax% + \count@consecutive=1\relax% + \fi% + \cref@isstackempty{\@refsubstack}% + \if@cref@stackempty% + \if@secondref% + \def\@pos{@second}% + \else% + \def\@pos{@last}% \fi% - \@secondreffalse% - \cref@isstackfull{\@refsubstack}% - }% end loop over reference substack - \fi% + \else% + \def\@pos{@middle}% + \fi% + \ifnum\count@consecutive=1\relax% + \edef\@tmpa{{\@beginref}{#1}{\@pos}}% + \expandafter\@setcref\@tmpa% + \else% + \ifnum\count@consecutive=2\relax% + \expandafter\@setcref\expandafter% + {\@beginref}{#1}{@middle}% + \expandafter\cref@stack@push\expandafter% + {\@endref}{\@refsubstack}% + \else% + \edef\@tmpa{{\@beginref}{\@endref}{#1}{\@pos}}% + \expandafter\@setcrefrange\@tmpa% + \fi% + \fi% + \@secondreffalse% + \cref@isstackfull{\@refsubstack}% + }% end loop over reference substack \cref@isstackfull{\@refstack}% }% end loop over main reference stack \endgroup} @@ -496,25 +849,6 @@ \fi% \fi} \def\@@setcref#1#2{\cref@getlabel{#2}{\@templabel}#1{\@templabel}{}{}} -\newif\if@cref@refconsecutive% -\def\cref@isrefconsecutive#1#2{% - \begingroup% - \countdef\refa@counter=1% - \countdef\refb@counter=2% - \cref@getcounter{#1}{\@result}% - \refa@counter=\@result% - \advance\refa@counter 1% - \cref@getcounter{#2}{\@result}% - \refb@counter=\@result% - \cref@getprefix{#1}{\refa@prefix}% - \cref@getprefix{#2}{\refb@prefix}% - \def\@after{\@cref@refconsecutivefalse}% - \ifx\refa@prefix\refb@prefix% - \ifnum\refa@counter=\refb@counter% - \def\@after{\@cref@refconsecutivetrue}% - \fi% - \fi% - \expandafter\endgroup\@after} \def\@setcrefrange#1#2#3#4{% \begingroup% \expandafter\ifx\csname r@#1\endcsname\relax% @@ -535,7 +869,8 @@ \protect\G@refundefinedtrue% \cref@getlabel{#1}{\@labela}% \@labela--\nfss@text{\reset@font\bfseries ??}% - \@latex@warning{Reference `#2' on page \thepage \space undefined}% + \@latex@warning{Reference `#2' on page \thepage % + \space undefined}% \else% \cref@gettype{#1}{\@typea}% \cref@gettype{#2}{\@typeb}% @@ -570,29 +905,28 @@ \def\@setcref@pairgroupconjunction{\crefpairgroupconjunction} \def\@setcref@middlegroupconjunction{\crefmiddlegroupconjunction} \def\@setcref@lastgroupconjunction{\creflastgroupconjunction} +\cref@stack@init{\cref@label@types} \newcommand{\crefdefaultlabelformat}[1]{% \def\cref@default@label##1##2##3{#1}} \newcommand{\crefname}[3]{% - \@crefname{cref}{#1}{#2}{#3}% - \@crefdefineallformats{#1}} + \@crefname{cref}{#1}{#2}{#3}{}} \newcommand{\Crefname}[3]{% - \@crefname{Cref}{#1}{#2}{#3}% - \@crefdefineallformats{#1}} + \@crefname{Cref}{#1}{#2}{#3}{}} \newcommand{\creflabelformat}[2]{% - \@creflabelformat{#1}{#2}% - \@crefdefineallformats{#1}} + \expandafter\def\csname cref@#1@label\endcsname##1##2##3{#2}% + \cref@stack@add{#1}{\cref@label@types}} \newcommand{\crefrangelabelformat}[2]{% - \@crefrangelabelformat{#1}{#2}% - \@crefdefineallformats{#1}} -\def\@creflabelformat#1#2{% - \expandafter\def\csname cref@#1@label\endcsname##1##2##3{#2}} -\def\@crefrangelabelformat#1#2{% \expandafter\def\csname cref@#1@rangelabel\endcsname% - ##1##2##3##4##5##6{#2}} -\def\@crefname#1#2#3#4{% + ##1##2##3##4##5##6{#2}% + \cref@stack@add{#1}{\cref@label@types}} +\newcommand{\crefname@preamble}[3]{% + \@crefname{cref}{#1}{#2}{#3}{@preamble}} +\newcommand{\Crefname@preamble}[3]{% + \@crefname{Cref}{#1}{#2}{#3}{@preamble}} +\def\@crefname#1#2#3#4#5{% \begingroup% - \expandafter\gdef\csname #1@#2@name\endcsname{#3}% - \expandafter\gdef\csname #1@#2@name@plural\endcsname{#4}% + \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}% @@ -602,7 +936,7 @@ \def\@changecase{\MakeLowercase}% \fi}% \@tmpa#1\@nil% - \@ifundefined{\@other @#2@name}{% + \@ifundefined{\@other @#2@name#5}{% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tmpa% \expandafter\expandafter\expandafter{% @@ -621,13 +955,14 @@ \expandafter\@changecase\@tmpb}% \toksdef\@toksa=0% \@toksa={% - \expandafter\gdef\csname\@other @#2@name\endcsname}% + \expandafter\gdef\csname\@other @#2@name#5\endcsname}% \expandafter\the\expandafter\@toksa\expandafter{\@tmpa}% \@toksa={% - \expandafter\gdef\csname\@other @#2@name@plural\endcsname}% + \expandafter\gdef\csname\@other @#2@name@plural#5\endcsname}% \expandafter\the\expandafter\@toksa\expandafter{\@tmpb}% }{}% - \endgroup} + \endgroup% + \cref@stack@add{#2}{\cref@label@types}} \def\@crefconstructcomponents#1{% \@ifundefined{cref@#1@label}{% \let\@tmplabel\cref@default@label% @@ -642,39 +977,43 @@ \@tmplabel{####2}{####5}{####6}}% \toksdef\@toksa=0% \@toksa={\def\@tmprangelabel##1##2##3##4##5##6}% - \expandafter\expandafter\expandafter\expandafter% + % \expandafter\expandafter\expandafter\expandafter% + % \expandafter\expandafter\expandafter\the% + % \expandafter\expandafter\expandafter\expandafter% + % \expandafter\expandafter\expandafter\@toksa% + % \expandafter\expandafter\expandafter\expandafter% + % \expandafter\expandafter\expandafter{% + % \expandafter\expandafter\expandafter\@tmpa% + % \expandafter\crefrangeconjunction\@tmpb}% \expandafter\expandafter\expandafter\the% - \expandafter\expandafter\expandafter\expandafter% \expandafter\expandafter\expandafter\@toksa% - \expandafter\expandafter\expandafter\expandafter% \expandafter\expandafter\expandafter{% - \expandafter\expandafter\expandafter\@tmpa% - \expandafter\crefrangeconjunction\@tmpb}% + \expandafter\@tmpa\expandafter\crefrangeconjunction\@tmpb}% }{% \expandafter\let\expandafter\@tmprangelabel% \csname cref@#1@rangelabel\endcsname% }% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpname% - \expandafter\expandafter\expandafter{% - \csname cref@#1@name\endcsname}% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpName% - \expandafter\expandafter\expandafter{% - \csname Cref@#1@name\endcsname}% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpnameplural% - \expandafter\expandafter\expandafter{% - \csname cref@#1@name@plural\endcsname}% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpNameplural% - \expandafter\expandafter\expandafter{% - \csname Cref@#1@name@plural\endcsname}% \expandafter\def\expandafter\@tmplabel\expandafter{% \@tmplabel{########1}{########2}{########3}}% \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{% + \csname cref@#1@name@plural\endcsname}% + \expandafter\def\expandafter\@tmpNameplural\expandafter{% + \csname Cref@#1@name@plural\endcsname}% } \def\@crefdefineformat#1{% \begingroup% @@ -721,17 +1060,23 @@ \expandafter\expandafter\expandafter\@tmpFirst% \expandafter\expandafter\expandafter{% \expandafter\@tmpNameplural\expandafter~\@tmplabel}% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpsecond% - \expandafter\expandafter\expandafter{% + % \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\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\expandafter\expandafter\def% + % \expandafter\expandafter\expandafter\@tmplast% + % \expandafter\expandafter\expandafter{% + % \expandafter\creflastconjunction\@tmplabel}% + \expandafter\def\expandafter\@tmplast\expandafter{% \expandafter\creflastconjunction\@tmplabel}% \toksdef\@toksa=0% \toksdef\@toksb=1% @@ -769,17 +1114,23 @@ \expandafter\expandafter\expandafter\@tmpFirst% \expandafter\expandafter\expandafter{% \expandafter\@tmpNameplural\expandafter~\@tmprangelabel}% - \expandafter\expandafter\expandafter\def% - \expandafter\expandafter\expandafter\@tmpsecond% - \expandafter\expandafter\expandafter{% + % \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\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\expandafter\expandafter\def% + % \expandafter\expandafter\expandafter\@tmplast% + % \expandafter\expandafter\expandafter{% + % \expandafter\creflastconjunction\@tmprangelabel}% + \expandafter\def\expandafter\@tmplast\expandafter{% \expandafter\creflastconjunction\@tmprangelabel}% \toksdef\@toksa=0% \toksdef\@toksb=1% @@ -995,313 +1346,156 @@ \csname #1@#2@format@last\endcsname% }{}% \endgroup} -\newcommand{\crefrangeconjunction}{ to~} -\newcommand{\crefpairconjunction}{ and~} -\newcommand{\crefmiddleconjunction}{, } -\newcommand{\creflastconjunction}{ and~} -\crefdefaultlabelformat{#2#1#3} -\AtBeginDocument{% - \@ifundefined{crefpairgroupconjunction}{% - \let\crefpairgroupconjunction\crefpairconjunction}{}% - \@ifundefined{crefmiddlegroupconjunction}{% - \let\crefmiddlegroupconjunction\crefmiddleconjunction}{}% - \@ifundefined{creflastgroupconjunction}{% - \def\@tmpa{ and~}% - \ifx\creflastconjunction\@tmpa% - \def\creflastgroupconjunction{, and~}% - \else% - \let\creflastgroupconjunction\creflastconjunction% - \fi}{}% - \@ifundefined{cref@equation@name}{% - \@crefname{cref}{equation}{eq.}{eqs.}% - \@crefname{Cref}{equation}{Equation}{Equations}}{}% - \@ifundefined{cref@equation@label}{% - \@creflabelformat{equation}{\textup{(#2#1#3)}}% - \@ifundefined{cref@equation@rangelabel}{% - \@crefrangelabelformat{equation}{% - \textup{(#3#1#4)}--\textup{(#5#2#6)}}}{}}{}% - \@ifundefined{cref@chapter@name}{% - \@crefname{cref}{chapter}{chapter}{chapters}% - \@crefname{Cref}{chapter}{Chapter}{Chapters}}{}% - \@ifundefined{cref@section@name}{% - \@crefname{cref}{section}{section}{sections}% - \@crefname{Cref}{section}{Section}{Sections}}{}% - \@ifundefined{cref@subsection@name}{% - \@crefname{cref}{subsection}{section}{sections}% - \@crefname{Cref}{subsection}{Section}{Sections}}{}% - \@ifundefined{cref@subsubsection@name}{% - \@crefname{cref}{subsubsection}{section}{sections}% - \@crefname{Cref}{subsubsection}{Section}{Sections}}{}% - \@ifundefined{cref@subsubsubsection@name}{% - \@crefname{cref}{subsubsubsection}{section}{sections}% - \@crefname{Cref}{subsubsubsection}{Section}{Sections}}{}% - \@ifundefined{cref@appendix@name}{% - \@crefname{cref}{appendix}{appendix}{appendices}% - \@crefname{Cref}{appendix}{Appendix}{Appendices}}{}% - \@ifundefined{cref@figure@name}{% - \@crefname{cref}{figure}{fig.}{figs.}% - \@crefname{Cref}{figure}{Figure}{Figures}}{}% - \@ifundefined{cref@figure@rangelabel}{% - \@crefrangelabelformat{figure}{#3#1#4--#5#2#6}}{}% - \@ifundefined{cref@table@name}{% - \@crefname{cref}{table}{table}{tables}% - \@crefname{Cref}{table}{Table}{Tables}}{}% - \@ifundefined{cref@theorem@name}{% - \@crefname{cref}{theorem}{theorem}{theorems}% - \@crefname{Cref}{theorem}{Theorem}{Theorems}}{}% - \@ifundefined{cref@enumi@name}{% - \@crefname{cref}{enumi}{item}{items}% - \@crefname{Cref}{enumi}{Item}{Items}}{}% - \@ifundefined{cref@enumii@name}{% - \@crefname{cref}{enumii}{item}{items}% - \@crefname{Cref}{enumii}{Item}{Items}}{}% - \@ifundefined{cref@enumiii@name}{% - \@crefname{cref}{enumiii}{item}{items}% - \@crefname{Cref}{enumiii}{Item}{Items}}{}% - \@ifundefined{cref@enumiv@name}{% - \@crefname{cref}{enumiv}{item}{items}% - \@crefname{Cref}{enumiv}{Item}{Items}}{}% - \@ifundefined{cref@enumv@name}{% - \@crefname{cref}{enumv}{item}{items}% - \@crefname{Cref}{enumv}{Item}{Items}}{}% - \@ifundefined{cref@equation@format}{% - \@crefdefineformat{equation}}{}% - \@ifundefined{crefrange@equation@format}{% - \@crefrangedefineformat{equation}}{}% - \@ifundefined{cref@equation@format@first}{% - \@crefdefinemultiformat{equation}}{}% - \@ifundefined{crefrange@equation@format@first}{% - \@crefrangedefinemultiformat{equation}}{}% - \@ifundefined{cref@chapter@format}{% - \@crefdefineformat{chapter}}{}% - \@ifundefined{crefrange@chapter@format}{% - \@crefrangedefineformat{chapter}}{}% - \@ifundefined{cref@chapter@format@first}{% - \@crefdefinemultiformat{chapter}}{}% - \@ifundefined{crefrange@chapter@format@first}{% - \@crefrangedefinemultiformat{chapter}}{}% - \@ifundefined{cref@section@format}{% - \@crefdefineformat{section}}{}% - \@ifundefined{crefrange@section@format}{% - \@crefrangedefineformat{section}}{}% - \@ifundefined{cref@section@format@first}{% - \@crefdefinemultiformat{section}}{}% - \@ifundefined{crefrange@section@format@first}{% - \@crefrangedefinemultiformat{section}}{}% - \@ifundefined{cref@subsection@format}{% - \@crefdefineformat{subsection}}{}% - \@ifundefined{crefrange@subsection@format}{% - \@crefrangedefineformat{subsection}}{}% - \@ifundefined{cref@subsection@format@first}{% - \@crefdefinemultiformat{subsection}}{}% - \@ifundefined{crefrange@subsection@format@first}{% - \@crefrangedefinemultiformat{subsection}}{}% - \@ifundefined{cref@subsubsection@format}{% - \@crefdefineformat{subsubsection}}{}% - \@ifundefined{crefrange@subsubsection@format}{% - \@crefrangedefineformat{subsubsection}}{}% - \@ifundefined{cref@subsubsection@format@first}{% - \@crefdefinemultiformat{subsubsection}}{}% - \@ifundefined{crefrange@subsubsection@format@first}{% - \@crefrangedefinemultiformat{subsubsection}}{}% - \@ifundefined{cref@subsubsubsection@format}{% - \@crefdefineformat{subsubsubsection}}{}% - \@ifundefined{crefrange@subsubsubsection@format}{% - \@crefrangedefineformat{subsubsubsection}}{}% - \@ifundefined{cref@subsubsubsection@format@first}{% - \@crefdefinemultiformat{subsubsubsection}}{}% - \@ifundefined{crefrange@subsubsubsection@format@first}{% - \@crefrangedefinemultiformat{subsubsubsection}}{}% - \@ifundefined{cref@appendix@format}{% - \@crefdefineformat{appendix}}{}% - \@ifundefined{crefrange@appendix@format}{% - \@crefrangedefineformat{appendix}}{}% - \@ifundefined{cref@appendix@format@first}{% - \@crefdefinemultiformat{appendix}}{}% - \@ifundefined{crefrange@appendix@format@first}{% - \@crefrangedefinemultiformat{appendix}}{}% - \@ifundefined{cref@figure@format}{% - \@crefdefineformat{figure}}{}% - \@ifundefined{crefrange@figure@format}{% - \@crefrangedefineformat{figure}}{}% - \@ifundefined{cref@figure@format@first}{% - \@crefdefinemultiformat{figure}}{}% - \@ifundefined{crefrange@figure@format@first}{% - \@crefrangedefinemultiformat{figure}}{}% - \@ifundefined{cref@table@format}{% - \@crefdefineformat{table}}{}% - \@ifundefined{crefrange@table@format}{% - \@crefrangedefineformat{table}}{}% - \@ifundefined{cref@table@format@first}{% - \@crefdefinemultiformat{table}}{}% - \@ifundefined{crefrange@table@format@first}{% - \@crefrangedefinemultiformat{table}}{}% - \@ifundefined{cref@theorem@format}{% - \@crefdefineformat{theorem}}{}% - \@ifundefined{crefrange@theorem@format}{% - \@crefrangedefineformat{theorem}}{}% - \@ifundefined{cref@theorem@format@first}{% - \@crefdefinemultiformat{theorem}}{}% - \@ifundefined{crefrange@theorem@format@first}{% - \@crefrangedefinemultiformat{theorem}}{}% - \@ifundefined{cref@enumi@format}{% - \@crefdefineformat{enumi}}{}% - \@ifundefined{crefrange@enumi@format}{% - \@crefrangedefineformat{enumi}}{}% - \@ifundefined{cref@enumi@format@first}{% - \@crefdefinemultiformat{enumi}}{}% - \@ifundefined{crefrange@enumi@format@first}{% - \@crefrangedefinemultiformat{enumi}}{}% - \@ifundefined{cref@enumii@format}{% - \@crefdefineformat{enumii}}{}% - \@ifundefined{crefrange@enumii@format}{% - \@crefrangedefineformat{enumii}}{}% - \@ifundefined{cref@enumii@format@first}{% - \@crefdefinemultiformat{enumii}}{}% - \@ifundefined{crefrange@enumii@format@first}{% - \@crefrangedefinemultiformat{enumii}}{}% - \@ifundefined{cref@enumiii@format}{% - \@crefdefineformat{enumiii}}{}% - \@ifundefined{crefrange@enumiii@format}{% - \@crefrangedefineformat{enumiii}}{}% - \@ifundefined{cref@enumiii@format@first}{% - \@crefdefinemultiformat{enumiii}}{}% - \@ifundefined{crefrange@enumiii@format@first}{% - \@crefrangedefinemultiformat{enumiii}}{}% - \@ifundefined{cref@enumiv@format}{% - \@crefdefineformat{enumiv}}{}% - \@ifundefined{crefrange@enumiv@format}{% - \@crefrangedefineformat{enumiv}}{}% - \@ifundefined{cref@enumiv@format@first}{% - \@crefdefinemultiformat{enumiv}}{}% - \@ifundefined{crefrange@enumiv@format@first}{% - \@crefrangedefinemultiformat{enumiv}}{}% - \@ifundefined{cref@enumiv@format}{% - \@crefdefineformat{enumiv}}{}% - \@ifundefined{crefrange@enumiv@format}{% - \@crefrangedefineformat{enumiv}}{}% - \@ifundefined{cref@enumiv@format@first}{% - \@crefdefinemultiformat{enumiv}}{}% - \@ifundefined{crefrange@enumiv@format@first}{% - \@crefrangedefinemultiformat{enumiv}}{}% -} \@ifpackageloaded{hyperref}{% -\PackageInfo{cleveref}{`hyperref' support loaded} -\@ifpackagewith{hyperref}{backref}{% - \PackageError{cleveref}{`cleveref' is currently incompatible with - `hyperref's `backref' option}{Remove the `backref' option from - `hyperref' if you want to use `cleveref'}}{} -\def\cref@reflabel#1#2#3#4#5{\@result} -\def\cref@hyperref#1{\expandafter\expandafter\expandafter% - \@fourthoffive\csname r@#1\endcsname} -\def\cref@getlabel#1#2{% - \expandafter\let\expandafter\@tmpa\csname r@#1\endcsname% - \edef\@tmpa{\expandafter\@firstoffive\@tmpa}% - \expandafter\@cref@getlabel\@tmpa\@nil#2} -\def\cref@gettype#1#2{% - \expandafter\let\expandafter\@tmpa\csname r@#1\endcsname% - \edef\@tmpa{\expandafter\@firstoffive\@tmpa}% - \expandafter\@cref@gettype\@tmpa\@nil#2} -\def\cref@getcounter#1#2{% - \expandafter\let\expandafter\@tmpa\csname r@#1\endcsname% - \edef\@tmpa{\expandafter\@firstoffive\@tmpa}% - \expandafter\@cref@getcounter\@tmpa\@nil#2} -\def\cref@getprefix#1#2{% - \expandafter\let\expandafter\@tmpa\csname r@#1\endcsname% - \edef\@tmpa{\expandafter\@firstoffive\@tmpa}% - \expandafter\@cref@getprefix\@tmpa\@nil#2} -\def\H@refstepcounter#1{% - \stepcounter{#1}% - \cref@resetby{#1}{\@result}% - \ifx\@result\relax\def\@result{}% - \else\edef\@result{\csname the\@result\endcsname}\fi% - \protected@edef\@currentlabel{% - [#1][\arabic{#1}][\@result]% - \csname p@#1\endcsname\csname the#1\endcsname}} -\def\refstepcounter@noarg#1{\cref@old@refstepcounter{#1}% -} -\def\refstepcounter@optarg[#1]#2{% - \cref@old@refstepcounter{#2}% - \expandafter\@cref@getlabel\@currentlabel\@nil{\@tmplabel}% - \cref@resetby{#2}{\@tmpreset}% - \ifx\@tmpreset\relax\def\@tmpreset{}% - \else\edef\@tmpreset{\csname the\@tmpreset\endcsname}\fi% - \protected@edef\@currentlabel{% - [#1][\arabic{#2}][\@tmpreset]\@tmplabel}} -\renewcommand\appendix{% - \cref@old@appendix% - \@ifundefined{chapter}{% - \def\H@refstepcounter##1{% - \stepcounter{##1}% - \cref@resetby{##1}{\@result}% - \ifx\@result\relax\def\@result{}% - \else\edef\@result{\csname the\@result\endcsname}\fi% - \def\@tmpa{##1}% - \def\@tmpb{section}% - \ifx\@tmpa\@tmpb% - \protected@edef\@currentlabel{% - [appendix][\arabic{##1}][\@result]% - \csname p@##1\endcsname\csname the##1\endcsname}% - \else% - \protected@edef\@currentlabel{% - [##1][\arabic{##1}][\@result]% - \csname p@##1\endcsname\csname the##1\endcsname}% - \fi}% - }{% - \def\H@refstepcounter##1{% - \stepcounter{##1}% - \cref@resetby{##1}{\@result}% - \ifx\@result\relax\def\@result{}% - \else\edef\@result{\csname the\@result\endcsname}\fi% - \def\@tmpa{##1}% - \def\@tmpb{chapter}% - \ifx\@tmpa\@tmpb% - \protected@edef\@currentlabel{% - [appendix][\arabic{##1}][\@result]% - \csname p@##1\endcsname\csname the##1\endcsname}% - \else% - \protected@edef\@currentlabel{% - [##1][\arabic{##1}][\@result]% - \csname p@##1\endcsname\csname the##1\endcsname}% - \fi}% - }% -} -\newif\if@crefstarred -\DeclareRobustCommand{\cref}{% - \@ifstar{\@crefstar{cref}}{\@crefnostar{cref}}} -\DeclareRobustCommand{\Cref}{% - \@ifstar{\@crefstar{Cref}}{\@crefnostar{Cref}}} -\DeclareRobustCommand{\crefrange}{% - \@ifstar{\@crefrangestar{cref}}{\@crefrangenostar{cref}}} -\DeclareRobustCommand{\Crefrange}{% - \@ifstar{\@crefrangestar{Cref}}{\@crefrangenostar{Cref}}} -\def\@crefnostar#1#2{\@cref{#1}{#2}} -\def\@crefstar#1#2{% - \@crefstarredtrue\@crefnostar{#1}{#2}\@crefstarredfalse} -\def\@crefrangenostar#1#2#3{\@setcrefrange{#2}{#3}{#1}{}} -\def\@crefrangestar#1#2#3{% - \@crefstarredtrue\@crefrangenostar{#1}{#2}{#3}\@crefstarredfalse} -\def\@@setcref#1#2{% - \cref@getlabel{#2}{\@tmplabel}% - \if@crefstarred% - #1{\@tmplabel}{}{}% - \else% - \edef\@tmplink{\cref@hyperref{#2}}% - #1{\@tmplabel}{\hyper@linkstart{link}{\@tmplink}}{\hyper@linkend}% - \fi} -\def\@@setcrefrange#1#2#3{% - \cref@getlabel{#2}{\@labela}% - \cref@getlabel{#3}{\@labelb}% - \if@crefstarred% - #1{\@labela}{\@labelb}{}{}{}{}% - \else% - \edef\@linka{\cref@hyperref{#2}}% - \edef\@linkb{\cref@hyperref{#3}}% - #1{\@labela}{\@labelb}% - {\hyper@linkstart{link}{\@linka}}{\hyper@linkend}% - {\hyper@linkstart{link}{\@linkb}}{\hyper@linkend}% - \fi} -}{} + \PackageInfo{cleveref}{`hyperref' support loaded} + \@ifpackagewith{hyperref}{backref}{% + \PackageError{cleveref}{`cleveref' is currently incompatible with + `hyperref's `backref' option}{Remove the `backref' option from + `hyperref' if you want to use `cleveref'}}{} + \def\cref@reflabel#1#2#3#4#5{\@result} + \def\cref@hyperref#1{\expandafter\expandafter\expandafter% + \@fourthoffive\csname r@#1\endcsname} + \def\cref@getlabel#1#2{% + \expandafter\let\expandafter\@tmpa\csname r@#1\endcsname% + \edef\@tmpa{\expandafter\@firstoffive\@tmpa}% + \expandafter\@cref@getlabel\@tmpa\@nil#2} + \def\cref@gettype#1#2{% + \expandafter\let\expandafter\@tmpa\csname r@#1\endcsname% + \edef\@tmpa{\expandafter\@firstoffive\@tmpa}% + \expandafter\@cref@gettype\@tmpa\@nil#2} + \def\cref@getcounter#1#2{% + \expandafter\let\expandafter\@tmpa\csname r@#1\endcsname% + \edef\@tmpa{\expandafter\@firstoffive\@tmpa}% + \expandafter\@cref@getcounter\@tmpa\@nil#2} + \def\cref@getprefix#1#2{% + \expandafter\let\expandafter\@tmpa\csname r@#1\endcsname% + \edef\@tmpa{\expandafter\@firstoffive\@tmpa}% + \expandafter\@cref@getprefix\@tmpa\@nil#2} + \def\H@refstepcounter#1{% + \stepcounter{#1}% + \cref@constructprefix{#1}{\@result}% + \protected@edef\@currentlabel{% + [#1][\arabic{#1}][\@result]% + \csname p@#1\endcsname\csname the#1\endcsname}} + \def\refstepcounter@noarg#1{\cref@old@refstepcounter{#1}} + \def\refstepcounter@optarg[#1]#2{% + \cref@old@refstepcounter{#2}% + \expandafter\@cref@getlabel\@currentlabel\@nil{\@tmplabel}% + \cref@constructprefix{#2}{\@tmpreset}% + \protected@edef\@currentlabel{% + [#1][\arabic{#2}][\@tmpreset]\@tmplabel}} + \renewcommand\appendix{% + \cref@old@appendix% + \@ifundefined{chapter}{% + \def\H@refstepcounter##1{% + \stepcounter{##1}% + \cref@constructprefix{##1}{\@result}% + \edef\@result{{2147483647}\@result}% + \def\@tmpa{##1}% + \def\@tmpb{section}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [appendix][\arabic{##1}][\@result]% + \csname p@##1\endcsname\csname the##1\endcsname}% + \else% + \def\@tmpa{##1}% + \def\@tmpb{subsection}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subappendix][\arabic{##1}][\@result]% + \csname p@##1\endcsname\csname the##1\endcsname}% + \else% + \def\@tmpa{##1}% + \def\@tmpb{subsubsection}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subsubappendix][\arabic{##1}][\@result]% + \csname p@##1\endcsname\csname the##1\endcsname}% + \else% + \protected@edef\@currentlabel{% + [##1][\arabic{##1}][\@result]% + \csname p@##1\endcsname\csname the##1\endcsname}% + \fi% + \fi% + \fi}% + }{% + \def\H@refstepcounter##1{% + \stepcounter{##1}% + \cref@constructprefix{##1}{\@result}% + \edef\@result{{2147483647}\@result}% + \def\@tmpa{##1}% + \def\@tmpb{chapter}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [appendix][\arabic{##1}][\@result]% + \csname p@##1\endcsname\csname the##1\endcsname}% + \else% + \def\@tmpa{##1}% + \def\@tmpb{section}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subappendix][\arabic{##1}][\@result]% + \csname p@##1\endcsname\csname the##1\endcsname}% + \else% + \def\@tmpa{##1}% + \def\@tmpb{subsection}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subsubappendix][\arabic{##1}][\@result]% + \csname p@##1\endcsname\csname the##1\endcsname}% + \else% + \def\@tmpa{##1}% + \def\@tmpb{subsubsection}% + \ifx\@tmpa\@tmpb% + \protected@edef\@currentlabel{% + [subsubsubappendix][\arabic{##1}][\@result]% + \csname p@##1\endcsname\csname the##1\endcsname}% + \else% + \protected@edef\@currentlabel{% + [##1][\arabic{##1}][\@result]% + \csname p@##1\endcsname\csname the##1\endcsname}% + \fi% + \fi% + \fi% + \fi}% + }% + } + \newif\if@crefstarred + \DeclareRobustCommand{\cref}{% + \@ifstar{\@crefstar{cref}}{\@crefnostar{cref}}} + \DeclareRobustCommand{\Cref}{% + \@ifstar{\@crefstar{Cref}}{\@crefnostar{Cref}}} + \def\@crefnostar#1#2{\@cref{#1}{#2}} + \def\@crefstar#1#2{% + \@crefstarredtrue\@cref{#1}{#2}\@crefstarredfalse} + \DeclareRobustCommand{\crefrange}{% + \@ifstar{\@crefrangestar{cref}}{\@crefrangenostar{cref}}} + \DeclareRobustCommand{\Crefrange}{% + \@ifstar{\@crefrangestar{Cref}}{\@crefrangenostar{Cref}}} + \def\@crefrangenostar#1#2#3{\@setcrefrange{#2}{#3}{#1}{}} + \def\@crefrangestar#1#2#3{% + \@crefstarredtrue\@setcrefrange{#2}{#3}{#1}{}\@crefstarredfalse} + \def\@@setcref#1#2{% + \cref@getlabel{#2}{\@tmplabel}% + \if@crefstarred% + #1{\@tmplabel}{}{}% + \else% + \edef\@tmplink{\cref@hyperref{#2}}% + #1{\@tmplabel}{\hyper@linkstart{link}{\@tmplink}}{\hyper@linkend}% + \fi} + \def\@@setcrefrange#1#2#3{% + \cref@getlabel{#2}{\@labela}% + \cref@getlabel{#3}{\@labelb}% + \if@crefstarred% + #1{\@labela}{\@labelb}{}{}{}{}% + \else% + \edef\@linka{\cref@hyperref{#2}}% + \edef\@linkb{\cref@hyperref{#3}}% + #1{\@labela}{\@labelb}% + {\hyper@linkstart{link}{\@linka}}{\hyper@linkend}% + {\hyper@linkstart{link}{\@linkb}}{\hyper@linkend}% + \fi}% + }{}% end of \@ifpackageloaded \AtBeginDocument{% \DeclareRobustCommand{\ref}{\@ifstar\cref@refstar\cref@ref} \def\cref@refstar#1{% @@ -1312,262 +1506,1785 @@ \fi% \expandafter\real@setref\csname r@#1\endcsname{\cref@reflabel}{#1}}% } -\@ifpackageloaded{ntheorem}{% -\PackageInfo{cleveref}{`ntheorem' support loaded} -\@ifpackagewith{ntheorem}{thref}{% - \PackageWarning{cleveref}{`cleveref' supersedes `ntheorem's `thref' - option}% - \renewcommand{\thref}{\cref}}{} -\@ifundefined{theorem@prework}{\let\theorem@prework\relax}{} -\gdef\@thm#1#2#3{% - \if@thmmarks% - \stepcounter{end\InTheoType ctr}% - \fi% - \renewcommand{\InTheoType}{#1}% - \if@thmmarks% - \stepcounter{curr#1ctr}% - \setcounter{end#1ctr}{0}% - \fi% - \refstepcounter[#1]{#2}% <<<<< - \theorem@prework% - \thm@topsepadd \theorempostskipamount% - \ifvmode \advance\thm@topsepadd\partopsep\fi% - \trivlist% - \@topsep \theorempreskipamount% - \@topsepadd \thm@topsepadd% - \advance\linewidth -\theorem@indent% - \advance\@totalleftmargin \theorem@indent% - \parshape \@ne \@totalleftmargin \linewidth% - \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}%] - } -\AtBeginDocument{% - \@ifundefined{cref@lemma@name}{% - \@crefname{cref}{lemma}{lemma}{lemmas}% - \@crefname{Cref}{lemma}{Lemma}{Lemmas}}{}% - \@ifundefined{cref@corollary@name}{% - \@crefname{cref}{corollary}{corollary}{corollaries}% - \@crefname{Cref}{corollary}{Corollary}{Corollaries}}{}% - \@ifundefined{cref@proposition@name}{% - \@crefname{cref}{proposition}{proposition}{propositions}% - \@crefname{Cref}{proposition}{Proposition}{Proposition}}{}% - \@ifundefined{cref@definition@name}{% - \@crefname{cref}{definition}{definition}{definitions}% - \@crefname{Cref}{definition}{Definition}{Definitions}}{}% - \@ifundefined{cref@result@name}{% - \@crefname{cref}{result}{result}{results}% - \@crefname{cref}{result}{Result}{Results}}{}% - \@ifundefined{cref@lemma@format}{% - \@crefdefineformat{lemma}}{}% - \@ifundefined{crefrange@lemma@format}{% - \@crefrangedefineformat{lemma}}{}% - \@ifundefined{cref@lemma@format@first}{% - \@crefdefinemultiformat{lemma}}{}% - \@ifundefined{crefrange@lemma@format@first}{% - \@crefrangedefinemultiformat{lemma}}{}% - \@ifundefined{cref@corollary@format}{% - \@crefdefineformat{corollary}}{}% - \@ifundefined{crefrange@corollary@format}{% - \@crefrangedefineformat{corollary}}{}% - \@ifundefined{cref@corollary@format@first}{% - \@crefdefinemultiformat{corollary}}{}% - \@ifundefined{crefrange@corollary@format@first}{% - \@crefrangedefinemultiformat{corollary}}{}% - \@ifundefined{cref@definition@format}{% - \@crefdefineformat{definition}}{}% - \@ifundefined{crefrange@definition@format}{% - \@crefrangedefineformat{definition}}{}% - \@ifundefined{cref@definition@format@first}{% - \@crefdefinemultiformat{definition}}{}% - \@ifundefined{crefrange@definition@format@first}{% - \@crefrangedefinemultiformat{definition}}{}% - \@ifundefined{cref@result@format}{% - \@crefdefineformat{result}}{}% - \@ifundefined{crefrange@result@format}{% - \@crefrangedefineformat{result}}{}% - \@ifundefined{cref@result@format@first}{% - \@crefdefinemultiformat{result}}{}% - \@ifundefined{crefrange@result@format@first}{% - \@crefrangedefinemultiformat{result}}{}% -}% -}{} -\DeclareOption{poorman}{% -\PackageInfo{cleveref}{option `poorman' loaded} -\edef\cref@text{} -\AtBeginDocument{% - \newwrite\@crefscript% - \immediate\openout\@crefscript=\jobname.sed% -} -\AtEndDocument{% - \immediate\closeout\@crefscript% - \newread\@crefscript% - \immediate\openin\@crefscript=\jobname.sed% - \begingroup% - \newif\if@not@eof% - \def\@eof{\par }% - \catcode`.=13 \catcode`[=13 \catcode`]=13 - \catcode`^=13 \catcode`$=13 %$ - \catcode`\=0 \catcode`<=1 \catcode`>=2 - \catcode`\\=13 \catcode`\{=12 \catcode`\}=12 \catcode`_=12 - \lccode`/=92 - \lccode`~=92\lowercase{\def~{\string/\string/}}% - \lccode`~=46\lowercase{\def~{\string/\string.}}% - \lccode`~=91\lowercase{\def~{\string/\string[}}% - \lccode`~=93\lowercase{\def~{\string/\string]}}% - \lccode`~=94\lowercase{\def~{\string/\string^}}% - \lccode`~=36\lowercase{\def~{\string/\string$}}% $ - \lccode`~=0 \lccode`/=0 \catcode`~=12 - \def\cref@text{}% - \immediate\read\@crefscript to \@tmpa% - \ifx\@tmpa\@eof% - \@not@eoffalse% + \@ifpackageloaded{ntheorem}{% + \PackageInfo{cleveref}{`ntheorem' support loaded} + \@ifpackagewith{ntheorem}{thref}{% + \PackageWarning{cleveref}{`cleveref' supersedes `ntheorem's `thref' + option}% + \renewcommand{\thref}{\cref}}{} + \@ifundefined{theorem@prework}{\let\theorem@prework\relax}{} + \gdef\@thm#1#2#3{% + \if@thmmarks% + \stepcounter{end\InTheoType ctr}% + \fi% + \renewcommand{\InTheoType}{#1}% + \if@thmmarks% + \stepcounter{curr#1ctr}% + \setcounter{end#1ctr}{0}% + \fi% + \refstepcounter[#1]{#2}% <<<<< + \theorem@prework% + \thm@topsepadd \theorempostskipamount% + \ifvmode \advance\thm@topsepadd\partopsep\fi% + \trivlist% + \@topsep \theorempreskipamount% + \@topsepadd \thm@topsepadd% + \advance\linewidth -\theorem@indent% + \advance\@totalleftmargin \theorem@indent% + \parshape \@ne \@totalleftmargin \linewidth% + \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}%] + }}{}% end of \@ifpackageloaded +\@ifpackageloaded{varioref}{% + \PackageInfo{cleveref}{`varioref' support loaded} + \PackageInfo{cleveref}{`cleveref' supersedes `varioref's % + $\backslash$\labelformat command, which will not work} + \AtBeginDocument{% + \def\cref@vref#1#2{% + \if@cref@legacyvarioref% + \leavevmode\unskip\vref@space + \fi% + \@cref{#1}{#2} % space here is deliberate + \begingroup% + \def\@tmpstack{#2,\@nil}% + \cref@stack@topandbottom{\@tmpstack}{\@firstref}{\@lastref}% + \ifx\@lastref\@empty% + \vpageref{#2}% + \else% + \edef\@tmpa{{\@firstref}{\@lastref}}% + \expandafter\vpagerefrange\@tmpa% + \fi% + \endgroup} + \def\cref@vrefrange#1#2#3{% + \@setcrefrange{#2}{#3}{#1}{} \vpagerefrange{#2}{#3}} + \def\cref@fullref#1#2{% + \@cref{#1}{#2} % space here is deliberate + \begingroup% + \def\@tmpstack{#2,\@nil}% + \cref@stack@topandbottom{\@tmpstack}{\@firstref}{\@lastref}% + \ifx\@lastref\@empty% + \reftextfaraway{#2}% + \else% + \expandafter\vrefpagenum\expandafter% + \@tmpa\expandafter{\@firstref}% + \expandafter\vrefpagenum\expandafter% + \@tmpb\expandafter{\@lastref}% + \ifx\@tmpa\@tmpb + \expandafter\reftextfaraway\expandafter{\@firstref}% + \else + \edef\@tmpa{{\@firstref}{\@lastref}}% + \expandafter\reftextpagerange\@tmpa% + \fi% + \fi% + \endgroup} + \if@cref@legacyvarioref% + \def\vr@f#1{\cref@vref{cref}{#1}} + \def\Vr@f#1{\cref@vref{Cref}{#1}} + \renewcommand\vrefrange[3][\reftextcurrent]{% + \crefrange{#2}{#3} \vpagerefrange{#2}{#3}} + \def\fullref#1{\cref@fullref{cref}{#1}} \else% - \@not@eoftrue% - \edef\@tmpa{\@tmpa}% + \@ifpackageloaded{hyperref}{% + \DeclareRobustCommand{\vref}{% + \@ifstar{\cref@vrefstar{cref}}{\cref@vref{cref}}} + \DeclareRobustCommand{\Vref}{% + \@ifstar{\cref@vrefstar{Cref}}{\cref@vref{Cref}}} + \DeclareRobustCommand{\vrefrange}{% + \@ifstar{\cref@vrefrangestar{cref}}{\cref@vrefrange{cref}}} + \DeclareRobustCommand{\Vrefrange}{% + \@ifstar{\cref@vrefrangestar{Cref}}{\cref@vrefrange{Cref}}}% + \DeclareRobustCommand{\fullref}{% + \@ifstar{\cref@fullrefstar{cref}}{\cref@fullref{cref}}} + \DeclareRobustCommand{\Fullref}{% + \@ifstar{\cref@fullrefstar{Cref}}{\cref@fullref{Cref}}} + \def\cref@vrefstar#1#2{% + \@crefstarredtrue% + \cref@vref{#1}{#2}% + \@crefstarredfalse} + \def\cref@vrefrangestar#1#2#3{% + \@crefstarredtrue% + \cref@vrefrange{#1}{#2}{#3}% + \@crefstarredfalse} + \def\cref@fullrefstar#1#2{% + \@crefstarredtrue% + \cref@fullref{#1}{#2}% + \@crefstarredfalse} + }{% + \DeclareRobustCommand{\vref}{\cref@vref{cref}} + \DeclareRobustCommand{\Vref}{\cref@vref{Cref}} + \DeclareRobustCommand{\vrefrange}{\cref@vrefrange{cref}} + \DeclareRobustCommand{\Vrefrange}{\cref@vrefrange{Cref}} + \DeclareRobustCommand{\fullref}{\cref@fullref{cref}} + \DeclareRobustCommand{\Fullref}{\cref@fullref{Cref}} + } \fi% - \@whilesw\if@not@eof\fi{% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% + }% end of \AtBeginDocument + }{}% end of \@ifpackageloaded +\let\if@cref@legacyvarioref\iffalse +\DeclareOption{legacyvarioref}{% + \PackageInfo{cleveref}{legacy `varioref' compatibility enabled} + \let\if@cref@legacyvarioref\iftrue} +\DeclareOption{poorman}{% + \PackageInfo{cleveref}{option `poorman' loaded} + \gdef\cref@poorman@text{} + \AtBeginDocument{% + \newwrite\@crefscript% + \immediate\openout\@crefscript=\jobname.sed} + \newif\if@cref@switched@language + \@ifpackageloaded{babel}{% + \AtBeginDocument{% + \let\cref@old@select@language\select@language + \def\select@language{% + \@cref@switched@languagetrue% + \cref@writelanguagerules% + \cref@old@select@language} + \let\cref@old@forreign@language\forreign@language + \def\forreign@language{% + \@cref@switched@languagetrue% + \cref@writelanguagerules% + \cref@old@forreign@language} + \edef\cref@inputlineno{\the\inputlineno}} + \AtEndDocument{% + \let\select@language\cref@old@select@language% + \let\forreign@language\cref@old@forreign@language% + \cref@writelanguagerules} + \def\cref@writelanguagerules{% + \begingroup% + \if@cref@switched@language% + \edef\@address{\cref@inputlineno,\the\inputlineno}% + \else% + \def\@address{}% + \fi% + \expandafter\def\expandafter\cref@poorman@text\expandafter{% + \crefrangeconjunction}% + \expandafter\def\expandafter\@tmpa\expandafter{% + \expandafter{\@address}{\string\crefrangeconjunction}} + \expandafter\cref@writescript\@tmpa% + \expandafter\def\expandafter\cref@poorman@text\expandafter{% + \crefpairconjunction}% + \expandafter\def\expandafter\@tmpa\expandafter{% + \expandafter{\@address}{\string\crefpairconjunction}} + \expandafter\cref@writescript\@tmpa% + \expandafter\def\expandafter\cref@poorman@text\expandafter{% + \crefmiddleconjunction}% + \expandafter\def\expandafter\@tmpa\expandafter{% + \expandafter{\@address}{\string\crefmiddleconjunction}} + \expandafter\cref@writescript\@tmpa% + \expandafter\def\expandafter\cref@poorman@text\expandafter{% + \creflastconjunction}% + \expandafter\def\expandafter\@tmpa\expandafter{% + \expandafter{\@address}{\string\creflastconjunction}} + \expandafter\cref@writescript\@tmpa% + \expandafter\def\expandafter\cref@poorman@text\expandafter{% + \crefpairgroupconjunction}% + \expandafter\def\expandafter\@tmpa\expandafter{% + \expandafter{\@address}{\string\crefpairgroupconjunction}} + \expandafter\cref@writescript\@tmpa% + \expandafter\def\expandafter\cref@poorman@text\expandafter{% + \crefmiddlegroupconjunction}% + \expandafter\def\expandafter\@tmpa\expandafter{% + \expandafter{\@address}{\string\crefmiddlegroupconjunction}} + \expandafter\cref@writescript\@tmpa% + \expandafter\def\expandafter\cref@poorman@text\expandafter{% + \creflastgroupconjunction}% + \expandafter\def\expandafter\@tmpa\expandafter{% + \expandafter{\@address}{\string\creflastgroupconjunction}} + \expandafter\cref@writescript\@tmpa% + \let\@tmpstack\cref@label@types% + \cref@isstackfull{\@tmpstack}% + \@whilesw\if@cref@stackfull\fi{% + \edef\@tmpa{\cref@stack@top{\@tmpstack}}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\cref@poorman@text% + \expandafter\expandafter\expandafter{% + \csname cref@\@tmpa @name\endcsname}% + \edef\@tmpa{% + \string\cref@\expandafter\noexpand\@tmpa @name\space}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@tmpa% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter{% + \expandafter\@address\expandafter}% + \expandafter{\@tmpa}} + \expandafter\cref@writescript\@tmpa% + \edef\@tmpa{\cref@stack@top{\@tmpstack}}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\cref@poorman@text% + \expandafter\expandafter\expandafter{% + \csname cref@\@tmpa @name@plural\endcsname}% + \edef\@tmpa{% + \string\cref@\expandafter\noexpand\@tmpa% + @name@plural\space}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@tmpa% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter{% + \expandafter\@address\expandafter}% + \expandafter{\@tmpa}} + \expandafter\cref@writescript\@tmpa% + \edef\@tmpa{\cref@stack@top{\@tmpstack}}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\cref@poorman@text% + \expandafter\expandafter\expandafter{% + \csname Cref@\@tmpa @name\endcsname}% + \edef\@tmpa{% + \string\Cref@\expandafter\noexpand\@tmpa @name\space}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@tmpa% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter% + {\expandafter\@address\expandafter}% + \expandafter{\@tmpa}} + \expandafter\cref@writescript\@tmpa% + \edef\@tmpa{\cref@stack@top{\@tmpstack}}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\cref@poorman@text% + \expandafter\expandafter\expandafter{% + \csname Cref@\@tmpa @name@plural\endcsname}% + \edef\@tmpa{% + \string\Cref@\expandafter\noexpand\@tmpa% + @name@plural\space}% + \expandafter\expandafter\expandafter\def% + \expandafter\expandafter\expandafter\@tmpa% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter% + {\expandafter\@address\expandafter}% + \expandafter{\@tmpa}} + \expandafter\cref@writescript\@tmpa% + \cref@stack@pop{\@tmpstack}% + \cref@isstackfull{\@tmpstack}}% + \endgroup% + \edef\cref@inputlineno{\the\inputlineno}}% + }{}% end of \@ifpackageloaded + \AtEndDocument{% + \immediate\closeout\@crefscript% + \newread\@crefscript% + \immediate\openin\@crefscript=\jobname.sed% + \begingroup% + \newif\if@not@eof% + \def\@eof{\par }% + \catcode`.=13 \catcode`*=13 + \catcode`[=13 \catcode`]=13 + \catcode`^=13 \catcode`$=13 %$ + \catcode`\=0 \catcode`<=1 \catcode`>=2 + \catcode`\\=13 \catcode`\{=12 \catcode`\}=12 \catcode`_=12 + \lccode`/=92 + \lccode`~=92\lowercase{\def~{\string/\string/}}% + \lccode`~=42\lowercase{\def~{\string/\string*}}% + \lccode`~=46\lowercase{\def~{\string/\string.}}% + \lccode`~=91\lowercase{\def~{\string/\string[}}% + \lccode`~=93\lowercase{\def~{\string/\string]}}% + \lccode`~=94\lowercase{\def~{\string/\string^}}% + \lccode`~=36\lowercase{\def~{\string/\string$}}% $ + \lccode`~=0 \lccode`/=0 \catcode`~=12 + \def\cref@poorman@text{}% \immediate\read\@crefscript to \@tmpa% \ifx\@tmpa\@eof% \@not@eoffalse% \else% \@not@eoftrue% \edef\@tmpa{\@tmpa}% - \fi}% - \endgroup% - \immediate\closein\@crefscript% - \begingroup% - \lccode`|=92 \lccode`<=123 \lccode`>=125 \lccode`C=67 - \lowercase{\edef\@tmpa{s/||usepackage|(|[.*|]|)|?//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{s/||[cC]refformat<.*><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{s/||[cC]refrangeformat<.*><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{s/||[cC]refmultiformat<.*><.*><.*><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{% - s/||[cC]refrangemultiformat<.*><.*><.*><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{s/||[cC]refname<.*><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{s/||[cC]reflabelformat<.*><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{s/||[cC]refrangelabelformat<.*><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{s/||[cC]refdefaultlabelformat<.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{% - s/||renewcommand<||crefpairconjunction><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{% - s/||renewcommand<||crefpairgroupconjunction><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{% - s/||renewcommand<||crefmiddleconjunction><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{% - s/||renewcommand<||crefmiddlegroupconjunction><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{% - s/||renewcommand<||creflastconjunction><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{% - s/||renewcommand<||creflastgroupconjunction><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{s/||renewcommand<||[cC]ref><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \lowercase{\edef\@tmpa{s/||renewcommand<||[cC]refrange><.*>//g}}% - \expandafter\g@addto@macro\expandafter\cref@text\expandafter{% - \@tmpa^^J}% - \endgroup% - \newwrite\@crefscript% - \immediate\openout\@crefscript=\jobname.sed% - \immediate\write\@crefscript{\cref@text}% - \immediate\closeout\@crefscript% + \fi% + \@whilesw\if@not@eof\fi{% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \immediate\read\@crefscript to \@tmpa% + \ifx\@tmpa\@eof% + \@not@eoffalse% + \else% + \@not@eoftrue% + \edef\@tmpa{\@tmpa}% + \fi}% + \endgroup% + \immediate\closein\@crefscript% + \begingroup% + \lccode`|=92 \lccode`<=123 \lccode`>=125 \lccode`C=67 + \lowercase{\def\@tmpa{%[ + s/||label|[[^]]*|]/||label/g}} + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||usepackage|(|[.*|]|)|?//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||[cC]refformat<.*><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||[cC]refrangeformat<.*><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||[cC]refmultiformat<.*><.*><.*><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{% + s/||[cC]refrangemultiformat<.*><.*><.*><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||[cC]refname<.*><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||[cC]reflabelformat<.*><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||[cC]refrangelabelformat<.*><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||[cC]refdefaultlabelformat<.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{% + s/||renewcommand<||crefpairconjunction><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{% + s/||renewcommand<||crefpairgroupconjunction><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{% + s/||renewcommand<||crefmiddleconjunction><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{% + s/||renewcommand<||crefmiddlegroupconjunction><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{% + s/||renewcommand<||creflastconjunction><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{% + s/||renewcommand<||creflastgroupconjunction><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||renewcommand<||[cC]ref><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \lowercase{\edef\@tmpa{s/||renewcommand<||[cC]refrange><.*>//g}}% + \expandafter\g@addto@macro\expandafter% + \cref@poorman@text\expandafter{\@tmpa^^J}% + \endgroup% + \newwrite\@crefscript% + \immediate\openout\@crefscript=\jobname.sed% + \immediate\write\@crefscript{\cref@poorman@text}% + \immediate\closeout\@crefscript% + } + \def\cref@getmeaning#1{\expandafter\@cref@getmeaning\meaning#1\@nil} + \def\@cref@getmeaning#1->#2\@nil{#2} + \def\cref@writescript#1#2{% + \edef\@tmpa{\cref@getmeaning{\cref@poorman@text}}% + \immediate\write\@crefscript{#1 s/#2/\@tmpa/g}} + \@ifpackageloaded{hyperref}{% + \def\@crefnostar#1#2{% + \gdef\cref@poorman@text{}% + \@cref{#1}{#2}% + \begingroup% + \lccode`|=92 \lccode`<=123 \lccode`>=125 \lccode`C=67 + \lowercase{\cref@writescript{}{|#1<#2>}}% + \endgroup} + \def\@crefstar#1#2{% + \gdef\cref@poorman@text{}% + \@crefstarredtrue\@cref{#1}{#2}\@crefstarredfalse% + \begingroup% + \lccode`|=92 \lccode`<=123 \lccode`>=125 \lccode`C=67 + \lowercase{\cref@writescript{}{|#1*<#2>}}% + \endgroup} + \def\@crefrangenostar#1#2#3{% + \gdef\cref@poorman@text{}% + \@setcrefrange{#2}{#3}{#1}{}% + \begingroup% + \lccode`|=92 \lccode`<=123 \lccode`>=125 \lccode`C=67 + \lowercase{\cref@writescript{}{|#1range<#2><#3>}}% + \endgroup} + \def\@crefrangestar#1#2#3{% + \gdef\cref@poorman@text{}% + \@crefstarredtrue\@setcrefrange{#2}{#3}{#1}{}\@crefstarredfalse% + \begingroup% + \lccode`|=92 \lccode`<=123 \lccode`>=125 \lccode`C=67 + \lowercase{\cref@writescript{}{|#1range*<#2><#3>}}% + \endgroup} + }{% + \DeclareRobustCommand{\cref}[1]{% + \edef\cref@poorman@text{}% + \@cref{cref}{#1}% + \cref@writescript{}{\string\cref\string{#1\string}}} + \DeclareRobustCommand{\Cref}[1]{% + \edef\cref@poorman@text{}% + \@cref{Cref}{#1}% + \cref@writescript{}{\string\Cref\string{#1\string}}} + \DeclareRobustCommand{\crefrange}[2]{% + \edef\cref@poorman@text{}% + \@setcrefrange{#1}{#2}{cref}{}% + \cref@writescript{}{% + \string\crefrange\string{#1\string}\string{#2\string}}} + \DeclareRobustCommand{\Crefrange}[2]{% + \edef\cref@poorman@text{}% + \@setcrefrange{#1}{#2}{Cref}{}% + \cref@writescript{}{% + \string\Crefrange\string{#1\string}\string{#2\string}}} + } + \@ifpackageloaded{varioref}{% + \AtBeginDocument{% + \if@cref@legacyvarioref% + \DeclareRobustCommand{\vref}{% + \@ifstar{\cref@vrefstar{cref}}{\cref@vref{cref}}} + \def\cref@vrefstar#1#2{% + \@crefstarredtrue\cref@vref{#1}{#2}\@crefstarredfalse} + \fi + \def\cref@vref#1#2{% + \gdef\cref@poorman@text{}% + \if@cref@legacyvarioref% + \leavevmode\unskip\vref@space + \fi% + \begingroup% + \let\if@tmp\if@crefstarred% + \if@cref@legacyvarioref\@crefstarredfalse\fi% + \@cref{#1}{#2} % space here is deliberate + \let\if@crefstarred\if@tmp% + \def\@tmpstack{#2,\@nil}% + \cref@stack@topandbottom{\@tmpstack}{\@firstref}{\@lastref}% + \ifx\@lastref\@empty% + \vpageref{#2}% + \g@addto@macro\cref@poorman@text{ \vpageref{#2}}% + \else% + \g@addto@macro\cref@poorman@text{ }% + \edef\@tmpa{{\@firstref}{\@lastref}}% + \expandafter\vpagerefrange\@tmpa% + \expandafter\g@addto@macro\expandafter\cref@poorman@text% + \expandafter{\expandafter\vpagerefrange\@tmpa}% + \fi% + \def\@tmpa##1##2\@nil{% + \if##1c% + \if@crefstarred% + \cref@writescript{}{\string\vref*\string{#2\string}}% + \else% + \cref@writescript{}{\string\vref\string{#2\string}}% + \fi% + \else% + \if@crefstarred% + \cref@writescript{}{\string\Vref*\string{#2\string}}% + \else% + \cref@writescript{}{\string\Vref\string{#2\string}}% + \fi% + \fi}% + \@tmpa#1\@nil% + \endgroup} + \def\cref@vrefrange#1#2#3{% + \gdef\cref@poorman@text{}% + \@setcrefrange{#2}{#3}{#1}{} \vpagerefrange{#2}{#3}% + \g@addto@macro\cref@poorman@text{ \vpagerefrange{#2}{#3}}% + \def\@tmpa##1##2\@nil{% + \if##1c% + \if@crefstarred% + \cref@writescript{}{% + \string\vrefrange*\string{#2\string}\string{#3\string}}% + \else% + \cref@writescript{}{% + \string\vrefrange\string{#2\string}\string{#3\string}}% + \fi% + \else% + \if@crefstarred% + \cref@writescript{}{% + \string\Vrefrange*\string{#2\string}\string{#3\string}}% + \else% + \cref@writescript{}{% + \string\Vrefrange\string{#2\string}\string{#3\string}}% + \fi% + \fi}% + \@tmpa#1\@nil} + \def\cref@fullref#1#2{% + \gdef\cref@poorman@text{}% + \begingroup% + \@cref{#1}{#2} % space here is deliberate + \def\@tmpstack{#2,\@nil}% + \cref@stack@topandbottom{\@tmpstack}{\@firstref}{\@lastref}% + \ifx\@lastref\@empty% + \reftextfaraway{#2}% + \def\@pageref{\reftextfaraway{#1}}% + \else% + \expandafter\vrefpagenum\expandafter% + \@tmpa\expandafter{\@firstref}% + \expandafter\vrefpagenum\expandafter% + \@tmpb\expandafter{\@lastref}% + \ifx\@tmpa\@tmpb + \expandafter\reftextfaraway\expandafter{\@firstref}% + \expandafter\def\expandafter\@pageref\expandafter{% + \expandafter\reftextfaraway\expandafter{\@firstref}}% + \else + \edef\@tmpa{{\@firstref}{\@lastref}}% + \expandafter\reftextpagerange\@tmpa% + \expandafter\def\expandafter\@pageref\expandafter{% + \expandafter\reftextpagerange\@tmpa}% + \fi% + \fi% + \g@addto@macro\cref@poorman@text{ }% + \expandafter\g@addto@macro\expandafter\cref@poorman@text% + \expandafter{\@pageref}% + \def\@tmpa##1##2\@nil{% + \if##1c% + \if@crefstarred% + \cref@writescript{}{\string\fullref*\string{#2\string}}% + \else% + \cref@writescript{}{\string\fullref\string{#2\string}}% + \fi% + \else% + \if@crefstarred% + \cref@writescript{}{\string\Fullref*\string{#2\string}}% + \else% + \cref@writescript{}{\string\Fullref\string{#2\string}}% + \fi% + \fi}% + \@tmpa#1\@nil + \endgroup} + }% end of \AtBeginDocument + }{}% end of \@ifpackageloaded + \def\@setcref@pairgroupconjunction{% + \crefpairgroupconjunction% + \expandafter\g@addto@macro\expandafter\cref@poorman@text% + \expandafter{\crefpairgroupconjunction}} + \def\@setcref@middlegroupconjunction{% + \crefmiddlegroupconjunction% + \expandafter\g@addto@macro\expandafter\cref@poorman@text% + \expandafter{\crefmiddlegroupconjunction}} + \def\@setcref@lastgroupconjunction{% + \creflastgroupconjunction% + \expandafter\g@addto@macro\expandafter\cref@poorman@text% + \expandafter{\creflastgroupconjunction}} + \@ifpackageloaded{hyperref}{% + \def\@@setcref#1#2{% + \cref@getlabel{#2}{\@tmplabel}% + \if@crefstarred% + #1{\@tmplabel}{}{}% + \expandafter\g@addto@macro\expandafter\cref@poorman@text% + \expandafter{#1{\ref*{#2}}{}{}}% + \else% + \edef\@tmplink{\cref@hyperref{#2}}% + #1{\@tmplabel}{\hyper@linkstart{link}{\@tmplink}}% + {\hyper@linkend}% + \expandafter\g@addto@macro\expandafter\cref@poorman@text% + \expandafter{#1{\ref{#2}}{}{}}% + \fi} + \def\@@setcrefrange#1#2#3{% + \cref@getlabel{#2}{\@labela}% + \cref@getlabel{#3}{\@labelb}% + \if@crefstarred% + #1{\@labela}{\@labelb}{}{}{}{}% + \expandafter\g@addto@macro\expandafter\cref@poorman@text% + \expandafter{#1{\ref*{#2}}{\ref*{#3}}{}{}{}{}}% + \else% + \edef\@linka{\cref@hyperref{#2}}% + \edef\@linkb{\cref@hyperref{#3}}% + #1{\@labela}{\@labelb}% + {\hyper@linkstart{link}{\@linka}}{\hyper@linkend}% + {\hyper@linkstart{link}{\@linkb}}{\hyper@linkend}% + \expandafter\g@addto@macro\expandafter\cref@poorman@text% + \expandafter{#1{\ref{#2}}{\ref{#3}}{}{}{}{}}% + \fi} + }{% + \def\@@setcref#1#2{% + \old@@setcref{#1}{#2}% + \expandafter\g@addto@macro\expandafter{% + \expandafter\cref@poorman@text\expandafter}\expandafter{% + #1{\ref{#2}}{}{}}} + \def\@@setcrefrange#1#2#3{% + \old@@setcrefrange{#1}{#2}{#3}% + \expandafter\g@addto@macro% + \expandafter{\expandafter\cref@poorman@text\expandafter}% + \expandafter{#1{\ref{#2}}{\ref{#3}}{}{}{}{}}} + } +}% end of poorman option +\newif\if@cref@sort +\newif\if@cref@compress +\@cref@sorttrue +\@cref@compresstrue +\DeclareOption{sort}{% + \PackageInfo{cleveref}{sorting but not compressing references} + \@cref@sorttrue + \@cref@compressfalse} +\DeclareOption{compress}{% + \PackageInfo{cleveref}{compressing but not sorting references} + \@cref@sortfalse + \@cref@compresstrue} +\DeclareOption{sort&compress}{% + \PackageInfo{cleveref}{sorting and compressing references} + \@cref@sorttrue + \@cref@compresstrue} +\DeclareOption{nosort}{% + \PackageInfo{cleveref}{neither sorting nor compressing references} + \@cref@sortfalse + \@cref@compressfalse} +\crefdefaultlabelformat{#2#1#3} +\creflabelformat{equation}{\textup{(#2#1#3)}} +\def\cref@addto#1#2{% + \@temptokena{#2}% + \ifx#1\undefined + \edef#1{\the\@temptokena}% + \else + \toks@\expandafter{#1}% + \edef#1{\the\toks@\the\@temptokena}% + \fi + \@temptokena{}\toks@\@temptokena% } -\@ifpackageloaded{hyperref}{% - \def\@crefnostar#1#2{% - \edef\cref@text{}% - \@cref{#1}{#2}% - \cref@writescript{% - \expandafter\string\csname#1\endcsname\string{#2\string}}} - \def\@crefrangenostar#1#2#3{% - \edef\cref@text{}% - \@setcrefrange{#2}{#3}{#1}{}% - \cref@writescript{% - \expandafter\string\csname#1range\endcsname% - \string{#2\string}\string{#3\string}}}% -}{% - \DeclareRobustCommand{\cref}[1]{% - \edef\cref@text{}% - \@cref{cref}{#1}% - \cref@writescript{\string\cref\string{#1\string}}} - \DeclareRobustCommand{\Cref}[1]{% - \edef\cref@text{}% - \@cref{Cref}{#1}% - \cref@writescript{\string\Cref\string{#1\string}}} - \DeclareRobustCommand{\crefrange}[2]{% - \edef\cref@text{}% - \@setcrefrange{#1}{#2}{cref}{}% - \cref@writescript{% - \string\crefrange\string{#1\string}\string{#2\string}}} - \DeclareRobustCommand{\Crefrange}[2]{% - \edef\cref@text{}% - \@setcrefrange{#1}{#2}{Cref}{}% - \cref@writescript{% - \string\Crefrange\string{#1\string}\string{#2\string}}}% +\@onlypreamble\cref@addto +\DeclareOption{english}{% + \PackageInfo{cleveref}{loaded `english' language definitions} + \AtBeginDocument{% + \def\crefrangeconjunction@preamble{ to~} + \def\crefpairconjunction@preamble{ and~} + \def\crefmiddleconjunction@preamble{, } + \def\creflastconjunction@preamble{ and~} + \def\crefpairgroupconjunction@preamble{ and~} + \def\crefmiddlegroupconjunction@preamble{, } + \def\creflastgroupconjunction@preamble{, and~} + \crefname@preamble{equation}{eq.}{eqs.} + \Crefname@preamble{equation}{Equation}{Equations} + \crefname@preamble{chapter}{chapter}{chapters} + \Crefname@preamble{chapter}{Chapter}{Chapters} + \crefname@preamble{section}{section}{sections} + \Crefname@preamble{section}{Section}{Sections} + \crefname@preamble{appendix}{appendix}{appendices} + \Crefname@preamble{appendix}{Appendix}{Appendices} + \crefname@preamble{figure}{fig.}{figs.} + \Crefname@preamble{figure}{Figure}{Figures} + \crefname@preamble{table}{table}{tables} + \Crefname@preamble{table}{Table}{Tables} + \crefname@preamble{theorem}{theorem}{theorems} + \Crefname@preamble{theorem}{Theorem}{Theorems} + \crefname@preamble{enumi}{item}{items} + \Crefname@preamble{enumi}{Item}{Items} + \crefname@preamble{lemma}{lemma}{lemmas} + \Crefname@preamble{lemma}{Lemma}{Lemmas} + \crefname@preamble{corollary}{corollary}{corollaries} + \Crefname@preamble{corollary}{Corollary}{Corollaries} + \crefname@preamble{proposition}{proposition}{propositions} + \Crefname@preamble{proposition}{Proposition}{Propositions} + \crefname@preamble{definition}{definition}{definitions} + \Crefname@preamble{definition}{Definition}{Definitions} + \crefname@preamble{result}{result}{results} + \Crefname@preamble{result}{Result}{Results} + \def\cref@language{english}% + \cref@addto\extrasenglish{% + \renewcommand{\crefrangeconjunction}{ to~} + \renewcommand{\crefpairconjunction}{ and~} + \renewcommand{\crefmiddleconjunction}{, } + \renewcommand{\creflastconjunction}{ and~} + \renewcommand{\crefpairgroupconjunction}{ and~} + \renewcommand{\crefmiddlegroupconjunction}{, } + \renewcommand{\creflastgroupconjunction}{, and~} + \crefname{equation}{eq.}{eqs.} + \Crefname{equation}{Equation}{Equations} + \crefname{chapter}{chapter}{chapters} + \Crefname{chapter}{Chapter}{Chapters} + \crefname{section}{section}{sections} + \Crefname{section}{Section}{Sections} + \crefname{subsection}{section}{sections} + \Crefname{subsection}{Section}{Sections} + \crefname{subsubsection}{section}{sections} + \Crefname{subsubsection}{Section}{Sections} + \crefname{appendix}{appendix}{appendices} + \Crefname{appendix}{Appendix}{Appendices} + \crefname{subappendix}{appendix}{appendices} + \Crefname{subappendix}{Appendix}{Appendices} + \crefname{subsubappendix}{appendix}{appendices} + \Crefname{subsubappendix}{Appendix}{Appendices} + \crefname{subsubsubappendix}{appendix}{appendices} + \Crefname{subsubsubappendix}{Appendix}{Appendices} + \crefname{figure}{fig.}{figs.} + \Crefname{figure}{Figure}{Figures} + \crefname{subfigure}{fig.}{figs.} + \Crefname{subfigure}{Figure}{Figures} + \crefname{table}{table}{tables} + \Crefname{table}{Table}{Tables} + \crefname{subtable}{table}{tables} + \Crefname{subtable}{Table}{Tables} + \crefname{theorem}{theorem}{theorems} + \Crefname{theorem}{Theorem}{Theorems} + \crefname{enumi}{item}{items} + \Crefname{enumi}{Item}{Items} + \crefname{enumii}{item}{items} + \Crefname{enumii}{Item}{Items} + \crefname{enumiii}{item}{items} + \Crefname{enumiii}{Item}{Items} + \crefname{enumiv}{item}{items} + \Crefname{enumiv}{Item}{Items} + \crefname{enumv}{item}{items} + \Crefname{enumv}{Item}{Items} + \crefname{lemma}{lemma}{lemmas} + \Crefname{lemma}{Lemma}{Lemmas} + \crefname{corollary}{corollary}{corollaries} + \Crefname{corollary}{Corollary}{Corollaries} + \crefname{proposition}{proposition}{propositions} + \Crefname{proposition}{Proposition}{Propositions} + \crefname{definition}{definition}{definitions} + \Crefname{definition}{Definition}{Definitions} + \crefname{result}{result}{results} + \Crefname{result}{Result}{Results}% + }}} +\DeclareOption{german}{% + \PackageInfo{cleveref}{loaded `german' language definitions} + \AtBeginDocument{% + \def\crefrangeconjunction@preamble{ bis~} + \def\crefpairconjunction@preamble{ und~} + \def\crefmiddleconjunction@preamble{, } + \def\creflastconjunction@preamble{ und~} + \def\crefpairgroupconjunction@preamble{ und~} + \def\crefmiddlegroupconjunction@preamble{, } + \def\creflastgroupconjunction@preamble{ und~} + \crefname@preamble{equation}{Gleichung}{Gleichungen} + \Crefname@preamble{equation}{Gleichung}{Gleichungen} + \crefname@preamble{chapter}{Kapitel}{Kapitel} + \Crefname@preamble{chapter}{Kapitel}{Kapitel} + \crefname@preamble{section}{Abschnitt}{Abschnitte} + \Crefname@preamble{section}{Abschnitt}{Abschnitte} + \crefname@preamble{appendix}{Anhang}{Anh\"ange} + \Crefname@preamble{appendix}{Anhang}{Anh\"ange} + \crefname@preamble{figure}{Abbildung}{Abbildungen} + \Crefname@preamble{figure}{Abbildung}{Abbildungen} + \crefname@preamble{table}{Tabelle}{Tabellen} + \Crefname@preamble{table}{Tabelle}{Tabellen} + \crefname@preamble{theorem}{Theorem}{Theoremen} + \Crefname@preamble{theorem}{Theorem}{Theoremen} + \crefname@preamble{enumi}{Punkt}{Punkte} + \Crefname@preamble{enumi}{Punkt}{Punkte} + \crefname@preamble{lemma}{Lemma}{Lemmata} + \Crefname@preamble{lemma}{Lemma}{Lemmata} + \crefname@preamble{corollary}{Korollar}{Korollaren} + \Crefname@preamble{corollary}{Korollar}{Korollaren} + \crefname@preamble{proposition}{Satz}{S\"atze} + \Crefname@preamble{proposition}{Satz}{S\"atze} + \crefname@preamble{definition}{Definition}{Definitionen} + \Crefname@preamble{definition}{Definition}{Definitionen} + \crefname@preamble{result}{Ergebnis}{Ergebnisse} + \Crefname@preamble{result}{Ergebnis}{Ergebnisse}% + \def\cref@language{german}% + \cref@addto\extrasgerman{% + \renewcommand{\crefrangeconjunction}{ bis~}% + \renewcommand{\crefpairconjunction}{ und~}% + \renewcommand{\crefmiddleconjunction}{, }% + \renewcommand{\creflastconjunction}{ und~}% + \renewcommand{\crefpairgroupconjunction}{ und~}% + \renewcommand{\crefmiddlegroupconjunction}{, }% + \renewcommand{\creflastgroupconjunction}{ und~}% + \crefname{equation}{Gleichung}{Gleichungen}% + \Crefname{equation}{Gleichung}{Gleichungen}% + \crefname{chapter}{Kapitel}{Kapitel}% + \Crefname{chapter}{Kapitel}{Kapitel}% + \crefname{section}{Abschnitt}{Abschnitte}% + \Crefname{section}{Abschnitt}{Abschnitte}% + \crefname{subsection}{Abschnitt}{Abschnitte}% + \Crefname{subsection}{Abschnitt}{Abschnitte}% + \crefname{subsubsection}{Abschnitt}{Abschnitte}% + \Crefname{subsubsection}{Abschnitt}{Abschnitte}% + \crefname{appendix}{Anhang}{Anh\"ange}% + \Crefname{appendix}{Anhang}{Anh\"ange}% + \crefname{subappendix}{Anhang}{Anh\"ange} + \Crefname{subappendix}{Anhang}{Anh\"ange} + \crefname{subsubappendix}{Anhang}{Anh\"ange} + \Crefname{subsubappendix}{Anhang}{Anh\"ange} + \crefname{subsubsubappendix}{Anhang}{Anh\"ange} + \Crefname{subsubsubappendix}{Anhang}{Anh\"ange} + \crefname{figure}{Abbildung}{Abbildungen}% + \Crefname{figure}{Abbildung}{Abbildungen}% + \crefname{subfigure}{Abbildung}{Abbildungen}% + \Crefname{subfigure}{Abbildung}{Abbildungen}% + \crefname{table}{Tabelle}{Tabellen}% + \Crefname{table}{Tabelle}{Tabellen}% + \crefname{subtable}{Tabelle}{Tabellen}% + \Crefname{subtable}{Tabelle}{Tabellen}% + \crefname{theorem}{Theorem}{Theoremen}% + \Crefname{theorem}{Theorem}{Theoremen}% + \crefname{enumi}{Punkt}{Punkte}% + \Crefname{enumi}{Punkt}{Punkte}% + \crefname{enumii}{Punkt}{Punkte}% + \Crefname{enumii}{Punkt}{Punkte}% + \crefname{enumiii}{Punkt}{Punkte}% + \Crefname{enumiii}{Punkt}{Punkte}% + \crefname{enumiv}{Punkt}{Punkte}% + \Crefname{enumiv}{Punkt}{Punkte}% + \crefname{enumv}{Punkt}{Punkte}% + \Crefname{enumv}{Punkt}{Punkte}% + \crefname{lemma}{Lemma}{Lemmata}% + \Crefname{lemma}{Lemma}{Lemmata}% + \crefname{corollary}{Korollar}{Korollaren}% + \Crefname{corollary}{Korollar}{Korollaren}% + \crefname{proposition}{Satz}{S\"atze}% + \Crefname{proposition}{Satz}{S\"atze}% + \crefname{definition}{Definition}{Definitionen}% + \Crefname{definition}{Definition}{Definitionen}% + \crefname{result}{Ergebnis}{Ergebnisse}% + \Crefname{result}{Ergebnis}{Ergebnisse}% + }}} +\DeclareOption{ngerman}{% + \PackageInfo{cleveref}{loaded `ngerman' language definitions} + \ExecuteOptions{german} + \def\cref@language{ngerman} + \AtBeginDocument{% + \cref@addto\extrasngerman{% + \renewcommand{\crefrangeconjunction}{ bis~}% + \renewcommand{\crefpairconjunction}{ und~}% + \renewcommand{\crefmiddleconjunction}{, }% + \renewcommand{\creflastconjunction}{ und~}% + \renewcommand{\crefpairgroupconjunction}{ und~}% + \renewcommand{\crefmiddlegroupconjunction}{, }% + \renewcommand{\creflastgroupconjunction}{ und~}% + \crefname{equation}{Gleichung}{Gleichungen}% + \Crefname{equation}{Gleichung}{Gleichungen}% + \crefname{chapter}{Kapitel}{Kapitel}% + \Crefname{chapter}{Kapitel}{Kapitel}% + \crefname{section}{Abschnitt}{Abschnitte}% + \Crefname{section}{Abschnitt}{Abschnitte}% + \crefname{subsection}{Abschnitt}{Abschnitte}% + \Crefname{subsection}{Abschnitt}{Abschnitte}% + \crefname{subsubsection}{Abschnitt}{Abschnitte}% + \Crefname{subsubsection}{Abschnitt}{Abschnitte}% + \crefname{appendix}{Anhang}{Anh\"ange}% + \Crefname{appendix}{Anhang}{Anh\"ange}% + \crefname{subappendix}{Anhang}{Anh\"ange} + \Crefname{subappendix}{Anhang}{Anh\"ange} + \crefname{subsubappendix}{Anhang}{Anh\"ange} + \Crefname{subsubappendix}{Anhang}{Anh\"ange} + \crefname{subsubsubappendix}{Anhang}{Anh\"ange} + \Crefname{subsubsubappendix}{Anhang}{Anh\"ange} + \crefname{figure}{Abbildung}{Abbildungen}% + \Crefname{figure}{Abbildung}{Abbildungen}% + \crefname{subfigure}{Abbildung}{Abbildungen}% + \Crefname{subfigure}{Abbildung}{Abbildungen}% + \crefname{table}{Tabelle}{Tabellen}% + \Crefname{table}{Tabelle}{Tabellen}% + \crefname{subtable}{Tabelle}{Tabellen}% + \Crefname{subtable}{Tabelle}{Tabellen}% + \crefname{theorem}{Theorem}{Theoremen}% + \Crefname{theorem}{Theorem}{Theoremen}% + \crefname{enumi}{Punkt}{Punkte}% + \Crefname{enumi}{Punkt}{Punkte}% + \crefname{enumii}{Punkt}{Punkte}% + \Crefname{enumii}{Punkt}{Punkte}% + \crefname{enumiii}{Punkt}{Punkte}% + \Crefname{enumiii}{Punkt}{Punkte}% + \crefname{enumiv}{Punkt}{Punkte}% + \Crefname{enumiv}{Punkt}{Punkte}% + \crefname{enumv}{Punkt}{Punkte}% + \Crefname{enumv}{Punkt}{Punkte}% + \crefname{lemma}{Lemma}{Lemmata}% + \Crefname{lemma}{Lemma}{Lemmata}% + \crefname{corollary}{Korollar}{Korollaren}% + \Crefname{corollary}{Korollar}{Korollaren}% + \crefname{proposition}{Satz}{S\"atze}% + \Crefname{proposition}{Satz}{S\"atze}% + \crefname{definition}{Definition}{Definitionen}% + \Crefname{definition}{Definition}{Definitionen}% + \crefname{result}{Ergebnis}{Ergebnisse}% + \Crefname{result}{Ergebnis}{Ergebnisse}% + }}} +\DeclareOption{french}{% + \PackageInfo{cleveref}{loaded `french' language definitions} + \AtBeginDocument{% + \def\crefrangeconjunction@preamble{ \`a~} + \def\crefpairconjunction@preamble{ et~} + \def\crefmiddleconjunction@preamble{, } + \def\creflastconjunction@preamble{ et~} + \def\crefpairgroupconjunction@preamble{ et~} + \def\crefmiddlegroupconjunction@preamble{, } + \def\creflastgroupconjunction@preamble{, et~} + \crefname@preamble{equation}{{\'e}quation}{{\'e}quations} + \Crefname@preamble{equation}{{\'E}quation}{{\'E}quations} + \crefname@preamble{chapter}{chapitre}{chapitres} + \Crefname@preamble{chapter}{Chapitre}{Chapitres} + \crefname@preamble{section}{section}{sections} + \Crefname@preamble{section}{Section}{Sections} + \crefname@preamble{appendix}{appendice}{appendices} + \Crefname@preamble{appendix}{Appendice}{Appendices} + \crefname@preamble{figure}{figure}{figures} + \Crefname@preamble{figure}{Figure}{Figures} + \crefname@preamble{table}{tableau}{tableaux} + \Crefname@preamble{table}{Tableau}{Tableaux} + \crefname@preamble{theorem}{th\'eor\`eme}{th\'eor\`emes} + \Crefname@preamble{theorem}{Th\'eor\`eme}{Th\'eor\`emes} + \crefname@preamble{enumi}{point}{points} + \Crefname@preamble{enumi}{Point}{Points} + \crefname@preamble{lemma}{lemme}{lemmes} + \Crefname@preamble{lemma}{Lemme}{Lemmes} + \crefname@preamble{corollary}{corollaire}{corollaires} + \Crefname@preamble{corollary}{Corollaire}{Corollaires} + \crefname@preamble{proposition}{proposition}{propositions} + \Crefname@preamble{proposition}{Proposition}{Propositions} + \crefname@preamble{definition}{d\'efinition}{d\'efinitions} + \Crefname@preamble{definition}{D\'efinition}{D\'efinitions} + \crefname@preamble{result}{r\'esultat}{r\'esultats} + \Crefname@preamble{result}{R\'esultat}{R\'esultats} + \def\cref@language{french}% + \cref@addto\extrasfrench{% + \renewcommand{\crefrangeconjunction}{ \`a~}% + \renewcommand{\crefpairconjunction}{ et~}% + \renewcommand{\crefmiddleconjunction}{, }% + \renewcommand{\creflastconjunction}{ et~}% + \renewcommand{\crefpairgroupconjunction}{ et~}% + \renewcommand{\crefmiddlegroupconjunction}{, }% + \renewcommand{\creflastgroupconjunction}{ et~}% + \crefname{equation}{{\'e}quation}{{\'e}quations}% + \Crefname{equation}{{\'E}quation}{{\'E}quations}% + \crefname{chapter}{chapitre}{chapitres}% + \Crefname{chapter}{Chapitre}{Chapitres}% + \crefname{section}{section}{sections}% + \Crefname{section}{Section}{Sections}% + \crefname{subsection}{section}{sections}% + \Crefname{subsection}{Section}{Sections}% + \crefname{subsubsection}{section}{sections}% + \Crefname{subsubsection}{Section}{Sections}% + \crefname{appendix}{appendice}{appendices}% + \Crefname{appendix}{Appendice}{Appendices}% + \crefname{subappendix}{appendice}{appendices} + \Crefname{subappendix}{Appendice}{Appendices} + \crefname{subsubappendix}{appendice}{appendices} + \Crefname{subsubappendix}{Appendice}{Appendices} + \crefname{subsubsubappendix}{appendice}{appendices} + \Crefname{subsubsubappendix}{Appendice}{Appendices} + \crefname{figure}{figure}{figures}% + \Crefname{figure}{Figure}{Figures}% + \crefname{subfigure}{figure}{figures}% + \Crefname{subfigure}{Figure}{Figures}% + \crefname{table}{tableau}{tableaux}% + \Crefname{table}{Tableau}{Tableaux}% + \crefname{subtable}{tableau}{tableaux}% + \Crefname{subtable}{Tableau}{Tableaux}% + \crefname{theorem}{th\'eor\`eme}{th\'eor\`emes}% + \Crefname{theorem}{Th\'eor\`eme}{Th\'eor\`emes}% + \crefname{enumi}{point}{points}% + \Crefname{enumi}{Point}{Points}% + \crefname{enumii}{point}{points}% + \Crefname{enumii}{Point}{Points}% + \crefname{enumiii}{point}{points}% + \Crefname{enumiii}{Point}{Points}% + \crefname{enumiv}{point}{points}% + \Crefname{enumiv}{Point}{Points}% + \crefname{enumv}{point}{points}% + \Crefname{enumv}{Point}{Points}% + \crefname{lemma}{lemme}{lemmes}% + \Crefname{lemma}{Lemme}{Lemmes}% + \crefname{corollary}{corollaire}{corollaires}% + \Crefname{corollary}{Corollaire}{Corollaires}% + \crefname{proposition}{proposition}{propositions}% + \Crefname{proposition}{Proposition}{Propositions}% + \crefname{definition}{d\'efinition}{d\'efinitions}% + \Crefname{definition}{D\'efinition}{D\'efinitions}% + \crefname{result}{r\'esultat}{r\'esultats}% + \Crefname{result}{R\'esultat}{R\'esultats}% + }}} +\ExecuteOptions{english} +\ProcessOptions*\relax +\AtBeginDocument{% + \edef\@tmpa{% + \expandafter\noexpand\csname extras\cref@language\endcsname}% + \@ifundefined{crefrangeconjunction}{% + \let\crefrangeconjunction\crefrangeconjunction@preamble% + }{% + \expandafter\def\expandafter\@tmpb\expandafter{% + \expandafter\renewcommand\expandafter% + {\expandafter\crefrangeconjunction\expandafter}% + \expandafter{\crefrangeconjunction}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\@tmpa\expandafter{\@tmpb}% + }% + \@ifundefined{crefpairconjunction}{% + \let\crefpairconjunction\crefpairconjunction@preamble% + }{% + \expandafter\def\expandafter\@tmpb\expandafter{% + \expandafter\renewcommand\expandafter% + {\expandafter\crefpairconjunction\expandafter}% + \expandafter{\crefpairconjunction}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\@tmpa\expandafter{\@tmpb}% + }% + \@ifundefined{crefmiddleconjunction}{% + \let\crefmiddleconjunction\crefmiddleconjunction@preamble% + }{% + \expandafter\def\expandafter\@tmpb\expandafter{% + \expandafter\renewcommand\expandafter% + {\expandafter\crefmiddleconjunction\expandafter}% + \expandafter{\crefmiddleconjunction}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\@tmpa\expandafter{\@tmpb}% + }% + \@ifundefined{creflastconjunction}{% + \let\creflastconjunction\creflastconjunction@preamble% + }{% + \expandafter\def\expandafter\@tmpb\expandafter{% + \expandafter\renewcommand\expandafter% + {\expandafter\creflastconjunction\expandafter}% + \expandafter{\creflastconjunction}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\@tmpa\expandafter{\@tmpb}% + }% + \@ifundefined{crefpairgroupconjunction}{% + \let\crefpairgroupconjunction% + \crefpairgroupconjunction@preamble% + }{% + \expandafter\def\expandafter\@tmpb\expandafter{% + \expandafter\renewcommand\expandafter% + {\expandafter\crefpairgroupconjunction\expandafter}% + \expandafter{\crefpairgroupconjunction}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\@tmpa\expandafter{\@tmpb}% + }% + \@ifundefined{crefmiddlegroupconjunction}{% + \let\crefmiddlegroupconjunction% + \crefmiddlegroupconjunction@preamble% + }{% + \expandafter\def\expandafter\@tmpb\expandafter{% + \expandafter\renewcommand\expandafter% + {\expandafter\crefpairmiddleconjunction\expandafter}% + \expandafter{\crefpairmiddleconjunction}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\@tmpa\expandafter{\@tmpb}% + }% + \@ifundefined{creflastgroupconjunction}{% + \let\creflastgroupconjunction% + \creflastgroupconjunction@preamble% + }{% + \expandafter\def\expandafter\@tmpb\expandafter{% + \expandafter\renewcommand\expandafter% + {\expandafter\crefpairlastconjunction\expandafter}% + \expandafter{\crefpairlastconjunction}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\@tmpa\expandafter{\@tmpb}% + }% + \@ifundefined{crefpairgroupconjunction}{% + \let\crefpairgroupconjunction\crefpairconjunction}{}% + \@ifundefined{crefmiddlegroupconjunction}{% + \let\crefmiddlegroupconjunction\crefmiddleconjunction}{}% + \@ifundefined{creflastgroupconjunction}{% + \edef\creflastgroupconjunction{, \creflastconjunction}}{}% + \let\@tmpstack\cref@label@types% + \cref@isstackfull{\@tmpstack}% + \@whilesw\if@cref@stackfull\fi{% + \edef\@tmpa{\cref@stack@top{\@tmpstack}}% + \@ifundefined{cref@\@tmpa @name}{% + \expandafter\def\expandafter\@tmpb\expandafter{% + \csname cref@\@tmpa @name\endcsname}% + \expandafter\def\expandafter\@tmpc\expandafter{% + \csname cref@\@tmpa @name@preamble\endcsname}% + \expandafter\expandafter\expandafter\let\expandafter\@tmpb\@tmpc% + \expandafter\def\expandafter\@tmpb\expandafter{% + \csname cref@\@tmpa @name@plural\endcsname}% + \expandafter\def\expandafter\@tmpc\expandafter{% + \csname cref@\@tmpa @name@plural@preamble\endcsname}% + \expandafter\expandafter\expandafter\let\expandafter\@tmpb\@tmpc + }{% + \edef\@tmpb{% + \expandafter\noexpand\csname extras\cref@language\endcsname}% + \expandafter\def\expandafter\@tmpc\expandafter{% + \expandafter\crefname\expandafter{\@tmpa}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\expandafter\expandafter\@tmpc% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter{% + \csname cref@\@tmpa @name\endcsname}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\expandafter\expandafter\@tmpc% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter{% + \csname cref@\@tmpa @name@plural\endcsname}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\@tmpb\expandafter{\@tmpc}% + }% + \@ifundefined{Cref@\@tmpa @name}{% + \expandafter\def\expandafter\@tmpb\expandafter{% + \csname Cref@\@tmpa @name\endcsname}% + \expandafter\def\expandafter\@tmpc\expandafter{% + \csname Cref@\@tmpa @name@preamble\endcsname}% + \expandafter\expandafter\expandafter\let\expandafter\@tmpb\@tmpc% + \expandafter\def\expandafter\@tmpb\expandafter{% + \csname Cref@\@tmpa @name@plural\endcsname}% + \expandafter\def\expandafter\@tmpc\expandafter{% + \csname Cref@\@tmpa @name@plural@preamble\endcsname}% + \expandafter\expandafter\expandafter\let\expandafter\@tmpb\@tmpc + }{% + \edef\@tmpb{% + \expandafter\noexpand\csname extras\cref@language\endcsname}% + \expandafter\def\expandafter\@tmpc\expandafter{% + \expandafter\Crefname\expandafter{\@tmpa}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\expandafter\expandafter\@tmpc% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter{% + \csname Cref@\@tmpa @name\endcsname}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\expandafter\expandafter\@tmpc% + \expandafter\expandafter\expandafter{% + \expandafter\expandafter\expandafter{% + \csname Cref@\@tmpa @name@plural\endcsname}}% + \expandafter\expandafter\expandafter\cref@addto% + \expandafter\@tmpb\expandafter{\@tmpc}% + }% + \@ifundefined{cref@\@tmpa @format}{% + \expandafter\@crefdefineformat\expandafter{\@tmpa}}{}% + \@ifundefined{crefrange@\@tmpa @format}{% + \expandafter\@crefrangedefineformat\expandafter{\@tmpa}}{}% + \@ifundefined{cref@\@tmpa @format@first}{% + \expandafter\@crefdefinemultiformat\expandafter{\@tmpa}}{}% + \@ifundefined{crefrange@\@tmpa @format@first}{% + \expandafter\@crefrangedefinemultiformat\expandafter{\@tmpa}}{}% + \cref@stack@pop{\@tmpstack}% + \cref@isstackfull{\@tmpstack}}% + \@ifundefined{cref@subsection@format}{% + \let\cref@subsection@format% + \cref@section@format}{}% + \@ifundefined{Cref@subsection@format}{% + \let\Cref@subsection@format% + \Cref@section@format}{}% + \@ifundefined{crefrange@subsection@format}{% + \let\crefrange@subsection@format% + \crefrange@section@format}{}% + \@ifundefined{Crefrange@subsection@format}{% + \let\Crefrange@subsection@format% + \Crefrange@section@format}{}% + \@ifundefined{cref@subsection@format@first}{% + \let\cref@subsection@format@first% + \cref@section@format@first}{}% + \@ifundefined{Cref@subsection@format@first}{% + \let\Cref@subsection@format@first% + \Cref@section@format@first}{}% + \@ifundefined{cref@subsection@format@second}{% + \let\cref@subsection@format@second% + \cref@section@format@second}{}% + \@ifundefined{Cref@subsection@format@second}{% + \let\Cref@subsection@format@second% + \Cref@section@format@second}{}% + \@ifundefined{cref@subsection@format@middle}{% + \let\cref@subsection@format@middle% + \cref@section@format@middle}{}% + \@ifundefined{Cref@subsection@format@middle}{% + \let\Cref@subsection@format@middle% + \Cref@section@format@middle}{}% + \@ifundefined{cref@subsection@format@last}{% + \let\cref@subsection@format@last% + \cref@section@format@last}{}% + \@ifundefined{Cref@subsection@format@last}{% + \let\Cref@subsection@format@last% + \Cref@section@format@last}{}% + \@ifundefined{crefrange@subsection@format@first}{% + \let\crefrange@subsection@format@first% + \crefrange@section@format@first}{}% + \@ifundefined{Crefrange@subsection@format@first}{% + \let\Crefrange@subsection@format@first% + \Crefrange@section@format@first}{}% + \@ifundefined{crefrange@subsection@format@second}{% + \let\crefrange@subsection@format@second% + \crefrange@section@format@second}{}% + \@ifundefined{Crefrange@subsection@format@second}{% + \let\Crefrange@subsection@format@second% + \Crefrange@section@format@second}{}% + \@ifundefined{crefrange@subsection@format@middle}{% + \let\crefrange@subsection@format@middle% + \crefrange@section@format@middle}{}% + \@ifundefined{Crefrange@subsection@format@middle}{% + \let\Crefrange@subsection@format@middle% + \Crefrange@section@format@middle}{}% + \@ifundefined{crefrange@subsection@format@last}{% + \let\crefrange@subsection@format@last% + \crefrange@section@format@last}{}% + \@ifundefined{Crefrange@subsection@format@last}{% + \let\Crefrange@subsection@format@last% + \Crefrange@section@format@last}{}% + \@ifundefined{cref@subsubsection@format}{% + \let\cref@subsubsection@format% + \cref@subsection@format}{}% + \@ifundefined{Cref@subsubsection@format}{% + \let\Cref@subsubsection@format% + \Cref@subsection@format}{}% + \@ifundefined{crefrange@subsubsection@format}{% + \let\crefrange@subsubsection@format% + \crefrange@subsection@format}{}% + \@ifundefined{Crefrange@subsubsection@format}{% + \let\Crefrange@subsubsection@format% + \Crefrange@subsection@format}{}% + \@ifundefined{cref@subsubsection@format@first}{% + \let\cref@subsubsection@format@first% + \cref@subsection@format@first}{}% + \@ifundefined{Cref@subsubsection@format@first}{% + \let\Cref@subsubsection@format@first% + \Cref@subsection@format@first}{}% + \@ifundefined{cref@subsubsection@format@second}{% + \let\cref@subsubsection@format@second% + \cref@subsection@format@second}{}% + \@ifundefined{Cref@subsubsection@format@second}{% + \let\Cref@subsubsection@format@second% + \Cref@subsection@format@second}{}% + \@ifundefined{cref@subsubsection@format@middle}{% + \let\cref@subsubsection@format@middle% + \cref@subsection@format@middle}{}% + \@ifundefined{Cref@subsubsection@format@middle}{% + \let\Cref@subsubsection@format@middle% + \Cref@subsection@format@middle}{}% + \@ifundefined{cref@subsubsection@format@last}{% + \let\cref@subsubsection@format@last% + \cref@subsection@format@last}{}% + \@ifundefined{Cref@subsubsection@format@last}{% + \let\Cref@subsubsection@format@last% + \Cref@subsection@format@last}{}% + \@ifundefined{crefrange@subsubsection@format@first}{% + \let\crefrange@subsubsection@format@first% + \crefrange@subsection@format@first}{}% + \@ifundefined{Crefrange@subsubsection@format@first}{% + \let\Crefrange@subsubsection@format@first% + \Crefrange@subsection@format@first}{}% + \@ifundefined{crefrange@subsubsection@format@second}{% + \let\crefrange@subsubsection@format@second% + \crefrange@subsection@format@second}{}% + \@ifundefined{Crefrange@subsubsection@format@second}{% + \let\Crefrange@subsubsection@format@second% + \Crefrange@subsection@format@second}{}% + \@ifundefined{crefrange@subsubsection@format@middle}{% + \let\crefrange@subsubsection@format@middle% + \crefrange@subsection@format@middle}{}% + \@ifundefined{Crefrange@subsubsection@format@middle}{% + \let\Crefrange@subsubsection@format@middle% + \Crefrange@subsection@format@middle}{}% + \@ifundefined{crefrange@subsubsection@format@last}{% + \let\crefrange@subsubsection@format@last% + \crefrange@subsection@format@last}{}% + \@ifundefined{Crefrange@subsubsection@format@last}{% + \let\Crefrange@subsubsection@format@last% + \Crefrange@subsection@format@last}{}% + \@ifundefined{cref@subappendix@format}{% + \let\cref@subappendix@format% + \cref@appendix@format}{}% + \@ifundefined{Cref@subappendix@format}{% + \let\Cref@subappendix@format% + \Cref@appendix@format}{}% + \@ifundefined{crefrange@subappendix@format}{% + \let\crefrange@subappendix@format% + \crefrange@appendix@format}{}% + \@ifundefined{Crefrange@subappendix@format}{% + \let\Crefrange@subappendix@format% + \Crefrange@appendix@format}{}% + \@ifundefined{cref@subappendix@format@first}{% + \let\cref@subappendix@format@first% + \cref@appendix@format@first}{}% + \@ifundefined{Cref@subappendix@format@first}{% + \let\Cref@subappendix@format@first% + \Cref@appendix@format@first}{}% + \@ifundefined{cref@subappendix@format@second}{% + \let\cref@subappendix@format@second% + \cref@appendix@format@second}{}% + \@ifundefined{Cref@subappendix@format@second}{% + \let\Cref@subappendix@format@second% + \Cref@appendix@format@second}{}% + \@ifundefined{cref@subappendix@format@middle}{% + \let\cref@subappendix@format@middle% + \cref@appendix@format@middle}{}% + \@ifundefined{Cref@subappendix@format@middle}{% + \let\Cref@subappendix@format@middle% + \Cref@appendix@format@middle}{}% + \@ifundefined{cref@subappendix@format@last}{% + \let\cref@subappendix@format@last% + \cref@appendix@format@last}{}% + \@ifundefined{Cref@subappendix@format@last}{% + \let\Cref@subappendix@format@last% + \Cref@appendix@format@last}{}% + \@ifundefined{crefrange@subappendix@format@first}{% + \let\crefrange@subappendix@format@first% + \crefrange@appendix@format@first}{}% + \@ifundefined{Crefrange@subappendix@format@first}{% + \let\Crefrange@subappendix@format@first% + \Crefrange@appendix@format@first}{}% + \@ifundefined{crefrange@subappendix@format@second}{% + \let\crefrange@subappendix@format@second% + \crefrange@appendix@format@second}{}% + \@ifundefined{Crefrange@subappendix@format@second}{% + \let\Crefrange@subappendix@format@second% + \Crefrange@appendix@format@second}{}% + \@ifundefined{crefrange@subappendix@format@middle}{% + \let\crefrange@subappendix@format@middle% + \crefrange@appendix@format@middle}{}% + \@ifundefined{Crefrange@subappendix@format@middle}{% + \let\Crefrange@subappendix@format@middle% + \Crefrange@appendix@format@middle}{}% + \@ifundefined{crefrange@subappendix@format@last}{% + \let\crefrange@subappendix@format@last% + \crefrange@appendix@format@last}{}% + \@ifundefined{Crefrange@subappendix@format@last}{% + \let\Crefrange@subappendix@format@last% + \Crefrange@appendix@format@last}{}% + \@ifundefined{cref@subsubappendix@format}{% + \let\cref@subsubappendix@format% + \cref@subappendix@format}{}% + \@ifundefined{Cref@subsubappendix@format}{% + \let\Cref@subsubappendix@format% + \Cref@subappendix@format}{}% + \@ifundefined{crefrange@subsubappendix@format}{% + \let\crefrange@subsubappendix@format% + \crefrange@subappendix@format}{}% + \@ifundefined{Crefrange@subsubappendix@format}{% + \let\Crefrange@subsubappendix@format% + \Crefrange@subappendix@format}{}% + \@ifundefined{cref@subsubappendix@format@first}{% + \let\cref@subsubappendix@format@first% + \cref@subappendix@format@first}{}% + \@ifundefined{Cref@subsubappendix@format@first}{% + \let\Cref@subsubappendix@format@first% + \Cref@subappendix@format@first}{}% + \@ifundefined{cref@subsubappendix@format@second}{% + \let\cref@subsubappendix@format@second% + \cref@subappendix@format@second}{}% + \@ifundefined{Cref@subsubappendix@format@second}{% + \let\Cref@subsubappendix@format@second% + \Cref@subappendix@format@second}{}% + \@ifundefined{cref@subsubappendix@format@middle}{% + \let\cref@subsubappendix@format@middle% + \cref@subappendix@format@middle}{}% + \@ifundefined{Cref@subsubappendix@format@middle}{% + \let\Cref@subsubappendix@format@middle% + \Cref@subappendix@format@middle}{}% + \@ifundefined{cref@subsubappendix@format@last}{% + \let\cref@subsubappendix@format@last% + \cref@subappendix@format@last}{}% + \@ifundefined{Cref@subsubappendix@format@last}{% + \let\Cref@subsubappendix@format@last% + \Cref@subappendix@format@last}{}% + \@ifundefined{crefrange@subsubappendix@format@first}{% + \let\crefrange@subsubappendix@format@first% + \crefrange@subappendix@format@first}{}% + \@ifundefined{Crefrange@subsubappendix@format@first}{% + \let\Crefrange@subsubappendix@format@first% + \Crefrange@subappendix@format@first}{}% + \@ifundefined{crefrange@subsubappendix@format@second}{% + \let\crefrange@subsubappendix@format@second% + \crefrange@subappendix@format@second}{}% + \@ifundefined{Crefrange@subsubappendix@format@second}{% + \let\Crefrange@subsubappendix@format@second% + \Crefrange@subappendix@format@second}{}% + \@ifundefined{crefrange@subsubappendix@format@middle}{% + \let\crefrange@subsubappendix@format@middle% + \crefrange@subappendix@format@middle}{}% + \@ifundefined{Crefrange@subsubappendix@format@middle}{% + \let\Crefrange@subsubappendix@format@middle% + \Crefrange@subappendix@format@middle}{}% + \@ifundefined{crefrange@subsubappendix@format@last}{% + \let\crefrange@subsubappendix@format@last% + \crefrange@subappendix@format@last}{}% + \@ifundefined{Crefrange@subsubappendix@format@last}{% + \let\Crefrange@subsubappendix@format@last% + \Crefrange@subappendix@format@last}{}% + \@ifundefined{cref@subsubsubappendix@format}{% + \let\cref@subsubsubappendix@format% + \cref@subsubappendix@format}{}% + \@ifundefined{Cref@subsubsubappendix@format}{% + \let\Cref@subsubsubappendix@format% + \Cref@subsubappendix@format}{}% + \@ifundefined{crefrange@subsubsubappendix@format}{% + \let\crefrange@subsubsubappendix@format% + \crefrange@subsubappendix@format}{}% + \@ifundefined{Crefrange@subsubsubappendix@format}{% + \let\Crefrange@subsubsubappendix@format% + \Crefrange@subsubappendix@format}{}% + \@ifundefined{cref@subsubsubappendix@format@first}{% + \let\cref@subsubsubappendix@format@first% + \cref@subsubappendix@format@first}{}% + \@ifundefined{Cref@subsubsubappendix@format@first}{% + \let\Cref@subsubsubappendix@format@first% + \Cref@subsubappendix@format@first}{}% + \@ifundefined{cref@subsubsubappendix@format@second}{% + \let\cref@subsubsubappendix@format@second% + \cref@subsubappendix@format@second}{}% + \@ifundefined{Cref@subsubsubappendix@format@second}{% + \let\Cref@subsubsubappendix@format@second% + \Cref@subsubappendix@format@second}{}% + \@ifundefined{cref@subsubsubappendix@format@middle}{% + \let\cref@subsubsubappendix@format@middle% + \cref@subsubappendix@format@middle}{}% + \@ifundefined{Cref@subsubsubappendix@format@middle}{% + \let\Cref@subsubsubappendix@format@middle% + \Cref@subsubappendix@format@middle}{}% + \@ifundefined{cref@subsubsubappendix@format@last}{% + \let\cref@subsubsubappendix@format@last% + \cref@subsubappendix@format@last}{}% + \@ifundefined{Cref@subsubsubappendix@format@last}{% + \let\Cref@subsubsubappendix@format@last% + \Cref@subsubappendix@format@last}{}% + \@ifundefined{crefrange@subsubsubappendix@format@first}{% + \let\crefrange@subsubsubappendix@format@first% + \crefrange@subsubappendix@format@first}{}% + \@ifundefined{Crefrange@subsubsubappendix@format@first}{% + \let\Crefrange@subsubsubappendix@format@first% + \Crefrange@subsubappendix@format@first}{}% + \@ifundefined{crefrange@subsubsubappendix@format@second}{% + \let\crefrange@subsubsubappendix@format@second% + \crefrange@subsubappendix@format@second}{}% + \@ifundefined{Crefrange@subsubsubappendix@format@second}{% + \let\Crefrange@subsubsubappendix@format@second% + \Crefrange@subsubappendix@format@second}{}% + \@ifundefined{crefrange@subsubsubappendix@format@middle}{% + \let\crefrange@subsubsubappendix@format@middle% + \crefrange@subsubappendix@format@middle}{}% + \@ifundefined{Crefrange@subsubsubappendix@format@middle}{% + \let\Crefrange@subsubsubappendix@format@middle% + \Crefrange@subsubappendix@format@middle}{}% + \@ifundefined{crefrange@subsubsubappendix@format@last}{% + \let\crefrange@subsubsubappendix@format@last% + \crefrange@subsubappendix@format@last}{}% + \@ifundefined{Crefrange@subsubsubappendix@format@last}{% + \let\Crefrange@subsubsubappendix@format@last% + \Crefrange@subsubappendix@format@last}{}% + \@ifundefined{cref@subfigure@format}{% + \let\cref@subfigure@format% + \cref@figure@format}{}% + \@ifundefined{Cref@subfigure@format}{% + \let\Cref@subfigure@format% + \Cref@figure@format}{}% + \@ifundefined{crefrange@subfigure@format}{% + \let\crefrange@subfigure@format% + \crefrange@figure@format}{}% + \@ifundefined{Crefrange@subfigure@format}{% + \let\Crefrange@subfigure@format% + \Crefrange@figure@format}{}% + \@ifundefined{cref@subfigure@format@first}{% + \let\cref@subfigure@format@first% + \cref@figure@format@first}{}% + \@ifundefined{Cref@subfigure@format@first}{% + \let\Cref@subfigure@format@first% + \Cref@figure@format@first}{}% + \@ifundefined{cref@subfigure@format@second}{% + \let\cref@subfigure@format@second% + \cref@figure@format@second}{}% + \@ifundefined{Cref@subfigure@format@second}{% + \let\Cref@subfigure@format@second% + \Cref@figure@format@second}{}% + \@ifundefined{cref@subfigure@format@middle}{% + \let\cref@subfigure@format@middle% + \cref@figure@format@middle}{}% + \@ifundefined{Cref@subfigure@format@middle}{% + \let\Cref@subfigure@format@middle% + \Cref@figure@format@middle}{}% + \@ifundefined{cref@subfigure@format@last}{% + \let\cref@subfigure@format@last% + \cref@figure@format@last}{}% + \@ifundefined{Cref@subfigure@format@last}{% + \let\Cref@subfigure@format@last% + \Cref@figure@format@last}{}% + \@ifundefined{crefrange@subfigure@format@first}{% + \let\crefrange@subfigure@format@first% + \crefrange@figure@format@first}{}% + \@ifundefined{Crefrange@subfigure@format@first}{% + \let\Crefrange@subfigure@format@first% + \Crefrange@figure@format@first}{}% + \@ifundefined{crefrange@subfigure@format@second}{% + \let\crefrange@subfigure@format@second% + \crefrange@figure@format@second}{}% + \@ifundefined{Crefrange@subfigure@format@second}{% + \let\Crefrange@subfigure@format@second% + \Crefrange@figure@format@second}{}% + \@ifundefined{crefrange@subfigure@format@middle}{% + \let\crefrange@subfigure@format@middle% + \crefrange@figure@format@middle}{}% + \@ifundefined{Crefrange@subfigure@format@middle}{% + \let\Crefrange@subfigure@format@middle% + \Crefrange@figure@format@middle}{}% + \@ifundefined{crefrange@subfigure@format@last}{% + \let\crefrange@subfigure@format@last% + \crefrange@figure@format@last}{}% + \@ifundefined{Crefrange@subfigure@format@last}{% + \let\Crefrange@subfigure@format@last% + \Crefrange@figure@format@last}{}% + \@ifundefined{cref@subtable@format}{% + \let\cref@subtable@format% + \cref@table@format}{}% + \@ifundefined{Cref@subtable@format}{% + \let\Cref@subtable@format% + \Cref@table@format}{}% + \@ifundefined{crefrange@subtable@format}{% + \let\crefrange@subtable@format% + \crefrange@table@format}{}% + \@ifundefined{Crefrange@subtable@format}{% + \let\Crefrange@subtable@format% + \Crefrange@table@format}{}% + \@ifundefined{cref@subtable@format@first}{% + \let\cref@subtable@format@first% + \cref@table@format@first}{}% + \@ifundefined{Cref@subtable@format@first}{% + \let\Cref@subtable@format@first% + \Cref@table@format@first}{}% + \@ifundefined{cref@subtable@format@second}{% + \let\cref@subtable@format@second% + \cref@table@format@second}{}% + \@ifundefined{Cref@subtable@format@second}{% + \let\Cref@subtable@format@second% + \Cref@table@format@second}{}% + \@ifundefined{cref@subtable@format@middle}{% + \let\cref@subtable@format@middle% + \cref@table@format@middle}{}% + \@ifundefined{Cref@subtable@format@middle}{% + \let\Cref@subtable@format@middle% + \Cref@table@format@middle}{}% + \@ifundefined{cref@subtable@format@last}{% + \let\cref@subtable@format@last% + \cref@table@format@last}{}% + \@ifundefined{Cref@subtable@format@last}{% + \let\Cref@subtable@format@last% + \Cref@table@format@last}{}% + \@ifundefined{crefrange@subtable@format@first}{% + \let\crefrange@subtable@format@first% + \crefrange@table@format@first}{}% + \@ifundefined{Crefrange@subtable@format@first}{% + \let\Crefrange@subtable@format@first% + \Crefrange@table@format@first}{}% + \@ifundefined{crefrange@subtable@format@second}{% + \let\crefrange@subtable@format@second% + \crefrange@table@format@second}{}% + \@ifundefined{Crefrange@subtable@format@second}{% + \let\Crefrange@subtable@format@second% + \Crefrange@table@format@second}{}% + \@ifundefined{crefrange@subtable@format@middle}{% + \let\crefrange@subtable@format@middle% + \crefrange@table@format@middle}{}% + \@ifundefined{Crefrange@subtable@format@middle}{% + \let\Crefrange@subtable@format@middle% + \Crefrange@table@format@middle}{}% + \@ifundefined{crefrange@subtable@format@last}{% + \let\crefrange@subtable@format@last% + \crefrange@table@format@last}{}% + \@ifundefined{Crefrange@subtable@format@last}{% + \let\Crefrange@subtable@format@last% + \Crefrange@table@format@last}{}% + \@ifundefined{cref@enumii@format}{% + \let\cref@enumii@format% + \cref@enumi@format}{}% + \@ifundefined{Cref@enumii@format}{% + \let\Cref@enumii@format% + \Cref@enumi@format}{}% + \@ifundefined{crefrange@enumii@format}{% + \let\crefrange@enumii@format% + \crefrange@enumi@format}{}% + \@ifundefined{Crefrange@enumii@format}{% + \let\Crefrange@enumii@format% + \Crefrange@enumi@format}{}% + \@ifundefined{cref@enumii@format@first}{% + \let\cref@enumii@format@first% + \cref@enumi@format@first}{}% + \@ifundefined{Cref@enumii@format@first}{% + \let\Cref@enumii@format@first% + \Cref@enumi@format@first}{}% + \@ifundefined{cref@enumii@format@second}{% + \let\cref@enumii@format@second% + \cref@enumi@format@second}{}% + \@ifundefined{Cref@enumii@format@second}{% + \let\Cref@enumii@format@second% + \Cref@enumi@format@second}{}% + \@ifundefined{cref@enumii@format@middle}{% + \let\cref@enumii@format@middle% + \cref@enumi@format@middle}{}% + \@ifundefined{Cref@enumii@format@middle}{% + \let\Cref@enumii@format@middle% + \Cref@enumi@format@middle}{}% + \@ifundefined{cref@enumii@format@last}{% + \let\cref@enumii@format@last% + \cref@enumi@format@last}{}% + \@ifundefined{Cref@enumii@format@last}{% + \let\Cref@enumii@format@last% + \Cref@enumi@format@last}{}% + \@ifundefined{crefrange@enumii@format@first}{% + \let\crefrange@enumii@format@first% + \crefrange@enumi@format@first}{}% + \@ifundefined{Crefrange@enumii@format@first}{% + \let\Crefrange@enumii@format@first% + \Crefrange@enumi@format@first}{}% + \@ifundefined{crefrange@enumii@format@second}{% + \let\crefrange@enumii@format@second% + \crefrange@enumi@format@second}{}% + \@ifundefined{Crefrange@enumii@format@second}{% + \let\Crefrange@enumii@format@second% + \Crefrange@enumi@format@second}{}% + \@ifundefined{crefrange@enumii@format@middle}{% + \let\crefrange@enumii@format@middle% + \crefrange@enumi@format@middle}{}% + \@ifundefined{Crefrange@enumii@format@middle}{% + \let\Crefrange@enumii@format@middle% + \Crefrange@enumi@format@middle}{}% + \@ifundefined{crefrange@enumii@format@last}{% + \let\crefrange@enumii@format@last% + \crefrange@enumi@format@last}{}% + \@ifundefined{Crefrange@enumii@format@last}{% + \let\Crefrange@enumii@format@last% + \Crefrange@enumi@format@last}{}% + \@ifundefined{cref@enumiii@format}{% + \let\cref@enumiii@format% + \cref@enumii@format}{}% + \@ifundefined{Cref@enumiii@format}{% + \let\Cref@enumiii@format% + \Cref@enumii@format}{}% + \@ifundefined{crefrange@enumiii@format}{% + \let\crefrange@enumiii@format% + \crefrange@enumii@format}{}% + \@ifundefined{Crefrange@enumiii@format}{% + \let\Crefrange@enumiii@format% + \Crefrange@enumii@format}{}% + \@ifundefined{cref@enumiii@format@first}{% + \let\cref@enumiii@format@first% + \cref@enumii@format@first}{}% + \@ifundefined{Cref@enumiii@format@first}{% + \let\Cref@enumiii@format@first% + \Cref@enumii@format@first}{}% + \@ifundefined{cref@enumiii@format@second}{% + \let\cref@enumiii@format@second% + \cref@enumii@format@second}{}% + \@ifundefined{Cref@enumiii@format@second}{% + \let\Cref@enumiii@format@second% + \Cref@enumii@format@second}{}% + \@ifundefined{cref@enumiii@format@middle}{% + \let\cref@enumiii@format@middle% + \cref@enumii@format@middle}{}% + \@ifundefined{Cref@enumiii@format@middle}{% + \let\Cref@enumiii@format@middle% + \Cref@enumii@format@middle}{}% + \@ifundefined{cref@enumiii@format@last}{% + \let\cref@enumiii@format@last% + \cref@enumii@format@last}{}% + \@ifundefined{Cref@enumiii@format@last}{% + \let\Cref@enumiii@format@last% + \Cref@enumii@format@last}{}% + \@ifundefined{crefrange@enumiii@format@first}{% + \let\crefrange@enumiii@format@first% + \crefrange@enumii@format@first}{}% + \@ifundefined{Crefrange@enumiii@format@first}{% + \let\Crefrange@enumiii@format@first% + \Crefrange@enumii@format@first}{}% + \@ifundefined{crefrange@enumiii@format@second}{% + \let\crefrange@enumiii@format@second% + \crefrange@enumii@format@second}{}% + \@ifundefined{Crefrange@enumiii@format@second}{% + \let\Crefrange@enumiii@format@second% + \Crefrange@enumii@format@second}{}% + \@ifundefined{crefrange@enumiii@format@middle}{% + \let\crefrange@enumiii@format@middle% + \crefrange@enumii@format@middle}{}% + \@ifundefined{Crefrange@enumiii@format@middle}{% + \let\Crefrange@enumiii@format@middle% + \Crefrange@enumii@format@middle}{}% + \@ifundefined{crefrange@enumiii@format@last}{% + \let\crefrange@enumiii@format@last% + \crefrange@enumii@format@last}{}% + \@ifundefined{Crefrange@enumiii@format@last}{% + \let\Crefrange@enumiii@format@last% + \Crefrange@enumii@format@last}{}% + \@ifundefined{cref@enumiv@format}{% + \let\cref@enumiv@format% + \cref@enumiii@format}{}% + \@ifundefined{Cref@enumiv@format}{% + \let\Cref@enumiv@format% + \Cref@enumiii@format}{}% + \@ifundefined{crefrange@enumiv@format}{% + \let\crefrange@enumiv@format% + \crefrange@enumiii@format}{}% + \@ifundefined{Crefrange@enumiv@format}{% + \let\Crefrange@enumiv@format% + \Crefrange@enumiii@format}{}% + \@ifundefined{cref@enumiv@format@first}{% + \let\cref@enumiv@format@first% + \cref@enumiii@format@first}{}% + \@ifundefined{Cref@enumiv@format@first}{% + \let\Cref@enumiv@format@first% + \Cref@enumiii@format@first}{}% + \@ifundefined{cref@enumiv@format@second}{% + \let\cref@enumiv@format@second% + \cref@enumiii@format@second}{}% + \@ifundefined{Cref@enumiv@format@second}{% + \let\Cref@enumiv@format@second% + \Cref@enumiii@format@second}{}% + \@ifundefined{cref@enumiv@format@middle}{% + \let\cref@enumiv@format@middle% + \cref@enumiii@format@middle}{}% + \@ifundefined{Cref@enumiv@format@middle}{% + \let\Cref@enumiv@format@middle% + \Cref@enumiii@format@middle}{}% + \@ifundefined{cref@enumiv@format@last}{% + \let\cref@enumiv@format@last% + \cref@enumiii@format@last}{}% + \@ifundefined{Cref@enumiv@format@last}{% + \let\Cref@enumiv@format@last% + \Cref@enumiii@format@last}{}% + \@ifundefined{crefrange@enumiv@format@first}{% + \let\crefrange@enumiv@format@first% + \crefrange@enumiii@format@first}{}% + \@ifundefined{Crefrange@enumiv@format@first}{% + \let\Crefrange@enumiv@format@first% + \Crefrange@enumiii@format@first}{}% + \@ifundefined{crefrange@enumiv@format@second}{% + \let\crefrange@enumiv@format@second% + \crefrange@enumiii@format@second}{}% + \@ifundefined{Crefrange@enumiv@format@second}{% + \let\Crefrange@enumiv@format@second% + \Crefrange@enumiii@format@second}{}% + \@ifundefined{crefrange@enumiv@format@middle}{% + \let\crefrange@enumiv@format@middle% + \crefrange@enumiii@format@middle}{}% + \@ifundefined{Crefrange@enumiv@format@middle}{% + \let\Crefrange@enumiv@format@middle% + \Crefrange@enumiii@format@middle}{}% + \@ifundefined{crefrange@enumiv@format@last}{% + \let\crefrange@enumiv@format@last% + \crefrange@enumiii@format@last}{}% + \@ifundefined{Crefrange@enumiv@format@last}{% + \let\Crefrange@enumiv@format@last% + \Crefrange@enumiii@format@last}{}% + \@ifundefined{cref@enumv@format}{% + \let\cref@enumv@format% + \cref@enumiv@format}{}% + \@ifundefined{Cref@enumv@format}{% + \let\Cref@enumv@format% + \Cref@enumiv@format}{}% + \@ifundefined{crefrange@enumv@format}{% + \let\crefrange@enumv@format% + \crefrange@enumiv@format}{}% + \@ifundefined{Crefrange@enumv@format}{% + \let\Crefrange@enumv@format% + \Crefrange@enumiv@format}{}% + \@ifundefined{cref@enumv@format@first}{% + \let\cref@enumv@format@first% + \cref@enumiv@format@first}{}% + \@ifundefined{Cref@enumv@format@first}{% + \let\Cref@enumv@format@first% + \Cref@enumiv@format@first}{}% + \@ifundefined{cref@enumv@format@second}{% + \let\cref@enumv@format@second% + \cref@enumiv@format@second}{}% + \@ifundefined{Cref@enumv@format@second}{% + \let\Cref@enumv@format@second% + \Cref@enumiv@format@second}{}% + \@ifundefined{cref@enumv@format@middle}{% + \let\cref@enumv@format@middle% + \cref@enumiv@format@middle}{}% + \@ifundefined{Cref@enumv@format@middle}{% + \let\Cref@enumv@format@middle% + \Cref@enumiv@format@middle}{}% + \@ifundefined{cref@enumv@format@last}{% + \let\cref@enumv@format@last% + \cref@enumiv@format@last}{}% + \@ifundefined{Cref@enumv@format@last}{% + \let\Cref@enumv@format@last% + \Cref@enumiv@format@last}{}% + \@ifundefined{crefrange@enumv@format@first}{% + \let\crefrange@enumv@format@first% + \crefrange@enumiv@format@first}{}% + \@ifundefined{Crefrange@enumv@format@first}{% + \let\Crefrange@enumv@format@first% + \Crefrange@enumiv@format@first}{}% + \@ifundefined{crefrange@enumv@format@second}{% + \let\crefrange@enumv@format@second% + \crefrange@enumiv@format@second}{}% + \@ifundefined{Crefrange@enumv@format@second}{% + \let\Crefrange@enumv@format@second% + \Crefrange@enumiv@format@second}{}% + \@ifundefined{crefrange@enumv@format@middle}{% + \let\crefrange@enumv@format@middle% + \crefrange@enumiv@format@middle}{}% + \@ifundefined{Crefrange@enumv@format@middle}{% + \let\Crefrange@enumv@format@middle% + \Crefrange@enumiv@format@middle}{}% + \@ifundefined{crefrange@enumv@format@last}{% + \let\crefrange@enumv@format@last% + \crefrange@enumiv@format@last}{}% + \@ifundefined{Crefrange@enumv@format@last}{% + \let\Crefrange@enumv@format@last% + \Crefrange@enumiv@format@last}{}% + \let\cref@language\relax% } -\def\cref@writescript#1{% - \edef\@tmpa{\cref@getmeaning{\cref@text}}% - \immediate\write\@crefscript{s/#1/\@tmpa/g}} -\let\old@@setcref\@@setcref -\let\old@@setcrefrange\@@setcrefrange -\def\cref@getmeaning#1{\expandafter\@cref@getmeaning\meaning#1\@nil} -\def\@cref@getmeaning#1->#2\@nil{#2} -\def\@@setcref#1#2{% - \old@@setcref{#1}{#2}% - \expandafter\g@addto@macro\expandafter{% - \expandafter\cref@text\expandafter}\expandafter{% - #1{\ref{#2}}{}{}}} -\def\@@setcrefrange#1#2#3{% - \old@@setcrefrange{#1}{#2}{#3}% - \expandafter\g@addto@macro% - \expandafter{\expandafter\cref@text\expandafter}% - \expandafter{#1{\ref{#2}}{\ref{#3}}{}{}{}{}}} -\def\@setcref@pairgroupconjunction{% - \crefpairgroupconjunction% - \expandafter\g@addto@macro% - \expandafter{\expandafter\cref@text\expandafter}% - \expandafter{\crefpairgroupconjunction}} -\def\@setcref@middlegroupconjunction{% - \crefmiddlegroupconjunction% - \expandafter\g@addto@macro% - \expandafter{\expandafter\cref@text\expandafter}% - \expandafter{\crefmiddlegroupconjunction}} -\def\@setcref@lastgroupconjunction{% - \creflastgroupconjunction% - \expandafter\g@addto@macro% - \expandafter{\expandafter\cref@text\expandafter}% - \expandafter{\creflastgroupconjunction}} -} % end of poorman option -\ProcessOptions\relax \endinput %% %% End of file `cleveref.sty'. -- cgit v1.2.3