summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/crossreftools
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-10-09 22:06:08 +0000
committerKarl Berry <karl@freefriends.org>2017-10-09 22:06:08 +0000
commit46088a3268571a362dd9a36835c27eb3c4cfe42a (patch)
treec2b30e23dd306a2d46cca3c52490a5521be12d89 /Master/texmf-dist/tex/latex/crossreftools
parent23af24470baf53702b88e463e7417e6daf136d2b (diff)
crossreftools (9oct17)
git-svn-id: svn://tug.org/texlive/trunk@45508 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/crossreftools')
-rw-r--r--Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty151
1 files changed, 151 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty b/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty
new file mode 100644
index 00000000000..e232337ae51
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty
@@ -0,0 +1,151 @@
+%% LaTeX package crossreftools - version 0.1 (2017/10/08 -- 22:58:50)
+%% Source file for crossreftools.sty
+%%
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2017 by Dr. Christian Hupfer <typography dot with dot latex at gmail dot com>
+%% -------------------------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%%
+%% This work has the LPPL maintenance status `author-maintained`
+%%
+%%
+
+\def\crossreftoolspackageversion{0.1}
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+\ProvidesPackage{crossreftools}[2017/10/08 - v\crossreftoolspackageversion]
+
+
+% Some helper macros
+\newcommand{\crt@firstoffive}[5]{#1}
+\newcommand{\crt@refundefined}{[UNDEFINED]}
+
+\long\def\crt@gobblethree#1#2#3{}
+\long\def\crt@gobbletwo#1#2{}
+\long\def\crt@gobbleone#1{}
+
+% Splitters
+
+\def\crt@@cref@@splitter@@first[#1][#2][#3]#4\@nil{%
+ #1%
+}
+
+\def\crt@@cref@@splitter@@second[#1][#2][#3]#4\@nil{%
+ #2%
+}
+
+\def\crt@@cref@@splitter@@third[#1][#2][#3]#4\@nil{%
+ #3%
+}
+
+\def\crt@@cref@@splitter@@fourth[#1][#2][#3]#4\@nil{%
+ #4%
+}
+
+
+\def\crt@cref@splitter@firstarg#1#2{%
+ \expandafter\crt@@cref@@splitter@@first#1\@nil
+}
+
+\def\crt@cref@splitter@secondarg#1#2{%
+ \expandafter\crt@@cref@@splitter@@second#1\@nil%
+}
+
+
+\def\crt@cref@splitter@thirdarg#1#2{%
+ \expandafter\crt@@cref@@splitter@@third#1\@nil%
+}
+
+
+\def\crt@cref@splitter@fourtharg#1#2{%
+ \expandafter\crt@@cref@@splitter@@fourth#1\@nil%
+}
+
+\def\crt@cref@splitter@firstargument{%
+ \@firstoftwo%
+}
+
+
+\def\crt@cref@splitter@pageref{%
+ \@secondoftwo%
+}
+
+
+\newcommand{\crtcrefname}[1]{%
+ \expandafter\csname cref@#1@name\endcsname%
+}
+
+\newcommand{\crtcrefpluralname}[1]{%
+ \csname cref@#1@name@plural\endcsname%
+}
+
+\newcommand{\crtCrefpluralname}[1]{%
+ \csname Cref@#1@name@plural\endcsname%
+}
+
+\newcommand{\crtCrefname}[1]{%
+ \csname Cref@#1@name\endcsname%
+}
+
+\newcommand{\crtcrefnamebylabel}[1]{%
+ \expandafter\csname cref@\@@crtextr@ct@cref{counter}{#1}@name\endcsname%
+}
+
+\newcommand{\crtCrefnamebylabel}[1]{%
+ \expandafter\csname Cref@\@@crtextr@ct@cref{counter}{#1}@name\endcsname%
+}
+
+\def\@@crt@@cref@@suffix{cref}
+
+\let\crt@cref@splitter@counter\crt@cref@splitter@firstarg
+\let\crt@cref@splitter@number\crt@cref@splitter@secondarg
+\let\crt@cref@splitter@result\crt@cref@splitter@thirdarg
+\let\crt@cref@splitter@reference\crt@cref@splitter@fourtharg
+\let\crt@cref@splitter@page\crt@cref@splitter@pageref
+
+
+\newcommand{\@@crtextr@ct@cref}[2]{%
+ \expandafter\ifx\csname r@#2@\@@crt@@cref@@suffix\endcsname\relax
+ \crt@refundefined%
+ \else
+ \expandafter\expandafter\expandafter\expandafter\expandafter\csname crt@cref@splitter@#1\expandafter\endcsname\csname r@#2@cref\endcsname%
+ \fi
+}
+
+\newcommand{\crtextractcref}[2]{%
+ \@@crtextr@ct@cref{#1}{#2}%
+}
+
+\newcommand{\crtcrefcounter}[1]{%
+ \@@crtextr@ct@cref{counter}{#1}%
+}
+
+\newcommand{\crtcrefnumber}[1]{%
+ \@@crtextr@ct@cref{number}{#1}%
+}
+
+\newcommand{\crtcrefresult}[1]{%
+ \@@crtextr@ct@cref{result}{#1}%
+}
+
+\newcommand{\crtcrefreference}[1]{%
+ \@@crtextr@ct@cref{reference}{#1}%
+}
+
+
+\newcommand{\crtcrefpage}[1]{%
+ \@@crtextr@ct@cref{page}{#1}%
+}
+
+
+\endinput
+