summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/cleveref/cleveref.sty28
1 files changed, 19 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/cleveref/cleveref.sty b/Master/texmf-dist/tex/latex/cleveref/cleveref.sty
index 3d0505e458f..7c280d871c0 100644
--- a/Master/texmf-dist/tex/latex/cleveref/cleveref.sty
+++ b/Master/texmf-dist/tex/latex/cleveref/cleveref.sty
@@ -22,7 +22,7 @@
%% version 1999/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{cleveref}
- [2007/21/11 v0.11 Automatic cross-reference formatting]
+ [2009/11/02 v0.12 Automatic cross-reference formatting]
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -77,14 +77,14 @@
}
\def\cref@reflabel#1#2{\@result}
\AtBeginDocument{%
- \expandafter\def\csname ref \endcsname#1{%
- \expandafter\ifx\csname r@#1\endcsname\relax%
- \let\@result\relax%
- \else%
- \cref@getlabel{#1}{\@result}%
- \fi%
- \expandafter\@setref\csname r@#1\endcsname{\cref@reflabel}{#1}}%
- \def\ref{\expandafter\protect\csname ref \endcsname}%
+ \DeclareRobustCommand{\ref}{\cref@ref}
+ \def\cref@ref#1{%
+ \expandafter\ifx\csname r@#1\endcsname\relax%
+ \let\@result\relax%
+ \else%
+ \cref@getlabel{#1}{\@result}%
+ \fi%
+ \expandafter\@setref\csname r@#1\endcsname{\cref@reflabel}{#1}}%
}
\let\cref@old@appendix\appendix
\renewcommand\appendix{%
@@ -1302,6 +1302,16 @@
{\hyper@linkstart{link}{\@linkb}}{\hyper@linkend}%
\fi}
}{}
+\AtBeginDocument{%
+ \DeclareRobustCommand{\ref}{\@ifstar\cref@refstar\cref@ref}
+ \def\cref@refstar#1{%
+ \expandafter\ifx\csname r@#1\endcsname\relax%
+ \let\@result\relax%
+ \else%
+ \cref@getlabel{#1}{\@result}%
+ \fi%
+ \expandafter\real@setref\csname r@#1\endcsname{\cref@reflabel}{#1}}%
+}
\@ifpackageloaded{ntheorem}{%
\PackageInfo{cleveref}{`ntheorem' support loaded}
\@ifpackagewith{ntheorem}{thref}{%