texlive[41371] Master/texmf-dist: xassoccnt (11jun16)

commits+karl at tug.org commits+karl at tug.org
Sun Jun 12 01:06:44 CEST 2016


Revision: 41371
          http://tug.org/svn/texlive?view=revision&revision=41371
Author:   karl
Date:     2016-06-12 01:06:44 +0200 (Sun, 12 Jun 2016)
Log Message:
-----------
xassoccnt (11jun16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/xassoccnt/README
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters.pdf
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters.tex
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.pdf
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.tex
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.pdf
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.tex
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.pdf
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.tex
    trunk/Master/texmf-dist/tex/latex/xassoccnt/xassoccnt.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf
    trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.tex

Modified: trunk/Master/texmf-dist/doc/latex/xassoccnt/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xassoccnt/README	2016-06-11 23:06:28 UTC (rev 41370)
+++ trunk/Master/texmf-dist/doc/latex/xassoccnt/README	2016-06-11 23:06:44 UTC (rev 41371)
@@ -1,4 +1,4 @@
-%% LaTeX package xassoccnt - version 0.7 (2016/05/10 -- 00/41/54)
+%% LaTeX package xassoccnt - version 0.8 (2016/06/10 -- 23/28/27)
 %% README file for xassoccnt.sty
 %%
 %%
@@ -26,7 +26,7 @@
 to the totcount package by Vasileios Koutavas (http://www.ctan.org/pkg/totcount), but
 can be used without it too.
 
-As of 2016/05/10 xassoccnt does not supersede the package assoccnt by the same author, however, 
-the older package isn't declared obsolete as of 2016/05/10
+As of 2016/06/10 xassoccnt does not supersede the package assoccnt by the same author, however, 
+the older package isn't declared obsolete as of 2016/06/10
 
 

Modified: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters.tex	2016-06-11 23:06:28 UTC (rev 41370)
+++ trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_coupledcounters.tex	2016-06-11 23:06:44 UTC (rev 41371)
@@ -1,5 +1,5 @@
-%% LaTeX package xassoccnt - version 0.7 (2016/05/10 -- 00/41/54)
-%% Coupled counters examples file for xassoccnt.sty
+%% LaTeX package xassoccnt - version 0.8 (2016/06/10 -- 23/28/27)
+%% Example file for coupled counters file for xassoccnt.sty
 %%
 %%
 %% -------------------------------------------------------------------------------------------

Modified: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.tex	2016-06-11 23:06:28 UTC (rev 41370)
+++ trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_doc.tex	2016-06-11 23:06:44 UTC (rev 41371)
@@ -1,5 +1,5 @@
-%% LaTeX package xassoccnt - version 0.7 (2016/05/10 -- 00/41/54)
-%% Documentation   file for xassoccnt.sty
+%% LaTeX package xassoccnt - version 0.8 (2016/06/10 -- 23/28/27)
+%% Documentation file for xassoccnt.sty
 %%
 %%
 %% -------------------------------------------------------------------------------------------
@@ -51,6 +51,7 @@
 \newlist{codeoptionsenum}{enumerate}{1}
 \setlist[codeoptionsenum,1]{label={\textcolor{blue}{\#\arabic*}}}
 
+\renewcommand{\rmdefault}{\sfdefault}
 
 \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
 
@@ -67,10 +68,31 @@
   \def\KVchdocfilepurpose{#1}%
 }
 
+
+\newcommand{\chdocextractversion}[1]{%
+  \@nameuse{#1}%
+}
+
+
+
+\@namedef{xassoccntversion0.4}{v0.4 2016-01-26}
+
+\@namedef{xassoccntversion0.5}{v0.5 2016-02-27}
+
+\@namedef{xassoccntversion0.6}{v0.6 2016-03-05}
+
+\@namedef{xassoccntversion0.7}{v0.7 2016-05-10}
+
+\@namedef{xassoccntversion0.8}{v0.8 2016-05-16}
+
+
 \makeatother
 
 
 
+
+
+
 \fancypagestyle{plain}{%
 \fancyfoot[L]{\begin{tabular}[t]{l}\PackageDocName\ \packageversion \tabularnewline \textcopyright\ Dr. Christian Hupfer\end{tabular}}%
 \fancyfoot[C]{\thepage}%
@@ -84,6 +106,7 @@
 }
 
 
+
 \newtcolorbox{CHPackageTitleBox}[1][]{%
   enhanced jigsaw,
   drop lifted shadow,
@@ -287,8 +310,9 @@
 \newcommand{\versionzerofourdate}{v0.4 2016-01-26}
 \newcommand{\versionzerofivedate}{v0.5 2016-02-27}
 \newcommand{\versionzerosixdate}{v0.6 2016-03-05}
-\newcommand{\currentversiondate}{2016-05-10}
-\newcommand{\versionzerosevendate}{v0.7 \currentversiondate}
+\newcommand{\versionzerosevendate}{v0.7 2016-05-10}
+\newcommand{\currentversiondate}{2016-06-10}
+\newcommand{\versionzeroeightdate}{v0.8 \currentversiondate}
 
 \begin{document}
 \mmddyyyydate
@@ -398,7 +422,8 @@
 
 
 \begin{marker}
-\tcbdocmarginnote{\tcbdocupdated{\versionzerosevendate}}
+%\tcbdocmarginnote{\tcbdocupdated{\versionzerosevendate}}
+\tcbdocmarginnote{\tcbdocupdated{\chdocextractversion{xassoccntversion0.7}}}
 Of course any package other that loads \CHDocPackage{calc} must be loaded before \PackageDocName, i.e. \CHDocPackage{mathtools}. 
 \end{marker}
 
@@ -836,6 +861,32 @@
 See the related commands \refCom{IfInResetListTF} and \refCom{IfInResetListT} as well. 
 \end{docCommand}
 
+\begin{docCommand}{DisplayResetList}{\oarg{separator={,}}\marg{resetting counter}}\tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xassoccntversion0.8}}}
+
+This command displays the reset list of a counter as a separated list. If the counter has no resetting list, nothing is shown. 
+
+\begin{docCommandArgs}{DisplayResetList}%
+
+\begin{codeoptionsenum}
+\item \oarg{separator}% 
+  This separator is used for display, it defaults to a comma character. 
+
+\item \marg{resetting counter}%
+
+  Contains the name of counter whose resetting list should be displayed. 
+\end{codeoptionsenum}
+\end{docCommandArgs}
+
+\end{docCommand}
+
+\begin{docCommand}{ShowResetList}{\marg{resetting counter}}\tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xassoccntversion0.8}}}
+
+This command displays the reset list of a counter on the terminal as the \cs{show} command would do. This is rather useful for debugging purposes only. 
+\end{docCommand}
+
+
+
+
 \subsection[Information macros]{Information on counters} \label{subsection::informationcmds}
 
 On occasions it might be important to have some information which counter has been changed last. Since there are four commands manipulating counter values, there are four corresponding routines for this:
@@ -939,16 +990,46 @@
 
 \section[Suspending and Resuming]{Suspending and resuming (associated) counters}\label{section::suspendedresumedcounters}
 
+
+
 Rather than removing an associated counter from the list, it is possible to suspend the automatic stepping for a while and then resume it (or completely drop it), for example, if the value of a counter should not be stepped within a specific chapter etc. 
 
+\tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xassoccntversion0.8}}}
+\begin{marker}
+  Suspension and resuming counters can cause wrong hyper links if \CHDocPackage{hyperref} is used. 
+\end{marker}
+
 \begin{docCommand}{SuspendCounters}{\oarg{options}\marg{counters list}}%
 \begin{docCommandArgs}{SuspendCounters}%
 
 \begin{codeoptionsenum}
 \item \oarg{options}% 
