From 7bd517903406aa8d487340f84350c10826ff5e54 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 4 Mar 2017 23:13:23 +0000 Subject: xassoccnt (4mar17) git-svn-id: svn://tug.org/texlive/trunk@43396 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/xassoccnt/README | 8 +- .../xassoccnt/xassoccnt_backupcounters_example.pdf | Bin 84360 -> 84360 bytes .../xassoccnt/xassoccnt_backupcounters_example.tex | 4 +- .../xassoccnt_coupledcounters_example.pdf | Bin 94195 -> 94195 bytes .../xassoccnt_coupledcounters_example.tex | 4 +- .../doc/latex/xassoccnt/xassoccnt_doc.pdf | Bin 508310 -> 525014 bytes .../doc/latex/xassoccnt/xassoccnt_doc.tex | 125 +++++++++++-- .../doc/latex/xassoccnt/xassoccnt_driver.pdf | Bin 81113 -> 0 bytes .../doc/latex/xassoccnt/xassoccnt_driver.tex | 204 --------------------- .../latex/xassoccnt/xassoccnt_driver_example.pdf | Bin 0 -> 81113 bytes .../latex/xassoccnt/xassoccnt_driver_example.tex | 204 +++++++++++++++++++++ .../doc/latex/xassoccnt/xassoccnt_example.pdf | Bin 68384 -> 68384 bytes .../doc/latex/xassoccnt/xassoccnt_example.tex | 4 +- .../latex/xassoccnt/xassoccnt_label_example.pdf | Bin 0 -> 42924 bytes .../latex/xassoccnt/xassoccnt_label_example.tex | 90 +++++++++ .../xassoccnt_periodiccounters_example.pdf | Bin 31637 -> 31637 bytes .../xassoccnt_periodiccounters_example.tex | 4 +- .../xassoccnt/xassoccnt_resetlist_example.pdf | Bin 46542 -> 46542 bytes .../xassoccnt/xassoccnt_resetlist_example.tex | 4 +- .../xassoccnt_suspendedcounters_example.pdf | Bin 60527 -> 60527 bytes .../xassoccnt_suspendedcounters_example.tex | 4 +- .../xassoccnt/xassoccnt_totalcounters_example.pdf | Bin 63550 -> 63550 bytes .../xassoccnt/xassoccnt_totalcounters_example.tex | 4 +- 23 files changed, 420 insertions(+), 239 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.pdf delete mode 100644 Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.tex create mode 100644 Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver_example.pdf create mode 100644 Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver_example.tex create mode 100644 Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_label_example.pdf create mode 100644 Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_label_example.tex (limited to 'Master/texmf-dist/doc/latex') diff --git a/Master/texmf-dist/doc/latex/xassoccnt/README b/Master/texmf-dist/doc/latex/xassoccnt/README index 158bd2f9de4..f31c3bbc79c 100644 --- a/Master/texmf-dist/doc/latex/xassoccnt/README +++ b/Master/texmf-dist/doc/latex/xassoccnt/README @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) %% README file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2015 -- 2016 by Dr. Christian Hupfer +%% Copyright (c) 2015 -- 2017 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -26,7 +26,7 @@ the associated counters as well. This package can be regarded as a supplement to the totcount package by Vasileios Koutavas (http://www.ctan.org/pkg/totcount), but can be used without it too. -As of 2016/10/29 xassoccnt does not supersede the package assoccnt by the same author, however, -the older package isn't declared obsolete as of 2016/10/29 +As of 2017/03/04 xassoccnt does not supersede the package assoccnt by the same author, however, +the older package isn't declared obsolete as of 2017/03/04 diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_backupcounters_example.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_backupcounters_example.pdf index 0c60f6573dd..690761aa73f 100644 Binary files a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_backupcounters_example.pdf and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_backupcounters_example.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_backupcounters_example.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_backupcounters_example.tex index a2adce4330a..d693a185002 100644 --- a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_backupcounters_example.tex +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_backupcounters_example.tex @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) %% Example file for backup counters file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2016 by Dr. Christian Hupfer +%% Copyright (c) 2016 -- 2017 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters_example.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters_example.pdf index b5e546ed582..1fb2e41f82e 100644 Binary files a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters_example.pdf and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters_example.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters_example.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters_example.tex index b6c3679e6f9..825e748f578 100644 --- a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters_example.tex +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters_example.tex @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) %% Example file for coupled counters file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2016 by Dr. Christian Hupfer +%% Copyright (c) 2016 -- 2017 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.pdf index 55b204204a2..e921a3a58fc 100644 Binary files a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.pdf and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.tex index 60a1a2d8d08..2ecf4cb802c 100644 --- a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.tex +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.tex @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) %% Documentation file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2015 -- 2016 by Dr. Christian Hupfer +%% Copyright (c) 2015 -- 2017 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the @@ -97,6 +97,10 @@ \@namedef{xassoccntversion1.1}{v1.1 2016-10-29} +\@namedef{xassoccntversion1.2}{v1.2 2017-03-03} + +\newcommand{\authorname}{Autor} + \makeatother @@ -147,7 +151,7 @@ \today \tabularnewline \tabularnewline \addtocounter{footnote}{2} - Author: \KVchdocpackageauthor\(^\mathrm{\fnsymbol{footnote}}\) + \authorname: \KVchdocpackageauthor\(^\mathrm{\fnsymbol{footnote}}\) \tabularnewline \end{tabular} \end{center} @@ -302,6 +306,19 @@ }% } + +\newcommand{\CHDocExperimentalFeature}[1][Experimental]{% + \tcbdocmarginnote[doclang/new={N}, + colframe=yellow!50!blue, + halign=left, + colback={blue!10!yellow}, + fontupper={\tiny} + ]{% + #1% + }% +} + + \usepackage{graphicx}% \usepackage[autodefinecounters=true]{xassoccnt} \usepackage{amsmath} @@ -311,13 +328,14 @@ \usepackage{bookmark} \usepackage{cleveref} \usetikzlibrary{mindmap} +\usepackage{url} \setcounter{tocdepth}{3} \newcommand{\PackageDocName}{xassoccnt}% \newcommand{\mymailtoaddress}{% - typography.with.latex@gmail.com + typography.with.latex@gmail.com% } \doparttoc @@ -535,6 +553,12 @@ As of version \packageversion\ \CHDocPackage{\PackageDocName} supports the packa Using this package option the super total counter \CHDocCounter{numberofruns} counter will not be defined. See \cref{subsection:numberofruns} about this feature. \end{docKey} +\begin{docKey}{redefinelabel}{=\meta{true,false}}{initially \meta{true}}\CHDocNew{1.2} +\CHDocExperimentalFeature This is an experimental feature as of version \packageversion. + +Enables the redefinition of the \refCom{label} command and takes care of the optional argument of \refCom{label} if \CHDocPackage{cleveref} is used. This will provide \refCom{label} with a final optional argument that can be used to allow labels for associated counters (either all or only a specified list of counters), for more on this see \refCom{label} in \namecref{subsec::associated_counters_experimental} \nameref{subsec::associated_counters_experimental}. +\end{docKey} + \clearpage \part{Tools for counters} @@ -560,17 +584,20 @@ As of \packageversion, there is only one option used: \subsection[\LaTeXe\ additions]{Additions to \LaTeXe\ commands} -\begin{docCommand}{NewDocumentCounter}{\oarg{options}\marg{counter}\oarg{resetting counter}} +\begin{docCommand}{NewDocumentCounter}{\oarg{options}\marg{counter1,counter2,\dots}\oarg{resetting counter}} This command is a new interface to \cs{newcounter} and behaves effectively the same. %The first optional argument is reserved for later purposes but not used as of version \packageversion. \begin{docKey}{initial}{=\meta{integer value}}{initially 0} This is used for the start value of the new counter. \end{docKey} +\CHDocUpdate{1.2}This command allows multiple counters (specified as a comma separated list) to be defined at once, but all have the same resetting counter then and initial value is the same for all those counters (if those options are given). + \end{docCommand}% \begin{docCommand}{DeclareDocumentCounter}{\oarg{options}\marg{counter}\oarg{resetting counter}} This command is the preamble-only version of \refCom{NewDocumentCounter}. + \CHDocUpdate{1.2}This command allows multiple counters (specified as a comma separated list) to be defined at once, but all have the same resetting counter then and initial value is the same for all those counters (if those options are given), i.e. the behaviour is like in \refCom{NewDocumentCounter}. \end{docCommand}% @@ -872,20 +899,20 @@ The package \CHDocPackage{chngcntr} offers the possibility of add or remove coun \begin{docCommand}[before={\CHDocNew{1.0}}\par]{RemoveFromReset}{\marg{counter name}\marg{driver counter name}} This macro removes the counter given in the first argument from the reset list of the driver counter given in the 2nd argument. -If the 2nd argument does not point to a LaTeXe\ counter name an error message is shipped and the compilation fails. +If the 2nd argument does not point to a \LaTeXe\ counter name an error message is shipped and the compilation fails. \end{docCommand} \begin{docCommand}[before={\CHDocNew{1.0}}]{RemoveFromFullReset}{\marg{counter name}\marg{driver counter name}} This macro removes the counter given in the first argument and all of its own reset list from the reset list of the driver counter given in the 2nd argument. -If the 2nd argument does not point to a LaTeXe\ counter name an error message is shipped and the compilation fails. +If the 2nd argument does not point to a \LaTeXe\ counter name an error message is shipped and the compilation fails. \end{docCommand} \begin{docCommand}[before={\CHDocNew{1.0}}]{AddToReset}{\marg{counter name}\marg{driver counter name}} This macro adds the counter given in the first argument to the reset list of the driver counter given in the 2nd argument. -If the 2nd argument does not point to a LaTeXe\ counter name an error message is shipped and the compilation fails. +If the 2nd argument does not point to a \LaTeXe\ counter name an error message is shipped and the compilation fails. \end{docCommand} @@ -983,9 +1010,9 @@ The 2nd argument value is added (or subtracted) to the counters given in the lis \item \marg{counter1, counter2,\dots} Holds the comma separated list of counter names \item \marg{counter increment/decrement} - Specifies the value to be added or subtracted + Specifies the value to be added or subtracted. - No check is performed whether \textbf{is} or \textbf{expands} to an integer value. + No check is performed whether \#2 \textbf{is} or \textbf{expands} to an integer value. \end{codeoptionsenum} %\end{docCommandArgs} @@ -1129,7 +1156,7 @@ This command will print the value of the counter using uppercase hexadecimal dig \begin{docCommand}{OctalValue}{\marg{counter name}} \CHDocNew{0.7} -This command will print the value of the counter using uppercase hexadecimal digits. +This command will print the value of the counter using octal digits. \end{docCommand} @@ -1234,7 +1261,6 @@ The usage of this macro is similar to \refCom{DeclareAssociatedCounters}; if it Using \refCom{AddAssociatedCounters} in the document body automated generation of counters is disabled. -% You have to use \refCom{DeclareAssociatedCounters} first, to set up the driver counter hook. \begin{docCommandArgs}{AddAssociatedCounters} @@ -1287,6 +1313,14 @@ If the driver counter and all its associated counters should be removed, use \re \end{docCommand} +\begin{docCommand}[before={\CHDocNew{1.2}}]{DeclareTotalAssociatedCounters}{\oarg{options}\marg{driver counter}\marg{associated counters list}} +This command combines the features of \CHDocTag{associated counters} and \CHDocTag{total counters}, i.e. the associated counters are defined with \refCom{NewTotalDocumentCounter} and associated to the driver counter. + +See \cref{sec::totalcounters} for more information on \CHDocTag{total counters}. +\end{docCommand} + + + \clearpage @@ -1461,8 +1495,54 @@ This commands tests, whether a given counter name is a driver counter and expand \end{docCommand}% +\subsection{Associated counters -- Experimental features}\label{subsec::associated_counters_experimental} +\begin{marker} +\marginnote{\bcbombe} +The content here is only of experimental nature and there is no guarantee that the feature will be maintained in future releases. +\end{marker} + +\begin{marker} +To enable the redefined \refCom{label} macro, specify the package option \refKey{redefinelabel} +\end{marker} + + + +\begin{docCommand}[before={\CHDocNew{1.2}}]{label}{\oarg{cleveref-counter-overrule}\marg{label name}\oarg{options for associated counters}} + \begin{docKey}{all}{=\meta{true,false}}{initially \meta{false}}\CHDocNew{1.2} + This will enable that all associated counters to a driver counter will cause the generation of a label too. By default this option is \meta{false}. + This option deliberately overrules \refKey{select}, the value of the option \refKey{prefix} is disregarded. + \end{docKey} + \begin{docKey}{select}{={counter1, counter2,\dots}}{initially empty}\CHDocNew{1.2} + Select only some of the associated counters to be able to be labeled. + As of version \packageversion{} there is no check whether the given names refer to counters at all or are associated counters to the last counter that has been used with \cs{refstepcounter}. + \end{docKey} + \begin{docKey}{prefix}{=\meta{text}}{initially empty}\CHDocNew{1.2} + This gives the prefix of the label of the associated counter. If the option \refKey{all} is enabled, the label name is generated from the name of the associated counter, the value of \refKey{prefix-sep} and the value of the 2nd argument. + \newcounter{morefoobar} + \begin{dispExample*}{listing only} + % Assume that some counter has the associated counters foobar, morefoobar and yetanotherfoobar + \label{foo}[prefix=assoc,all] + \end{dispExample*} + will cause a label named \texttt{foobar::foo}, \texttt{morefoobar::foo} and \texttt{yetanotherfoobar::foo}, whereas + \begin{dispExample*}{listing only} + \label{foo}[prefix=assoc,select=morefoobar] + \end{dispExample*} + would generate the label \texttt{assocc::foobar} only and will be tied to the value of the counter \texttt{morefoobar} + \end{docKey} + \begin{docKey}{prefix-sep}{=\meta{text}}{initially ::}\CHDocNew{1.2} + Defines the separator between the \refKey{prefix} and the label name for the driver counter, i.e. the 2nd argument of the \refCom{label} command. + \end{docKey} +\end{docCommand} -\section[Counter backup/restoration]{Backup and restore of counter values}\label{section::new_backuprestore}\CHDocNew{1.0} + +\begin{marker} +\marginnote{\bcbombe} +If the package option \refKey{redefinelabel} is set to \meta{false}, the usage of the third optional argument will leave spurious content at the position \cs{label} was used. The reason is that the content of third optional argument with \texttt{[]} is not recognized as an argument any longer. +\end{marker} + + + +\section[Counter backup/restoration]{Backup and restore of counter values}\CHDocNew{1.0}\label{section::new_backuprestore} It might be necessary to interrupt the current sectioning, e.g. including another document's structure (an external paper, for example) such that the counting should start again and after finishing of the external structure the old values should be restored. @@ -1698,7 +1778,7 @@ This macro tests if the backup-id exists for the given counter group and execute \subsection{Some notes on the backup features} \label{subsec::backup_and_hyperref} -Principally backing up counter values and restoring them later on is not really difficult -- with one exception: If the \CHDocPackage{hyperref} package is used, the counter values form up the hypertarget anchors, for example \texttt{chapter.1} for the first chapter. If the chapter counter is reset, there would be a chapter with number one again and as well an anchor name \texttt{chapter.1} -- \packagename{hyperref} will complain 'only' about this but it will put the wrong hyperlink as well, for example for the table of contents and the bookmarks -- this is an undesirable feature. +Principally backing up counter values and restoring them later on is not really difficult -- with one exception: If the \CHDocPackage{hyperref} package is used, the counter values form up the hypertarget anchors, for example \texttt{chapter.1} for the first chapter. If the chapter counter is reset, there would be a chapter with number one again and as well an anchor name \texttt{chapter.1} -- \CHDocPackage{hyperref} will complain 'only' about this but it will put the wrong hyperlink as well, for example for the table of contents and the bookmarks -- this is an undesirable feature. However, there is a solution to this problem: The hypertarget anchors are built up from the specifications of a macro \cs{theH...} where the ellipses stands for the counter name. If for example \cs{theHchapter} is changed after a counter was reset the hypertargets will again be correct, since this will provide a different target name. \refCom{BackupCounterGroup} does this resetting automatically in an unique way and \refCom{RestoreBackupCounterGroup} restores as well the old \cs{theH...} macros of all counters that are in the backup list. It tracks the number of calls to \refCom{BackupCounterGroup} and changes the relevant \cs{theH...} macro definitions to use unique anchor names then -- this way multiple \refCom{BackupCounterGroup} calls are possible without destroying the hyperlink facilities with \CHDocPackage{hyperref}. @@ -2057,7 +2137,7 @@ There are \number\totvalue{totalequations}~equations in here! -\section{Total counters}\tcbdocmarginnote{\tcbdocnew{2015-11-27}} +\section{Total counters}\tcbdocmarginnote{\tcbdocnew{2015-11-27}}\label{sec::totalcounters} @@ -2152,19 +2232,22 @@ In addition to the concept of a total counter, there is also the possibility of \subsection{Defining super total counters} -\begin{docCommand}{NewTotalDocumentCounter}{\oarg{options}\marg{total counter name}} +\begin{docCommand}{NewTotalDocumentCounter}{\oarg{options}\marg{total counter name1, total counter name2,\dots}} This macro defines a new counter (which mustn't exist before of course) and puts it under control of the total counter features. \begin{codeoptionsenum} \item \oarg{options}: As of version \packageversion, only this option is used \refKey{supertotal} -- this has the same meaning as in \refCom{RegisterTotalDocumentCounter} and defaults to \texttt{false}. - \item \marg{total counter name}: The name of the total counter. This must not be the same like the name of any already existing counter. Internally another counter is defined which has a prefix to prevent name clashes with counter names defined by the package \CHDocPackage{totalcount}. + \item \marg{total counter name1, total counter name2,\dots}: The names of the total counter, separated by a comma. This must not be the same like the name of any already existing counter. Internally another counter is defined which has a prefix to prevent name clashes with counter names defined by the package \CHDocPackage{totalcount}. \end{codeoptionsenum} + If an already existing counter should be tracked with total counter features, use \refCom{RegisterTotalDocumentCounter} instead. +\CHDocUpdate{1.2}This command allows multiple counters (specified as a comma separated list) to be defined at once. + \end{docCommand} @@ -2269,6 +2352,14 @@ write this documentation. \begin{itemize}[itemsep=15pt] +\item \CHDocFullVersion{1.2} +\begin{itemize} + \item Corrected some typos in the manual. + \item The macros \refCom{NewDocumentCounter}, \refCom{DeclareDocumentCounter} and \refCom{NewTotalDocumentCounter} allow multiple counters to be specified and defined. + \item Added the macro \refCom{DeclareTotalAssociatedCounters} in order to combine total counters and the associated feature, i.e. the counters are total ones and associated to a driver counter. + \item \CHDocExperimentalFeature An extended version of \refCom{label} is provided to allow labels also for associated counters during the stepping process of the driver counter. +\end{itemize} + \item \CHDocFullVersion{1.1} \begin{itemize} \item Added some missing basic functions needed after the more restrictive \CHDocPackage{expl3} update from 2016/10/19 diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.pdf deleted file mode 100644 index 362c5dcc4a1..00000000000 Binary files a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.tex deleted file mode 100644 index aed48fa537e..00000000000 --- a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.tex +++ /dev/null @@ -1,204 +0,0 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) -%% Driver file for xassoccnt.sty -%% -%% -%% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2015 -- 2016 by Dr. Christian Hupfer -%% ------------------------------------------------------------------------------------------- -%% -%% 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{xcolor} -\usepackage{totcount} -\usepackage{calc} -\usepackage[autodefinecounters=false]{xassoccnt} - - -\usepackage{hyperref} -\usepackage{cleveref} - - -\newcounter{totalpages} -\newtotcounter{totalsections} -\newcounter{othersections} -\newtotcounter{totaltables} - -\NewTotalDocumentCounter{equations} - -\DeclareAssociatedCounters[autodefine=none]{section}{totalsections,othersections,equations} -\AddAssociatedCounters{section}{totalsections} - - -\DeclareAssociatedCounters{page}{totalpages} -\DeclareAssociatedCounters{table}{totaltables} - - -\begin{document} -\chapter{First} - -In \cref{section::dummylabel} we will see that - -\section{First} - -\begin{table} -\caption{table} -\end{table} - - -\begin{table} -\caption{table} -\end{table} - - -\begin{table} -\caption{table} -\end{table} - - - -\section{Other} -\section{Third} - -\begin{table} -\caption{Other table} -\end{table} - -\begin{equation} - E=mc^2 -\end{equation} - -\begin{equation} - E=mc^2 -\end{equation} - - -\TotalValue{equations} - -\chapter{Second chapter} - -\section{First section of 2nd chapter} \label{section::dummylabel} - -\thesection\ \total{totalsections}\ \theothersections\ \fbox{\color{blue}{\thetotaltables}} - - -\IsSuspendedCounter{totalsections}{Yes, it's suspended}{Nope, it's not suspended} - -\IsAssociatedCounter{totalsections}{Yes, it's associated}{Nope, it's not associated} - -\IsSuspendedCounter{equation}{Yes, it's suspended}{Nope, it's not suspended} - -\IsAssociatedCounter{equation}{Yes, it's associated}{Nope, it's not associated} - - -\TotalValue{equations} - - - -\TotalValue{equations} - - -\SetDocumentCounter{section}{28} - -\SetDocumentCounter{totalsections}{100} - -\NewDocumentCounter[initial=151]{counterother}[section] - - - -Value of counterother: \thecounterother - -\section{Another one} - -Value of counterother: \thecounterother - - - - - -\thesection\ \thetotalsections\ \theothersections\ \fbox{\color{blue}{\thetotaltables}}\ - -\SyncCounters[onlycounters={totalsections}]{section} - - -\IfIsDocumentCounterTF{section}{% - Yes, it's a counter -}{% - No, it's no counter -} - - -\IsSuperTotalCounterT{numberofruns}{% - Yes, numberofruns is a super total counter -} - -\IsSuperTotalCounterF{chapter}{% - No, chapter is not a super total counter -} - - -\countersresetlistcount{chapter} -\SetDocumentCounter{counterother}{\getresetlistcount} - -\begin{itemize} - \item There are \getresetlistcount\ counters in the reset list of chapter - \item \IfInResetListTF{chapter}{figure}{Yes, figure is in the reset list of chapter}{No, figure is not in the reset list of chapter} - \item \IfInResetListTF{chapter}{page}{Yes, page is in the reset list of chapter}{No, page is not in the reset list of chapter} - \item Values: \thesection\ \total{totalsections}\ \theothersections\ \fbox{\color{blue}{\total{totaltables}}}\ \thecounterother. -\end{itemize} - -Total value of equations: \TotalValue{equations} - -Internal name: \TotalCounterInternalName{equations} - -\begin{table} -\caption{table} -\end{table} - - -%\stepcounter{equations} - - -\chapter{Another chapter} - -\PrettyPrintCounterName{countertype=general}{equation} -\PrettyPrintCounterName{countertype=driver}{chapter} -\PrettyPrintCounterName{countertype=associated}{totalsections} -\PrettyPrintCounterName{countertype=total}{equations} - - - -\begin{table} -\caption{table} -\end{table} - - - -\chapter{A new chapter} - -\begin{equation} - E=mc^2 -\end{equation} - -\chapter{Another new chapter} - -\begin{equation} - E=mc^2 -\end{equation} - - - - -\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver_example.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver_example.pdf new file mode 100644 index 00000000000..12b008b3ce7 Binary files /dev/null and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver_example.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver_example.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver_example.tex new file mode 100644 index 00000000000..8cd63b0b31c --- /dev/null +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver_example.tex @@ -0,0 +1,204 @@ +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) +%% Driver file for xassoccnt.sty +%% +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2015 -- 2017 by Dr. Christian Hupfer +%% ------------------------------------------------------------------------------------------- +%% +%% 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{xcolor} +\usepackage{totcount} +\usepackage{calc} +\usepackage[autodefinecounters=false]{xassoccnt} + + +\usepackage{hyperref} +\usepackage{cleveref} + + +\newcounter{totalpages} +\newtotcounter{totalsections} +\newcounter{othersections} +\newtotcounter{totaltables} + +\NewTotalDocumentCounter{equations} + +\DeclareAssociatedCounters[autodefine=none]{section}{totalsections,othersections,equations} +\AddAssociatedCounters{section}{totalsections} + + +\DeclareAssociatedCounters{page}{totalpages} +\DeclareAssociatedCounters{table}{totaltables} + + +\begin{document} +\chapter{First} + +In \cref{section::dummylabel} we will see that + +\section{First} + +\begin{table} +\caption{table} +\end{table} + + +\begin{table} +\caption{table} +\end{table} + + +\begin{table} +\caption{table} +\end{table} + + + +\section{Other} +\section{Third} + +\begin{table} +\caption{Other table} +\end{table} + +\begin{equation} + E=mc^2 +\end{equation} + +\begin{equation} + E=mc^2 +\end{equation} + + +\TotalValue{equations} + +\chapter{Second chapter} + +\section{First section of 2nd chapter} \label{section::dummylabel} + +\thesection\ \total{totalsections}\ \theothersections\ \fbox{\color{blue}{\thetotaltables}} + + +\IsSuspendedCounter{totalsections}{Yes, it's suspended}{Nope, it's not suspended} + +\IsAssociatedCounter{totalsections}{Yes, it's associated}{Nope, it's not associated} + +\IsSuspendedCounter{equation}{Yes, it's suspended}{Nope, it's not suspended} + +\IsAssociatedCounter{equation}{Yes, it's associated}{Nope, it's not associated} + + +\TotalValue{equations} + + + +\TotalValue{equations} + + +\SetDocumentCounter{section}{28} + +\SetDocumentCounter{totalsections}{100} + +\NewDocumentCounter[initial=151]{counterother}[section] + + + +Value of counterother: \thecounterother + +\section{Another one} + +Value of counterother: \thecounterother + + + + + +\thesection\ \thetotalsections\ \theothersections\ \fbox{\color{blue}{\thetotaltables}}\ + +\SyncCounters[onlycounters={totalsections}]{section} + + +\IfIsDocumentCounterTF{section}{% + Yes, it's a counter +}{% + No, it's no counter +} + + +\IsSuperTotalCounterT{numberofruns}{% + Yes, numberofruns is a super total counter +} + +\IsSuperTotalCounterF{chapter}{% + No, chapter is not a super total counter +} + + +\countersresetlistcount{chapter} +\SetDocumentCounter{counterother}{\getresetlistcount} + +\begin{itemize} + \item There are \getresetlistcount\ counters in the reset list of chapter + \item \IfInResetListTF{chapter}{figure}{Yes, figure is in the reset list of chapter}{No, figure is not in the reset list of chapter} + \item \IfInResetListTF{chapter}{page}{Yes, page is in the reset list of chapter}{No, page is not in the reset list of chapter} + \item Values: \thesection\ \total{totalsections}\ \theothersections\ \fbox{\color{blue}{\total{totaltables}}}\ \thecounterother. +\end{itemize} + +Total value of equations: \TotalValue{equations} + +Internal name: \TotalCounterInternalName{equations} + +\begin{table} +\caption{table} +\end{table} + + +%\stepcounter{equations} + + +\chapter{Another chapter} + +\PrettyPrintCounterName{countertype=general}{equation} +\PrettyPrintCounterName{countertype=driver}{chapter} +\PrettyPrintCounterName{countertype=associated}{totalsections} +\PrettyPrintCounterName{countertype=total}{equations} + + + +\begin{table} +\caption{table} +\end{table} + + + +\chapter{A new chapter} + +\begin{equation} + E=mc^2 +\end{equation} + +\chapter{Another new chapter} + +\begin{equation} + E=mc^2 +\end{equation} + + + + +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.pdf index 2b62ede7a5a..173d3bc2dbd 100644 Binary files a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.pdf and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.tex index b98d7b76894..88a1d1505b2 100644 --- a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.tex +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.tex @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) %% Example file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2015 -- 2016 by Dr. Christian Hupfer +%% Copyright (c) 2015 -- 2017 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_label_example.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_label_example.pdf new file mode 100644 index 00000000000..a729e13d57f Binary files /dev/null and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_label_example.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_label_example.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_label_example.tex new file mode 100644 index 00000000000..01d305561be --- /dev/null +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_label_example.tex @@ -0,0 +1,90 @@ +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) +%% Example file the the usage of labels with associated counters file for xassoccnt.sty +%% +%% +%% ------------------------------------------------------------------------------------------- +%% Copyright (c) 2017 by Dr. Christian Hupfer +%% ------------------------------------------------------------------------------------------- +%% +%% 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[10pt,a4paper,twoside]{article} +\usepackage{chngcntr} +\usepackage{xassoccnt} +\usepackage{hyperref} +\NewDocumentCounter{ap, apother} +\DeclareAssociatedCounters{subsection}{ap, apother} + +\counterwithout{ap}{section} + +\usepackage{cleveref} + +\crefname{ap}{package}{packages} +\Crefname{ap}{Package}{Packages} +\creflabelformat{ap}{AP~#2#1#3} +\crefformat{ap}{AP~#2#1#3} + +\begin{document} + +See \cref{foosection} + + \section{ some section } \label{foosection} + \section{ special section on packages } + \setcounter{ap}{0} + + Here we describe \cref{ap::ap-one,ap::ap-two,ap::ap-three} .... + this will be presented in \cref{ap::ap-one,ap::ap-two} and + finally in \cref{ap::ap-three} we describe .... + + Preferably this should look like this: + + Here we describe package AP 1 to AP 3 .... + this will be presented in packages AP 1 and AP 2 and + finally in package AP 3 we describe .... + + but currently it looks like this: + + Here we describe package AP 2.1 to AP 2.3 .... + this will be presented in packages AP 2.1 and AP 2.2 and + finally in package AP 2.3 we describe .... + + \subsection{AP~\arabic{ap}: first } \label{ap-one} + bla bla bla + Here we describe ... + which will be used in \cref{ap::ap-two,ap::ap-three} .... + + + \subsection{AP~\arabic{ap}: second } + \label{ap-two} + bla bla bla + we described in \cref{ap::ap-one} .... + follow in \cref{ap::ap-three} + + ap counter is \arabic{ap} or \theap. + + subsection counter is \arabic{subsection} + and ``thesection'' is \thesubsection. + + + \subsection{AP~\arabic{ap}: three } + \label{ap-three} + bla bla bla + we described in \cref{ap::ap-three,ap::ap-two} but look at \ref{ap-three} + + + \section*{Appendix} + The table of contents is fine as is + \tableofcontents + +\end{document} diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_periodiccounters_example.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_periodiccounters_example.pdf index d7008f5b500..9f2c3354fa2 100644 Binary files a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_periodiccounters_example.pdf and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_periodiccounters_example.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_periodiccounters_example.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_periodiccounters_example.tex index e6fbff6feca..164ad4f1e7d 100644 --- a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_periodiccounters_example.tex +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_periodiccounters_example.tex @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) %% Example file for periodic counters file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2016 by Dr. Christian Hupfer +%% Copyright (c) 2016 -- 2017 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_resetlist_example.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_resetlist_example.pdf index a0b1d0d43a9..790e2515f55 100644 Binary files a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_resetlist_example.pdf and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_resetlist_example.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_resetlist_example.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_resetlist_example.tex index 4ec7cc9c88d..b480a43dd12 100644 --- a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_resetlist_example.tex +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_resetlist_example.tex @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) %% Example file for reset list features file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2016 by Dr. Christian Hupfer +%% Copyright (c) 2016 -- 2017 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf index 09427de8a2f..f52b8584ce6 100644 Binary files a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.tex index 381669576fc..c36c71f6969 100644 --- a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.tex +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.tex @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) %% Example file for suspended counters file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2016 by Dr. Christian Hupfer +%% Copyright (c) 2016 -- 2017 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_totalcounters_example.pdf b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_totalcounters_example.pdf index 70a2368b73c..6e8c7a432d0 100644 Binary files a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_totalcounters_example.pdf and b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_totalcounters_example.pdf differ diff --git a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_totalcounters_example.tex b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_totalcounters_example.tex index 297e59b6559..9bb7b552ce8 100644 --- a/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_totalcounters_example.tex +++ b/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_totalcounters_example.tex @@ -1,9 +1,9 @@ -%% LaTeX package xassoccnt - version 1.1 (2016/10/29 -- 13:34:52) +%% LaTeX package xassoccnt - version 1.2 (2017/03/04 -- 00:46:43) %% Example file for total counters file for xassoccnt.sty %% %% %% ------------------------------------------------------------------------------------------- -%% Copyright (c) 2015 -- 2016 by Dr. Christian Hupfer +%% Copyright (c) 2015 -- 2017 by Dr. Christian Hupfer %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the -- cgit v1.2.3