summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cleveref
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-05 21:55:39 +0000
committerKarl Berry <karl@freefriends.org>2018-02-05 21:55:39 +0000
commit8b4451636905feb26dd54d7ad87238ccb6ea9b43 (patch)
tree07b7c2d079f41917b0c533ab06bf51f3499896d2 /Master/texmf-dist/tex/latex/cleveref
parent2ef422c944ed60d619037098bbea4a734f86d6e0 (diff)
cleveref (5feb18)
git-svn-id: svn://tug.org/texlive/trunk@46549 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cleveref')
-rw-r--r--Master/texmf-dist/tex/latex/cleveref/cleveref.sty2756
1 files changed, 1155 insertions, 1601 deletions
diff --git a/Master/texmf-dist/tex/latex/cleveref/cleveref.sty b/Master/texmf-dist/tex/latex/cleveref/cleveref.sty
index 0522c48433c..026390ca0d3 100644
--- a/Master/texmf-dist/tex/latex/cleveref/cleveref.sty
+++ b/Master/texmf-dist/tex/latex/cleveref/cleveref.sty
@@ -8,11 +8,11 @@
%%
%% LaTeX package for intelligent cross-referencing.
%%
-%% Copyright (C) 2006--2013 Toby Cubitt
+%% Copyright (C) 2006--2016 Toby Cubitt
%% See the files README and COPYING.
%%
-\def\packagedate{2013/12/28}
-\def\packageversion{0.19}
+\def\packagedate{2017/07/10}
+\def\packageversion{0.21}
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
%% of this license or (at your option) any later version.
@@ -68,19 +68,31 @@
\def\label{\@ifnextchar[\label@optarg\label@noarg}%]
\let\cref@label\label%
\def\label@noarg#1{%
- \@bsphack%
\cref@old@label{#1}%
+ \@bsphack%
+ \edef\@tempa{{page}{\the\c@page}}%
+ \setcounter{page}{1}%
+ \edef\@tempb{\thepage}%
+ \expandafter\setcounter\@tempa%
+ \cref@constructprefix{page}{\cref@result}%
\protected@write\@auxout{}%
- {\string\newlabel{#1@cref}{{\cref@currentlabel}{\thepage}}}%
+ {\string\newlabel{#1@cref}{{\cref@currentlabel}%
+ {[\@tempb][\arabic{page}][\cref@result]\thepage}}}%
\@esphack}%
\def\label@optarg[#1]#2{%
- \@bsphack%
\cref@old@label{#2}%
+ \@bsphack%
+ \edef\@tempa{{page}{\the\c@page}}%
+ \setcounter{page}{1}%
+ \edef\@tempb{\thepage}%
+ \expandafter\setcounter\@tempa%
+ \cref@constructprefix{page}{\cref@result}%
\protected@edef\cref@currentlabel{%
\expandafter\cref@override@label@type%
\cref@currentlabel\@nil{#1}}%
\protected@write\@auxout{}%
- {\string\newlabel{#2@cref}{{\cref@currentlabel}{\thepage}}}%
+ {\string\newlabel{#2@cref}{{\cref@currentlabel}%
+ {[\@tempb][\arabic{page}][\cref@result]\thepage}}}%
\@esphack}%
}% end of AtBeginDocument
\let\cref@old@makefntext\@makefntext%
@@ -160,114 +172,124 @@
\cref@stack@add{#1}{\cref@label@types}%
\cref@old@ynthm{#1}{#2}}%
\@ifundefined{appendix}{}{%
- \g@addto@macro\appendix{%
+ \let\cref@old@appendix\appendix%
+ \def\appendix{%
\@ifundefined{chapter}{%
- \gdef\refstepcounter@noarg#1{%
- \cref@old@refstepcounter{#1}%
- \cref@constructprefix{#1}{\cref@result}%
+ \gdef\refstepcounter@noarg##1{%
+ \cref@old@refstepcounter{##1}%
+ \cref@constructprefix{##1}{\cref@result}%
\ifx\cref@result\@empty%
\def\cref@result{2147483647}%
\else%
\edef\cref@result{2147483647,\cref@result}%
\fi%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{section}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [appendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [appendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{subsection}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{subsubsection}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subsubappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subsubappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \@ifundefined{cref@#1@alias}%
- {\def\@tempa{#1}}%
- {\def\@tempa{\csname cref@#1@alias\endcsname}}%
+ \@ifundefined{cref@##1@alias}%
+ {\def\@tempa{##1}}%
+ {\def\@tempa{\csname cref@##1@alias\endcsname}}%
\protected@edef\cref@currentlabel{%
- [\@tempa][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [\@tempa][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\fi%
\fi%
\fi}%
+ \cref@old@appendix%
}{%
- \def\refstepcounter@noarg#1{%
- \cref@old@refstepcounter{#1}%
- \cref@constructprefix{#1}{\cref@result}%
+ \def\refstepcounter@noarg##1{%
+ \cref@old@refstepcounter{##1}%
+ \cref@constructprefix{##1}{\cref@result}%
\ifx\cref@result\@empty%
\def\cref@result{2147483647}%
\else%
\edef\cref@result{2147483647,\cref@result}%
\fi%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{chapter}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [appendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [appendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{section}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{subsection}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subsubappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subsubappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{subsubsection}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subsubsubappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subsubsubappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \@ifundefined{cref@#1@alias}%
- {\def\@tempa{#1}}%
- {\def\@tempa{\csname cref@#1@alias\endcsname}}%
+ \@ifundefined{cref@##1@alias}%
+ {\def\@tempa{##1}}%
+ {\def\@tempa{\csname cref@##1@alias\endcsname}}%
\protected@edef\cref@currentlabel{%
- [\@tempa][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [\@tempa][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\fi%
\fi%
\fi%
\fi}%
- }%
+ \cref@old@appendix}%
}%
}% end of \@ifundefined{appendix}
-\def\@gobble@optarg{\@ifnextchar[\@@gobble@optarg\@gobble@orig}%]
-\def\@gobble@orig#1{}%
-\def\@@gobble@optarg[#1]#2{}%
+\def\cref@gobble@optarg{\@ifnextchar[\@cref@gobble@optarg\cref@gobble}%]
+\def\cref@gobble#1{}%
+\def\@cref@gobble@optarg[#1]#2{}%
\def\cref@append@toks#1#2{\toks0={#2}%
\edef\act{\noexpand#1={\the#1\the\toks0}}%
\act}%
+\def\cref@ifstreq#1#2#3#4{%
+ \begingroup%
+ \edef\@tempa{#1}%
+ \edef\@tempb{#2}%
+ \expandafter\def\expandafter\@tempa\expandafter{\csname\@tempa\endcsname}%
+ \expandafter\def\expandafter\@tempb\expandafter{\csname\@tempb\endcsname}%
+ \ifx\@tempa\@tempb%
+ \let\@tempc\@firstoftwo%
+ \else%
+ \let\@tempc\@secondoftwo%
+ \fi%
+ \expandafter%
+ \endgroup%
+ \@tempc{#3}{#4}}%
\def\cref@getref#1#2{%
\expandafter\let\expandafter#2\csname r@#1@cref\endcsname%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter#2%
\expandafter\expandafter\expandafter{%
\expandafter\@firstoftwo#2}}%
-\def\cref@getpageref#1#2{%
- \expandafter\let\expandafter#2\csname r@#1@cref\endcsname%
- \expandafter\expandafter\expandafter\def%
- \expandafter\expandafter\expandafter#2%
- \expandafter\expandafter\expandafter{%
- \expandafter\@secondoftwo#2}}%
\def\cref@getlabel#1#2{%
\cref@getref{#1}{\@tempa}%
\expandafter\@cref@getlabel\@tempa\@nil#2}%
@@ -292,6 +314,36 @@
\def\@cref@getprefix{\@ifnextchar[%]
\@@cref@getprefix{\@@cref@getprefix[][][]}}%
\def\@@cref@getprefix[#1][#2][#3]#4\@nil#5{\def#5{#3}}%
+\def\cpageref@getref#1#2{%
+ \expandafter\let\expandafter#2\csname r@#1@cref\endcsname%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter#2%
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@secondoftwo#2}}%
+\def\cpageref@getlabel#1#2{%
+ \cpageref@getref{#1}{\@tempa}%
+ \expandafter\@cpageref@getlabel\@tempa\@nil#2}%
+\def\@cpageref@getlabel{\@ifnextchar[%]
+ \@@cpageref@getlabel{\@@cpageref@getlabel[][][]}}%
+\def\@@cpageref@getlabel[#1][#2][#3]#4\@nil#5{\def#5{#4}}%
+\def\cpageref@gettype#1#2{%
+ \cpageref@getref{#1}{\@tempa}%
+ \expandafter\@cpageref@gettype\@tempa\@nil#2}%
+\def\@cpageref@gettype{\@ifnextchar[%]
+ \@@cpageref@gettype{\@@cpageref@gettype[][][]}}%
+\def\@@cpageref@gettype[#1][#2][#3]#4\@nil#5{\def#5{#1}}%
+\def\cpageref@getcounter#1#2{%
+ \cpageref@getref{#1}{\@tempa}%
+ \expandafter\@cpageref@getcounter\@tempa\@nil#2}%
+\def\@cpageref@getcounter{\@ifnextchar[%]
+ \@@cpageref@getcounter{\@@cpageref@getcounter[][][]}}%
+\def\@@cpageref@getcounter[#1][#2][#3]#4\@nil#5{\def#5{#2}}%
+\def\cpageref@getprefix#1#2{%
+ \cpageref@getref{#1}{\@tempa}%
+ \expandafter\@cpageref@getprefix\@tempa\@nil#2}%
+\def\@cpageref@getprefix{\@ifnextchar[%]
+ \@@cpageref@getprefix{\@@cpageref@getprefix[][][]}}%
+\def\@@cpageref@getprefix[#1][#2][#3]#4\@nil#5{\def#5{#3}}%
\def\cref@override@label@type[#1][#2][#3]#4\@nil#5{[#5][#2][#3]#4}%
\def\cref@constructprefix#1#2{%
\cref@stack@init{\@tempstack}%
@@ -373,50 +425,60 @@
\def\@tempa{\@nil}%
\ifx#1\@tempa\@cref@stackfullfalse%
\else\@cref@stackfulltrue\fi}%
+\def\cref@stack@dropempty#1{%
+ \edef\@tempa{\cref@stack@top{#1}}%
+ \@whilesw\ifx\@tempa\@empty\fi{%
+ \cref@stack@pop{#1}%
+ \cref@isstackempty{#1}%
+ \if@cref@stackempty%
+ \let\@tempa\relax%
+ \else%
+ \edef\@tempa{\cref@stack@top{#1}}%
+ \fi}}%
\def\cref@stack@sort#1#2{%
\begingroup%
\cref@stack@init{\@sortstack}%
- \edef\@element{\cref@stack@top{#1}}%
+ \edef\@element{\cref@stack@top{#2}}%
\expandafter\cref@stack@push\expandafter{\@element}{\@sortstack}%
- \cref@stack@pop{#1}%
- \cref@isstackfull{#1}%
+ \cref@stack@pop{#2}%
+ \cref@isstackfull{#2}%
\if@cref@stackfull%
- \edef\@tempa{\cref@stack@top{#1}}%
+ \edef\@tempa{\cref@stack@top{#2}}%
\@whilesw\ifx\@tempa\@empty\fi{%
\cref@stack@pull{}{\@sortstack}%
- \cref@stack@pop{#1}%
- \cref@isstackempty{#1}%
+ \cref@stack@pop{#2}%
+ \cref@isstackempty{#2}%
\if@cref@stackempty%
\let\@tempa\relax%
\else%
- \edef\@tempa{\cref@stack@top{#1}}%
+ \edef\@tempa{\cref@stack@top{#2}}%
\fi}%
\fi%
- \cref@isstackfull{#1}%
+ \cref@isstackfull{#2}%
\@whilesw\if@cref@stackfull\fi{%
- \edef\@element{\cref@stack@top{#1}}%
- \cref@stack@pop{#1}%
+ \edef\@element{\cref@stack@top{#2}}%
+ \cref@stack@pop{#2}%
\def\@empties{}%
- \cref@isstackfull{#1}%
+ \cref@isstackfull{#2}%
\if@cref@stackfull%
- \edef\@tempa{\cref@stack@top{#1}}%
+ \edef\@tempa{\cref@stack@top{#2}}%
\@whilesw\ifx\@tempa\@empty\fi{%
\edef\@empties{\@empties,}%
- \cref@stack@pop{#1}%
- \cref@isstackempty{#1}%
+ \cref@stack@pop{#2}%
+ \cref@isstackempty{#2}%
\if@cref@stackempty%
\let\@tempa\relax%
\else%
- \edef\@tempa{\cref@stack@top{#1}}%
+ \edef\@tempa{\cref@stack@top{#2}}%
\fi}%
\fi%
\edef\@tempa{{\expandafter\noexpand\@element}%
{\expandafter\noexpand\@empties}%
- {\noexpand\@sortstack}{\noexpand#2}}%
+ {\noexpand\@sortstack}{\noexpand#1}}%
\expandafter\cref@stack@insert\@tempa%
- \cref@isstackfull{#1}}%
+ \cref@isstackfull{#2}}%
\expandafter\endgroup\expandafter%
- \def\expandafter#1\expandafter{\@sortstack}}%
+ \def\expandafter#2\expandafter{\@sortstack}}%
\def\cref@stack@insert#1#2#3#4{%
\let\@cmp#4%
\@cref@stack@insert{}{#1}{#2}{#3}%
@@ -440,28 +502,85 @@
\fi%
\fi%
\cref@iterate}%
+\newif\if@cref@sametype%
+\def\cref@isrefsametype#1#2{%
+ \begingroup%
+ \expandafter\ifx\csname r@#1@cref\endcsname\relax%
+ \expandafter\ifx\csname r@#2@cref\endcsname\relax%
+ \def\@after{\@cref@sametypetrue}%
+ \else%
+ \def\@after{\@cref@sametypefalse}%
+ \fi%
+ \else%
+ \expandafter\ifx\csname r@#2@cref\endcsname\relax%
+ \def\@after{\@cref@sametypefalse}%
+ \else%
+ \cref@gettype{#1}{\@type}%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@formata%
+ \expandafter\expandafter\expandafter{%
+ \csname cref@\@type @format\endcsname%
+ {\@dummya}{\@dummyb}{\@dummyc}}%
+ \cref@gettype{#2}{\@type}%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@formatb%
+ \expandafter\expandafter\expandafter{%
+ \csname cref@\@type @format\endcsname%
+ {\@dummya}{\@dummyb}{\@dummyc}}%
+ \ifx\@formata\@formatb%
+ \def\@after{\@cref@sametypetrue}%
+ \else%
+ \def\@after{\@cref@sametypefalse}%
+ \fi%
+ \fi%
+ \fi%
+ \expandafter\endgroup\@after}%
+\def\cpageref@isrefsametype#1#2{%
+ \begingroup%
+ \expandafter\ifx\csname r@#1@cref\endcsname\relax%
+ \expandafter\ifx\csname r@#2@cref\endcsname\relax%
+ \def\@after{\@cref@sametypetrue}%
+ \else%
+ \def\@after{\@cref@sametypefalse}%
+ \fi%
+ \else%
+ \expandafter\ifx\csname r@#2@cref\endcsname\relax%
+ \def\@after{\@cref@sametypefalse}%
+ \else%
+ \cpageref@gettype{#1}{\@typea}%
+ \cpageref@gettype{#2}{\@typeb}%
+ \ifx\@typea\@typeb%
+ \def\@after{\@cref@sametypetrue}%
+ \else%
+ \def\@after{\@cref@sametypefalse}%
+ \fi%
+ \fi%
+ \fi%
+ \expandafter\endgroup\@after}%
\def\cref@counter@first#1#2\@nil{#1}%
\def\cref@counter@rest#1#2\@nil{#2}%
-\def\cref@countercmp#1#2#3{%
+\def\cref@countercmp{\@cref@countercmp{cref}}%
+\def\cpageref@countercmp{\@cref@countercmp{cpageref}}%
+\def\@cref@countercmp#1#2#3#4{%
\begingroup%
- \def\@tempa{#1}%
+ \def\@tempa{#2}%
\ifx\@tempa\@empty%
\def\cref@result{1}%
\else%
- \def\@tempa{#2}%
+ \def\@tempa{#3}%
\ifx\@tempa\@empty%
\def\cref@result{2}%
\else%
- \expandafter\ifx\csname r@#1@cref\endcsname\relax%
+ \expandafter\ifx\csname r@#2@cref\endcsname\relax%
\def\cref@result{2}%
\else%
- \expandafter\ifx\csname r@#2@cref\endcsname\relax%
+ \expandafter\ifx\csname r@#3@cref\endcsname\relax%
\def\cref@result{1}%
\else%
- \cref@getcounter{#1}{\@countera}%
- \cref@getprefix{#1}{\@prefixa}%
- \cref@getcounter{#2}{\@counterb}%
- \cref@getprefix{#2}{\@prefixb}%
+ \csname #1@getcounter\endcsname{#2}{\@countera}%
+ \csname #1@getprefix\endcsname{#2}{\@prefixa}%
+ \csname #1@getcounter\endcsname{#3}{\@counterb}%
+ \csname #1@getprefix\endcsname{#3}{\@prefixb}%
\cref@stack@init{\@countstacka}%
\expandafter\cref@stack@push\expandafter%
{\@countera}{\@countstacka}%
@@ -476,14 +595,14 @@
\expandafter\cref@stack@push\expandafter%
{\@prefixb}{\@countstackb}%
\fi%
- \@cref@countercmp%
+ \@@cref@countercmp%
\fi%
\fi%
\fi%
\fi%
\expandafter\endgroup\expandafter%
- \chardef\expandafter#3\expandafter=\cref@result\relax}%
-\def\@cref@countercmp{%
+ \chardef\expandafter#4\expandafter=\cref@result\relax}%
+\def\@@cref@countercmp{%
\let\@iterate\relax%
\cref@isstackempty{\@countstacka}%
\if@cref@stackempty%
@@ -508,45 +627,12 @@
\ifnum\@tempa>\@tempb\relax%
\def\cref@result{2}%
\else%
- \def\@iterate{\@cref@countercmp}%
+ \def\@iterate{\@@cref@countercmp}%
\fi%
\fi%
\fi%
\fi%
\@iterate}%
-\def\cref@pagecmp#1#2#3{%
- \begingroup%
- \def\@tempa{#1}%
- \ifx\@tempa\@empty%
- \def\cref@result{1}%
- \else%
- \def\@tempa{#2}%
- \ifx\@tempa\@empty%
- \def\cref@result{2}%
- \else%
- \expandafter\ifx\csname r@#1@cref\endcsname\relax%
- \def\cref@result{2}%
- \else%
- \expandafter\ifx\csname r@#2@cref\endcsname\relax%
- \def\cref@result{1}%
- \else%
- \cref@getpageref{#1}{\@tempa}%
- \cref@getpageref{#2}{\@tempb}%
- \ifnum\@tempa<\@tempb\relax%
- \def\cref@result{1}\relax%
- \else%
- \ifnum\@tempa>\@tempb\relax%
- \def\cref@result{2}\relax%
- \else%
- \def\cref@result{0}\relax%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \expandafter\endgroup\expandafter%
- \chardef\expandafter#3\expandafter=\cref@result\relax}%
\newif\if@cref@inresetlist%
\def\cref@isinresetlist#1#2{%
\begingroup%
@@ -578,79 +664,38 @@
\@next}%
\def\cref@resetby#1#2{%
\let#2\relax%
- \def\@tempa{#1}%
- \def\@tempb{subfigure}%
- \ifx\@tempa\@tempb%
+ \cref@ifstreq{#1}{subfigure}{%
\cref@isinresetlist{#1}{figure}%
\if@cref@inresetlist%
\def#2{figure}%
\fi%
- \fi%
- \def\@tempa{#1}%
- \def\@tempb{subtable}%
- \ifx\@tempa\@tempb%
+ }{}%
+ \cref@ifstreq{#1}{subtable}{%
\cref@isinresetlist{#1}{table}%
\if@cref@inresetlist%
\def#2{table}%
\fi%
- \fi%
+ }{}%
\@ifundefined{cl@parentequation}{}{%
- \def\@tempa{#1}%
- \def\@tempb{equation}%
- \ifx\@tempa\@tempb%
+ \cref@ifstreq{#1}{equation}{%
\cref@isinresetlist{#1}{parentequation}%
\if@cref@inresetlist%
\expandafter\ifnum\c@parentequation=0\else%
\def#2{parentequation}%
\fi%
\fi%
- \fi}%
- \def\@tempa{#1}%
- \def\@tempb{enumii}%
- \ifx\@tempa\@tempb%
- \def#2{enum}%
- \fi%
- \def\@tempb{enumiii}%
- \ifx\@tempa\@tempb%
- \def#2{enum}%
- \fi%
- \def\@tempb{enumiv}%
- \ifx\@tempa\@tempb%
- \def#2{enum}%
- \fi%
- \def\@tempb{enumv}%
- \ifx\@tempa\@tempb%
- \def#2{enum}%
- \fi%
- \def\@tempb{enum}%
- \ifx#2\@tempb%
- \cref@isinresetlist{#1}{enumiv}%
- \if@cref@inresetlist%
- \def#2{enumiv}%
- \else%
- \cref@isinresetlist{#1}{enumiii}%
- \if@cref@inresetlist%
+ }{}}%
+ \cref@ifstreq{#1}{enumii}{%
+ \def#2{enumi}%
+ }{%
+ \cref@ifstreq{#1}{enumiii}{%
+ \def#2{enumii}%
+ }{%
+ \cref@ifstreq{#1}{enumiv}{%
\def#2{enumiii}%
- \else%
- \cref@isinresetlist{#1}{enumii}%
- \if@cref@inresetlist%
- \def#2{enumii}%
- \else%
- \cref@isinresetlist{#1}{enumi}%
- \if@cref@inresetlist%
- \def#2{enumi}%
- \else%
- \cref@isinresetlist{#1}{part}%
- \if@cref@inresetlist%
- \def#2{part}%
- \else%
- \let#2\relax%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
+ }{}%
+ }%
+ }%
\ifx#2\relax%
\cref@isinresetlist{#1}{table}%
\if@cref@inresetlist%
@@ -685,212 +730,116 @@
\fi%
\fi}%
\newif\if@cref@refconsecutive%
-\def\cref@isrefconsecutive#1#2{%
+\def\cref@isrefconsecutive{\@cref@isrefconsecutive{cref}}%
+\def\cpageref@isrefconsecutive{\@cref@isrefconsecutive{cpageref}}%
+\def\@cref@isrefconsecutive#1#2#3{%
\begingroup%
- \countdef\refa@counter=0%
- \countdef\refb@counter=1%
- \cref@getcounter{#1}{\cref@result}%
- \refa@counter=\cref@result%
- \cref@getcounter{#2}{\cref@result}%
- \refb@counter=\cref@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%
+ \def\@after{\@cref@refconsecutivefalse}%
+ \expandafter\ifx\csname r@#2@cref\endcsname\relax\else%
+ \expandafter\ifx\csname r@#3@cref\endcsname\relax\else%
+ \countdef\refa@counter=0%
+ \countdef\refb@counter=1%
+ \csname #1@getcounter\endcsname{#2}{\cref@result}%
+ \refa@counter=\cref@result%
+ \csname #1@getcounter\endcsname{#3}{\cref@result}%
+ \refb@counter=\cref@result%
+ \csname #1@getprefix\endcsname{#2}{\refa@prefix}%
+ \csname #1@getprefix\endcsname{#3}{\refb@prefix}%
+ \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%
\fi%
- \expandafter\endgroup\@after}%
-\def\cref@ispagerefconsecutive#1#2{%
- \begingroup%
- \countdef\refa@counter=0%
- \countdef\refb@counter=1%
- \cref@getpageref{#1}{\cref@result}%
- \refa@counter=\cref@result%
- \cref@getpageref{#2}{\cref@result}%
- \refb@counter=\cref@result%
- \def\@after{\@cref@refconsecutivefalse}%
- \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%
\expandafter\endgroup\@after}%
-\def\cref@processgroup#1#2{%
- \edef\@nextref{\cref@stack@top{#1}}%
- \expandafter\ifx\csname r@\@nextref @cref\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}%
+\def\cref@processgroup#1#2#3{%
+ \cref@stack@dropempty{#2}%
+ \edef\@firstref{\cref@stack@top{#2}}%
+ \let\@nextref\@firstref%
+ \cref@isrefsametypetrue%
+ \@whilesw\if@cref@sametype\fi{%
+ \expandafter\cref@stack@pull\expandafter{\@nextref}{#3}%
+ \cref@stack@pop{#2}%
+ \cref@isstackempty{#2}%
\if@cref@stackempty%
- \let\@nexttype\relax%
- \let\@nextformat\relax%
+ \@cref@sametypefalse%
\else%
- \edef\@nextref{\cref@stack@top{#1}}%
+ \edef\@nextref{\cref@stack@top{#2}}%
\ifx\@nextref\@empty%
- \let\@nexttype\@grouptype%
- \let\@nextforamt\@groupformat%
+ \@cref@sametypetrue%
\else%
- \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax%
- \def\@nexttype{\@undefined}%
- \def\@nextformat{\@undefined}%
- \else%
- \expandafter\cref@gettype\expandafter%
- {\@nextref}{\@nexttype}%
- \def\@tempa{\@undefined}%
- \ifx\@nexttype\@tempa%
- \def\@nextformat{\@undefined}%
- \else%
- \expandafter\expandafter\expandafter\def%
- \expandafter\expandafter\expandafter\@nextformat%
- \expandafter\expandafter\expandafter{%
- \csname cref@\@nexttype @format\endcsname%
- {\@dummya}{\@dummyb}{\@dummyc}}%
- \fi%
- \fi%
+ \csname #1@isrefsametype\endcsname{\@firstref}{\@nextref}%
\fi%
- \fi}%
-}%
-\def\cref@processgroupall#1#2{%
+ \fi}}%
+\def\cref@processgroupall#1#2#3{%
\cref@stack@init{\@tempstack}%
- \edef\@nextref{\cref@stack@top{#1}}%
- \expandafter\ifx\csname r@\@nextref @cref\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}%
+ \cref@stack@dropempty{#2}%
+ \edef\@firstref{\cref@stack@top{#2}}%
+ \cref@isstackfull{#2}%
\@whilesw\if@cref@stackfull\fi{%
- \edef\@nextref{\cref@stack@top{#1}}%
+ \edef\@nextref{\cref@stack@top{#2}}%
\ifx\@nextref\@empty%
- \ifx\@lastformat\@groupformat%
- \let\@nexttype\@grouptype%
- \let\@nextformat\@groupformat%
- \else%
- \let\@nexttype\relax%
- \let\@nextformat\relax%
- \fi%
+ \expandafter\cref@stack@pull\expandafter{\@nextref}{#3}%
\else%
- \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax%
- \def\@nexttype{\@undefined}%
- \def\@nextformat{\@undefined}%
+ \edef\@tempa{{\@firstref}{\@nextref}}%
+ \csname #1@isrefsametype\expandafter\endcsname\@tempa%
+ \if@cref@sametype%
+ \expandafter\cref@stack@pull\expandafter{\@nextref}{#3}%
\else%
- \expandafter\cref@gettype\expandafter%
- {\@nextref}{\@nexttype}%
- \def\@tempa{\@undefined}%
- \ifx\@nexttype\@tempa%
- \def\@nextformat{\@undefined}%
- \else%
- \expandafter\expandafter\expandafter\def%
- \expandafter\expandafter\expandafter\@nextformat%
- \expandafter\expandafter\expandafter{%
- \csname cref@\@nexttype @format\endcsname%
- {\@dummya}{\@dummyb}{\@dummyc}}%
- \fi%
+ \expandafter\cref@stack@pull\expandafter{\@nextref}{\@tempstack}%
\fi%
\fi%
- \ifx\@nextformat\@groupformat%
- \expandafter\cref@stack@pull\expandafter{\@nextref}{#2}%
- \else%
- \expandafter\cref@stack@pull\expandafter{\@nextref}{\@tempstack}%
- \fi%
- \cref@stack@pop{#1}%
- \let\@lasttype\@nexttype%
- \let\@lastformat\@nextformat%
- \cref@isstackfull{#1}}%
- \let#1\@tempstack}%
+ \cref@stack@pop{#2}%
+ \cref@isstackfull{#2}}%
+ \let#2\@tempstack}%
\def\cref@processconsecutive#1#2#3#4#5{%
- #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@cref\endcsname\relax%
+ \let#4\relax%
+ #5=1\relax%
+ \edef\@nextref{\cref@stack@top{#2}}%
+ \edef#3{\@nextref}%
+ \cref@stack@pop{#2}%
+ \cref@isstackfull{#2}%
+ \if@cref@stackfull%
+ \edef\@nextref{\cref@stack@top{#2}}%
+ \expandafter\ifx\csname r@#3@cref\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}%
+ \cref@stack@dropempty{#2}%
\else%
- \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax%
- \@cref@refconsecutivefalse%
- \else%
- \edef\@tempa{{#2}{\@nextref}}%
- \expandafter#5\@tempa%
- \fi%
+ \edef\@tempa{{#3}{\@nextref}}%
+ \csname #1@isrefconsecutive\expandafter\endcsname\@tempa%
\fi%
\fi%
\@whilesw\if@cref@refconsecutive\fi{%
- \advance#4 1%
- \let#3\@nextref%
- \cref@stack@pop{#1}%
- \cref@isstackempty{#1}%
+ \advance#5 1\relax%
+ \let#4\@nextref%
+ \cref@stack@pop{#2}%
+ \cref@isstackempty{#2}%
\if@cref@stackempty%
\@cref@refconsecutivefalse%
\else%
- \edef\@nextref{\cref@stack@top{#1}}%
+ \edef\@nextref{\cref@stack@top{#2}}%
\ifx\@nextref\@empty%
\@cref@refconsecutivefalse%
\@whilesw\ifx\@nextref\@empty\fi{%
- \cref@stack@pop{#1}%
- \cref@isstackempty{#1}%
+ \cref@stack@pop{#2}%
+ \cref@isstackempty{#2}%
\if@cref@stackempty%
\let\@nextref\relax%
\else%
- \edef\@nextref{\cref@stack@top{#1}}%
+ \edef\@nextref{\cref@stack@top{#2}}%
\fi}%
\else%
- \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax%
- \@cref@refconsecutivefalse%
- \else%
- \edef\@tempa{{#3}{\@nextref}}%
- \expandafter#5\@tempa%
- \fi%
+ \edef\@tempa{{#4}{\@nextref}}%
+ \csname #1@isrefconsecutive\expandafter\endcsname\@tempa%
\fi%
\fi}%
\fi}%
@@ -901,7 +850,7 @@
\let\cref@acc\@empty%
\@crefstripprefix%
\cref@result%
- \endgroup}
+ \endgroup}%
\def\@crefstripprefix{%
\let\@iterate\relax%
\def\accum@flag{0}%
@@ -939,7 +888,7 @@
\fi%
\edef\cref@result{\cref@acc\@tempb\@toksb}%
\fi%
- \@iterate}
+ \@iterate}%
\def\cref@poptok#1#2{%
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter#2%
@@ -948,24 +897,31 @@
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter#1%
\expandafter\expandafter\expandafter{%
- \expandafter\@cref@poptok#1\@nil}}
-\def\@cref@firsttok#1#2\@nil{#1}
-\def\@cref@poptok#1#2\@nil{#2}
+ \expandafter\@cref@poptok#1\@nil}}%
+\def\@cref@firsttok#1#2\@nil{#1}%
+\def\@cref@poptok#1#2\@nil{#2}%
\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}{}}%
+\DeclareRobustCommand{\crefrange}[2]{\@setcrefrange{#1}{#2}{}}%
+\DeclareRobustCommand{\Crefrange}[2]{\@setCrefrange{#1}{#2}{}}%
\@ifpackageloaded{hyperref}{\newif\if@crefstarred}{%
\@ifpackageloaded{varioref}{\newif\if@crefstarred}{}}%
\let\if@crefstarred\iffalse%
\def\@cref#1#2{%
\leavevmode%
\begingroup%
+ \def\cref@variant{#1}%
+ \def\@tempa{\in@{page}}%
+ \expandafter\@tempa\expandafter{\cref@variant}%
+ \ifin@%
+ \def\cref@variant@get{cpageref}%
+ \else%
+ \def\cref@variant@get{cref}%
+ \fi%
\countdef\count@consecutive=0%
\countdef\count@group=1%
\count@group=1%
- \def\cref@variant{#1}%
- \newif\if@secondref%
+ \countdef\count@subgroup=2%
\cref@stack@init{\@refstack}%
\edef\@tempa{#2}%
\expandafter\cref@stack@push\expandafter{\@tempa}{\@refstack}%
@@ -973,13 +929,16 @@
\@whilesw\if@cref@stackfull\fi{%
\cref@stack@init{\@refsubstack}%
\if@cref@sort%
- \cref@processgroupall{\@refstack}{\@refsubstack}%
- \cref@stack@sort{\@refsubstack}{\cref@countercmp}%
+ \expandafter\cref@processgroupall\expandafter%
+ {\cref@variant@get}{\@refstack}{\@refsubstack}%
+ \expandafter\cref@stack@sort\expandafter%
+ {\csname\cref@variant@get @countercmp\endcsname}{\@refsubstack}%
\else%
- \cref@processgroup{\@refstack}{\@refsubstack}%
+ \expandafter\cref@processgroup\expandafter%
+ {\cref@variant@get}{\@refstack}{\@refsubstack}%
\fi%
\ifnum\count@group=1\relax%
- \advance\count@group 1%
+ \advance\count@group 1\relax%
\else%
\cref@isstackfull{\@refstack}%
\if@cref@stackfull%
@@ -991,103 +950,67 @@
\@setcref@lastgroupconjunction%
\fi%
\fi%
- \advance\count@group 1%
- \def\cref@variant{cref}%
- \fi%
- \if@cref@compress%
- \cref@processconsecutive%
- {\@refsubstack}{\@beginref}{\@endref}{\count@consecutive}%
- {\cref@isrefconsecutive}%
- \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%
- \let\@beginref\relax%
- \else%
- \edef\@beginref{\cref@stack@top{\@refsubstack}}%
- \fi}%
- \let\@endref\relax%
- \count@consecutive=1\relax%
- \fi%
- \ifnum\count@consecutive=1\relax%
- \cref@isstackfull{\@refsubstack}%
- \if@cref@stackfull%
- \expandafter\@setcref%
- \expandafter{\@beginref}{\cref@variant}{@first}%
- \else%
- \expandafter\@setcref%
- \expandafter{\@beginref}{\cref@variant}{}%
- \fi%
- \else%
- \ifnum\count@consecutive=2\relax%
- \expandafter\@setcref%
- \expandafter{\@beginref}{\cref@variant}{@first}%
- \expandafter\cref@stack@push\expandafter%
- {\@endref,}{\@refsubstack}%
- \else%
- \edef\@tempa{{\@beginref}{\@endref}}%
- \if@cref@stackempty%
- \expandafter\@setcrefrange\@tempa{\cref@variant}{}%
- \else%
- \expandafter\@setcrefrange\@tempa{\cref@variant}{@first}%
- \fi%
- \fi%
+ \advance\count@group 1\relax%
+ \lowercase{\def\cref@variant{#1}}%
\fi%
- \@secondreftrue%
+ \count@subgroup=1%
\cref@isstackfull{\@refsubstack}%
\@whilesw\if@cref@stackfull\fi{%
\if@cref@compress%
- \cref@processconsecutive%
+ \expandafter\cref@processconsecutive\expandafter{\cref@variant@get}%
{\@refsubstack}{\@beginref}{\@endref}{\count@consecutive}%
- {\cref@isrefconsecutive}%
\else%
+ \cref@stack@dropempty{\@refsubstack}%
\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%
- \let\@beginref\relax%
- \else%
- \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}%
+ \ifnum\count@consecutive>1\relax%
+ \csname\cref@variant@get @getlabel\endcsname{\@beginref}{\@labela}%
+ \csname\cref@variant@get @getlabel\endcsname{\@endref}{\@labelb}%
+ \ifx\@labela\@labelb%
+ \let\@endref\relax%
+ \count@consecutive=1\relax%
+ \fi%
+ \fi%
+ \ifnum\count@consecutive=2\relax%
+ \expandafter\cref@stack@push\expandafter{\@endref,}{\@refsubstack}%
+ \let\@endref\relax%
+ \count@consecutive=1\relax%
+ \fi%
+ \cref@isstackfull{\@refsubstack}%
+ \if@cref@stackfull%
+ \ifnum\count@subgroup=1\relax%
+ \def\@pos{@first}%
\else%
- \def\@pos{@last}%
+ \def\@pos{@middle}%
\fi%
\else%
- \def\@pos{@middle}%
+ \ifnum\count@subgroup=1\relax%
+ \def\@pos{}%
+ \else%
+ \ifnum\count@subgroup=2\relax%
+ \def\@pos{@second}%
+ \else%
+ \def\@pos{@last}%
+ \fi%
+ \fi%
\fi%
\ifnum\count@consecutive=1\relax%
- \edef\@tempa{{\@beginref}{cref}{\@pos}}%
- \expandafter\@setcref\@tempa%
+ \edef\@tempa{{\@beginref}{\@pos}}%
+ \csname @set\cref@variant\expandafter\endcsname\@tempa%
\else%
- \ifnum\count@consecutive=2\relax%
- \expandafter\@setcref\expandafter%
- {\@beginref}{cref}{@middle}%
- \expandafter\cref@stack@push\expandafter%
- {\@endref}{\@refsubstack}%
- \else%
- \edef\@tempa{{\@beginref}{\@endref}{cref}{\@pos}}%
- \expandafter\@setcrefrange\@tempa%
- \fi%
+ \edef\@tempa{{\@beginref}{\@endref}{\@pos}}%
+ \csname @set\cref@variant range\expandafter\endcsname\@tempa%
\fi%
- \@secondreffalse%
+ \advance\count@subgroup 1\relax%
\cref@isstackfull{\@refsubstack}%
}% end loop over reference substack
\cref@isstackfull{\@refstack}%
\if@cref@stackfull%
- \def\@tempa{#1}\def\@tempb{labelcref}%
- \ifx\@tempa\@tempb\relax%
+ \def\@tempa{labelcref}%
+ \ifx\cref@variant\@tempa%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries\space ??}%
\@latex@warning{References in label reference on page \thepage
@@ -1097,80 +1020,94 @@
\fi%
}% end loop over main reference stack
\endgroup}%
-\def\@setcref#1#2#3{%
- \expandafter\ifx\csname r@#1@cref\endcsname\relax%
+\def\@setcref{\@@setcref{cref}}%
+\def\@setCref{\@@setcref{Cref}}%
+\def\@setlabelcref{\@@setcref{labelcref}}%
+\def\@@setcref#1#2#3{%
+ \expandafter\ifx\csname r@#2@cref\endcsname\relax%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#1' on page \thepage \space undefined}%
+ \@latex@warning{Reference `#2' on page \thepage \space undefined}%
\else%
- \cref@gettype{#1}{\@temptype}% puts label type in \@temptype
- \cref@getlabel{#1}{\@templabel}% puts label in \@templabel
- \expandafter\ifx\csname #2@\@temptype @format#3\endcsname\relax%
- \edef\@tempa{#2}\def\@tempb{labelcref}%
+ \cref@gettype{#2}{\@temptype}% puts label type in \@temptype
+ \cref@getlabel{#2}{\@templabel}% puts label in \@templabel
+ \expandafter\ifx\csname #1@\@temptype @format#3\endcsname\relax%
+ \edef\@tempa{#1}\def\@tempb{labelcref}%
\ifx\@tempa\@tempb\relax%
- \expandafter\@@setcref\expandafter%
- {\csname #2@default@format#3\endcsname}{#1}%
+ \expandafter\@@@setcref\expandafter%
+ {\csname #1@default@format#3\endcsname}{#2}%
\else%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries ??}~\@templabel%
- \@latex@warning{#2 \space reference format for label type
+ \@latex@warning{#1\space reference format for label type
`\@temptype' undefined}%
\fi%
\else%
- \expandafter\@@setcref\expandafter%
- {\csname #2@\@temptype @format#3\endcsname}{#1}%
+ \expandafter\@@@setcref\expandafter%
+ {\csname #1@\@temptype @format#3\endcsname}{#2}%
\fi%
\fi}%
-\def\@@setcref#1#2{\cref@getlabel{#2}{\@templabel}#1{\@templabel}{}{}}%
-\def\@setcrefrange#1#2#3#4{%
+\def\@@@setcref#1#2{\cref@getlabel{#2}{\@templabel}#1{\@templabel}{}{}}%
+\def\@setcrefrange{\@@setcrefrange{cref}}%
+\def\@setCrefrange{\@@setcrefrange{Cref}}%
+\def\@setlabelcrefrange{\@@setcrefrange{labelcref}}%
+\def\@@setcrefrange#1#2#3#4{%
\begingroup%
- \expandafter\ifx\csname r@#1@cref\endcsname\relax%
+ \expandafter\ifx\csname r@#2@cref\endcsname\relax%
\protect\G@refundefinedtrue%
- \@latex@warning{Reference `#1' on page \thepage \space%
+ \@latex@warning{Reference `#2' on page \thepage \space%
undefined}%
- \expandafter\ifx\csname r@#2@cref\endcsname\relax%
+ \expandafter\ifx\csname r@#3@cref\endcsname\relax%
\nfss@text{\reset@font\bfseries ??}--%
\nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#2' on page \thepage \space%
+ \@latex@warning{Reference `#3' on page \thepage \space%
undefined}%
\else%
- \cref@getlabel{#2}{\@labelb}%
+ \cref@getlabel{#3}{\@labelb}%
\nfss@text{\reset@font\bfseries ??}--\@labelb%
\fi%
\else%
- \expandafter\ifx\csname r@#2@cref\endcsname\relax%
+ \expandafter\ifx\csname r@#3@cref\endcsname\relax%
\protect\G@refundefinedtrue%
- \cref@getlabel{#1}{\@labela}%
+ \cref@getlabel{#2}{\@labela}%
\@labela--\nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#2' on page \thepage %
+ \@latex@warning{Reference `#3' on page \thepage %
\space undefined}%
\else%
- \cref@gettype{#1}{\@typea}%
- \cref@gettype{#2}{\@typeb}%
- \cref@getlabel{#1}{\@labela}%
- \cref@getlabel{#2}{\@labelb}%
- \edef\@formata{\expandafter\noexpand%
- \csname #3range@\@typea @format#4\endcsname}%
- \edef\@formatb{\expandafter\noexpand%
- \csname #3range@\@typeb @format#4\endcsname}%
- \expandafter\ifx\@formata\relax%
- \edef\@tempa{#3}\def\@tempb{labelcref}%
+ \cref@gettype{#2}{\@typea}%
+ \cref@gettype{#3}{\@typeb}%
+ \cref@getlabel{#2}{\@labela}%
+ \cref@getlabel{#3}{\@labelb}%
+ \edef\@format{\expandafter\noexpand%
+ \csname #1range@\@typea @format#4\endcsname}%
+ \expandafter\ifx\@format\relax%
+ \edef\@tempa{#1}\def\@tempb{labelcref}%
\ifx\@tempa\@tempb\relax%
- \expandafter\@@setcrefrange\expandafter%
- {\csname #3range@default@format#4\endcsname}{#1}{#2}%
+ \expandafter\@@@setcrefrange\expandafter%
+ {\csname #1range@default@format#4\endcsname}{#2}{#3}%
\else%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries ??}~\@labela--\@labelb%
- \@latex@warning{#3\space reference range format for label
+ \@latex@warning{#1 reference range format for label
type `\@typea' undefined}%
\fi%
\else%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@formata%
+ \expandafter\expandafter\expandafter{%
+ \csname #1range@\@typea @format#4\endcsname%
+ {\@dummya}{\@dummyb}{\@dummyc}{\@dummyd}{\@dummye}{\@dummyf}}%
+ \expandafter\expandafter\expandafter\def%
+ \expandafter\expandafter\expandafter\@formatb%
+ \expandafter\expandafter\expandafter{%
+ \csname #1range@\@typeb @format#4\endcsname%
+ {\@dummya}{\@dummyb}{\@dummyc}{\@dummyd}{\@dummye}{\@dummyf}}%
\ifx\@formata\@formatb%
- \expandafter\@@setcrefrange\expandafter{\@formata}{#1}{#2}%
+ \expandafter\@@@setcrefrange\expandafter{\@format}{#2}{#3}%
\else%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries ??}~\@labela--\@labelb%
- \@latex@warning{References `#1' and `#2' in reference range
+ \@latex@warning{References `#2' and `#3' in reference range
on page \thepage \space have different types
`\@typea' and `\@typeb'}%
\fi%
@@ -1178,7 +1115,7 @@
\fi%
\fi%
\endgroup}%
-\def\@@setcrefrange#1#2#3{%
+\def\@@@setcrefrange#1#2#3{%
\cref@getlabel{#2}{\@labela}%
\cref@getlabel{#3}{\@labelb}%
#1{\@labela}{\@labelb}{}{}{}{}}%
@@ -1212,146 +1149,52 @@
}{%
\edef\@tempa{%
\expandafter\noexpand\csname #1@\@tempa @name#3\endcsname}%
- \expandafter\@@setnamecref\expandafter{\@tempa}{#4}%
+ \expandafter\@@@setnamecref\expandafter{\@tempa}{#4}%
}%
\fi}%
-\def\@@setnamecref#1#2{%
+\def\@@@setnamecref#1#2{%
\expandafter\def\expandafter\@tempa\expandafter{#1}%
\expandafter#2\@tempa}%
-\DeclareRobustCommand{\cpageref}[1]{%
- \@cpageref{cref}{#1}{\@setcpageref}{\@setcpagerefrange}}%
-\DeclareRobustCommand{\Cpageref}[1]{%
- \@cpageref{Cref}{#1}{\@setcpageref}{\@setcpagerefrange}}%
+\DeclareRobustCommand{\cpageref}[1]{\@cref{cpageref}{#1}}%
+\DeclareRobustCommand{\Cpageref}[1]{\@cref{Cpageref}{#1}}%
\DeclareRobustCommand{\cpagerefrange}[2]{%
- \@setcpagerefrange{#1}{#2}{cref}{}}%
+ \@@setcpagerefrange{#1}{#2}{cref}{}}%
\DeclareRobustCommand{\Cpagerefrange}[2]{%
- \@setcpagerefrange{#1}{#2}{Cref}{}}%
+ \@@setcpagerefrange{#1}{#2}{Cref}{}}%
\DeclareRobustCommand{\labelcpageref}[1]{%
- \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}}%
-\def\@cpageref#1#2#3#4{%
- \leavevmode%
- \begingroup%
- \countdef\count@consecutive=0%
- \countdef\count@group=1%
- \countdef\@counta=2%
- \countdef\@countb=3%
- \count@group=0%
- \cref@stack@init{\@refstack}%
- \edef\@tempa{#2}%
- \expandafter\cref@stack@push\expandafter{\@tempa}{\@refstack}%
- \if@cref@sort%
- \cref@stack@sort{\@refstack}{\cref@pagecmp}%
- \fi%
- \cref@isstackfull{\@refstack}%
- \@whilesw\if@cref@stackfull\fi{%
- \if@cref@compress%
- \cref@processconsecutive%
- {\@refstack}{\@beginref}{\@endref}{\count@consecutive}%
- {\cref@ispagerefconsecutive}%
- \else%
- \edef\@beginref{\cref@stack@top{\@refstack}}%
- \cref@stack@pop{\@refstack}%
- \@whilesw\ifx\@beginref\@empty\fi{%
- \cref@stack@pop{\@refstack}%
- \cref@isstackempty{\@refstack}%
- \if@cref@stackempty%
- \let\@beginref\relax%
- \else%
- \edef\@beginref{\cref@stack@top{\@refstack}}%
- \fi}%
- \let\@endref\relax%
- \count@consecutive=1\relax%
- \fi%
- \ifx\@endref\relax\else%
- \expandafter\ifx\csname r@\@beginref @cref\endcsname\relax\else%
- \expandafter\ifx\csname r@\@endref @cref\endcsname\relax\else%
- \cref@getpageref{\@beginref}{\@tempa}%
- \cref@getpageref{\@endref}{\@tempb}%
- \ifx\@tempa\@tempb\relax%
- \count@consecutive=1%
- \let\@endref\relax%
- \else%
- \@counta=\@tempa\relax%
- \@countb=\@tempb\relax%
- \advance\@counta 1\relax%
- \ifnum\@counta=\@countb\relax%
- \count@consecutive=2%
- \fi%
- \fi%
- \fi%
- \fi%
- \fi%
- \cref@isstackempty{\@refstack}%
- \if@cref@stackempty%
- \ifcase\count@group\relax%
- \ifnum\count@consecutive=2\relax%
- \def\@pos{@first}%
- \else%
- \def\@pos{}%
- \fi%
- \or%
- \ifnum\count@consecutive=2\relax%
- \def\@pos{@middle}%
- \else%
- \def\@pos{@second}%
- \fi%
- \else%
- \def\@pos{@last}%
- \fi%
- \else%
- \ifnum\count@group=0\relax%
- \def\@pos{@first}%
- \else%
- \def\@pos{@middle}%
- \fi%
- \fi%
- \ifnum\count@consecutive=1\relax%
- \def\@tempa{#3}%
- \edef\@tempb{{\@beginref}{#1}{\@pos}}%
- \expandafter\@tempa\@tempb%
- \else%
- \ifnum\count@consecutive=2\relax%
- \def\@tempa{#3}%
- \edef\@tempb{{\@beginref}{#1}{\@pos}}%
- \expandafter\@tempa\@tempb%
- \expandafter\cref@stack@push\expandafter%
- {\@endref,}{\@refstack}%
- \else%
- \def\@tempa{#4}%
- \edef\@tempb{{\@beginref}{\@endref}{#1}{\@pos}}%
- \expandafter\@tempa\@tempb%
- \fi%
- \fi%
- \advance\count@group 1%
- \cref@isstackfull{\@refstack}%
- }% end loop over reference stack
- \endgroup}%
-\def\@setcpageref#1#2#3{%
- \expandafter\ifx\csname r@#1@cref\endcsname\relax%
+ \@cref{labelcpageref}{#1}}%
+\def\@setcpageref{\@@setcpageref{cref}}
+\def\@setCpageref{\@@setcpageref{Cref}}
+\def\@setlabelcpageref{\@@setcpageref{labelcref}}
+\def\@@setcpageref#1#2#3{%
+ \expandafter\ifx\csname r@#2@cref\endcsname\relax%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries ??}%
- \@latex@warning{Reference `#1' on page \thepage \space undefined}%
+ \@latex@warning{Reference `#2' on page \thepage \space undefined}%
\else%
- \cref@getpageref{#1}{\@temppage}%
- \expandafter\ifx\csname #2@page@format#3\endcsname\relax%
- \edef\@tempa{#2}\def\@tempb{labelcref}%
+ \cpageref@getlabel{#2}{\@temppage}%
+ \expandafter\ifx\csname #1@page@format#3\endcsname\relax%
+ \edef\@tempa{#1}\def\@tempb{labelcref}%
\ifx\@tempa\@tempb\relax%
- \expandafter\@@setcpageref\expandafter%
- {\csname #2@default@format#3\endcsname}{#1}%
+ \expandafter\@@@setcpageref\expandafter%
+ {\csname #1@default@format#3\endcsname}{#2}%
\else%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries ??}~\@temppage%
- \@latex@warning{#2 \space reference format for
+ \@latex@warning{ #1 reference format for
page references undefined}%
\fi%
\else%
- \expandafter\@@setcpageref\expandafter%
- {\csname #2@page@format#3\endcsname}{#1}%
+ \expandafter\@@@setcpageref\expandafter%
+ {\csname #1@page@format#3\endcsname}{#2}%
\fi%
\fi}%
-\def\@@setcpageref#1#2{%
- \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}}%
-\def\@setcpagerefrange#1#2#3#4{%
+\def\@@@setcpageref#1#2{%
+ \cpageref@getlabel{#2}{\@temppage}#1{\@temppage}{}{}}%
+\def\@setcpagerefrange#1#2#3{\@@setcpagerefrange{#1}{#2}{cref}{#3}}%
+\def\@setCpagerefrange#1#2#3{\@@setcpagerefrange{#1}{#2}{Cref}{#3}}%
+\def\@setlabelcpagerefrange#1#2#3{\@@setcpagerefrange{#1}{#2}{labelcref}{#3}}%
+\def\@@setcpagerefrange#1#2#3#4{%
\begingroup%
\expandafter\ifx\csname r@#1@cref\endcsname\relax%
\protect\G@refundefinedtrue%
@@ -1363,41 +1206,41 @@
\@latex@warning{Reference `#2' on page \thepage \space%
undefined}%
\else%
- \cref@getpageref{#2}{\@pageb}%
+ \cpageref@getlabel{#2}{\@pageb}%
\nfss@text{\reset@font\bfseries ??}--\@pageb%
\fi%
\else%
\expandafter\ifx\csname r@#2@cref\endcsname\relax%
\protect\G@refundefinedtrue%
- \cref@getpageref{#1}{\@pagea}%
+ \cpageref@getlabel{#1}{\@pagea}%
\@pagea--\nfss@text{\reset@font\bfseries ??}%
\@latex@warning{Reference `#2' on page \thepage %
\space undefined}%
\else%
- \cref@getpageref{#1}{\@pagea}%
- \cref@getpageref{#2}{\@pageb}%
+ \cpageref@getlabel{#1}{\@pagea}%
+ \cpageref@getlabel{#2}{\@pageb}%
\edef\@format{\expandafter\noexpand%
- \csname #3range@page@format#4\endcsname}%
+ \csname#3range@page@format#4\endcsname}%
\expandafter\ifx\@format\relax%
\edef\@tempa{#3}\def\@tempb{labelcref}%
\ifx\@tempa\@tempb\relax%
- \expandafter\@@setcpagerefrange\expandafter%
- {\csname #3range@default@format#4\endcsname}{#1}{#2}%
+ \expandafter\@@@setcpagerefrange\expandafter%
+ {\csname#3range@default@format#4\endcsname}{#1}{#2}%
\else%
\protect\G@refundefinedtrue%
\nfss@text{\reset@font\bfseries ??}~\@pagea--\@pageb%
- \@latex@warning{#3\space reference range format for page
+ \@latex@warning{#3 reference range format for page
references undefined}%
\fi%
\else%
- \expandafter\@@setcpagerefrange\expandafter{\@format}{#1}{#2}%
+ \expandafter\@@@setcpagerefrange\expandafter{\@format}{#1}{#2}%
\fi%
\fi%
\fi%
\endgroup}%
-\def\@@setcpagerefrange#1#2#3{%
- \cref@getpageref{#2}{\@pagea}%
- \cref@getpageref{#3}{\@pageb}%
+\def\@@@setcpagerefrange#1#2#3{%
+ \cpageref@getlabel{#2}{\@pagea}%
+ \cpageref@getlabel{#3}{\@pageb}%
#1{\@pagea}{\@pageb}{}{}{}{}}%
\cref@stack@init{\cref@label@types}%
\newcommand\crefdefaultlabelformat[1]{%
@@ -1824,6 +1667,142 @@
\@crefrangedefineformat{#1}%
\@crefdefinemultiformat{#1}%
\@crefrangedefinemultiformat{#1}}%
+\def\@crefcopyformats#1#2{%
+ \@ifundefined{cref@#2@name}{%
+ \edef\@tempa{\expandafter\noexpand\csname cref@#2@name\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname cref@#1@name\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb%
+ \edef\@tempa{\expandafter\noexpand\csname cref@#2@name@plural\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname cref@#1@name@plural\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{cref@#2@format}{%
+ \edef\@tempa{\expandafter\noexpand\csname cref@#2@format\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname cref@#1@format\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{crefrange@#2@format}{%
+ \edef\@tempa{\expandafter\noexpand\csname crefrange@#2@format\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname crefrange@#1@format\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{cref@#2@format@first}{%
+ \edef\@tempa{\expandafter\noexpand\csname cref@#2@format@first\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname cref@#1@format@first\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{cref@#2@format@second}{%
+ \edef\@tempa{\expandafter\noexpand\csname cref@#2@format@second\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname cref@#1@format@second\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{cref@#2@format@middle}{%
+ \edef\@tempa{\expandafter\noexpand\csname cref@#2@format@middle\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname cref@#1@format@middle\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{cref@#2@format@last}{%
+ \edef\@tempa{\expandafter\noexpand\csname cref@#2@format@last\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname cref@#1@format@last\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{crefrange@#2@format@first}{%
+ \edef\@tempa{\expandafter\noexpand\csname crefrange@#2@format@first\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname crefrange@#1@format@first\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{crefrange@#2@format@second}{%
+ \edef\@tempa{\expandafter\noexpand\csname crefrange@#2@format@second\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname crefrange@#1@format@second\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{crefrange@#2@format@middle}{%
+ \edef\@tempa{\expandafter\noexpand\csname crefrange@#2@format@middle\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname crefrange@#1@format@middle\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{crefrange@#2@format@last}{%
+ \edef\@tempa{\expandafter\noexpand\csname crefrange@#2@format@last\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname crefrange@#1@format@last\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Cref@#2@name}{%
+ \edef\@tempa{\expandafter\noexpand\csname Cref@#2@name\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Cref@#1@name\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb%
+ \edef\@tempa{\expandafter\noexpand\csname Cref@#2@name@plural\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Cref@#1@name@plural\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Cref@#2@format}{%
+ \edef\@tempa{\expandafter\noexpand\csname Cref@#2@format\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Cref@#1@format\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Crefrange@#2@format}{%
+ \edef\@tempa{\expandafter\noexpand\csname Crefrange@#2@format\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Crefrange@#1@format\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Cref@#2@format@first}{%
+ \edef\@tempa{\expandafter\noexpand\csname Cref@#2@format@first\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Cref@#1@format@first\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Cref@#2@format@second}{%
+ \edef\@tempa{\expandafter\noexpand\csname Cref@#2@format@second\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Cref@#1@format@second\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Cref@#2@format@middle}{%
+ \edef\@tempa{\expandafter\noexpand\csname Cref@#2@format@middle\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Cref@#1@format@middle\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Cref@#2@format@last}{%
+ \edef\@tempa{\expandafter\noexpand\csname Cref@#2@format@last\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Cref@#1@format@last\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Crefrange@#2@format@first}{%
+ \edef\@tempa{\expandafter\noexpand\csname Crefrange@#2@format@first\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Crefrange@#1@format@first\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Crefrange@#2@format@second}{%
+ \edef\@tempa{\expandafter\noexpand\csname Crefrange@#2@format@second\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Crefrange@#1@format@second\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Crefrange@#2@format@middle}{%
+ \edef\@tempa{\expandafter\noexpand\csname Crefrange@#2@format@middle\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Crefrange@#1@format@middle\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{Crefrange@#2@format@last}{%
+ \edef\@tempa{\expandafter\noexpand\csname Crefrange@#2@format@last\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname Crefrange@#1@format@last\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcref@#2@format}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcref@#2@format\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcref@#1@format\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcrefrange@#2@format}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcrefrange@#2@format\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcrefrange@#1@format\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcref@#2@format@first}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcref@#2@format@first\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcref@#1@format@first\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcref@#2@format@second}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcref@#2@format@second\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcref@#1@format@second\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcref@#2@format@middle}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcref@#2@format@middle\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcref@#1@format@middle\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcref@#2@format@last}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcref@#2@format@last\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcref@#1@format@last\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcrefrange@#2@format@first}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcrefrange@#2@format@first\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcrefrange@#1@format@first\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcrefrange@#2@format@second}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcrefrange@#2@format@second\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcrefrange@#1@format@second\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcrefrange@#2@format@middle}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcrefrange@#2@format@middle\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcrefrange@#1@format@middle\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+ \@ifundefined{labelcrefrange@#2@format@last}{%
+ \edef\@tempa{\expandafter\noexpand\csname labelcrefrange@#2@format@last\endcsname}%
+ \edef\@tempb{\expandafter\noexpand\csname labelcrefrange@#1@format@last\endcsname}%
+ \expandafter\expandafter\expandafter\let\expandafter\@tempa\@tempb}{}%
+}
\newcommand\crefformat[2]{\@crefformat{cref}{#1}{#2}}%
\newcommand\Crefformat[2]{\@crefformat{Cref}{#1}{#2}}%
\newcommand\crefrangeformat[2]{\@crefrangeformat{crefrange}{#1}{#2}}%
@@ -2000,15 +1979,17 @@
}{}%
\endgroup}%
\let\if@cref@hyperrefloaded\iffalse%
+\let\cref@addtoreset\@addtoreset%
\@ifpackageloaded{hyperref}{%
\@ifpackagewith{hyperref}{implicit=false}{}{%
\let\if@cref@hyperrefloaded\iftrue%
\PackageInfo{cleveref}{`hyperref' support loaded}%
+ \let\cref@addtoreset\HyOrg@addtoreset%
\def\cref@hyperlinkname#1{\expandafter\expandafter\expandafter%
\@fourthoffive\csname r@#1\endcsname}%
\def\cref@hyperlinkurl#1{\expandafter\expandafter\expandafter%
\@fifthoffive\csname r@#1\endcsname}%
- \def\cref@hyperlink#1#2#3\@nil{\hyper@@link[link]{#1}{#2}{#3}}
+ \def\cref@hyperlink#1#2#3\@nil{\hyper@@link[link]{#1}{#2}{#3}}%
\let\cref@old@H@refstepcounter\H@refstepcounter%
\def\H@refstepcounter#1{%
\cref@old@H@refstepcounter{#1}%
@@ -2022,149 +2003,142 @@
\let\refstepcounter@noarg\cref@old@refstepcounter%
\def\refstepcounter@optarg[#1]#2{%
\cref@old@refstepcounter{#2}%
+ \@ifundefined{cref@#1@alias}%
+ {\def\@tempa{#1}}%
+ {\def\@tempa{\csname cref@#1@alias\endcsname}}%
\protected@edef\cref@currentlabel{%
\expandafter\cref@override@label@type%
- \cref@currentlabel\@nil{#1}}}%
+ \cref@currentlabel\@nil{\@tempa}}}%
\@ifundefined{appendix}{}{%
- \g@addto@macro\appendix{%
+ \def\appendix{%
\@ifundefined{chapter}{%
- \def\H@refstepcounter#1{%
- \cref@old@H@refstepcounter{#1}%
- \cref@constructprefix{#1}{\cref@result}%
+ \def\H@refstepcounter##1{%
+ \cref@old@H@refstepcounter{##1}%
+ \cref@constructprefix{##1}{\cref@result}%
\ifx\cref@result\@empty%
\def\cref@result{2147483647}%
\else%
\edef\cref@result{2147483647,\cref@result}%
\fi%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{section}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [appendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [appendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{subsection}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{subsubsection}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subsubappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subsubappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \@ifundefined{cref@#1@alias}%
- {\def\@tempa{#1}}%
- {\def\@tempa{\csname cref@#1@alias\endcsname}}%
+ \@ifundefined{cref@##1@alias}%
+ {\def\@tempa{##1}}%
+ {\def\@tempa{\csname cref@##1@alias\endcsname}}%
\protected@edef\cref@currentlabel{%
- [\@tempa][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [\@tempa][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\fi%
\fi%
\fi}%
+ \cref@old@appendix%
}{%
- \def\H@refstepcounter#1{%
- \cref@old@H@refstepcounter{#1}%
- \cref@constructprefix{#1}{\cref@result}%
+ \def\H@refstepcounter##1{%
+ \cref@old@H@refstepcounter{##1}%
+ \cref@constructprefix{##1}{\cref@result}%
\ifx\cref@result\@empty%
\def\cref@result{2147483647}%
\else%
\edef\cref@result{2147483647,\cref@result}%
\fi%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{chapter}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [appendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [appendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{section}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{subsection}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subsubappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subsubappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \def\@tempa{#1}%
+ \def\@tempa{##1}%
\def\@tempb{subsubsection}%
\ifx\@tempa\@tempb%
\protected@edef\cref@currentlabel{%
- [subsubsubappendix][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [subsubsubappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\else%
- \@ifundefined{cref@#1@alias}%
- {\def\@tempa{#1}}%
- {\def\@tempa{\csname cref@#1@alias\endcsname}}%
+ \@ifundefined{cref@##1@alias}%
+ {\def\@tempa{##1}}%
+ {\def\@tempa{\csname cref@##1@alias\endcsname}}%
\protected@edef\cref@currentlabel{%
- [\@tempa][\arabic{#1}][\cref@result]%
- \csname p@#1\endcsname\csname the#1\endcsname}%
+ [\@tempa][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
\fi%
\fi%
\fi%
\fi}%
- }%
+ \cref@old@appendix}%
}%
}% end of \@ifundefined{appendix}
\DeclareRobustCommand{\cref}{%
- \@ifstar{\@crefstar{cref}}{\@crefnostar{cref}}}%
+ \@ifstar{\@crefstar{cref}}{\@cref{cref}}}%
\DeclareRobustCommand{\Cref}{%
- \@ifstar{\@crefstar{Cref}}{\@crefnostar{Cref}}}%
- \def\@crefnostar#1#2{\@cref{#1}{#2}}%
+ \@ifstar{\@crefstar{Cref}}{\@cref{Cref}}}%
\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\@crefrangenostar#1#2#3{\@@setcrefrange{#1}{#2}{#3}{}}
\def\@crefrangestar#1#2#3{%
- \@crefstarredtrue\@setcrefrange{#2}{#3}{#1}{}\@crefstarredfalse}%
+ \@crefstarredtrue\@@setcrefrange{#1}{#2}{#3}{}\@crefstarredfalse}%
\DeclareRobustCommand{\cpageref}{%
- \@ifstar{\@cpagerefstar{cref}}{\@cpagerefnostar{cref}}}%
+ \@ifstar{\@crefstar{cpageref}}{\@cref{cpageref}}}%
\DeclareRobustCommand{\Cpageref}{%
- \@ifstar{\@cpagerefstar{Cref}}{\@cpagerefnostar{Cref}}}%
- \def\@cpagerefnostar#1#2{%
- \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}}%
- \def\@cpagerefstar#1#2{%
- \@crefstarredtrue%
- \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}%
- \@crefstarredfalse}%
+ \@ifstar{\@crefstar{Cpageref}}{\@cref{Cpageref}}}%
\DeclareRobustCommand{\cpagerefrange}{%
- \@ifstar{\@cpagerefrangestar{cref}}{\@cpagerefrangenostar{cref}}}%
+ \@ifstar{\@cpagerefrangestar{cpageref}}{\@setcpagerefrange}}%
\DeclareRobustCommand{\Cpagerefrange}{%
- \@ifstar{\@cpagerefrangestar{Cref}}{\@cpagerefrangenostar{Cref}}}%
- \def\@cpagerefrangenostar#1#2#3{\@setcpagerefrange{#2}{#3}{#1}{}}%
+ \@ifstar{\@cpagerefrangestar{Cpageref}}{\@setCpagerefrange}}%
\def\@cpagerefrangestar#1#2#3{%
\@crefstarredtrue%
- \@setcpagerefrange{#2}{#3}{#1}{}%
+ \@@setcpagerefrange{#1}{#2}{#3}{}%
\@crefstarredfalse}%
\DeclareRobustCommand{\labelcref}{%
- \@ifstar{\@labelcrefstar}{\@labelcrefnostar}}%
- \def\@labelcrefnostar#1{\@cref{labelcref}{#1}}%
+ \@ifstar{\@labelcrefstar}{\@cref{labelcref}}}%
\def\@labelcrefstar#1{%
\@crefstarredtrue%
\@cref{labelcref}{#1}%
\@crefstarredfalse}%
\DeclareRobustCommand{\labelcpageref}{%
- \@ifstar{\@labelcpagerefstar}{\@labelcpagerefnostar}}%
- \def\@labelcpagerefnostar#1{%
- \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}}%
+ \@ifstar{\@labelcpagerefstar}{\@cref{labelcpageref}}}%
\def\@labelcpagerefstar#1{%
\@crefstarredtrue%
- \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \@cref{labelcpageref}{#1}%
\@crefstarredfalse}%
- \def\@@setcref#1#2{%
+ \def\@@@setcref#1#2{%
\cref@getlabel{#2}{\@templabel}%
\if@crefstarred%
#1{\@templabel}{}{}%
@@ -2173,7 +2147,7 @@
\edef\@tempurl{\cref@hyperlinkurl{#2}}%
#1{\@templabel}{\cref@hyperlink{\@tempurl}{\@tempname}}{\@nil}%
\fi}%
- \def\@@setcrefrange#1#2#3{%
+ \def\@@@setcrefrange#1#2#3{%
\cref@getlabel{#2}{\@labela}%
\cref@getlabel{#3}{\@labelb}%
\if@crefstarred%
@@ -2187,8 +2161,8 @@
{\cref@hyperlink{\@tempurla}{\@tempnamea}}{\@nil}%
{\cref@hyperlink{\@tempurlb}{\@tempnameb}}{\@nil}%
\fi}%
- \def\@@setcpageref#1#2{%
- \cref@getpageref{#2}{\@temppage}%
+ \def\@@@setcpageref#1#2{%
+ \cpageref@getlabel{#2}{\@temppage}%
\if@crefstarred%
#1{\@temppage}{}{}%
\else%
@@ -2196,9 +2170,9 @@
\edef\@tempurl{\cref@hyperlinkurl{#2}}%
#1{\@temppage}{\cref@hyperlink{\@tempurl}{\@tempname}}{\@nil}%
\fi}%
- \def\@@setcpagerefrange#1#2#3{%
- \cref@getpageref{#2}{\@pagea}%
- \cref@getpageref{#3}{\@pageb}%
+ \def\@@@setcpagerefrange#1#2#3{%
+ \cpageref@getlabel{#2}{\@pagea}%
+ \cpageref@getlabel{#3}{\@pageb}%
\if@crefstarred%
#1{\@pagea}{\@pageb}{}{}{}{}%
\else%
@@ -2225,78 +2199,117 @@
\protected@edef\cref@currentlabel{%
[\@tempa][\arabic{#1}][\cref@result]%
\csname p@#1\endcsname\csname the#1\endcsname}}%
- \fi%
+ \@ifundefined{appendix}{}{%
+ \def\appendix{%
+ \@ifundefined{chapter}{%
+ \def\H@refstepcounter##1{%
+ \cref@old@H@refstepcounter{##1}%
+ \cref@constructprefix{##1}{\cref@result}%
+ \ifx\cref@result\@empty%
+ \def\cref@result{2147483647}%
+ \else%
+ \edef\cref@result{2147483647,\cref@result}%
+ \fi%
+ \def\@tempa{##1}%
+ \def\@tempb{section}%
+ \ifx\@tempa\@tempb%
+ \protected@edef\cref@currentlabel{%
+ [appendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
+ \else%
+ \def\@tempa{##1}%
+ \def\@tempb{subsection}%
+ \ifx\@tempa\@tempb%
+ \protected@edef\cref@currentlabel{%
+ [subappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
+ \else%
+ \def\@tempa{##1}%
+ \def\@tempb{subsubsection}%
+ \ifx\@tempa\@tempb%
+ \protected@edef\cref@currentlabel{%
+ [subsubappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
+ \else%
+ \@ifundefined{cref@##1@alias}%
+ {\def\@tempa{##1}}%
+ {\def\@tempa{\csname cref@##1@alias\endcsname}}%
+ \protected@edef\cref@currentlabel{%
+ [\@tempa][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
+ \fi%
+ \fi%
+ \fi}%
+ \cref@old@appendix%
+ }{%
+ \def\H@refstepcounter##1{%
+ \cref@old@H@refstepcounter{##1}%
+ \cref@constructprefix{##1}{\cref@result}%
+ \ifx\cref@result\@empty%
+ \def\cref@result{2147483647}%
+ \else%
+ \edef\cref@result{2147483647,\cref@result}%
+ \fi%
+ \def\@tempa{##1}%
+ \def\@tempb{chapter}%
+ \ifx\@tempa\@tempb%
+ \protected@edef\cref@currentlabel{%
+ [appendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
+ \else%
+ \def\@tempa{##1}%
+ \def\@tempb{section}%
+ \ifx\@tempa\@tempb%
+ \protected@edef\cref@currentlabel{%
+ [subappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
+ \else%
+ \def\@tempa{##1}%
+ \def\@tempb{subsection}%
+ \ifx\@tempa\@tempb%
+ \protected@edef\cref@currentlabel{%
+ [subsubappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
+ \else%
+ \def\@tempa{##1}%
+ \def\@tempb{subsubsection}%
+ \ifx\@tempa\@tempb%
+ \protected@edef\cref@currentlabel{%
+ [subsubsubappendix][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
+ \else%
+ \@ifundefined{cref@##1@alias}%
+ {\def\@tempa{##1}}%
+ {\def\@tempa{\csname cref@##1@alias\endcsname}}%
+ \protected@edef\cref@currentlabel{%
+ [\@tempa][\arabic{##1}][\cref@result]%
+ \csname p@##1\endcsname\csname the##1\endcsname}%
+ \fi%
+ \fi%
+ \fi%
+ \fi}%
+ \cref@old@appendix}%
+ }%
+ }% end of \@ifundefined{appendix}
+ \fi% end of \if@cref@hyperrefloaded
\let\if@cref@hyperrefloaded\iffalse%
}% end of \@ifpackageloaded{hyperref}
+\AtBeginDocument{%
+ \if@cref@hyperrefloaded\else%
+ \@ifpackageloaded{hyperref}{%
+ \PackageError{cleveref}{cleveref must be loaded after hyperref!}%
+ {Package load order is wrong: load cleveref *after* hyperref.}
+ }{}%
+ \fi}
+\let\if@cref@variorefloaded\iffalse%
\@ifpackageloaded{varioref}{%
+ \let\if@cref@variorefloaded\iftrue%
\PackageInfo{cleveref}{`varioref' support loaded}%
\PackageInfo{cleveref}{`cleveref' supersedes `varioref's
\string\labelformat command}%
- \def\cref@@vpageref#1[#2]#3{%
- \@cpageref{cref}{#3}%
- {\@setvpageref[#1][\vref@space]}{\@setvpagerefrange[#1]}}%
- \def\cref@vref#1#2{%
- \leavevmode%
- \begingroup%
- \def\reftextcurrent{}%
- \@cref{#1}{#2}\@setcref@space%
- \cref@@vpageref{\reftextcurrent}[]{#2}%
- \endgroup}%
- \def\cref@vrefrange#1#2#3{%
- \@setcrefrange{#2}{#3}{#1}{}\@setcref@space\vpagerefrange{#2}{#3}}%
- \def\cref@fullref#1#2{%
- \@cref{#1}{#2}\@setcref@space%
- \@cpageref{cref}{#2}{\@setfullpageref}{\@setfullpagerefrange}}%
- \def\cref@vpagerefconjunction#1{%
- \def\@tempa{#1}%
- \def\@tempb{@second}%
- \ifx\@tempa\@tempb\relax%
- \@setcref@pairconjunction%
- \else%
- \def\@tempb{@middle}%
- \ifx\@tempa\@tempb\relax%
- \@setcref@middleconjunction%
- \else%
- \def\@tempb{@last}%
- \ifx\@tempa\@tempb\relax%
- \@setcref@lastconjunction%
- \fi%
- \fi%
- \fi}%
- \def\@setcref@space{ }%
- \def\@setvpageref[#1][#2]#3#4#5{%
- \cref@vpagerefconjunction{#5}%
- \def\vref@space{}%
- \begingroup%
- \cref@patchreftexts{#5}%
- \@@setvpageref{#1}[#2]{#3}%
- \endgroup}%
- \def\@@setvpageref#1[#2]#3{\cref@old@@vpageref{#1}[#2]{#3}}%
- \def\@setvpagerefrange[#1]#2#3#4#5{%
- \cref@vpagerefconjunction{#5}%
- \let\vref@space\relax%
- \begingroup%
- \cref@patchreftexts{#5}%
- \@@setvpagerefrange[#1]{#2}{#3}%
- \endgroup}%
- \def\@@setvpagerefrange[#1]#2#3{\vpagerefrange[#1]{#2}{#3}}%
- \def\@setfullpageref#1#2#3{%
- \cref@vpagerefconjunction{#3}%
- \begingroup%
- \cref@patchreftexts{#3}%
- \@@setfullpageref{#1}%
- \endgroup}%
- \def\@@setfullpageref#1{\reftextfaraway{#1}}%
- \def\@setfullpagerefrange#1#2#3#4{%
- \cref@vpagerefconjunction{#4}%
- \begingroup%
- \cref@patchreftexts{#4}%
- \@@setfullpagerefrange{#1}{#2}%
- \endgroup}%
- \def\@@setfullpagerefrange#1#2{\reftextpagerange{#1}{#2}}%
\def\cref@old@@vpageref#1[#2]#3{%
\leavevmode%\unskip <<<
- \global\advance\c@vrcnt\@ne%
+ \global\advance\c@vrcnt\@ne\relax%
\vref@pagenum\@tempa{\the\c@vrcnt @vr}%
\vref@pagenum\@tempb{\the\c@vrcnt @xvr}%
%\vref@label{\the\c@vrcnt @xvr}% <<<
@@ -2320,7 +2333,7 @@
{%
\is@pos@number\@tempa%
{\@tempcnta\@tempa%
- \advance\@tempcnta\@ne%
+ \advance\@tempcnta\@ne\relax%
}%
{\@tempcnta\maxdimen}%
\ifnum \thevpagerefnum =\@tempcnta%
@@ -2334,7 +2347,7 @@
\reftextafter%
\fi%
\else%
- \advance\@tempcnta-2%
+ \advance\@tempcnta-2\relax%
\ifnum \thevpagerefnum =\@tempcnta%
\ifodd\@tempcnta%
\reftextbefore%
@@ -2355,6 +2368,71 @@
\vref@label{\the\c@vrcnt @xvr}% <<<
\vref@label{\the\c@vrcnt @vr}%
}%
+ \def\cref@@vpageref#1[#2]#3{%
+ \begingroup%
+ \def\cref@@vpageref@arg{#1}%
+ \@cref{vpageref}{#3}%
+ \endgroup}%
+ \def\cref@vref#1#2{%
+ \leavevmode%
+ \begingroup%
+ \def\reftextcurrent{}%
+ \@cref{#1}{#2}\@setcref@space%
+ \cref@@vpageref{\reftextcurrent}[]{#2}%
+ \endgroup}%
+ \def\cref@vrefrange#1#2#3{%
+ \@@setcrefrange{#1}{#2}{#3}{}\@setcref@space\vpagerefrange{#2}{#3}}%
+ \def\cref@fullref#1#2{%
+ \@cref{#1}{#2}\@setcref@space\@cref{fullpageref}{#2}}%
+ \def\cref@vpagerefconjunction#1{%
+ \def\@tempa{#1}%
+ \def\@tempb{@second}%
+ \ifx\@tempa\@tempb\relax%
+ \@setcref@pairconjunction%
+ \else%
+ \def\@tempb{@middle}%
+ \ifx\@tempa\@tempb\relax%
+ \@setcref@middleconjunction%
+ \else%
+ \def\@tempb{@last}%
+ \ifx\@tempa\@tempb\relax%
+ \@setcref@lastconjunction%
+ \fi%
+ \fi%
+ \fi}%
+ \def\@setcref@space{ }%
+ \def\@setvpageref#1#2{%
+ \cref@vpagerefconjunction{#2}%
+ \def\vref@space{}%
+ \begingroup%
+ \cref@patchreftexts{#2}%
+ \expandafter\@@@setvpageref\expandafter%
+ {\cref@@vpageref@arg}[\vref@space]{#1}%
+ \endgroup}%
+ \let\@@@setvpageref\cref@old@@vpageref%
+ \def\@setvpagerefrange#1#2#3{%
+ \cref@vpagerefconjunction{#3}%
+ \let\vref@space\relax%
+ \begingroup%
+ \cref@patchreftexts{#3}%
+ \expandafter\@@@setvpagerefrange\expandafter%
+ [\cref@@vpageref@arg]{#1}{#2}%
+ \endgroup}%
+ \let\@@@setvpagerefrange\vpagerefrange
+ \def\@setfullpageref#1#2{%
+ \cref@vpagerefconjunction{#2}%
+ \begingroup%
+ \cref@patchreftexts{#2}%
+ \@@@setfullpageref{#1}%
+ \endgroup}%
+ \let\@@@setfullpageref\reftextfaraway%
+ \def\@setfullpagerefrange#1#2#3{%
+ \cref@vpagerefconjunction{#3}%
+ \begingroup%
+ \cref@patchreftexts{#3}%
+ \@@@setfullpagerefrange{#1}{#2}%
+ \endgroup}%
+ \let\@@@setfullpagerefrange\reftextpagerange%
\let\creftextcurrent\reftextcurrent%
\let\creftextfaceafter\reftextfaceafter%
\let\creftextfacebefore\reftextfacebefore%
@@ -2374,12 +2452,12 @@
\def\@tempc{}%
\expandafter\ifx\csname #1\endcsname\@tempc\relax%
\expandafter\def\csname #1\endcsname{\unskip}%
- %{\advance\count@group -1\reftextcurrent@orig}%
+ %{\advance\count@group -1\relax\reftextcurrent@orig}%
\else%
\long\def\@tempc{}%
\expandafter\ifx\csname #1\endcsname\@tempc\relax%
\expandafter\def\csname #1\endcsname{\unskip}%
- %{\advance\count@group -1\reftextcurrent@orig}%
+ %{\advance\count@group -1\relax\reftextcurrent@orig}%
\fi%
\fi%
\else%
@@ -2415,7 +2493,7 @@
\def\@setcref@middleconjunction{\crefmiddleconjunction}%
\def\@setcref@lastconjunction{\creflastconjunction}%
\AtBeginDocument{%
- \def\@@vpageref#1[#2]#3{\cref@@vpageref{#1}[#2]{#3}}%
+ \let\@@vpageref\cref@@vpageref%
}%
\if@cref@hyperrefloaded\relax% hyperref loaded%
\DeclareRobustCommand{\vref}{%
@@ -2450,8 +2528,17 @@
\DeclareRobustCommand{\fullref}{\cref@fullref{cref}}%
\DeclareRobustCommand{\Fullref}{\cref@fullref{Cref}}%
\fi% end of test for hyperref
-}{}% end of \@ifpackageloaded{varioref}
+}{\let\if@cref@variorefloaded\iffalse}% end of \@ifpackageloaded{varioref}
+\AtBeginDocument{%
+ \if@cref@variorefloaded\relax\else%
+ \@ifpackageloaded{varioref}{%
+ \PackageError{cleveref}{cleveref must be loaded after varioref!}%
+ {Package load order is wrong: load cleveref *after* varioref.}
+ }{}%
+ \fi}
+\let\if@cref@amsmathloaded\iffalse%
\@ifpackageloaded{amsmath}{%
+ \let\if@cref@amsmathloaded\iftrue%
\AtBeginDocument{%
\let\cref@old@label@in@display\label@in@display%
\def\label@in@display{%
@@ -2473,7 +2560,7 @@
\let\math@cr@@@\math@cr@@@align@measure%
\everycr{\noalign{\global\tag@false%
\global\let\raise@tag\@empty \global\column@\z@}}%
- \let\label\@gobble@optarg% <<< cleveref modification
+ \let\label\cref@gobble@optarg% <<< cleveref modification
\global\row@\z@%
\tabskip\z@%
\halign{\span\align@preamble\crcr%
@@ -2485,7 +2572,7 @@
}%
\restorecounters@%
\ifodd\maxfields@%
- \global\advance\maxfields@\@ne%
+ \global\advance\maxfields@\@ne\relax%
\fi%
\ifnum\xatlevel@=\tw@%
\ifnum\maxfields@<\thr@@%
@@ -2496,7 +2583,7 @@
\unvbox\z@ \unpenalty \global\setbox\@ne\lastbox%
}%
\global\totwidth@\wd\@ne%
- \if@fleqn \global\advance\totwidth@\@mathmargin \fi%
+ \if@fleqn \global\advance\totwidth@\@mathmargin\relax\fi%
\global\let\maxcolumn@widths\@empty%
\begingroup%
\let\or\relax%
@@ -2509,7 +2596,7 @@
\repeat%
\endgroup%
\dimen@\displaywidth%
- \advance\dimen@-\totwidth@%
+ \advance\dimen@-\totwidth@\relax%
\ifcase\xatlevel@%
\global\alignsep@\z@%
\let\minalignsep\z@%
@@ -2520,43 +2607,43 @@
\else%
\@tempcnta\tw@%
\global\eqnshift@\dimen@%
- \global\divide\eqnshift@\@tempcnta%
+ \global\divide\eqnshift@\@tempcnta\relax%
\fi%
\or%
\@tempcntb\maxfields@%
- \divide\@tempcntb\tw@%
+ \divide\@tempcntb\tw@\relax%
\@tempcnta\@tempcntb%
- \advance\@tempcntb\m@ne%
+ \advance\@tempcntb\m@ne\relax%
\if@fleqn%
\global\eqnshift@\@mathmargin%
\global\alignsep@\dimen@%
- \global\divide\alignsep@\@tempcnta%
+ \global\divide\alignsep@\@tempcnta\relax%
\else%
- \global\advance\@tempcnta\@ne%
+ \global\advance\@tempcnta\@ne\relax%
\global\eqnshift@\dimen@%
- \global\divide\eqnshift@\@tempcnta%
+ \global\divide\eqnshift@\@tempcnta\relax%
\global\alignsep@\eqnshift@%
\fi%
\or%
\@tempcntb\maxfields@%
- \divide\@tempcntb\tw@%
- \global\advance\@tempcntb\m@ne%
- \global\@tempcnta\@tempcntb%
+ \divide\@tempcntb\tw@\relax%
+ \global\advance\@tempcntb\m@ne\relax%
+ \global\@tempcnta\@tempcntb\relax%
\global\eqnshift@\z@%
\global\alignsep@\dimen@%
\if@fleqn%
\global\advance\alignsep@\@mathmargin\relax%
\fi%
- \global\divide\alignsep@\@tempcntb%
+ \global\divide\alignsep@\@tempcntb\relax%
\fi%
\ifdim\alignsep@<\minalignsep\relax%
\global\alignsep@\minalignsep\relax%
\ifdim\eqnshift@>\z@%
\if@fleqn\else%
\global\eqnshift@\displaywidth%
- \global\advance\eqnshift@-\totwidth@%
- \global\advance\eqnshift@-\@tempcntb\alignsep@%
- \global\divide\eqnshift@\tw@%
+ \global\advance\eqnshift@-\totwidth@\relax%
+ \global\advance\eqnshift@-\@tempcntb\alignsep@\relax%
+ \global\divide\eqnshift@\tw@\relax%
\fi%
\fi%
\fi%
@@ -2565,19 +2652,19 @@
\fi%
\calc@shift@align%
\global\tagshift@\totwidth@%
- \global\advance\tagshift@\@tempcntb\alignsep@%
+ \global\advance\tagshift@\@tempcntb\alignsep@\relax%
\if@fleqn%
\ifnum\xatlevel@=\tw@%
\global\advance\tagshift@-\@mathmargin\relax%
\fi%
\else%
- \global\advance\tagshift@\eqnshift@%
+ \global\advance\tagshift@\eqnshift@\relax%
\fi%
\iftagsleft@ \else%
- \global\advance\tagshift@-\displaywidth%
+ \global\advance\tagshift@-\displaywidth\relax%
\fi%
\dimen@\minalignsep\relax%
- \global\advance\totwidth@\@tempcntb\dimen@%
+ \global\advance\totwidth@\@tempcntb\dimen@\relax%
\ifdim\totwidth@>\displaywidth%
\global\let\displaywidth@\totwidth@%
\else%
@@ -2609,7 +2696,7 @@
}%
\restorecounters@%
\if@fleqn%
- \global\advance\totwidth@\@mathmargin%
+ \global\advance\totwidth@\@mathmargin\relax%
\fi%
\iftagsleft@%
\ifdim\totwidth@>\displaywidth%
@@ -2622,17 +2709,17 @@
}%
\def\multline@#1{%
\Let@%
- \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}%
+ \@display@init{\global\advance\row@\@ne\relax\global\dspbrk@lvl\m@ne}%
\chardef\dspbrk@context\z@%
\restore@math@cr%
\let\tag\tag@in@align%
\global\tag@false \global\let\raise@tag\@empty%
\mmeasure@{#1}%
- \let\tag\gobble@tag \let\label\@gobble@optarg% <<< cleveref modification
+ \let\tag\gobble@tag \let\label\cref@gobble@optarg% <<< cleveref modification
\tabskip \if@fleqn \@mathmargin \else \z@skip \fi%
\totwidth@\displaywidth%
\if@fleqn%
- \advance\totwidth@-\@mathmargin%
+ \advance\totwidth@-\@mathmargin\relax%
\fi%
\halign\bgroup%
\hbox to\totwidth@{%
@@ -2669,7 +2756,7 @@
\multline@indent%
\else%
\setbox\z@\hbox{\make@display@tag}%
- \dimen@\@mathmargin \advance\dimen@-\wd\z@%
+ \dimen@\@mathmargin \advance\dimen@-\wd\z@\relax%
\ifdim\dimen@<\multlinetaggap%
\dimen@\multlinetaggap%
\fi%
@@ -2725,11 +2812,11 @@
}%
\global\tagwidth@\wdz@%
\dimen@\totwidth@%
- \advance\dimen@\tagwidth@%
- \advance\dimen@\multlinetaggap%
+ \advance\dimen@\tagwidth@\relax%
+ \advance\dimen@\multlinetaggap\relax%
\iftagsleft@\else%
\if@fleqn%
- \advance\dimen@\@mathmargin%
+ \advance\dimen@\@mathmargin\relax%
\fi%
\fi%
\ifdim\dimen@>\displaywidth%
@@ -2755,10 +2842,10 @@
\let\cref@old@endsubequations\endsubequations%
\cref@resetby{equation}{\cref@result}%
\ifx\cref@result\relax\else%
- \@addtoreset{parentequation}{\cref@result}%
+ \cref@addtoreset{parentequation}{\cref@result}%
\fi%
\renewenvironment{subequations}{%
- \@addtoreset{equation}{parentequation}%
+ \cref@addtoreset{equation}{parentequation}%
\let\cref@orig@equation@alias\cref@equation@alias%
\@ifundefined{cref@subequation@alias}%
{\crefalias{equation}{subequation}}%
@@ -2791,6 +2878,13 @@
\toks@\@xp{\p@equation{#1}}%
\edef\cref@currentlabel{[equation][2147483647][]\the\toks@}}}%
}{}% end of \@ifpackageloaded{amsmath}
+\AtBeginDocument{%
+ \if@cref@amsmathloaded\else%
+ \@ifpackageloaded{amsmath}{%
+ \PackageError{cleveref}{cleveref must be loaded after amsmath!}%
+ {Package load order is wrong: load cleveref *after* amsmath.}
+ }{}%
+ \fi}
\@ifpackageloaded{amsthm}{%
\PackageInfo{cleveref}{`amsthm' support loaded}%
\let\cref@thmnoarg\@thm%
@@ -2875,12 +2969,12 @@
\refstepcounter[#1]{#2}% <<< cleveref modification
\theorem@prework%
\thm@topsepadd \theorempostskipamount%
- \ifvmode \advance\thm@topsepadd\partopsep\fi%
+ \ifvmode \advance\thm@topsepadd\partopsep\relax\fi%
\trivlist%
\@topsep \theorempreskipamount%
\@topsepadd \thm@topsepadd%
- \advance\linewidth -\theorem@indent%
- \advance\@totalleftmargin \theorem@indent%
+ \advance\linewidth -\theorem@indent\relax%
+ \advance\@totalleftmargin \theorem@indent\relax%
\parshape \@ne \@totalleftmargin \linewidth%
\@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}%]
}%
@@ -2893,18 +2987,31 @@
\addtocounter{equation}{-1}%
\cref@orig@@IEEEeqnarray[#1]{#2}}%
\let\cref@orig@IEEEeqnarrayXCR\@IEEEeqnarrayXCR%
- \def\@IEEEeqnarrayXCR[#1]{%
- \if@eqnsw%
- \if@IEEEissubequation%
- %\addtocounter{equation}{1}%
- \refstepcounter{IEEEsubequation}%
- \addtocounter{IEEEsubequation}{-1}%
- \else%
- \refstepcounter{equation}%
- \addtocounter{equation}{-1}%
+ \@ifundefined{c@IEEEsubequation}{%
+ \def\@IEEEeqnarrayXCR[#1]{%
+ \if@eqnsw%
+ \if@IEEEissubequation%
+ \refstepcounter{IEEEsubequation}%
+ \addtocounter{IEEEsubequation}{-1}%
+ \else%
+ \refstepcounter{equation}%
+ \addtocounter{equation}{-1}%
+ \fi%
\fi%
- \fi%
- \cref@orig@IEEEeqnarrayXCR[#1]}%
+ \cref@orig@IEEEeqnarrayXCR[#1]}%
+ }{
+ \def\@IEEEeqnarrayXCR[#1]{%
+ \if@eqnsw%
+ \ifnum\c@IEEEsubequation>0\relax%
+ \refstepcounter{IEEEsubequation}%
+ \addtocounter{IEEEsubequation}{-1}%
+ \else%
+ \refstepcounter{equation}%
+ \addtocounter{equation}{-1}%
+ \fi%
+ \fi%
+ \cref@orig@IEEEeqnarrayXCR[#1]}%
+ }% end of \@ifundefined{c@IEEEsubequation}
\let\cref@orig@IEEEyessubnumber\IEEEyessubnumber%
\def\IEEEyessubnumber{%
\if@IEEEeqnarrayISinner%
@@ -2914,8 +3021,8 @@
\fi%
\fi%
\cref@orig@IEEEyessubnumber}%
- \@addtoreset{IEEEsubequation}{equation}%
- \crefalias{IEEEsubequation}{equation}%
+ \cref@addtoreset{IEEEsubequation}{subequation}%
+ \crefalias{IEEEsubequation}{subequation}%
}{}% end of \@ifpackageloaded{IEEEtrantools}
\@ifpackageloaded{breqn}{%
\PackageInfo{cleveref}{`breqn' support loaded}%
@@ -2924,7 +3031,7 @@
\cref@old@eq@setnumber%
\cref@constructprefix{equation}{\cref@result}%
\protected@xdef\cref@currentlabel{%
- [equation][\arabic{equation}][\cref@result]\p@equation\theequation}}%
+ [equation][\arabic{equation}][\cref@result]\p@equation\eq@number}}%
}{}% end of \@ifpackageloaded{breqn}
\@ifpackageloaded{algorithmicx}{%
\PackageInfo{cleveref}{`algorithmicx' support loaded}%
@@ -3007,7 +3114,7 @@
\cref@old@newaliascnt{#1}{#2}%
\cref@resetby{#2}{\cref@result}%
\ifx\cref@result\relax\else%
- \@addtoreset{#1}{\cref@result}%
+ \cref@addtoreset{#1}{\cref@result}%
\fi}%
}{}% end of \@ifpackageloaded{aliascnt}
\DeclareOption{poorman}{%
@@ -3291,19 +3398,19 @@
\@tempa#1\@nil}%
\def\@crefrangenostar#1#2#3{%
\gdef\cref@poorman@text{}%
- \@setcrefrange{#2}{#3}{#1}{}%
+ \@@setcrefrange{#2}{#3}{#1}{}%
\def\@tempa##1##2\@nil{%
\if##1c%
\cref@writescript{}{%
\string\crefrange\string{#2\string}\string{#3\string}}%
\else%
\cref@writescript{}{%
- \string\Crefrange\string{#2\string}\string{#3\string}}%
+ \strinsg\Crefrange\string{#2\string}\string{#3\string}}%
\fi}%
\@tempa#1\@nil}%
\def\@crefrangestar#1#2#3{%
\gdef\cref@poorman@text{}%
- \@crefstarredtrue\@setcrefrange{#2}{#3}{#1}{}\@crefstarredfalse%
+ \@crefstarredtrue\@@setcrefrange{#2}{#3}{#1}{}\@crefstarredfalse%
\def\@tempa##1##2\@nil{%
\if##1c%
\cref@writescript{}{%
@@ -3313,31 +3420,9 @@
\string\Crefrange*\string{#2\string}\string{#3\string}}%
\fi}%
\@tempa#1\@nil}%
- \def\@cpagerefnostar#1#2{%
- \gdef\cref@poorman@text{}%
- \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}%
- \def\@tempa##1##2\@nil{%
- \if##1c%
- \cref@writescript{}{\string\cpageref\string{#2\string}}%
- \else%
- \cref@writescript{}{\string\Cpageref\string{#2\string}}%
- \fi}%
- \@tempa#1\@nil}%
- \def\@cpagerefstar#1#2{%
- \gdef\cref@poorman@text{}%
- \@crefstarredtrue%
- \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}%
- \@crefstarredfalse%
- \def\@tempa##1##2\@nil{%
- \if##1c%
- \cref@writescript{}{\string\cpageref*\string{#2\string}}%
- \else%
- \cref@writescript{}{\string\Cpageref*\string{#2\string}}%
- \fi}%
- \@tempa#1\@nil}%
\def\@cpagerefrangenostar#1#2#3{%
\gdef\cref@poorman@text{}%
- \@setcpagerefrange{#2}{#3}{#1}{}%
+ \@@setcpagerefrange{#2}{#3}{#1}{}%
\def\@tempa##1##2\@nil{%
\if##1c%
\cref@writescript{}{%
@@ -3350,7 +3435,7 @@
\def\@cpagerefrangestar#1#2#3{%
\gdef\cref@poorman@text{}%
\@crefstarredtrue%
- \@setcpagerefrange{#2}{#3}{#1}{}%
+ \@@setcpagerefrange{#2}{#3}{#1}{}%
\@crefstarredfalse%
\def\@tempa##1##2\@nil{%
\if##1c%
@@ -3373,12 +3458,12 @@
\cref@writescript{}{\string\labelcref*\string{#1\string}}}%
\def\@labelcpagerefnostar#1{%
\gdef\cref@poorman@text{}%
- \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \@cref{labelcpageref}{#1}%
\cref@writescript{}{\string\labelcpageref\string{#1\string}}}%
\def\@labelcpagerefstar#1{%
\gdef\cref@poorman@text{}%
\@crefstarredtrue%
- \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \@cref{labelcpageref}{#1}%
\@crefstarredfalse%
\cref@writescript{}{\string\labelcpageref*\string{#1\string}}}%
\else% hyperref not loaded
@@ -3392,30 +3477,30 @@
\cref@writescript{}{\string\Cref\string{#1\string}}}%
\DeclareRobustCommand{\crefrange}[2]{%
\gdef\cref@poorman@text{}%
- \@setcrefrange{#1}{#2}{cref}{}%
+ \@@setcrefrange{#1}{#2}{cref}{}%
\cref@writescript{}{%
\string\crefrange\string{#1\string}\string{#2\string}}}%
\DeclareRobustCommand{\Crefrange}[2]{%
\gdef\cref@poorman@text{}%
- \@setcrefrange{#1}{#2}{Cref}{}%
+ \@@setcrefrange{#1}{#2}{Cref}{}%
\cref@writescript{}{%
\string\Crefrange\string{#1\string}\string{#2\string}}}%
\DeclareRobustCommand{\cpageref}[1]{%
\gdef\cref@poorman@text{}%
- \@cpageref{cref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \@cref{cpageref}{#1}%
\cref@writescript{}{\string\cpageref\string{#1\string}}}%
\DeclareRobustCommand{\Cpageref}[1]{%
\gdef\cref@poorman@text{}%
- \@cpageref{Cref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \@cref{Cpageref}{#1}%
\cref@writescript{}{\string\Cpageref\string{#1\string}}}%
\DeclareRobustCommand{\cpagerefrange}[2]{%
\gdef\cref@poorman@text{}%
- \@setcpagerefrange{#1}{#2}{cref}{}%
+ \@@setcpagerefrange{#1}{#2}{cref}{}%
\cref@writescript{}{%
\string\cpagerefrange\string{#1\string}\string{#2\string}}}%
\DeclareRobustCommand{\Cpagerefrange}[2]{%
\gdef\cref@poorman@text{}%
- \@setcpagerefrange{#1}{#2}{Cref}{}%
+ \@@setcpagerefrange{#1}{#2}{Cref}{}%
\cref@writescript{}{%
\string\Cpagerefrange\string{#1\string}\string{#2\string}}}%
\DeclareRobustCommand{\labelcref}[1]{%
@@ -3424,7 +3509,7 @@
\cref@writescript{}{\string\labelcref\string{#1\string}}}%
\DeclareRobustCommand{\labelcpageref}[1]{%
\gdef\cref@poorman@text{}%
- \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}%
+ \@cref{labelcpageref}{#1}%
\cref@writescript{}{\string\labelcpageref\string{#1\string}}}%
\fi% end of test for hyperref
\DeclareRobustCommand{\namecref}[1]{%
@@ -3463,13 +3548,13 @@
\creflastgroupconjunction%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{\creflastgroupconjunction}}%
- \let\old@@setcref\@@setcref%
- \let\old@@setcrefrange\@@setcrefrange%
- \let\old@@setcpageref\@@setcpageref%
- \let\old@@setcpagerefrange\@@setcpagerefrange%
+ \let\old@@@setcref\@@@setcref%
+ \let\old@@@setcrefrange\@@@setcrefrange%
+ \let\old@@@setcpageref\@@@setcpageref%
+ \let\old@@@setcpagerefrange\@@@setcpagerefrange%
\if@cref@hyperrefloaded\relax% hyperref loaded
- \def\@@setcref#1#2{%
- \old@@setcref{#1}{#2}%
+ \def\@@@setcref#1#2{%
+ \old@@@setcref{#1}{#2}%
\if@crefstarred%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\ref*{#2}}{}{}}%
@@ -3477,8 +3562,8 @@
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\ref{#2}}{}{}}%
\fi}%
- \def\@@setcrefrange#1#2#3{%
- \old@@setcrefrange{#1}{#2}{#3}%
+ \def\@@@setcrefrange#1#2#3{%
+ \old@@@setcrefrange{#1}{#2}{#3}%
\if@crefstarred%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\ref*{#2}}{\ref*{#3}}{}{}{}{}}%
@@ -3486,8 +3571,8 @@
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\ref{#2}}{\ref{#3}}{}{}{}{}}%
\fi}%
- \def\@@setcpageref#1#2{%
- \old@@setcpageref{#1}{#2}%
+ \def\@@@setcpageref#1#2{%
+ \old@@@setcpageref{#1}{#2}%
\if@crefstarred%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\pageref*{#2}}{}{}}%
@@ -3495,8 +3580,8 @@
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\pageref{#2}}{}{}}%
\fi}%
- \def\@@setcpagerefrange#1#2#3{%
- \old@@setcpagerefrange{#1}{#2}{#3}%
+ \def\@@@setcpagerefrange#1#2#3{%
+ \old@@@setcpagerefrange{#1}{#2}{#3}%
\if@crefstarred%
\expandafter\g@addto@macro\expandafter\cref@poorman@text%
\expandafter{#1{\pageref*{#2}}{\pageref*{#3}}{}{}{}{}}%
@@ -3505,30 +3590,30 @@
\expandafter{#1{\pageref{#2}}{\pageref{#3}}{}{}{}{}}%
\fi}%
\else% hyperref not loaded
- \def\@@setcref#1#2{%
- \old@@setcref{#1}{#2}%
+ \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}%
+ \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}}{}{}{}{}}}%
- \def\@@setcpageref#1#2{%
- \old@@setcpageref{#1}{#2}%
+ \def\@@@setcpageref#1#2{%
+ \old@@@setcpageref{#1}{#2}%
\expandafter\g@addto@macro\expandafter{%
\expandafter\cref@poorman@text\expandafter}%
\expandafter{#1{\pageref{#2}}{}{}}}%
- \def\@@setcpagerefrange#1#2#3{%
- \old@@setcpagerefrange{#1}{#2}{#3}%
+ \def\@@@setcpagerefrange#1#2#3{%
+ \old@@@setcpagerefrange{#1}{#2}{#3}%
\expandafter\g@addto@macro%
\expandafter{\expandafter\cref@poorman@text\expandafter}%
\expandafter{#1{\pageref{#2}}{\pageref{#3}}{}{}{}{}}}%
\fi% end of hyperref test
- \let\old@@setnamecref\@@setnamecref%
- \def\@@setnamecref#1#2{%
- \old@@setnamecref{#1}{#2}%
+ \let\old@@@setnamecref\@@@setnamecref%
+ \def\@@@setnamecref#1#2{%
+ \old@@@setnamecref{#1}{#2}%
\expandafter\def\expandafter\@tempa\expandafter{#1}%
\def\@tempb{#2}%
\expandafter\expandafter\expandafter\g@addto@macro%
@@ -3603,16 +3688,16 @@
\fi%
\fi}%
\@tempa#1\@nil}%
- \def\@@setvpageref#1[#2]#3{%
+ \def\@@@setvpageref#1[#2]#3{%
\cref@old@@vpageref{#1}[#2]{#3}%
\g@addto@macro\cref@poorman@text{\vpageref{#3}}}%
- \def\@@setvpagerefrange[#1]#2#3{%
+ \def\@@@setvpagerefrange[#1]#2#3{%
\vpagerefrange[#1]{#2}{#3}%
\g@addto@macro\cref@poorman@text{\vpagerefrange{#2}{#3}}}%
- \def\@@setfullpageref#1{%
+ \def\@@@setfullpageref#1{%
\reftextfaraway{#1}%
\g@addto@macro\cref@poorman@text{\reftextfaraway{#1}}}%
- \def\@@setfullpagerefrange#1#2{%
+ \def\@@@setfullpagerefrange#1#2{%
\reftextpagerange{#1}{#2}%
\g@addto@macro\cref@poorman@text{\reftextpagerange{#1}{#2}}}%
\def\@setcref@space{ % space here is deliberate
@@ -7163,7 +7248,7 @@
\crefname{subfigure}{Figur}{Figur}%
\fi%
\crefname{page}{Sida}{Sida}%
- \crefname{table}{Tablell}{Tabell}%
+ \crefname{table}{Tabell}{Tabell}%
\crefname{subtable}{Tabell}{Tabell}%
\crefname{part}{Del}{Del}%
\crefname{chapter}{Kapitel}{Kapitel}%
@@ -7205,7 +7290,7 @@
\crefname{subfigure}{figur}{figur}%
\crefname{page}{sida}{sida}%
\fi%
- \crefname{table}{tablell}{tabell}%
+ \crefname{table}{tabell}{tabell}%
\crefname{subtable}{tabell}{tabell}%
\crefname{part}{del}{del}%
\crefname{chapter}{kapitel}{kapitel}%
@@ -7458,6 +7543,207 @@
\crefname{listing}{listagem}{listagens}%
\crefname{line}{linha}{linhas}%
\fi}% end \cref@addlangagedefs
+\DeclareOption{catalan}{%
+ \AtBeginDocument{%
+ \def\crefrangeconjunction@preamble{ a\nobreakspace}%
+ \def\crefrangepreconjunction@preamble{}%
+ \def\crefrangepostconjunction@preamble{}%
+ \def\crefpairconjunction@preamble{ i\nobreakspace}%
+ \def\crefmiddleconjunction@preamble{, }%
+ \def\creflastconjunction@preamble{ i\nobreakspace}%
+ \def\crefpairgroupconjunction@preamble{ i\nobreakspace}%
+ \def\crefmiddlegroupconjunction@preamble{, }%
+ \def\creflastgroupconjunction@preamble{ i\nobreakspace}%
+ %
+ \Crefname@preamble{equation}{Equaci\'o}{Equacions}%
+ \Crefname@preamble{figure}{Gr\`afic}{Gr\`afics}%
+ \Crefname@preamble{table}{Taula}{Taules}%
+ \Crefname@preamble{page}{P\`agina}{P\`agines}%
+ \Crefname@preamble{part}{Part}{Parts}%
+ \Crefname@preamble{chapter}{Cap\'itol}{Cap\'itols}%
+ \Crefname@preamble{section}{Secci\'o}{Seccions}%
+ \Crefname@preamble{appendix}{Ap\`endix}{Ap\`endixs}%
+ \Crefname@preamble{enumi}{Punt}{Punts}%
+ \Crefname@preamble{footnote}{Nota}{Notes}%
+ \Crefname@preamble{theorem}{Teorema}{Teoremes}%
+ \Crefname@preamble{lemma}{Lema}{Lemes}%
+ \Crefname@preamble{corollary}{Coro\lgem ari}{Coro\lgem aris}%
+ \Crefname@preamble{proposition}{Proposici\'o}{Proposicions}%
+ \Crefname@preamble{definition}{Definici\'o}{Definicions}%
+ \Crefname@preamble{result}{Resultat}{Resultats}%
+ \Crefname@preamble{example}{Exemple}{Exemples}%
+ \Crefname@preamble{remark}{Observaci\'o}{Observacions}%
+ \Crefname@preamble{note}{Nota}{Notes}%
+ \Crefname@preamble{algorithm}{Algorisme}{Algorismes}%
+ \Crefname@preamble{listing}{Llistat}{Llistats}%
+ \Crefname@preamble{line}{L\'inia}{L\'inies}%
+ %
+ \if@cref@capitalise% capitalise set
+ \crefname@preamble{equation}{Equaci\'o}{Equacions}%
+ \crefname@preamble{figure}{Gr\`afic}{Gr\`afics}%
+ \crefname@preamble{table}{Taula}{Taules}%
+ \crefname@preamble{page}{P\`agina}{P\`agines}%
+ \crefname@preamble{part}{Part}{Parts}%
+ \crefname@preamble{chapter}{Cap\'itol}{Cap\'itols}%
+ \crefname@preamble{section}{Secci\'o}{Seccions}%
+ \crefname@preamble{appendix}{Ap\`endix}{Ap\`endixs}%
+ \crefname@preamble{enumi}{Punt}{Punts}%
+ \crefname@preamble{footnote}{Nota}{Notes}%
+ \crefname@preamble{theorem}{Teorema}{Teoremes}%
+ \crefname@preamble{lemma}{Lema}{Lemes}%
+ \crefname@preamble{corollary}{Coro\lgem ari}{Coro\lgem aris}%
+ \crefname@preamble{proposition}{Proposici\'o}{Proposicions}%
+ \crefname@preamble{definition}{Definici\'o}{Definicions}%
+ \crefname@preamble{result}{Resultat}{Resultats}%
+ \crefname@preamble{example}{Exemple}{Exemples}%
+ \crefname@preamble{remark}{Observaci\'o}{Observacions}%
+ \crefname@preamble{note}{Nota}{Notes}%
+ \crefname@preamble{algorithm}{Algorisme}{Algorismes}%
+ \crefname@preamble{listing}{Llistat}{Llistats}%
+ \crefname@preamble{line}{L\'inia}{L\'inies}%
+ %
+ \else% capitalise unset
+ \crefname@preamble{equation}{equaci\'o}{equacions}%
+ \crefname@preamble{figure}{gr\`afic}{gr\`afics}%
+ \crefname@preamble{table}{taula}{taules}%
+ \crefname@preamble{page}{p\`agina}{p\`agines}%
+ \crefname@preamble{part}{part}{parts}%
+ \crefname@preamble{chapter}{cap\'itol}{cap\'itols}%
+ \crefname@preamble{section}{secci\'o}{seccions}%
+ \crefname@preamble{appendix}{ap\`endix}{ap\`endixs}%
+ \crefname@preamble{enumi}{punt}{punts}%
+ \crefname@preamble{footnote}{nota}{notes}%
+ \crefname@preamble{theorem}{teorema}{teoremes}%
+ \crefname@preamble{lemma}{lema}{lemes}%
+ \crefname@preamble{corollary}{coro\lgem ari}{coro\lgem aris}%
+ \crefname@preamble{proposition}{proposici\'o}{proposicions}%
+ \crefname@preamble{definition}{definici\'o}{definicions}%
+ \crefname@preamble{result}{resultat}{resultats}%
+ \crefname@preamble{example}{exemple}{exemples}%
+ \crefname@preamble{remark}{observaci\'o}{observacions}%
+ \crefname@preamble{note}{nota}{notes}%
+ \crefname@preamble{algorithm}{algorisme}{algorismes}%
+ \crefname@preamble{listing}{llistat}{llistats}%
+ \crefname@preamble{line}{l\'inia}{l\'inies}%
+ \fi%
+ \def\cref@language{catalan}%
+ }}% end \AtBeginDocument and \DeclareOption
+\cref@addlanguagedefs{catalan}{%
+ \PackageInfo{cleveref}{loaded `catalan language definitions}%
+ \renewcommand{\crefrangeconjunction}{ a\nobreakspace}%
+ \renewcommand{\crefrangepreconjunction}{}%
+ \renewcommand{\crefrangepostconjunction}{}%
+ \renewcommand{\crefpairconjunction}{ i\nobreakspace}%
+ \renewcommand{\crefmiddleconjunction}{, }%
+ \renewcommand{\creflastconjunction}{ i\nobreakspace}%
+ \renewcommand{\crefpairgroupconjunction}{ i\nobreakspace}%
+ \renewcommand{\crefmiddlegroupconjunction}{, }%
+ \renewcommand{\creflastgroupconjunction}{ i\nobreakspace}%
+ %
+ \Crefname{equation}{Equaci\'o}{Equacions}%
+ \Crefname{figure}{Gr\`afic}{Gr\`afics}%
+ \Crefname{subfigure}{Gr\`afic}{Gr\`afics}%
+ \Crefname{table}{Taula}{Taules}%
+ \Crefname{subtable}{Taula}{Taules}%
+ \Crefname{page}{P\`agina}{P\`aginas}%
+ \Crefname{part}{Part}{Parts}%
+ \Crefname{chapter}{Cap\'itol}{Cap\'itols}%
+ \Crefname{section}{Secci\'o}{Seccions}%
+ \Crefname{subsection}{Secci\'o}{Seccions}%
+ \Crefname{subsubsection}{Secci\'o}{Seccions}%
+ \Crefname{appendix}{Ap\`endix}{Ap\`endixs}%
+ \Crefname{subappendix}{Ap\`endix}{Ap\`endixs}%
+ \Crefname{subsubappendix}{Ap\`endix}{Ap\`endixs}%
+ \Crefname{subsubsubappendix}{Ap\`endix}{Ap\`endixs}%
+ \Crefname{enumi}{Punt}{Punts}%
+ \Crefname{enumii}{Punt}{Punts}%
+ \Crefname{enumiii}{Punt}{Punts}%
+ \Crefname{enumiv}{Punt}{Punts}%
+ \Crefname{enumv}{Punt}{Punts}%
+ \Crefname{footnote}{Nota}{Notes}%
+ \Crefname{theorem}{Teorema}{Teoremes}%
+ \Crefname{lemma}{Lema}{Lemes}%
+ \Crefname{corollary}{Coro\lgem ari}{Coro\lgem aris}%
+ \Crefname{proposition}{Proposici\'o}{Proposicions}%
+ \Crefname{definition}{Definici\'o}{Definicions}%
+ \Crefname{result}{Resultat}{Resultats}%
+ \Crefname{example}{Exemple}{Exemples}%
+ \Crefname{remark}{Observaci\'o}{Observacions}%
+ \Crefname{note}{Nota}{Notes}%
+ \Crefname{algorithm}{Algorisme}{Algorismes}%
+ \Crefname{listing}{Llistat}{Llistats}%
+ \Crefname{line}{L\'inia}{L\'inies}%
+ %
+ \if@cref@capitalise% capitalise set
+ \crefname{equation}{Equaci\'o}{Equacions}%
+ \crefname{figure}{Gr\`afic}{Gr\`afics}%
+ \crefname{subfigure}{Gr\`afic}{Gr\`afics}%
+ \crefname{table}{Taula}{Taules}%
+ \crefname{subtable}{Taula}{Taules}%
+ \crefname{page}{P\`agina}{P\`aginas}%
+ \crefname{part}{Part}{Parts}%
+ \crefname{chapter}{Cap\'itol}{Cap\'itols}%
+ \crefname{section}{Secci\'o}{Seccions}%
+ \crefname{subsection}{Secci\'o}{Seccions}%
+ \crefname{subsubsection}{Secci\'o}{Seccions}%
+ \crefname{appendix}{Ap\`endix}{Ap\`endixs}%
+ \crefname{subappendix}{Ap\`endix}{Ap\`endixs}%
+ \crefname{subsubappendix}{Ap\`endix}{Ap\`endixs}%
+ \crefname{subsubsubappendix}{Ap\`endix}{Ap\`endixs}%
+ \crefname{enumi}{Punt}{Punts}%
+ \crefname{enumii}{Punt}{Punts}%
+ \crefname{enumiii}{Punt}{Punts}%
+ \crefname{enumiv}{Punt}{Punts}%
+ \crefname{enumv}{Punt}{Punts}%
+ \crefname{footnote}{Nota}{Notes}%
+ \crefname{theorem}{Teorema}{Teoremes}%
+ \crefname{lemma}{Lema}{Lemes}%
+ \crefname{corollary}{Coro\lgem ari}{Coro\lgem aris}%
+ \crefname{proposition}{Proposici\'o}{Proposicions}%
+ \crefname{definition}{Definici\'o}{Definicions}%
+ \crefname{result}{Resultat}{Resultats}%
+ \crefname{example}{Exemple}{Exemples}%
+ \crefname{remark}{Observaci\'o}{Observacions}%
+ \crefname{note}{Nota}{Notes}%
+ \crefname{algorithm}{Algorisme}{Algorismes}%
+ \crefname{listing}{Llistat}{Llistats}%
+ \crefname{line}{L\'inia}{L\'inies}%
+ %
+ \else% capitalise unset
+ \crefname{equation}{equaci\'o}{equacions}%
+ \crefname{figure}{gr\`afic}{gr\`afics}%
+ \crefname{subfigure}{gr\`afic}{gr\`afics}%
+ \crefname{table}{taula}{taules}%
+ \crefname{subtable}{taula}{taules}%
+ \crefname{page}{p\`agina}{p\`aginas}%
+ \crefname{part}{part}{parts}%
+ \crefname{chapter}{cap\'itol}{cap\'itols}%
+ \crefname{section}{secci\'o}{seccions}%
+ \crefname{subsection}{secci\'o}{seccions}%
+ \crefname{subsubsection}{secci\'o}{seccions}%
+ \crefname{appendix}{ap\`endix}{ap\`endixs}%
+ \crefname{subappendix}{ap\`endix}{ap\`endixs}%
+ \crefname{subsubappendix}{ap\`endix}{ap\`endixs}%
+ \crefname{subsubsubappendix}{ap\`endix}{ap\`endixs}%
+ \crefname{enumi}{punt}{punts}%
+ \crefname{enumii}{punt}{punts}%
+ \crefname{enumiii}{punt}{punts}%
+ \crefname{enumiv}{punt}{punts}%
+ \crefname{enumv}{punt}{punts}%
+ \crefname{footnote}{nota}{notes}%
+ \crefname{theorem}{teorema}{teoremes}%
+ \crefname{lemma}{lema}{lemes}%
+ \crefname{corollary}{coro\lgem ari}{coro\lgem aris}%
+ \crefname{proposition}{proposici\'o}{proposicions}%
+ \crefname{definition}{definici\'o}{definicions}%
+ \crefname{result}{resultat}{resultats}%
+ \crefname{example}{exemple}{exemples}%
+ \crefname{remark}{observaci\'o}{observacions}%
+ \crefname{note}{nota}{notes}%
+ \crefname{algorithm}{algorisme}{algorismes}%
+ \crefname{listing}{llistat}{llistats}%
+ \crefname{line}{l\'inia}{l\'inies}%
+ \fi}% end \cref@loadlanguagedefs
\edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
\@expandtwoargs\in@{,capitalise,}{%
,\@classoptionslist,\@curroptions,}%
@@ -7481,7 +7767,6 @@
\else%
\creflabelformat{equation}{\textup{(#2#1#3)}}%
\fi%
-\@labelcrefdefinedefaultformats%
\@ifpackageloaded{polyglossia}%
{\ifcsdef{languagename}%
{\ExecuteOptions{\languagename}}%
@@ -7674,750 +7959,19 @@
\expandafter{\@tempa}}}{}%
\cref@stack@pop{\@tempstack}%
\cref@isstackfull{\@tempstack}}%
- \@ifundefined{cref@subsection@name}{%
- \let\cref@subsection@name\cref@section@name%
- \let\cref@subsection@name@plural\cref@section@name@plural}{}%
- \@ifundefined{Cref@subsection@name}{%
- \let\Cref@subsection@name\Cref@section@name%
- \let\Cref@subsection@name@plural\Cref@section@name@plural}{}%
- \@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@name}{%
- \let\cref@subsubsection@name\cref@section@name%
- \let\cref@subsubsection@name@plural\cref@section@name@plural}{}%
- \@ifundefined{Cref@subsection@name}{%
- \let\Cref@subsection@name\Cref@section@name%
- \let\Cref@subsection@name@plural\Cref@section@name@plural}{}%
- \@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@name}{%
- \let\cref@subappendix@name\cref@appendix@name%
- \let\cref@subappendix@name@plural%
- \cref@appendix@name@plural}{}%
- \@ifundefined{Cref@subappendix@name}{%
- \let\Cref@subappendix@name\Cref@section@name%
- \let\Cref@subappendixsection@name@plural%
- \Cref@appendix@name@plural}{}%
- \@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@name}{%
- \let\cref@subsubappendix@name\cref@appendix@name%
- \let\cref@subsubappendix@name@plural%
- \cref@appendix@name@plural}{}%
- \@ifundefined{Cref@subsubappendix@name}{%
- \let\Cref@subsubappendix@name\Cref@section@name%
- \let\Cref@subsubappendixsection@name@plural%
- \Cref@appendix@name@plural}{}%
- \@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@subequation@format}{%
- \let\cref@subequation@format%
- \cref@equation@format}{}%
- \@ifundefined{Cref@subequation@format}{%
- \let\Cref@subequation@format%
- \Cref@equation@format}{}%
- \@ifundefined{crefrange@subequation@format}{%
- \let\crefrange@subequation@format%
- \crefrange@equation@format}{}%
- \@ifundefined{Crefrange@subequation@format}{%
- \let\Crefrange@subequation@format%
- \Crefrange@equation@format}{}%
- \@ifundefined{cref@subequation@format@first}{%
- \let\cref@subequation@format@first%
- \cref@equation@format@first}{}%
- \@ifundefined{Cref@subequation@format@first}{%
- \let\Cref@subequation@format@first%
- \Cref@equation@format@first}{}%
- \@ifundefined{cref@subequation@format@second}{%
- \let\cref@subequation@format@second%
- \cref@equation@format@second}{}%
- \@ifundefined{Cref@subequation@format@second}{%
- \let\Cref@subequation@format@second%
- \Cref@equation@format@second}{}%
- \@ifundefined{cref@subequation@format@middle}{%
- \let\cref@subequation@format@middle%
- \cref@equation@format@middle}{}%
- \@ifundefined{Cref@subequation@format@middle}{%
- \let\Cref@subequation@format@middle%
- \Cref@equation@format@middle}{}%
- \@ifundefined{cref@subequation@format@last}{%
- \let\cref@subequation@format@last%
- \cref@equation@format@last}{}%
- \@ifundefined{Cref@subequation@format@last}{%
- \let\Cref@subequation@format@last%
- \Cref@equation@format@last}{}%
- \@ifundefined{crefrange@subequation@format@first}{%
- \let\crefrange@subequation@format@first%
- \crefrange@equation@format@first}{}%
- \@ifundefined{Crefrange@subequation@format@first}{%
- \let\Crefrange@subequation@format@first%
- \Crefrange@equation@format@first}{}%
- \@ifundefined{crefrange@subequation@format@second}{%
- \let\crefrange@subequation@format@second%
- \crefrange@equation@format@second}{}%
- \@ifundefined{Crefrange@subequation@format@second}{%
- \let\Crefrange@subequation@format@second%
- \Crefrange@equation@format@second}{}%
- \@ifundefined{crefrange@subequation@format@middle}{%
- \let\crefrange@subequation@format@middle%
- \crefrange@equation@format@middle}{}%
- \@ifundefined{Crefrange@subequation@format@middle}{%
- \let\Crefrange@subequation@format@middle%
- \Crefrange@equation@format@middle}{}%
- \@ifundefined{crefrange@subequation@format@last}{%
- \let\crefrange@subequation@format@last%
- \crefrange@equation@format@last}{}%
- \@ifundefined{Crefrange@subequation@format@last}{%
- \let\Crefrange@subequation@format@last%
- \Crefrange@equation@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}{}%
+ \@crefcopyformats{section}{subsection}%
+ \@crefcopyformats{section}{subsubsection}%
+ \@crefcopyformats{appendix}{subappendix}%
+ \@crefcopyformats{appendix}{subsubappendix}%
+ \@crefcopyformats{figure}{subfigure}%
+ \@crefcopyformats{table}{subtable}%
+ \@crefcopyformats{equation}{subequation}%
+ \@crefcopyformats{enumi}{enumii}%
+ \@crefcopyformats{enumii}{enumiii}%
+ \@crefcopyformats{enumiii}{enumiv}%
+ \@crefcopyformats{enumiv}{enumv}%
+ \@labelcrefdefinedefaultformats%
+ %
\let\cref@language\relax%
}% end of \AtBeginDocument
\InputIfFileExists{cleveref.cfg}%