+  
+  Not used so far, reserved for later usage.
 
-  Not used so far, reserved for later usages
+\item \marg{counters list}%
 
+  Contains the name of counters to be suspended, separated by commas (CSV - list)
+\end{codeoptionsenum}
+\end{docCommandArgs}
+\end{docCommand}%
+
+\begin{docCommand}{CascadeSuspendCounters}{\oarg{options}\marg{counters list}}\tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xassoccntversion0.8}}}
+
+This macro is more powerful than \refCom{SuspendCounters}, since it tries to detect whether a counter has a reset list and 'mutes' the counters on this list as well and checks whether those counters themselves have reset lists and cascades down to the final state. 
+
+\begin{marker}
+  Stated differently: All counters anyhow connected to a counter named \CHDocCounter{foo} will be suspended, e.g. for the \CHDocClass{book} class and \CHDocCounter{chapter}, this means in a standard setup, that \CHDocCounter*{section,figure,table,equation,footnote} will be suspended, as well as in consequence \CHDocCounter*{subsection,subsubsection,paragraph,subparagraph}, assuming hereby no other counters have been added to the reset lists.
+\end{marker}
+
+
+\begin{docCommandArgs}{CascadeSuspendCounters}%
+
+\begin{codeoptionsenum}
+\item \oarg{options}% 
+
+  Not used so far, reserved for later usage.
+
 \item \marg{counters list}%
 
   Contains the name of counters to be suspended, separated by commas (CSV - list)
