summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex')
-rw-r--r--Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex83
1 files changed, 63 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
index cb21cf87e31..06b4159ed19 100644
--- a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
+++ b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
@@ -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)
%% Documentation 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
@@ -93,7 +93,9 @@
\@namedef{crossreftoolsversion0.3}{v0.3 2017-10-29}
-\@namedef{crossreftoolsversion0.4}{v0.4 2017-12-06}
+\@namedef{crossreftoolsversion0.4}{v0.4 2017-12-26}
+
+\@namedef{crossreftoolsversion0.5}{v0.5 2018-02-23}
\newcommand{\authorname}{Autor}
@@ -323,7 +325,7 @@
-\def\packageversion{0.4}
+\def\packageversion{0.5}
\def\hyperrefversionwithfifthargument{v6.85a}
@@ -441,6 +443,13 @@ As of version \packageversion\ \CHDocPackage{\PackageDocName} does have followin
This disables the feature \CHDocTag{List of Labels}, see \crtcrefcounter{section::listoflabels} \nameref{section::listoflabels} for more information about this feature -- it is considered to be unnecessary having a List of Labels in a final version of document.
By default, the package works in \texttt{draft} - mode, unless the class option \texttt{final} is specified already. In this case, the package option \texttt{final} can be omitted.
+\item \texttt{cleverefcompat}
+
+Use this option if the \CHDocPackage{cleveref} version is older than 0.21.
+
+\begin{marker}
+With the release of \CHDocPackage{cleveref} version 0.21 (dating to 2018/02/08) the format of stored information by \cs{label} changed and causes wrong output of \refCom{crtcrefpage}. Since version \makeatletter\@nameuse{crossreftoolsversion0.5}\makeatother\ this change is caught with \refCom{crtcrefpage}.
+\end{marker}
\end{itemize}
@@ -510,10 +519,9 @@ This command will extract one of the properties \texttt{reference}, \texttt{page
For convenience, there are shortcuts to extract a specific property:
-\begin{docCommand}[code={\CHDocExpCommand{}},
-doc new={\chdocextractversion{crossreftoolsversion0.3}}]{crtcrefpage}{\marg{label name}}
+\begin{docCommand}[code={\CHDocExpCommand{}},doc new and updated={\chdocextractversion{crossreftoolsversion0.3}}{\chdocextractversion{crossreftoolsversion0.5}},after=\par]{crtcrefpage}{\marg{label name}}%
-This extracts the page number that would be printed by \cs{pageref}.
+ This extracts the page number that would be printed by \cs{cpageref}.
\end{docCommand}
@@ -621,19 +629,6 @@ This extracts the reference that would be printed by \cs{cref} or \cs{Cref}, wit
\end{docCommand}
\begin{docCommand}[code={\CHDocExpCommand{}},
-doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefpage}{\marg{label name}}
-
-This extracts the page number that would be printed by \cs{pageref}.
-\end{docCommand}
-
-
-\section{Additional macros and utilities}
-
-\subsection{Expandable Commands}
-
-\CHDocPackage{\PackageDocName} provides some expandable helper macros in order to query the cross reference names that are stored with \cs{crefname} and \cs{Crefname} from \CHDocPackage{cleveref}.
-
-\begin{docCommand}[code={\CHDocExpCommand{}},
doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefname}{\marg{counter name}}
This extracts the lower case cross reference name of a given counter.
@@ -759,6 +754,45 @@ This behaves like \refCom{crtcrossreflabel} but suppresses the output of the 2nd
\end{docCommand}
+\clearpage
+\section{Checking for label existence}\label{sec:checkinglabelexistence}
+
+Sometimes it is necessary to check whether some label exists in order to refer to it. The macros
+
+\begin{itemize}
+ \item \refCom{crtrefifdefinedlabel}
+ \item \refCom{crtcrefifdefinedlabel}
+\end{itemize}
+
+check for the label existence and execute the relevant true or false conditions for labels defined the usual \cs{label} macro and for their \CHDocPackage{cleveref} version.
+
+Those macros have related commands that revert the test, i.e. they check for the non-existence of a label:
+
+\begin{itemize}
+ \item \refCom{crtrefifundefinedlabel}
+ \item \refCom{crtcrefifundefinedlabel}
+\end{itemize}
+
+
+\begin{docCommand}[doc new={\chdocextractversion{crossreftoolsversion0.5}}]{crtrefifdefinedlabel}{\marg{label name}\marg{true branch}\marg{false branch}}
+This checks whether the label 'label name' is defined and executes the true branch, otherwise the false branch.
+\end{docCommand}
+
+
+\begin{docCommand}[doc new={\chdocextractversion{crossreftoolsversion0.5}}]{crtrefifundefinedlabel}{\marg{label name}\marg{true branch}\marg{false branch}}
+This checks whether the label 'label name' is undefined and executes the true branch, otherwise the false branch.
+\end{docCommand}
+
+\begin{docCommand}[doc new={\chdocextractversion{crossreftoolsversion0.5}}]{crtcrefifdefinedlabel}{\marg{label name}\marg{true branch}\marg{false branch}}
+This checks whether the label 'label name' is defined by \CHDocPackage{cleveref} and executes the true branch, otherwise the false branch.
+\end{docCommand}
+
+
+\begin{docCommand}[doc new={\chdocextractversion{crossreftoolsversion0.5}}]{crtcrefifundefinedlabel}{\marg{label name}\marg{true branch}\marg{false branch}}
+This checks whether the label 'label name' is undefined by \CHDocPackage{cleveref} and executes the true branch, otherwise the false branch.
+\end{docCommand}
+
+
\section{Displaying label information}\label{section::listoflabels}
@@ -882,6 +916,15 @@ By default, this macro expands to nothing, but can be redefined with \cs{renewco
\begin{itemize}[itemsep=15pt]
+\item \CHDocFullVersion{0.5}
+ \begin{itemize}
+ \item Added the \texttt{cleverefcompat} option.
+ \item Changed the internal code of \refCom{crtcrefpage} which was necessary after the update of \CHDocPackage{cleveref} to version 0.21
+ \item Added some macros that check for label existence, see \cref{sec:checkinglabelexistence} about this.
+\end{itemize}
+\item \CHDocFullVersion{0.3}
+
+
\item \CHDocFullVersion{0.4}
\begin{itemize}
\item Corrected typos in this documentation