summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/totalcount
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-08-30 21:11:23 +0000
committerKarl Berry <karl@freefriends.org>2020-08-30 21:11:23 +0000
commit9fbec9a9d124a7b55050150eb52e1e3239597579 (patch)
tree3a53411c290334a022b1d724d9b970235b9aacc6 /Master/texmf-dist/tex/latex/totalcount
parent4e8113d580e4cfb631552c3d78ab6aa413f1f422 (diff)
totalcount (30aug20)
git-svn-id: svn://tug.org/texlive/trunk@56214 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/totalcount')
-rw-r--r--Master/texmf-dist/tex/latex/totalcount/totalcount.sty92
1 files changed, 92 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/totalcount/totalcount.sty b/Master/texmf-dist/tex/latex/totalcount/totalcount.sty
new file mode 100644
index 00000000000..a3df7950532
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/totalcount/totalcount.sty
@@ -0,0 +1,92 @@
+%%
+%% This is file `totalcount.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% totalcount.dtx (with options: `package')
+%%
+%% Copyright (C) 2010-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+%%
+%% https://gitlab.com/axelsommerfeldt/totalcount
+%%
+%% --------------------------------------------------------------------------
+%%
+%% 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 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "maintained".
+%%
+%% This Current Maintainer of this work is Axel Sommerfeldt.
+%%
+%% This work consists of the files totalcount.ins, totalcount.dtx,
+%% and the derived file totalcount.sty.
+%%
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]
+\ProvidesPackage{totalcount}[2018/01/21 v1.0a Total values of counters (AR)]
+\newcommand*\DeclareTotalCounter[1]{%
+ \newcounter{totalcount@#1}%
+ \@namedef{total#1s}{\nfss@text{\reset@font\bfseries ??}}%
+ \@namedef{total#1es}{\@nameuse{total#1s}}%
+ \expandafter\newif\csname iftotal#1s\endcsname
+ \@namedef{iftotal#1es}{\@nameuse{iftotal#1s}}%
+ \AtBeginDocument{\@ifundefined{c@#1}%
+ {\PackageError{totalcount}{Undefined counter `#1'}\@ehc}%
+ {\@cons\totalcount@counters{{#1}}}}}
+\@onlypreamble\DeclareTotalCounter
+\let\totalcount@counters\@empty
+\newcommand*\totalcount@xspace{}
+\DeclareOption{xspace}{\renewcommand*\totalcount@xspace{\xspace}}
+\DeclareOption*{\expandafter\DeclareTotalCounter\expandafter{\CurrentOption}}
+\ProcessOptions\relax
+\ifx\totalcount@xspace\@empty\else
+ \RequirePackage{xspace}
+\fi
+\newcommand*\totalcount@addtocounter[1]{%
+ \@ifundefined{c@totalcount@#1}{}{%
+ \addtocounter{totalcount@#1}{\value{#1}}}}
+\let\totalcount@stpelt@ORI\@stpelt
+\renewcommand*\@stpelt[1]{%
+ \totalcount@addtocounter{#1}%
+ \totalcount@stpelt@ORI{#1}}
+\newcommand*\totalcount@set[2]{%
+ \@ifundefined{c@totalcount@#1}%
+ {}%
+ {\global\@namedef{total#1s}{#2\totalcount@xspace}%
+ \ifnum#2<1\relax \else
+ \global\@nameuse{total#1strue}%
+ \fi}}
+\AtBeginDocument{\AtEndDocument{%
+ \begingroup
+ \@tempswafalse
+ \if@filesw
+ \immediate\write\@mainaux{%
+ \string\providecommand\string\totalcount@set[2]{}}%
+ \fi
+ \def\@elt#1{%
+ \totalcount@addtocounter{#1}%
+ \edef\totalcount@tempa{\the\value{totalcount@#1}}%
+ \expandafter\let\expandafter\totalcount@tempb\csname total#1s\endcsname
+ \@expandtwoargs\totalcount@set{#1}{\totalcount@tempa}%
+ \expandafter\ifx\csname total#1s\endcsname\totalcount@tempb \else
+ \@tempswatrue
+ \fi
+ \if@filesw
+ \immediate\write\@mainaux{%
+ \string\totalcount@set{#1}{\totalcount@tempa}}%
+ \fi}%
+ \totalcount@counters
+ \if@tempswa
+ \PackageWarningNoLine{totalcount}{%
+ Total counter(s) have changed.\MessageBreak
+ Rerun to get them right}%
+ \fi
+ \endgroup}}%
+\endinput
+%%
+%% End of file `totalcount.sty'.