@@ -956,11 +1037,18 @@
 \end{docCommandArgs}
 \end{docCommand}%
 
+
 \begin{docCommand}{ResumeSuspendedCounters}{\oarg{options}\marg{counters list}}
+  As of version \packageversion\ the optional argument is not used and reserved for later purposes. 
   This command revokes the suspension of the counters in the \marg{counters} list.
 \end{docCommand}
 
+\begin{docCommand}{ResumeAllSuspendedCounters}{\oarg{options}} \tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xassoccntversion0.8}}}
+  As of version \packageversion\ the optional argument is not used and reserved for later purposes. 
+  This command revokes all suspended counters.
+\end{docCommand}
 
+
 \begin{marker}
 If a driver counter is suspended, all counters associated to it are suspended too!
 \end{marker}
@@ -1132,7 +1220,7 @@
 
 \begin{docCommand}{SyncCounters}{\oarg{options}\marg{driver counter}}
 
-This document synchronizes the driver counter value to the associated values. It has the some options as \refCom{SetDocumentCounter}. If the given counter is no driver counter, nothing is done. 
+This document synchronizes the driver counter value to the associated values. It has the same options as \refCom{SetDocumentCounter}. If the given counter is no driver counter, nothing is done. 
 
 \begin{docCommandArgs}{SyncCounters}%
 
@@ -1732,7 +1820,7 @@
   \item Enrico Gregorio
   \item Joseph Wright
   \item David Carlisle
-  \item Werner 
+  \item Werner Grundlingh
   \item Gonzalo Medina
   \item Cosmo Huber (for providing the bug report with the \CHDocPackage{calc} package.)
 \end{itemize}
@@ -1750,21 +1838,34 @@
 \section{Version history}
 
 \begin{itemize}
+
 \item 
-Version 0.7
-
+Version 0.8
 \begin{itemize}[label={$\checkmark$}]
-\item Fixed a small bug in the \CHDocPackage{\PackageDocName} version of \cs{stepcounter}
-\item Added some macros that support the output of binary, octal or hexadecimal (both lower/uppercase) values of counters.  \tcbdocmarginnote{\tcbdocnew{\versionzerosevendate}}
-  \item Added the \cs{Loop...Counters} macros that performs an action in loop on all given counter names. \tcbdocmarginnote{\tcbdocnew{\versionzerosixdate}}
-\end{itemize}
-
+\item Fixed the \refCom{SuspendCounters} and \refCom{ResumeSuspendedCounters} macros -- the comma separated list of counters was not used (contrary to the purpose and the documentation description). \tcbdocmarginnote{\tcbdocupdated{\chdocextractversion{xassoccntversion0.8}}}
+  \item Additions of commands\tcbdocmarginnote{\tcbdocnew{\chdocextractversion{xassoccntversion0.8}}}
+    \begin{itemize}[label={$\triangleright$}]
+    \item \refCom{ResumeAllSuspendedCounters}
+    \item  \refCom{CascadeSuspendCounters}
+    \item  \refCom{DisplayResetList}
+    \item  \refCom{ShowResetList}
+    \end{itemize}
+  \end{itemize}
 \item 
