summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/assoccnt/assoccnt_example.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/assoccnt/assoccnt_example.tex')
-rw-r--r--Master/texmf-dist/doc/latex/assoccnt/assoccnt_example.tex88
1 files changed, 49 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/latex/assoccnt/assoccnt_example.tex b/Master/texmf-dist/doc/latex/assoccnt/assoccnt_example.tex
index af6e1ddd295..8d58612b262 100644
--- a/Master/texmf-dist/doc/latex/assoccnt/assoccnt_example.tex
+++ b/Master/texmf-dist/doc/latex/assoccnt/assoccnt_example.tex
@@ -1,12 +1,27 @@
-\documentclass{book}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%
+% $Date: 2014-08-21 18:12:22 +0200 (Thu, 21 Aug 2014) $
+%
+% $Revision: 55 $
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\documentclass[a4paper,12pt]{book}%
-\usepackage{totcount}%
-\usepackage{assoccnt}%
% Some packages only for output and dummy pages
\usepackage{blindtext}%
\usepackage{forloop}%
-\usepackage{xcolor}%
+\usepackage[svgnames]{xcolor}%
+\usepackage{tcolorbox}
+
+\usepackage{totcount}%
+\usepackage{assoccnt}%
+
+
+
+
\newcounter{loopcounter}%
@@ -16,11 +31,11 @@
& & & \tabularnewline
& \multicolumn{3}{c}{totcount page values} \tabularnewline
Page & \textcolor{red}{#1} & \textcolor{blue}{#2} & \textcolor{gray}{#3} \tabularnewline
-\thepage & \textcolor{red}{\number\totvalue{#1}} & \textcolor{blue}{\number\totvalue{#2}} & \textcolor{gray}{\number\totvalue{#3}} \tabularnewline
+\thepage & \textcolor{red}{\number\totvalue{#1}} & \textcolor{blue}{\number\value{#2}} & \textcolor{gray}{\number\value{#3}} \tabularnewline
& & & \tabularnewline
- & \multicolumn{3}{c}{totcount section values} \tabularnewline
-Section & \textcolor{red}{#4} & \textcolor{blue}{#5} \tabularnewline
-\thesection & \textcolor{red}{\number\totvalue{#4}} & \textcolor{blue}{\number\totvalue{#5}} & \tabularnewline
+% & \multicolumn{3}{c}{totcount section values} \tabularnewline
+%Section & \textcolor{red}{#4} & \textcolor{blue}{#5} \tabularnewline
+%\thesection & \textcolor{red}{\number\totvalue{#4}} & \textcolor{blue}{\number\totvalue{#5}} & \tabularnewline
& & & \tabularnewline
\end{tabular}
\end{center}%
@@ -37,61 +52,56 @@ Section & \textcolor{red}{#4} & \textcolor{blue}{#5} \tabularnewline
}%
}%
+\newcounter{totalpages}
+\newtotcounter{totalsections}%
+\newcounter{anotherpagescounter}%
-
-\begin{document}
\regtotcounter{page} % Register a total value counter --> this will be the driver counter
-\newtotcounter{totalpages}% 1st driven counter
-\newtotcounter{anotherpagescounter}% 2nd driven counter
\newtotcounter{yetanotherpagescounter}% 3rd driven counter
-\regtotcounter{section}%
-\newtotcounter{totalsections}
+\DeclareAssociatedCounters{page}{totalpages,anotherpagescounter,totalpages}% Register the driver and the driven counters
+\DeclareAssociatedCounters{totalpages}{anotherpagescounter}% Register the driver and the driven counters
+\DeclareAssociatedCounters{section}{totalsections}%
+
-\DeclareAssociatedCounters{page}{totalpages,anotherpagescounter}% Register the driver and the driven counters
-\DeclareAssociatedCounters{section}{section,totalsections}% Register the driver and the driven counters for sections%
-\DeclareAssociatedCounters{page}{yetanotherpagescounter}% Register the driver and the driven counters
+
+\begin{document}
+\tableofcontents%
+\chapter{Chapter one}
-\pagenumbering{Roman}%
+\section{First}
-\chapter{The first chapter}%
+\QuickOutput{10}
-\section{My first section}%
-% Generate dummy output
-\QuickOutput{10}%
+\section{Query routines}%
+\IsAssociatedCounter{totalsections}{Yes, it's associated}{Nope, it's not associated}
-\section{My second section}%
+\IsAssociatedCounter{anotherpagescounter}{Yes, it's associated}{Nope, it's not associated}
-\QuickOutput{10}%
-\pagenumbering{arabic}% -> pagenumber reset to zero
+\AssociationStatistics%
-\appendix
+\IsDriverCounter{section}{Yes, it's a driver counter}{No, it does not have this feature}%
-\chapter{First Appendix chapter}%
+\ClearAssociatedCountersList{section}
-\section{My (only) appendix section}%
+\IsDriverCounter{section}{Yes, it's a driver counter}{No, it does not have this feature}%
-% Generate dummy output, again ;-)
-\QuickOutput{10}%
+\AssociationStatistics%
-% Clear the list of counters associated to page
-\ClearAssociatedCountersList{page}%
+Clearing the counters:
-% Not necessary, only for removing some counters from list
-\RemoveAssociatedCounters{page}{totalpages,anotherpagescounter}%
-% Readd the counter totalpages to the list --> in this context,
-% It acts, as if it has not been removed at all
-\DeclareAssociatedCounters{page}{totalpages}
+\ClearDriverCountersList
-\QuickOutput{20}%
+Show Statistics%
+\AssociationStatistics%
+\end{document}
-\end{document} \ No newline at end of file