summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-03-18 21:51:41 +0000
committerKarl Berry <karl@freefriends.org>2018-03-18 21:51:41 +0000
commit5e4b8348654b7629a0fc624aa7b48492a7e6249a (patch)
tree827cd6604cd18d352538fcd25496438f22d1f334 /Master/texmf-dist/tex/latex
parentdd818c2d997f74708d290d17a5791078a55b8b34 (diff)
crossreftools (18mar18)
git-svn-id: svn://tug.org/texlive/trunk@47012 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty108
1 files changed, 105 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty b/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty
index ea1e98c410a..cf89b6fbc97 100644
--- a/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty
+++ b/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty
@@ -1,4 +1,4 @@
-%% LaTeX package crossreftools - version 0.5 (2018/02/23 -- 13:46:13)
+%% LaTeX package crossreftools - version 0.6 (2018/03/18 -- 16:34:57)
%% Source file for crossreftools.sty
%%
%%
@@ -19,10 +19,10 @@
%%
%%
-\def\crossreftoolspackageversion{0.5}
+\def\crossreftoolspackageversion{0.6}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{crossreftools}[2018/02/23 - v\crossreftoolspackageversion]
+\ProvidesPackage{crossreftools}[2018/03/18 - v\crossreftoolspackageversion]
\newif\ifcrtfinal
\newif\ifcleverefcompatmode
@@ -309,9 +309,12 @@
}
\newcommand{\crtrefcounter}[1]{%
+ \if@crt@hyperrefloaded
\@ifundefined{r@#1}{\crt@refundefined}{%
\expandafter\crt@split@anchor\expandafter{\csname r@#1\endcsname}%
}%
+ \else
+ \fi
}
@@ -476,6 +479,105 @@
}
+%%%%
+
+% First lower case and first uppercase support
+
+
+\def\crt@first@up#1#2\relax{\uppercase{#1}#2}%
+\def\crt@first@low#1#2\relax{\lowercase{#1}#2}
+
+\newcommand{\crt@firstupper}[1]{\expandafter\expandafter\expandafter\crt@first@up#1\relax}%
+\newcommand{\crt@firstlower}[1]{\expandafter\expandafter\expandafter\crt@first@low#1\relax}%
+
+\def\crt@@lowercase@@splitter#1#2#3#4#5\@nil{%
+ \crt@firstlower{#3}%
+}
+
+\def\crt@@uppercase@@splitter#1#2#3#4#5\@nil{%
+ \crt@firstupper{#3}%
+}
+
+
+\newcommand{\crt@lowercasesplitter}[1]{%
+ \expandafter\crt@@lowercase@@splitter#1\@nil%
+}
+\newcommand{\crt@uppercasesplitter}[1]{%
+ \expandafter\crt@@uppercase@@splitter#1\@nil%
+}
+
+
+\newcommand{\crtlnameref}{%
+ \@ifstar{\@crtlnameref@starred}{\@crtlnameref@unstarred}
+}
+
+\newcommand{\@crtlnameref@starred}[1]{%
+ \crtifdefinedlabel{#1}{%
+ \expandafter\crt@lowercasesplitter\csname r@#1\endcsname%
+ }{}%
+}
+
+\newcommand{\@crtlnameref@unstarred}[1]{%
+ \crtifdefinedlabel{#1}{%
+ \if@crt@hyperrefloaded
+ \hyperlink{\crtrefanchor{#1}}{\expandafter\crt@lowercasesplitter\csname r@#1\endcsname}%
+ \else
+ \@crtlnameref@starred{#1}%
+ \fi
+ }{}%
+}
+
+
+
+\newcommand{\crtunameref}{%
+ \@ifstar{\@crtunameref@starred}{\@crtunameref@unstarred}
+}
+
+\newcommand{\@crtunameref@starred}[1]{%
+ \crtifdefinedlabel{#1}{%
+ \expandafter\crt@uppercasesplitter\csname r@#1\endcsname%
+ }{}%
+}
+
+\newcommand{\@crtunameref@unstarred}[1]{%
+ \crtifdefinedlabel{#1}{%
+ \if@crt@hyperrefloaded
+ \hyperlink{\crtrefanchor{#1}}{\expandafter\crt@uppercasesplitter\csname r@#1\endcsname}%
+ \else
+ \@crtunameref@starred{#1}%
+ \fi
+ }{}%
+}
+
+%%%%%
+
+% Convenience wrappers
+
+\newcommand{\crtnameref}{%
+ \crt@nameref%
+}
+
+\newcommand{\crt@nameref}{%
+ \@ifstar{\crt@nameref@starred}{\crt@nameref@unstarred}
+}
+
+\newcommand{\crt@nameref@starred}[1]{%
+ \crtifdefinedlabel{#1}{%
+ \crtrefname{#1}%
+ }{}
+}
+
+\newcommand{\crt@nameref@unstarred}[1]{%
+ \crtifdefinedlabel{#1}{%
+ \if@crt@hyperrefloaded
+ \hyperlink{\crtrefanchor{#1}}{\crtrefname{#1}}%
+ \else
+ \crt@nameref@starred{#1}%
+ \fi
+ }{}%
+}
+
+
%%%%%%%%%%%%%%%%%