-Version 0.6
-
-\begin{itemize}[label={$\checkmark$}]
-  \item The coupled counters allow to specify a counter group to which all relevant counters belong, this allows several coupled counter groups then  \tcbdocmarginnote{\tcbdocnew{\versionzerosixdate}}
-  \item Fixed a small bug within backup counter support -- the resetting was not done any more \tcbdocmarginnote{\tcbdocnew{\versionzerosixdate}}
+  Version 0.7
+    
+  \begin{itemize}[label={$\checkmark$}]
+  \item Fixed a small bug in the \CHDocPackage{\PackageDocName} version of \cs{stepcounter}
+    \item Added some macros that support the output of binary, octal or hexadecimal (both lower/uppercase) values of counters.  \tcbdocmarginnote{\tcbdocnew{\versionzerosevendate}}
+    \item Added the \cs{Loop...Counters} macros that performs an action in loop on all given counter names. \tcbdocmarginnote{\tcbdocnew{\versionzerosevendate}}
+    \end{itemize}
+    
+  \item 
+    Version 0.6
+    
+    \begin{itemize}[label={$\checkmark$}]
+    \item The coupled counters allow to specify a counter group to which all relevant counters belong, this allows several coupled counter groups then  \tcbdocmarginnote{\tcbdocnew{\versionzerosixdate}}
+    \item Fixed a small bug within backup counter support -- the resetting was not done any more \tcbdocmarginnote{\tcbdocnew{\versionzerosixdate}}
   \item Added the \CHDocKey{nonumberofruns}\ package option.
 \end{itemize}
 \item

Modified: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.tex	2016-06-11 23:06:28 UTC (rev 41370)
+++ trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_driver.tex	2016-06-11 23:06:44 UTC (rev 41371)
@@ -1,5 +1,5 @@
-%% LaTeX package xassoccnt - version 0.7 (2016/05/10 -- 00/41/54)
-%% Driver   file for xassoccnt.sty
+%% LaTeX package xassoccnt - version 0.8 (2016/06/10 -- 23/28/27)
+%% Driver file for xassoccnt.sty
 %%
 %%
 %% -------------------------------------------------------------------------------------------

Modified: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.tex	2016-06-11 23:06:28 UTC (rev 41370)
+++ trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_example.tex	2016-06-11 23:06:44 UTC (rev 41371)
@@ -1,5 +1,5 @@
-%% LaTeX package xassoccnt - version 0.7 (2016/05/10 -- 00/41/54)
-%% Example   file for xassoccnt.sty
+%% LaTeX package xassoccnt - version 0.8 (2016/06/10 -- 23/28/27)
+%% Example file for xassoccnt.sty
 %%
 %%
 %% -------------------------------------------------------------------------------------------
@@ -141,7 +141,7 @@
 \QuickSections{10}{subsection}%
 
 % Resume all counters
-\ResumeSuspendedCounters
+\ResumeAllSuspendedCounters
 \QuickSections{20}{subsection}%
 
 

Added: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf	2016-06-11 23:06:28 UTC (rev 41370)
+++ trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf	2016-06-11 23:06:44 UTC (rev 41371)

Property changes on: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.tex	2016-06-11 23:06:44 UTC (rev 41371)
@@ -0,0 +1,94 @@
+%% LaTeX package xassoccnt - version 0.8 (2016/06/10 -- 23/28/27)
+%% Example file for suspended counters file for xassoccnt.sty
+%%
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2016 by Dr. Christian Hupfer <christian dot hupfer at yahoo dot de>
+%% -------------------------------------------------------------------------------------------
+%%
+%% 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{xassoccnt}
+\usepackage{blindtext}
+
+
+\setcounter{secnumdepth}{4}
+\begin{document}
+\tableofcontents
+\listoffigures
+\listoftables
+
+
+\CascadeSuspendCounters{chapter}
+\chapter{The first chapter}
+\section{Foo}
+
+
+\begin{figure}
+
+\caption{A foo figure}
+\end{figure}
+
+\begin{table}
+\caption{A foo table}
+\end{table}
+
+
+
+\subsection{My First subsection}
+\blindtext
+\section{Foobar}
+\subsection{Foobar subsection}
+\blindtext
+\subsubsection{Foobar Again}
+\blindtext
+
+
+\ResumeAllSuspendedCounters
+
+\chapter{Another chapter}
+
+
+\begin{figure}
+\caption{Another figure}
+\end{figure}
+
+
+
+\SuspendCounters{chapter,section}
+
+\chapter{Yet another chapter}
+
+\section{Foo section in yet another chapter}
+
+\begin{figure}
+\caption{Another figure}
+\end{figure}
+
+
+
+\end{document}
+
+
+\subsubsection{Foobar Again}
+\blindtext
+
+\subsection{Foobar subsection}
+\blindtext
+
+\subsubsection{Foobar Again}
+\blindtext
+


