texlive[45508] Master: crossreftools (9oct17)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 10 00:06:09 CEST 2017


Revision: 45508
          http://tug.org/svn/texlive?view=revision&revision=45508
Author:   karl
Date:     2017-10-10 00:06:08 +0200 (Tue, 10 Oct 2017)
Log Message:
-----------
crossreftools (9oct17)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/crossreftools/
    trunk/Master/texmf-dist/doc/latex/crossreftools/README
    trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf
    trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
    trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf
    trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex
    trunk/Master/texmf-dist/tex/latex/crossreftools/
    trunk/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty
    trunk/Master/tlpkg/tlpsrc/crossreftools.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/crossreftools/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/crossreftools/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/crossreftools/README	2017-10-09 22:06:08 UTC (rev 45508)
@@ -0,0 +1,25 @@
+%% LaTeX package crossreftools - version 0.1 (2017/10/08 -- 22:58:50)
+%% README 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`
+%%
+%%
+
+
+The package crossreftools provides a way of extracting information for labels when the package cleveref is used. The macros are expandable. 
+
+


Property changes on: trunk/Master/texmf-dist/doc/latex/crossreftools/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf	2017-10-09 22:05:14 UTC (rev 45507)
+++ trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf	2017-10-09 22:06:08 UTC (rev 45508)

Property changes on: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex	2017-10-09 22:06:08 UTC (rev 45508)
@@ -0,0 +1,564 @@
+%% LaTeX package crossreftools - version 0.1 (2017/10/08 -- 22:58:50)
+%% Documentation 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`
+%%
+%%
+
+\documentclass[12pt,a4paper,oneside]{article}
+
+
+
+
+\usepackage[lmargin=2cm,rmargin=2cm,headheight=15pt]{geometry}
+\usepackage{savesym}
+\usepackage{bbding}
+\savesymbol{Cross}
+
+\usepackage{graphicx}
+\usepackage{blindtext}
+\usepackage[x11names]{xcolor}
+\usepackage{imakeidx}
+\usepackage{fontawesome}
+\usepackage[most,documentation]{tcolorbox}
+\usepackage[tikz]{bclogo}
+\usepackage{marginnote}
+\usepackage{fancyhdr}
+\usepackage{datetime}
+\usepackage{array}
+\usepackage{xkeyval}
+\usepackage{xparse}
+\usepackage{totcount}
+\usepackage{enumitem}
+\usepackage{microtype}
+\usepackage{caption}
+\usepackage[T1]{fontenc}
+\usepackage[scaled=0.92]{helvet}
+
+\newlist{codeoptionsenum}{enumerate}{1}
+\setlist[codeoptionsenum,1]{label={\textcolor{blue}{\#\arabic*}}}
+
+\renewcommand{\rmdefault}{\sfdefault}
+
+\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
+
+\makeatletter
+\define at key{chdoc}{packageauthor}{%
+  \def\KVchdocpackageauthor{#1}%
+}
+
+\define at key{chdoc}{packageauthormail}{%
+  \def\KVchdocpackageauthormail{#1}%
+}
+
+\define at key{chdoc}{filepurpose}{%
+  \def\KVchdocfilepurpose{#1}%
+}
+
+
+\newcommand{\chdocextractversion}[1]{%
+  \@nameuse{#1}%
+}
+
+
+\@namedef{crossreftoolsversion0.1}{v0.1 2017-10-08}
+
+\newcommand{\authorname}{Autor}
+
+
+\makeatother
+
+
+
+
+
+
+\fancypagestyle{plain}{%
+\fancyfoot[L]{\begin{tabular}[t]{l}\PackageDocName\ \packageversion \tabularnewline \textcopyright\ Dr. Christian Hupfer\end{tabular}}%
+\fancyfoot[C]{\thepage}%
+\fancyfoot[R]{\today}%
+\renewcommand{\headrule}{{\color{blue}%
+\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
+\renewcommand{\footrule}{{\color{blue}\vskip-\footruleskip\vskip-\footrulewidth
+\hrule width\headwidth height\footrulewidth\vskip\footruleskip}}
+\renewcommand{\footrulewidth}{2pt}
+\renewcommand{\headrulewidth}{2pt}
+}
+
+
+
+\newtcolorbox{CHPackageTitleBox}[1][]{%
+  enhanced jigsaw,
+  drop lifted shadow,
+  colback=yellow!30!white,
+  width=0.8\textwidth,
+  #1
+}
+
+
+\presetkeys{chdoc}{packageauthor={Christian Hupfer}}{}%
+\NewDocumentCommand{\CHPackageTitlePage}{O{}mO{}}{%
+  \setkeys{chdoc}{packageauthor={Christian Hupfer},filepurpose={Documentation},#1}%
+  \typeout{Package version: \packageversion}
+  \begin{center}
+    \begin{CHPackageTitleBox}[#3]
+      \large \bfseries%
+      \begin{center}%
+        \begin{tabular}{C{0.9\textwidth}}%
+          \scshape \PackageDocName \tabularnewline
+          \tabularnewline
+          #2 \tabularnewline
+          \tabularnewline
+          \KVchdocfilepurpose \tabularnewline
+          \tabularnewline
+          Version \packageversion \tabularnewline
+          \tabularnewline
+          \today \tabularnewline
+          \tabularnewline
+          \addtocounter{footnote}{2}
+          \authorname: \KVchdocpackageauthor\(^\mathrm{\fnsymbol{footnote}}\)
+          \tabularnewline
+        \end{tabular}
+      \end{center}
+    \end{CHPackageTitleBox}
+    \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
+    \footnotetext{\mymailtoaddress}%
+  \end{center}
+}
+
+\newtcolorbox{docCommandArgs}[1]{colbacktitle={blue},coltitle={white},title={Description of arguments of command \cs{#1}}}
+
+
+\newcommand{\tcolorboxdoclink}{http://mirrors.ctan.org/macros/latex/contrib/tcolorbox/tcolorbox.pdf}
+
+% 'Stolen' from tcolorbox documentation ;-)
+
+\newtcolorbox{marker}[1][]{enhanced,
+  before skip=2mm,after skip=3mm,
+  boxrule=0.4pt,left=5mm,right=2mm,top=1mm,bottom=1mm,
+  colback=yellow!50,
+  colframe=yellow!20!black,
+  sharp corners,rounded corners=southeast,arc is angular,arc=3mm,
+  underlay={%
+    \path[fill=tcbcol at back!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+    \path[draw=tcbcol at frame,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+    \path[fill=yellow!50!black,draw=none] (interior.south west) rectangle node[white]{\Huge\bfseries !} ([xshift=4mm]interior.north west);
+    },
+    drop fuzzy shadow,#1}
+
+
+%%%% Documentation macros
+
+
+\NewDocumentCommand{\packagename}{sm}{%
+  \textcolor{blue}{\textbf{\faEnvelopeO~#2}}%
+  \IfBooleanF{#1}{%
+    \index{Package!#2}
+  }%
+}
+
+\NewDocumentCommand{\classname}{sm}{%
+  \textcolor{brown}{\textbf{\faBriefcase~#2}}%
+  \IfBooleanF{#1}{%
+    \index{Package!#2}%
+  }%
+}
+
+
+\NewDocumentCommand{\CHDocPackage}{sm}{%
+  \textcolor{blue}{\textbf{\faEnvelopeO~#2}}%
+  \IfBooleanF{#1}{%
+    \index{Package!#2}
+  }%
+}
+
+
+
+
+\NewDocumentCommand{\CHDocClass}{sm}{%
+  \textcolor{brown}{\textbf{\faBriefcase~#2}}%
+  \IfBooleanF{#1}{%
+    \index{Package!#2}%
+  }%
+}
+
+\NewDocumentCommand{\CHDocKey}{sm}{%
+  \textcolor{red}{\textbf{\faKey~#2}}%
+  \IfBooleanF{#1}{%
+      \index{Option!#2}%
+  }%
+}
+
+\newcommand{\handrightnote}{\tcbdocmarginnote{\ding{43}}}
+
+
+\NewDocumentCommand{\CHDocCounter}{sm}{%
+  \textcolor{Green4}{\textbf{\faCalculator~#2}}%
+  \IfBooleanF{#1}{%
+    \index{Counter!#2}%
+  }%	
+}
+
+
+\NewDocumentCommand{\CHDocTag}{sm}{%
+  \textcolor{violet}{\faTag~#2}%
+  \IfBooleanF{#1}{%
+    \index{Feature!#2}%
+  }%	
+}
+
+
+\NewDocumentCommand{\CHDocFileExt}{sm}{%
+    \faFile~#2%
+}
+
+\NewDocumentCommand{\CHDocFiles}{sm}{%
+    \faFilesO~#2%
+}
+
+
+\NewDocumentCommand{\CHDocConventions}{}{%
+  \section*{\centering Typographical conventions}
+  Throughout this documentation following symbols and conventions are used:
+  \begin{itemize}
+  \item \CHDocClass*{foo} means a the class \texttt{foo}
+  \item \CHDocPackage*{foo} names a package \texttt{foo}
+  \item \CHDocCounter*{foo} indicates a counter named \texttt{foo}
+  \item \CHDocFileExt*{foo} will indicate either a file named \texttt{foo} or a file extension \texttt{foo}
+  \item \CHDocFiles*{foo} will indicate some files 
+  \item \CHDocTag*{foo} names a special feature or tag \texttt{foo}
+  \item \CHDocKey*{foo} deals with a command or package option named \texttt{foo}
+  \end{itemize}
+}
+
+
+
+\renewcommand{\tcbdocnew}[1]{#1}%
+\renewcommand{\tcbdocupdated}[1]{#1}%
+
+\newcommand{\CHDocNew}[1]{%
+  \tcbdocmarginnote[doclang/new={N},
+  colframe=blue,
+  halign=left,
+  colback={blue!20!white},
+  fontupper={\tiny}
+  ]{%
+    \chdocextractversion{crossreftoolsversion#1}%
+  }%
+}
+
+
+
+\newcommand{\CHDocUpdate}[1]{\tcbdocmarginnote[doclang/updated={},colback={yellow},colframe={yellow!50!red},  fontupper={\tiny}
+]{%
+  \tcbdocupdated{\chdocextractversion{crossreftoolsversion#1}}%
+}%
+}
+
+
+
+\newcommand{\CHDocFullVersion}[1]{Version \chdocextractversion{crossreftoolsversion#1}}
+
+
+\newcommand{\CHDocExpCommand}[1][Expandable]{%
+  \tcbdocmarginnote[doclang/new={N},
+  colframe=green!50!blue,
+  halign=left,
+  colback={green!90!blue},
+  fontupper={\tiny}
+  ]{%
+    #1%
+  }%
+}
+
+
+\newcommand{\CHDocExperimentalFeature}[1][Experimental]{%
+  \tcbdocmarginnote[doclang/new={N},
+  colframe=yellow!50!blue,
+  halign=left,
+  colback={blue!10!yellow},
+  fontupper={\tiny}
+  ]{%
+    #1%
+  }%
+}
+
+
+\usepackage[T1]{fontenc}
+\usepackage{graphicx}%
+\usepackage{crossreftools}
+
+
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{minitoc}
+\usepackage{tocbibind}
+
+
+\usepackage{bookmark}
+
+\usepackage{cleveref}
+
+
+\def\packageversion{0.1}
+
+
+\usepackage{url}
+
+\setcounter{tocdepth}{3}
+\newcommand{\PackageDocName}{crossreftools}%
+
+
+\newcommand{\mymailtoaddress}{%
+  typography.with.latex at gmail.com%
+}
+
+\doparttoc
+
+\makeindex[intoc]
+
+
+\renewcommand{\rmdefault}{\sfdefault}
+
+
+
+\hypersetup{breaklinks=true,
+  pdftitle={\jobname.pdf -- version \packageversion},
+  pdfauthor={Dr. Christian Hupfer},
+  pdfsubject={Documentation of \PackageDocName\ package},
+  pdfkeywords={LaTeX, cross-referencing},
+  bookmarksopen=true,
+  bookmarksopenlevel=2,
+  bookmarksnumbered=true,
+  pdfcreator={LaTeX}
+}
+
+
+
+\begin{document}
+\yyyymmdddate
+
+
+\setlength{\parindent}{0em}
+
+\pagestyle{empty}%
+
+
+
+\CHPackageTitlePage[packageauthor={Christian Hupfer}]{Expandable extraction of cleveref data}
+
+
+\clearpage
+\tableofcontents
+\clearpage
+
+\CHDocConventions
+\clearpage
+
+
+\pagestyle{plain}
+
+
+\setcounter{footnote}{0}
+
+\part{Introduction}
+
+\parttoc
+
+\section*{Preface}
+
+This package provides expandable extraction of information stored in labels generated with \CHDocPackage{cleveref}. 
+
+Whereas \CHDocPackage{cleveref} provides \cs{labelcref} and other commands, 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|
+\end{marker}
+
+
+\section{Requirements, loading and incompatibilities}%
+
+
+
+\subsection{Required packages and \TeX\ engine}
+
+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. 
+
+
+\subsection{Loading of the package}
+
+Loading is done with
+
+\begin{tcblisting}{listing only}
+\usepackage[options]{crossreftools}
+\end{tcblisting}
+
+As of version \packageversion\ \CHDocPackage{\PackageDocName} does not have options.
+
+There is no loading order required. The macros expand to \makeatletter\fbox{\crt at refundefined}\makeatother\ if \CHDocPackage{cleveref} is not loaded. 
+
+\subsection{Incompatibilities}\label{subsection:incompatibilities}
+
+As of \packageversion\ this package cannot be used with plain \TeX\ 
+
+\clearpage
+
+\part{Macro descriptions}
+
+\parttoc
+
+\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 
+
+\begin{tcblisting}{listing only}
+\label{foo}
+\end{tcblisting}
+
+would generate both the labels \verb!foo! and \verb!foo at cref!. The \CHDocPackage{cleveref} - version of a label saves basically five properties to the \CHDocFileExt{.aux} - file. 
+
+
+\begin{itemize}
+  \item \texttt{counter}
+
+    This property holds the name of the counter that was used in \cs{refstepcounter}.
+
+
+  \item \texttt{number}
+
+    This property holds the value of label, this is usually the value of a counter
+    \begin{marker}
+      Please note that this property does not mean the reference value that is displayed with \cs{cref} or \cs{Cref}. 
+    \end{marker}
+  \item \texttt{result}
+    
+  \item \texttt{reference}
+    This property holds the reference that is to be typeset, i.e. the content displayed with \cs{cref} or \cs{Cref}, however, without hyperlinks. 
+
+  \item \texttt{page}
+    This property stores the page number of the \cs{label} usage.
+    
+\end{itemize}
+
+\clearpage
+\CHDocPackage{\PackageDocName} extracts those properties with \refCom{crtextractcref}. 
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtextractcref}{\marg{property}\marg{labelname}}
+
+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}
+
+For convenience, there are shortcuts to extract a specific property:
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefcounter}{\marg{labelname}}
+
+This extracts the counter belonging to a certain labelname.
+\end{docCommand}
+
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefnumber}{\marg{labelname}}
+
+This extracts the counter value (or something that is stored by \cs{cref at currentlabel} belonging to a certain labelname.
+\end{docCommand}
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefresult}{\marg{labelname}}
+
+This extracts the result of the splitting of a counter belonging to a certain labelname.
+\end{docCommand}
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefreference}{\marg{labelname}}
+
+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}}
+
+This extracts the page number that would be printed by \cs{pageref}. 
+\end{docCommand}
+
+
+\section{Additional macros and utilities}
+
+\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. 
+\end{docCommand}
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtCrefname}{\marg{counter name}}
+
+This extracts the upper case cross reference name of a given counter. 
+\end{docCommand}
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefpluralname}{\marg{counter name}}
+
+This extracts the lower case cross reference plural name of a given counter. 
+\end{docCommand}
+
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtCrefpluralname}{\marg{counter name}}
+
+This extracts the upper case cross reference plural name of a given counter. 
+\end{docCommand}
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtcrefnamebylabel}{\marg{labelname}}
+
+This extracts the lower case cross reference name of a given label. 
+\end{docCommand}
+
+\begin{docCommand}[code={\CHDocExpCommand{}},
+doc new={\chdocextractversion{crossreftoolsversion0.1}}]{crtCrefnamebylabel}{\marg{labelname}}
+
+This extracts the upper case cross reference name of a given label. 
+\end{docCommand}
+
+\clearpage
+\part{Examples}
+
+\parttoc
+
+\section{Driver example}
+
+\tcbinputlisting{breakable,listing only,listing file=crossreftools_driver.tex}
+
+\clearpage
+\section{Version history}
+
+
+\begin{itemize}[itemsep=15pt]
+\item   \CHDocFullVersion{0.1} First version
+\end{itemize}
+
+
+\printindex
+
+\end{document}
+


Property changes on: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf	2017-10-09 22:05:14 UTC (rev 45507)
+++ trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf	2017-10-09 22:06:08 UTC (rev 45508)

Property changes on: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex	2017-10-09 22:06:08 UTC (rev 45508)
@@ -0,0 +1,85 @@
+%% LaTeX package crossreftools - version 0.1 (2017/10/08 -- 22:58:50)
+%% Driver 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`
+%%
+%%
+
+\documentclass{book}
+
+\usepackage{crossreftools}
+
+
+\usepackage{hyperref}
+\usepackage{cleveref}
+
+
+\setlength{\parindent}{0em}
+
+\def\labeltoshow{foochapterlabel}
+
+\def\equationlabeltoshow{fooequationlabel}
+
+
+\begin{document}
+
+
+\setcounter{chapter}{16}
+
+Let us refer the usual way: \Cref{\labeltoshow}
+
+\edef\foocntr{\crtcrefcounter{\labeltoshow}}  
+
+The counter for \fbox{\labeltoshow} is \foocntr\ or \crtcrefcounter{\labeltoshow}. It is used on page \crtcrefpage{\labeltoshow}. The value for the misspelled label name is \crtcrefnumber{labeltoshowstuff}, whereas the correct value is \crtcrefnumber{\labeltoshow}. 
+
+
+
+The result is \fbox{\crtcrefresult{\labeltoshow}}
+
+\edef\labeltoshowname{\crtcrefname{chapter}}
+
+\section{Extracting the cleveref names}
+
+\begin{itemize}
+  
+\item The lower case cross reference name for \fbox{\equationlabeltoshow} is \crtcrefnamebylabel{\equationlabeltoshow}, this time using \verb!\crtcrefnamebylabel!; the upper case name is \crtCrefnamebylabel{\equationlabeltoshow}.
+\item  Extracting content with  \verb!\crtextractcref!
+  \begin{itemize}
+  \item counter: \crtextractcref{counter}{\labeltoshow}
+  \item number: \crtextractcref{number}{\labeltoshow}
+  \item result: \crtextractcref{result}{\labeltoshow}
+  \item reference:   \crtextractcref{reference}{\labeltoshow}
+  \item page:   \crtextractcref{page}{\labeltoshow}
+  \end{itemize}
+\end{itemize}
+
+The macro \verb!\crtextractcref! is expandable!\edef\counterof{\crtextractcref{counter}{\labeltoshow}} Using the stored value for counter: \counterof!
+
+\chapter{This is foo}\label{foochapterlabel}
+
+\setcounter{section}{5}
+\section{Foo}\label{foosectionlabel}
+
+\begin{equation}
+  E=mc^{2}\label{firstequationlabel}
+\end{equation}
+
+\begin{equation}
+  E=mc^{2}\label{fooequationlabel}
+\end{equation}
+
+\end{document}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/crossreftools/crossreftools_driver.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty	2017-10-09 22:06:08 UTC (rev 45508)
@@ -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 at firstoffive}[5]{#1}
+\newcommand{\crt at refundefined}{[UNDEFINED]}
+
+\long\def\crt at gobblethree#1#2#3{}
+\long\def\crt at gobbletwo#1#2{}
+\long\def\crt at 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 at cref@splitter at firstarg#1#2{%
+  \expandafter\crt@@cref@@splitter@@first#1\@nil
+}
+
+\def\crt at cref@splitter at secondarg#1#2{%
+  \expandafter\crt@@cref@@splitter@@second#1\@nil%
+}
+
+
+\def\crt at cref@splitter at thirdarg#1#2{%
+  \expandafter\crt@@cref@@splitter@@third#1\@nil%
+}
+
+
+\def\crt at cref@splitter at fourtharg#1#2{%
+  \expandafter\crt@@cref@@splitter@@fourth#1\@nil%
+}
+
+\def\crt at cref@splitter at firstargument{%
+  \@firstoftwo%
+}
+
+
+\def\crt at cref@splitter at pageref{%
+  \@secondoftwo%
+}
+
+
+\newcommand{\crtcrefname}[1]{%
+  \expandafter\csname cref@#1 at name\endcsname%
+}
+
+\newcommand{\crtcrefpluralname}[1]{%
+  \csname cref@#1 at name@plural\endcsname%
+}
+
+\newcommand{\crtCrefpluralname}[1]{%
+  \csname Cref@#1 at name@plural\endcsname%
+}
+
+\newcommand{\crtCrefname}[1]{%
+  \csname Cref@#1 at name\endcsname%
+}
+
+\newcommand{\crtcrefnamebylabel}[1]{%
+  \expandafter\csname cref@\@@crtextr at ct@cref{counter}{#1}@name\endcsname%
+}
+
+\newcommand{\crtCrefnamebylabel}[1]{%
+  \expandafter\csname Cref@\@@crtextr at ct@cref{counter}{#1}@name\endcsname%
+}
+
+\def\@@crt@@cref@@suffix{cref}
+
+\let\crt at cref@splitter at counter\crt at cref@splitter at firstarg
+\let\crt at cref@splitter at number\crt at cref@splitter at secondarg
+\let\crt at cref@splitter at result\crt at cref@splitter at thirdarg
+\let\crt at cref@splitter at reference\crt at cref@splitter at fourtharg
+\let\crt at cref@splitter at page\crt at cref@splitter at pageref
+
+
+\newcommand{\@@crtextr at ct@cref}[2]{%
+  \expandafter\ifx\csname r@#2@\@@crt@@cref@@suffix\endcsname\relax
+  \crt at refundefined%
+  \else
+  \expandafter\expandafter\expandafter\expandafter\expandafter\csname crt at cref@splitter@#1\expandafter\endcsname\csname r@#2 at cref\endcsname%
+  \fi
+}
+
+\newcommand{\crtextractcref}[2]{%
+  \@@crtextr at ct@cref{#1}{#2}%
+}
+
+\newcommand{\crtcrefcounter}[1]{%
+  \@@crtextr at ct@cref{counter}{#1}%
+}  
+
+\newcommand{\crtcrefnumber}[1]{%
+  \@@crtextr at ct@cref{number}{#1}%
+}  
+
+\newcommand{\crtcrefresult}[1]{%
+  \@@crtextr at ct@cref{result}{#1}%
+}  
+
+\newcommand{\crtcrefreference}[1]{%
+  \@@crtextr at ct@cref{reference}{#1}%
+}  
+
+
+\newcommand{\crtcrefpage}[1]{%
+  \@@crtextr at ct@cref{page}{#1}%
+}  
+
+
+\endinput
+


Property changes on: trunk/Master/texmf-dist/tex/latex/crossreftools/crossreftools.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-10-09 22:05:14 UTC (rev 45507)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-10-09 22:06:08 UTC (rev 45508)
@@ -181,7 +181,8 @@
     coverpage covington
     cprotect cquthesis
     crbox crimson crop
-    crossreference crossrefware crossword crosswrd cryptocode cryst
+    crossreference crossreftools crossrefware crossword crosswrd
+    cryptocode cryst
     cs csbulletin cslatex csplain csquotes csquotes-de
     css-colors cstypo csvsimple cstex
     ctan_chk ctanify ctanupload ctable ctablestack ctex ctex-faq

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2017-10-09 22:05:14 UTC (rev 45507)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2017-10-09 22:06:08 UTC (rev 45508)
@@ -205,6 +205,7 @@
 depend cprotect
 depend crbox
 depend crossreference
+depend crossreftools
 depend csquotes
 depend css-colors
 depend csvsimple

Added: trunk/Master/tlpkg/tlpsrc/crossreftools.tlpsrc
===================================================================


More information about the tex-live-commits mailing list