diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty b/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty index bacb9cfc8db..ea1e98c410a 100644 --- a/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty +++ b/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty @@ -1,9 +1,9 @@ -%% LaTeX package crossreftools - version 0.4 (2017/12/26 -- 17:55:15) +%% LaTeX package crossreftools - version 0.5 (2018/02/23 -- 13:46:13) %% Source file for crossreftools.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2017 by Dr. Christian Hupfer <typography dot with dot latex at gmail dot com> +%% Copyright (c) 2017 -- 2018 by Dr. Christian Hupfer <typography dot with dot latex at gmail dot com> %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -19,13 +19,16 @@ %% %% -\def\crossreftoolspackageversion{0.4} +\def\crossreftoolspackageversion{0.5} \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{crossreftools}[2017/12/26 - v\crossreftoolspackageversion] +\ProvidesPackage{crossreftools}[2018/02/23 - v\crossreftoolspackageversion] \newif\ifcrtfinal +\newif\ifcleverefcompatmode + \DeclareOption{final}{\global\crtfinaltrue} +\DeclareOption{cleverefcompat}{\global\cleverefcompatmodetrue} \DeclareOption{draft}{\global\crtfinalfalse} \ProcessOptions* @@ -38,6 +41,8 @@ \@onlypreamble\crtrefundefined + + % Splitters for cleveref \def\crt@@cref@@splitter@@first[#1][#2][#3]#4\@nil{% @@ -80,9 +85,15 @@ } +\ifcleverefcompatmode \def\crt@cref@splitter@pageref{% \@secondoftwo% } +\else +\def\crt@cref@splitter@pageref#1#2{% + \expandafter\crt@@cref@@splitter@@fourth#2\@nil% +} +\fi \newcommand{\crtcrefname}[1]{% @@ -464,6 +475,31 @@ }% } + + +%%%%%%%%%%%%%%%%% + +%%% Checking for existence of a label + + +\newcommand{\crtifdefinedlabel}[3]{% + \@ifundefined{r@#1}{#3}{#2}% +} + +\newcommand{\crtifundefinedlabel}[3]{% + \@ifundefined{r@#1}{#2}{#3}% +} + + +\newcommand{\crtcrefifdefinedlabel}[3]{% + \@ifundefined{r@#1@cref}{#3}{#2}% +} + +\newcommand{\crtcrefifundefinedlabel}[3]{% + \@ifundefined{r@#1@cref}{#2}{#3}% +} + + %%%%%%%%%%%%%% |