Property changes on: trunk/Master/texmf-dist/doc/latex/xassoccnt/xassoccnt_suspendedcounters_example.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/xassoccnt/xassoccnt.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xassoccnt/xassoccnt.sty	2016-06-11 23:06:28 UTC (rev 41370)
+++ trunk/Master/texmf-dist/tex/latex/xassoccnt/xassoccnt.sty	2016-06-11 23:06:44 UTC (rev 41371)
@@ -1,4 +1,4 @@
-%% LaTeX package xassoccnt - version 0.7 (2016/05/10 -- 00/41/54)
+%% LaTeX package xassoccnt - version 0.8 (2016/06/10 -- 23/28/27)
 %% Source file for xassoccnt.sty
 %%
 %%
@@ -19,10 +19,10 @@
 %%
 %%
 
-\def\xassoccntpackageversion{0.7}
-\NeedsTeXFormat{LaTeX2e}
+\def\xassoccntpackageversion{0.8}
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
 
-\ProvidesPackage{xassoccnt}[2016/05/10 - v\xassoccntpackageversion]
+\ProvidesPackage{xassoccnt}[2016/06/10 - v\xassoccntpackageversion]
 
 \RequirePackage{xcolor}
 \RequirePackage{xparse}
@@ -52,6 +52,8 @@
 \bool_new:N \l__xassoccnt_autodefine_allcounters
 \bool_new:N \l__xassoccnt_autodefine_associatedcounter
 
+\bool_new:N \l__xassoccnt_cascade_suspension_bool
+
 \bool_new:N \l__xassoccnt_countertype_general
 \bool_new:N \l__xassoccnt_countertype_driver
 \bool_new:N \l__xassoccnt_countertype_associated
@@ -127,6 +129,7 @@
                          \clist_set:Nn \l__xassoccnt_onlycounters_clist {#1} },
 
   exclude       .clist_set:N=\l__xassoccnt_exclude_clist,                    
+  cascade       .bool_set:N={\l__xassoccnt_cascade_suspension_bool},
 
 %% For later purposes
   countertype .choice:,
@@ -251,6 +254,10 @@
   \endgroup
 }
 
