summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/crossreftools/README5
-rw-r--r--Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdfbin181760 -> 196192 bytes
-rw-r--r--Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex145
-rw-r--r--Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdfbin85475 -> 85058 bytes
-rw-r--r--Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex29
5 files changed, 157 insertions, 22 deletions
diff --git a/Master/texmf-dist/doc/latex/crossreftools/README b/Master/texmf-dist/doc/latex/crossreftools/README
index abe74c12672..fd5fb45c6a5 100644
--- a/Master/texmf-dist/doc/latex/crossreftools/README
+++ b/Master/texmf-dist/doc/latex/crossreftools/README
@@ -1,4 +1,4 @@
-%% LaTeX package crossreftools - version 0.2 (2017/10/25 -- 23:08:36)
+%% LaTeX package crossreftools - version 0.3 (2017/10/31 -- 08:23:52)
%% README file for crossreftools.sty
%%
%%
@@ -20,6 +20,7 @@
%%
-The package crossreftools provides a way of extracting information for labels when the package cleveref is used. The macros are expandable.
+The package crossreftools provides a way of extracting information for labels, also for special information stored by the package cleveref is used. The macros are expandable.
+
diff --git a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf
index 445f6391dce..22a83063e81 100644
--- a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf
+++ b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
index e24b34656bc..b0f297be8f0 100644
--- a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
+++ b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
@@ -1,4 +1,4 @@
-%% LaTeX package crossreftools - version 0.2 (2017/10/25 -- 23:08:36)
+%% LaTeX package crossreftools - version 0.3 (2017/10/31 -- 08:23:52)
%% Documentation file for crossreftools.sty
%%
%%
@@ -79,6 +79,8 @@
\@namedef{crossreftoolsversion0.2}{v0.2 2017-10-25}
+\@namedef{crossreftoolsversion0.3}{v0.3 2017-10-29}
+
\newcommand{\authorname}{Autor}
@@ -300,7 +302,6 @@
\usepackage[T1]{fontenc}
\usepackage{graphicx}%
-\usepackage{crossreftools}
\usepackage{amsmath}
@@ -314,9 +315,12 @@
\usepackage{cleveref}
-\def\packageversion{0.2}
+\def\packageversion{0.3}
+
+\def\hyperrefversionwithfifthargument{v6.85a}
+
\usepackage{url}
\setcounter{tocdepth}{3}
@@ -347,9 +351,15 @@
pdfcreator={LaTeX}
}
+% Load here!
+
+\AtEndPreamble{
+ \usepackage{crossreftools}
+}
\begin{document}
+
\yyyymmdddate
@@ -359,7 +369,7 @@
-\CHPackageTitlePage[packageauthor={Christian Hupfer}]{Expandable extraction of cleveref data}
+\CHPackageTitlePage[packageauthor={Christian Hupfer}]{Expandable extraction of cleveref and other label data}
\clearpage
@@ -381,9 +391,9 @@
\section*{Preface}
-This package provides expandable extraction of information stored in labels generated with \CHDocPackage{cleveref}.
+This package provides expandable extraction of information stored in labels generated with \CHDocPackage{cleveref} and regular labels written by the usual \cs{label} macro, regardless whether \CHDocPackage{hyperref} is loaded or not. For those regular cross-reference information \CHDocPackage{\PackageDocName} works in a \CHDocPackage{refcount} - like manner.
-Whereas \CHDocPackage{cleveref} provides \cs{labelcref} and other commands, none of those are expandable and can not be used in an \cs{edef} - approach.
+Whereas \CHDocPackage{cleveref} provides \cs{labelcref} and other commands or \cs{ref} from standard \LaTeX2e kernel none of those are expandable and can not be used in an \cs{edef} - approach.
\begin{marker}
Most times class and package authors will benefit of this package, but there might be usual documents that need the features of |\PackageDocName|
@@ -398,7 +408,7 @@ Most times class and package authors will benefit of this package, but there mig
The package does not require features from Xe\LaTeX\ or Lua\LaTeX\ but can be run with those features as well as with \LaTeX\ or pdf\LaTeX. The compilation documentation requires however pdf\LaTeX\ as of version \packageversion.
-No packages are loaded by \CHDocPackage{crossreftools}, this package does not load \CHDocPackage{cleveref} itself.
+No packages are loaded by \CHDocPackage{crossreftools}, this package does neither load \CHDocPackage{hyperref} nor \CHDocPackage{cleveref} itself.
\subsection{Loading of the package}
@@ -423,6 +433,57 @@ As of \packageversion\ this package cannot be used with plain \TeX\
\parttoc
+\section{Extracting information from regular labels}\label{section:extractingregularlabels}
+
+Depending on loading of \CHDocPackage{hyperref} there is some more information (properties) stored with a \cs{label} command. Common properties are \texttt{reference} and \texttt{page}, additions of \CHDocPackage{hyperref} are \texttt{name}, \texttt{anchor} and the (yet) unused 5th argument of \cs{newlabel}, the property is called \texttt{unused} as of version \packageversion.
+
+All properties are extracted with \refCom{crtextractref}.
+
+
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.3}}]{crtextractref}{\marg{property}\marg{label name}}
+
+This command will extract one of the properties \texttt{reference}, \texttt{page}, \texttt{anchor}, \texttt{name} and \texttt{unused} from the label given as the 2nd mandatory argument.
+\end{docCommand}
+
+For convenience, there are shortcuts to extract a specific property:
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.3}}]{crtcrefpage}{\marg{label name}}
+
+This extracts the page number that would be printed by \cs{pageref}.
+\end{docCommand}
+
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.3}}]{crtrefnumber}{\marg{label name}}
+
+This extracts the reference value (or something that is stored by \cs{@currentlabel} belonging to a certain label name.
+\end{docCommand}
+
+With \CHDocPackage{hyperref} being loaded, following return non-empty label information, without \CHDocPackage{hyperref} they are available, but expand to nothing.
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.3}}]{crtrefname}{\marg{label name}}
+
+This extracts the name of the sectioning unit or counter as being specified with \cs{nameref}.
+\end{docCommand}
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.3}}]{crtrefanchor}{\marg{label name}}
+
+This extracts the hyper target anchor of the reference in order to be used with \cs{hyperlink}.
+\end{docCommand}
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.3}}]{crtrefunused}{\marg{label name}}
+
+This extracts the yet unused 5th argument of labels generated after \CHDocPackage{hyperref} is loaded. As of version \hyperrefversionwithfifthargument\ of \CHDocPackage{hyperref}, this argument has no meaning yet. If this is going to be change in future, \refCom{crtrefunused} will probably be removed and replaced by another macro that reflects the meaning of this 5th argument.
+\end{docCommand}
+
+
+
\section{Extracting information from cleveref}
The \CHDocPackage{cleveref} package redefines the \cs{label} macro and stores another label with the same basic name and a suffix \string @cref, so
@@ -460,7 +521,7 @@ would generate both the labels \verb!foo! and \verb!foo@cref!. The \CHDocPackage
\CHDocPackage{\PackageDocName} extracts those properties with \refCom{crtextractcref}.
\begin{docCommand}[code={\CHDocExpCommand{}},
-doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtextractcref}{\marg{property}\marg{labelname}}
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtextractcref}{\marg{property}\marg{label name}}
This command will extract one of the properties \texttt{counter}, \texttt{number}, \texttt{result}, \texttt{reference} and \texttt{page} from the label given as the 2nd mandatory argument.
\end{docCommand}
@@ -468,32 +529,32 @@ This command will extract one of the properties \texttt{counter}, \texttt{number
For convenience, there are shortcuts to extract a specific property:
\begin{docCommand}[code={\CHDocExpCommand{}},
-doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefcounter}{\marg{labelname}}
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefcounter}{\marg{label name}}
-This extracts the counter belonging to a certain labelname.
+This extracts the counter belonging to a certain label name.
\end{docCommand}
\begin{docCommand}[code={\CHDocExpCommand{}},
-doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefnumber}{\marg{labelname}}
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefnumber}{\marg{label name}}
-This extracts the counter value (or something that is stored by \cs{cref@currentlabel} belonging to a certain labelname.
+This extracts the counter value (or something that is stored by \cs{cref@currentlabel} belonging to a certain label name.
\end{docCommand}
\begin{docCommand}[code={\CHDocExpCommand{}},
-doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefresult}{\marg{labelname}}
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefresult}{\marg{label name}}
-This extracts the result of the splitting of a counter belonging to a certain labelname.
+This extracts the result of the splitting of a counter belonging to a certain label name.
\end{docCommand}
\begin{docCommand}[code={\CHDocExpCommand{}},
-doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefreference}{\marg{labelname}}
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefreference}{\marg{label name}}
This extracts the reference that would be printed by \cs{cref} or \cs{Cref}, without hyperlinks.
\end{docCommand}
\begin{docCommand}[code={\CHDocExpCommand{}},
-doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefpage}{\marg{labelname}}
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefpage}{\marg{label name}}
This extracts the page number that would be printed by \cs{pageref}.
\end{docCommand}
@@ -501,6 +562,8 @@ This extracts the page number that would be printed by \cs{pageref}.
\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{}},
@@ -530,18 +593,63 @@ This extracts the upper case cross reference plural name of a given counter.
\begin{docCommand}[code={\CHDocExpCommand{}},
doc new and updated={\chdocextractversion{crossreftoolsversion0.1}}{\chdocextractversion{crossreftoolsversion0.2}}]
-{crtcrefnamebylabel}{\marg{labelname}}
+{crtcrefnamebylabel}{\marg{label name}}
This extracts the lower case cross reference name of a given label.
\end{docCommand}
\begin{docCommand}[code={\CHDocExpCommand{}},
doc new and updated={\chdocextractversion{crossreftoolsversion0.1}}{\chdocextractversion{crossreftoolsversion0.2}}]
-{crtCrefnamebylabel}{\marg{labelname}}
+{crtCrefnamebylabel}{\marg{label name}}
This extracts the upper case cross reference name of a given label.
\end{docCommand}
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new=\chdocextractversion{crossreftoolsversion0.3}]
+{crtcref}{\marg{label name}}
+
+This displays the reference in the same way as \cs{cref} from \CHDocPackage{cleveref} would do in a setup without using \cs{crefformat} etc. The hyperlink is not displayed, however. This command is expandable.
+
+For the upper case version see \refCom{crtCref}.
+\end{docCommand}
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new=\chdocextractversion{crossreftoolsversion0.3}]
+{crtCref}{\marg{label name}}
+
+This displays the reference in the same way as \cs{Cref} from \CHDocPackage{cleveref} would do in a setup without using \cs{Crefformat} etc. The hyperlink is not displayed, however. This command is expandable.
+
+For the lower case version see \refCom{crtcref}.
+\end{docCommand}
+
+\subsection{Nonexpandable Commands}
+
+
+\begin{docCommand}[doc new=\chdocextractversion{crossreftoolsversion0.3}]
+{crthyperlink}{\marg{anchor}\marg{link text}}
+
+This is a wrapper to the \cs{hyperlink} macro from \CHDocPackage{hyperref} to the given \marg{anchor}, displaying the \marg{link text}. If \CHDocPackage{hyperref} is not loaded, only the link text is displayed.
+\end{docCommand}
+
+\begin{docCommand}[doc new=\chdocextractversion{crossreftoolsversion0.3}]
+{crthypercref}{\marg{label name}}
+
+This generates a linked reference to a given label like \cs{cref} would do. If \CHDocPackage{hyperref} is not loaded, no link but only the reference text is displayed.
+
+For the upper case version see \refCom{crtcref}.
+\end{docCommand}
+
+\begin{docCommand}[doc new=\chdocextractversion{crossreftoolsversion0.3}]
+{crthyperCref}{\marg{label name}}
+
+This generates a linked reference to a given label like \cs{Cref} would do. If \CHDocPackage{hyperref} is not loaded, no link but only the reference text is displayed.
+
+For the lower case version see \refCom{crtcref}.
+\end{docCommand}
+
+
+
\clearpage
\part{Examples}
@@ -556,6 +664,7 @@ This extracts the upper case cross reference name of a given label.
\begin{itemize}[itemsep=15pt]
+\item \CHDocFullVersion{0.3} Added the extraction macros for regular labels (i.e. not the \CHDocPackage{cleveref} - related ones) and convenience wrappers for generating links.
\item \CHDocFullVersion{0.2} Introduced a check in \refCom{crtcrefnamebylabel} and \refCom{crtCrefnamebylabel} whether given label exists
\item \CHDocFullVersion{0.1} First version
\end{itemize}
diff --git a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf
index 6b8abd73ee1..ef7b8cf627a 100644
--- a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf
+++ b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex
index 5150f4d96e4..38c5858af4d 100644
--- a/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex
+++ b/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex
@@ -1,4 +1,4 @@
-%% LaTeX package crossreftools - version 0.2 (2017/10/25 -- 23:08:36)
+%% LaTeX package crossreftools - version 0.3 (2017/10/31 -- 08:23:52)
%% Driver file for crossreftools.sty
%%
%%
@@ -21,12 +21,13 @@
\documentclass{book}
-\usepackage{crossreftools}
\usepackage{hyperref}
\usepackage{cleveref}
+\usepackage{crossreftools}
+
\setlength{\parindent}{0em}
@@ -52,6 +53,26 @@ The result is \fbox{\crtcrefresult{\labeltoshow}}
\edef\labeltoshowname{\crtcrefname{chapter}}
+\section{Extracting usual reference information}
+
+Extracting content with \verb!\crtextractref!
+ \begin{itemize}
+ \item reference: \crtextractcref{reference}{\labeltoshow}
+ \item page: \crtextractcref{page}{\labeltoshow}
+\end{itemize}
+
+If the \fbox{hyperref} package is loaded, further properties are retrievable:
+
+\begin{itemize}
+ \item name: \crtextractref{name}{\labeltoshow}
+ \item hyperanchor: \crtextractref{anchor}{\labeltoshow}
+ \item unused: \crtextractref{unused}{\labeltoshow}
+ \end{itemize}
+
+The 5th (and usually empty) label property introduced by hyperref is unused as of version v6.85a of that package -- \crtextractref{unused}{labelname} will return nothing here, i.e. the expansion is empty.
+
+
+
\section{Extracting the cleveref names}
\begin{itemize}
@@ -69,6 +90,10 @@ The result is \fbox{\crtcrefresult{\labeltoshow}}
The macro \verb!\crtextractcref! is expandable!\edef\counterof{\crtextractcref{counter}{\labeltoshow}} Using the stored value for counter: \counterof!
+
+See \crthyperCref{fooequationlabel}
+
+
\chapter{This is foo}\label{foochapterlabel}
\setcounter{section}{5}