From a634832239bc23a946c5ce5d60c139981f3f141b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 23 Feb 2018 22:07:41 +0000 Subject: crossreftools (23feb18) git-svn-id: svn://tug.org/texlive/trunk@46724 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/crossreftools/crossreftools.sty | 44 ++++++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) (limited to 'Master/texmf-dist/tex/latex/crossreftools') 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 +%% Copyright (c) 2017 -- 2018 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% 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}% +} + + %%%%%%%%%%%%%% -- cgit v1.2.3