+\cs_new:Nn \xassoccnt_report_resetlist:n {%
+  \__xassoccnt_getresetlist:n {#1} 
+  \seq_show:N \l__xassoccnt_counterreset_seq%
+}
 
 
 \cs_set_eq:NN \xassoccnt_standardstepcounter    \stepcounter
@@ -277,6 +284,7 @@
 }{}
 
 \AtEndOfPackage{
+  \PackageInfo{xassoccnt}{2016/06/10 - v\xassoccntpackageversion -- stepping counters simultaneously and other features}
   \@ifpackageloaded{calc}{%
     \msg_warning:nnn{xassoccnt}{incompatiblepackagenonfatal}{calc}% Warning
     \bool_set_true:N \l__xassoccnt_calcpackage_loaded
@@ -334,6 +342,7 @@
 \cs_new_nopar:Nn \__xassoccnt_container_removeduplicates:n { \seq_gremove_duplicates:c{\__xassoccnt_generate_countercontainername:n{#1}}}
 \cs_new_nopar:Nn \__xassoccnt_container_removecounter:nn   { \seq_gremove_all:cn{\__xassoccnt_generate_countercontainername:n{#1}}{#2} }
 \cs_new_nopar:Nn \__xassoccnt_container_putright:nn        { \seq_put_right:cn{\__xassoccnt_generate_countercontainername:n{#1}}{#2} } 
+\cs_new_nopar:Nn \__xassoccnt_container_gputright:nn        { \seq_gput_right:cn{\__xassoccnt_generate_countercontainername:n{#1}}{#2} } 
 \cs_new_nopar:Nn \__xassoccnt_container_removeassociated:nn   { \seq_gremove_all:cn{\__xassoccnt_drivercontainer:n{#1}}{#2}}
 \cs_new_nopar:Nn \__xassoccnt_container_gclear:n {\seq_gclear:N #1 }
 \cs_new_nopar:Nn \__xassoccnt_container_clear:n {\seq_clear:N #1 }
@@ -540,9 +549,9 @@
   }
 }
 
-\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnTF { cnTF }
-\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnT { cnT } 
-\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnF { cnF }
+\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnTF { nxTF, cnTF,cxTF }
+\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnT { nxT,cnT,cxT } 
+\cs_generate_variant:Nn \__xassoccnt_container_if_in:NnF { nxF,cnF,cxF }
 
 \prg_new_conditional:Nnn \xassoccnt_is_associatedcounter:n {T,F,TF} 
 {
@@ -555,7 +564,7 @@
 
 \prg_new_conditional:Nnn \xassoccnt_is_suspendedcounter:n  {TF,T,F}
 {%
-  \__xassoccnt_container_if_in:cnTF{\__xassoccnt_generate_countercontainername:n{\c_xassoccnt_suspendedname_str}}{#1}{%
+  \__xassoccnt_container_if_in:cxTF{\__xassoccnt_generate_countercontainername:n{\c_xassoccnt_suspendedname_str}}{#1}{%
     \prg_return_true:
   }{%
     \prg_return_false:
@@ -602,15 +611,66 @@
 
 \NewDocumentCommand{\SuspendCounters}{O{}m}{%
   \keys_set:nn { xassoccnt }{#1}%
-  \__xassoccnt_container_putright:nn{\c_xassoccnt_suspendedname_str}{#2}
+  \clist_set:Nx \l_tmpa_clist {#2}%
+  \clist_map_inline:Nn \l_tmpa_clist {
+    \__xassoccnt_container_gputright:nn{\c_xassoccnt_suspendedname_str}{##1}
+  }
+  % Code for removal of duplicates
+  \__xassoccnt_container_removeduplicates:n{\c_xassoccnt_suspendedname_str}
 }
 
+\cs_new_protected:Nn \xassoccnt_cascade_suspendcounters:nn {%
+  \keys_set:nn { xassoccnt }{#1}%
+  \clist_set:Nx \l_tmpa_clist {#2}%
+  % Loop through the several counters!
+  \clist_map_inline:Nn \l_tmpa_clist {%
+    % Cascading requires knowledge of the counter reset list, so get this!
+    \xassoccnt_countersinresetlist:n {##1} 
+    \int_compare:nNnT {\l_xassoccnt_resetlist_counter} > {0} {%
+      \__xassoccnt_getresetlist:n {##1}%
+      \seq_map_inline:Nn \l__xassoccnt_counterreset_seq {% 
+        \__xassoccnt_container_gputright:nn{\c_xassoccnt_suspendedname_str}{####1}
+        % Recursively suspend all other counters that are on the reset list of #2 and hunt down their reset lists as well.
+        \xassoccnt_cascade_suspendcounters:nn{#1}{####1}%
+      }%
+    }% End \int_compare:
+    % Now add ##1
+    \__xassoccnt_container_gputright:nn{\c_xassoccnt_suspendedname_str}{##1}
+  }% End \clist_map_inline:
+  % Remove duplicates
+  \__xassoccnt_container_removeduplicates:n{\c_xassoccnt_suspendedname_str}
+  \bool_set_false:N \l__xassoccnt_cascade_suspension_bool
+}
 
+
+
+\NewDocumentCommand{\CascadeSuspendCounters}{O{}m}{%
+  \xassoccnt_cascade_suspendcounters:nn {#1}{#2}%
+}
+
+\NewDocumentCommand{\ShowSuspendedCounters}{}{%
+  \seq_use:cn { \__xassoccnt_generate_countercontainername:n{\c_xassoccnt_suspendedname_str}} {\par}
+}
+
 \NewDocumentCommand{\ResumeSuspendedCounters}{O{}m}{%
-  \__xassoccnt_container_removecounter:nn{\c_xassoccnt_suspendedname_str}{#2}%
+  \clist_set:Nx \l_tmpa_clist {#2}%
+  \clist_map_inline:Nn \l_tmpa_clist {
+    \__xassoccnt_container_removecounter:nn{\c_xassoccnt_suspendedname_str}{##1}%
+  }
 }
 
+\NewDocumentCommand{\ResumeAllSuspendedCounters}{O{}}{%
+  \seq_if_exist:cTF{\__xassoccnt_generate_countercontainername:n{\c_xassoccnt_suspendedname_str}} {%
+    \seq_gclear:c {\__xassoccnt_generate_countercontainername:n{\c_xassoccnt_suspendedname_str}}%
+  }{%	
+    % A warning message later on here!
+    \typeout{Container\space\__xassoccnt_generate_countercontainername:n{\c_xassoccnt_suspendedname_str}\space does\space not\space exist}%
+  }%
+}
 
+
+%%%% Associated counters section
+
 \NewDocumentCommand{\DeclareAssociatedCounters}{omm}{%
   \IfValueTF{#1}{%
     \keys_set:nn {xassoccnt} {#1}
@@ -759,11 +819,10 @@
 \cs_new:Nn \__xassoccnt_step_associatedcounters:n {%
   \seq_if_exist:cT { \__xassoccnt_drivercontainer:n{#1} }
   { \seq_map_inline:cn {\__xassoccnt_drivercontainer:n{#1} } 
-    { 
-%      \typeout{Stepping~the~associated~counter(#1):##1}%
+    {%
       \xassoccnt_addtocounter{##1}{\c_one} 
-    }
-  }
+    }%
+  }%
  % End of \seq_if_exist
 }
 
@@ -1412,12 +1471,16 @@
 }
 
 
+
 \RenewDocumentCommand{\refstepcounter}{m}{%
-  \cs_gset_nopar:Nn \__xassoccnt_lastrefsteppedcounter: {#1}
-  \xassoccnt_standardrefstepcounter{#1}%
-  \int_gset:Nn \g__xassoccnt_lastcountervalue_int {\number\value{#1}}%
+  \seq_if_in:NxF \g_xassoccnt_suspendedcnt_seq {#1} {%
+    \cs_gset_nopar:Nn \__xassoccnt_lastrefsteppedcounter: {#1}
+    \xassoccnt_standardrefstepcounter{#1}%
+    \int_gset:Nn \g__xassoccnt_lastcountervalue_int {\number\value{#1}}%
+  }
 }
 
+
 %%%% Now some expandable wrapper macros for information on the last counter changed
 
 \newcommand{\LastSteppedCounter}{%
@@ -1596,7 +1659,6 @@
 %  \seq_use:Nn \g__xassoccnt_totalcounter_container {\par}%
   \tl_set:Nx \l_tmpa_tl {\__xassoccnt_expand_totalcountername:n{#1}}
   \tl_set:Nx \l_tmpb_tl {#1}%
-  \typeout{Foo}
   \seq_if_in:NnTF \g__xassoccnt_supertotalcounter_container {\l_tmpb_tl }{%
     \tl_set:Nx \l_tmpa_tl {\__xassoccnt_expand_totalcountername:n{#1}}
   }{%
@@ -1607,11 +1669,6 @@
   \number\value{\tl_use:N \l_tmpa_tl}%
 }
 
-\newcommand{\TotalValueOld}[1]{%
-  %\tl_set:Nx \l_tmpa_tl {\__xassoccnt_expand_totalcountername:n{#1}}
-  %\tl_set:Nx \l_tmpb_tl {#1}%
-  \number\value{\__xassoccnt_expand_totalcountername:n{#1}}%
-}
 
 
 \cs_new:Nn \__xassoccnt_writetotalcounters:nn {%
@@ -1770,7 +1827,6 @@
       \msg_error:nnn{xassoccnt}{nameisnocounter}{##1}%
     }%
   }%
-%  \seq_use:Nn \l__xassoccnt_countervaluesbackup_seq {\par}
 }
 
 
@@ -1930,8 +1986,19 @@
 
 %%%%%%%%%%%%%%%%%%%%
 
+%% Reporting Macros
 
+\NewDocumentCommand{\ShowResetList}{m}{%
+  \xassoccnt_report_resetlist:n{#1}%
+}
 
+\NewDocumentCommand{\DisplayResetList}{O{,}m}{%
+  \__xassoccnt_getresetlist:n {#2}
+  \seq_use:Nn \l__xassoccnt_counterreset_seq {#1}
+}
+
+
+
 %%%%%%%%%%%%%%%%%%%%
 
 \NewDocumentCommand{\EnableNumberofrunsTF}{mm}{%
@@ -1984,6 +2051,9 @@
 \newcommand{\TotalCounterInfoColor}{violet}
 
 
+
+
+
 \AddFeature[sublists=true]{coupledcounters}  % New style, not fully implemented so far
 
 



More information about the tex-live-commits mailing list