summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/assoccnt/assoccntdoc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/assoccnt/assoccntdoc.tex')
-rw-r--r--Master/texmf-dist/doc/latex/assoccnt/assoccntdoc.tex141
1 files changed, 123 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/assoccnt/assoccntdoc.tex b/Master/texmf-dist/doc/latex/assoccnt/assoccntdoc.tex
index 6688576aaaa..3039d9c46ee 100644
--- a/Master/texmf-dist/doc/latex/assoccnt/assoccntdoc.tex
+++ b/Master/texmf-dist/doc/latex/assoccnt/assoccntdoc.tex
@@ -1,6 +1,32 @@
+%% Documentation for assoccnt.sty
+%%
+%%
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2014 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'.
+%%
+%% This work consists of all files listed in README
+%%
+
+
\documentclass[12pt,paper=a4]{ltxdoc}
\usepackage[lmargin=2cm,rmargin=2cm]{geometry}
+\usepackage{savesym}%
+\usepackage{bbding}%
+\savesymbol{Cross}%
+
\usepackage{blindtext}%
\usepackage{xcolor}
\usepackage{imakeidx}%
@@ -19,15 +45,20 @@
\usepackage{array}%
+
\usepackage{amsmath}%
\usepackage{amsthm}%
\usepackage{totcount}%
-\usepackage[globalsuspend=false]{assoccnt}%
+\usepackage[globalsuspend=true]{assoccnt}%
\usepackage{bookmark}%
+\newcommand{\packagename}[1]{\textcolor{blue}{\textbf{\Envelope~#1}}\index{Paket!#1}}%
+
+
+
\newcommand{\MarkupPackageName}[2][lightgray]{%
\colorbox{#1}{\textcolor{black}{#2}}%
}%
@@ -43,7 +74,7 @@
\newtcolorbox{docCommandArgs}[1]{colbacktitle={blue},coltitle={white},title={Description of arguments of command \cs{#1}}}
-\def\packageversion{0.4}%
+\def\packageversion{0.5a}%
\makeindex
@@ -86,14 +117,14 @@ Version \packageversion \tabularnewline
\today \tabularnewline
\tabularnewline
\addtocounter{footnote}{2}
-Author: Christian Hupfer\(^\mathrm{\fnsymbol{footnote}}\)% }{\makeatletter christian.hupfer@siebenfelsen.de}
+Author: Christian Hupfer\(^\mathrm{\fnsymbol{footnote}}\)% }{\makeatletter christian.hupfer@yahoo.de}
\tabularnewline
\end{tabular}
\end{center}
\end{tcolorbox}
\makeatletter
\renewcommand{\thefootnote}{\fnsymbol{footnote}}%
-\footnotetext{christian.hupfer@siebenfelsen.de}%
+\footnotetext{christian.hupfer@yahoo.de}%
\makeatother
\end{center}
@@ -135,7 +166,7 @@ Please note, that this package does not provide means for simultaneous stepping
\section{Package options}%
-As of version \packageversion~ the package has only one option, regarding the suspending of counters globally, regardless, whether they are drivers or associated counters (more on this facility of the package, see \ref{section::suspendedresumedcounters}.
+As of version \packageversion~ the package has only one option, regarding the suspending of counters globally, regardless, whether they are drivers or associated counters (more on this facility of the package, see \ref{section::suspendedresumedcounters}).
\begin{docKey}{globalsuspend}{=\meta{true/false}}{initially false}
If this key is set to \meta{true}, a a general driver can be set to the suspended list, i.e, it is not updated via \cs{addtocounter}. If unsure, do not use this option or say explicitly
@@ -147,6 +178,21 @@ As of version \packageversion~ the package has only one option, regarding the su
+\section{Requirements and incompatibilities}%
+
+\subsection{Required packages}
+
+\begin{itemize}
+\item \packagename{etoolbox}
+\item \packagename{xkeyval}
+\item \packagename{xcolor}%
+\end{itemize}
+
+\subsection{Incompatibilities}
+
+This package does not work together when the Package \packagename{xifthen} is included. As of version \packageversion~I could not figure out, where the strange behaviour comes in. It's most likely an incompatibility between \packagename{etoolbox} and \packagename{xifthen}
+
+
\section{Documentation of Macros}
\tcbset{color command={blue}}
@@ -182,10 +228,12 @@ This command behaves like the standard macro \cs{setcounter}, but has an additio
\end{docCommand}%
-All macros have the general rule, that the driver counter is specified as 1st argument to the macro.
\subsection{Associated counters commands}
+All macros have the general rule, that the driver counter is specified as 1st argument to the macro.
+
+
\begin{docCommand}{DeclareAssociatedCounters}{\oarg{options}\marg{driver counter}\marg{associated counters list}}
This command is the main macro of the package. It declares the counter names being specified in comma - separated - list (CSV) which should be stepped simultaneously when the driver counter is increased by \cs{stepcounter}.
@@ -319,7 +367,6 @@ The optional argument is not used as of version \packageversion.
Sometimes it might be necessary to get information, whether a counter is regarded as a driver or as an associated counter. This section describes some query macros in order to obtain this information.
-
\begin{docCommand}{IsAssociatedToCounter}{\marg{driver counter}\marg{associated counter}\marg{True branch}\marg{False branch}}
This macro checks, whether a counter is associated to a particular given driver counter and expands the corresponding branch. If the internal driver counter list does not exist, the false branch will be used, since this also means, that the possibly associated counter is not associated at all.
@@ -438,7 +485,6 @@ This commands tests, whether a given counter name is a driver counter and expand
\item \marg{True branch}
This code is expanded if the counter is \textbf{not} a driver, otherwise it is ignored
-
\end{enumerate}
\end{docCommandArgs}
@@ -502,6 +548,64 @@ This command is purposed for statistics only, for package/class authors for exam
\end{docCommand}%
+\subsection{Information on counters}
+
+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:
+
+\begin{docCommand}{LastAddedToCounter}{}
+This command has no arguments and expands to the name of the counter which was used last in \cs{addtocounter}. There is no further typesetting done with the countername.
+
+\begin{dispExample}
+ \newcounter{SomeCounter}
+
+ \addtocounter{SomeCounter}{10}
+
+ The last counter something added to was \PrettyPrintCounterName{\LastAddedToCounter}.
+\end{dispExample}%
+
+\end{docCommand}%
+
+\begin{docCommand}{LastSteppedCounter}{}
+This command has no arguments and expands to the name of the counter which was stepped last using \cs{stepcounter}. There is no further typesetting done with the countername.
+
+\begin{dispExample}
+ \stepcounter{SomeCounter}
+
+ The last counter being stepped was \PrettyPrintCounterName{\LastSteppedCounter}.
+\end{dispExample}%
+
+\end{docCommand}%
+
+\begin{docCommand}{LastRefSteppedCounter}{}
+
+\begin{dispExample}
+ \begin{equation}
+ E = mc^2 \label{eq::einstein}
+ \end{equation}
+ % \stepcounter{SomeCounter}
+
+ The last counter being refstepped was \PrettyPrintCounterName{\LastRefSteppedCounter}.
+\end{dispExample}%
+
+\end{docCommand}%
+
+
+
+
+
+\begin{docCommand}{LastSetCounter}{}
+This command has no arguments and expands to the name of the counter which was set last using \refCom{setcounter}. There is no further typesetting done with the countername.
+
+\begin{dispExample}
+ \setcounter{SomeCounter}{21}%
+
+ The last counter being stepped was \PrettyPrintCounterName{\LastSetCounter}.
+\end{dispExample}%
+
+\end{docCommand}%
+
+Please note, that all of this commands are only working in the current run of compilation, i.e. \underline{after} there has been some operation on the counters. They can't be used for information on the last changed counter in a previous run.
+
\subsection{Minor macros}
For the informational output on counter properties in conjunction with the macro
@@ -569,6 +673,12 @@ Rather than remove an associated counter from the list, it is possible to suspen
\end{enumerate}
\end{docCommandArgs}
+\end{docCommand}%
+
+\begin{docCommand}{ResumeSuspendedCounters}{}
+ This command has no arguments and revokes the suspension of \textbf{all} counters.
+\end{docCommand}
+
Some remarks:
@@ -604,18 +714,10 @@ And resume it: \ResumeSuspendedCounters
E = h \nu
\end{equation}
-There are \number\totvalue{totalequations}~ equations in here!
-
-
+There are \number\totvalue{totalequations}~equations in here!
\end{dispExample}
-\end{docCommand}%
-
-\begin{docCommand}{ResumeSuspendedCounters}{}
- This command has no arguments and revokes the suspension of \textbf{all} counters.
-\end{docCommand}
-
\section{Internals commands}
@@ -708,13 +810,16 @@ This macro generates a list from the driver counter name and the driver counter
\clearpage
-\section{To do list}
+\section{To-Do list}
\begin{itemize}
+\item Better counter definition/copy counter routines \(\longrightarrow\) another package perhaps
\item Check the existence of driver and associated counters
\item Provide a better internal list organization
\item Some macro names might be non-intuitive
\item Improve documentation
+\item Allow for specific counter to be resumed from suspension instead of resuming all
+\item Allow for an associated counter to have multiple masters
\end{itemize}
If you