From 9fbec9a9d124a7b55050150eb52e1e3239597579 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 30 Aug 2020 21:11:23 +0000 Subject: totalcount (30aug20) git-svn-id: svn://tug.org/texlive/trunk@56214 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/totalcount/CHANGELOG | 10 + Master/texmf-dist/doc/latex/totalcount/README | 36 ++ Master/texmf-dist/doc/latex/totalcount/SUMMARY | 1 + .../texmf-dist/doc/latex/totalcount/totalcount.pdf | Bin 0 -> 82731 bytes .../source/latex/totalcount/totalcount.dtx | 384 +++++++++++++++++++++ .../source/latex/totalcount/totalcount.ins | 42 +++ .../texmf-dist/tex/latex/totalcount/totalcount.sty | 92 +++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 + Master/tlpkg/tlpsrc/totalcount.tlpsrc | 0 10 files changed, 567 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/totalcount/CHANGELOG create mode 100644 Master/texmf-dist/doc/latex/totalcount/README create mode 100644 Master/texmf-dist/doc/latex/totalcount/SUMMARY create mode 100644 Master/texmf-dist/doc/latex/totalcount/totalcount.pdf create mode 100644 Master/texmf-dist/source/latex/totalcount/totalcount.dtx create mode 100644 Master/texmf-dist/source/latex/totalcount/totalcount.ins create mode 100644 Master/texmf-dist/tex/latex/totalcount/totalcount.sty create mode 100644 Master/tlpkg/tlpsrc/totalcount.tlpsrc (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/totalcount/CHANGELOG b/Master/texmf-dist/doc/latex/totalcount/CHANGELOG new file mode 100644 index 00000000000..934daeb2605 --- /dev/null +++ b/Master/texmf-dist/doc/latex/totalcount/CHANGELOG @@ -0,0 +1,10 @@ +Changes made in the totalcount package +====================================== + +Please note that this document does not reflect bugfix-releases, and that the dates given are the dates of the release w/o bugfixes. + +If you are interested in a complete changelog -- including bugfixes -- process the dtx files with \RecordChanges and \PrintChanges. + +v1.0 (2008/03/09) +- 1st published version + diff --git a/Master/texmf-dist/doc/latex/totalcount/README b/Master/texmf-dist/doc/latex/totalcount/README new file mode 100644 index 00000000000..8833eeb8d5c --- /dev/null +++ b/Master/texmf-dist/doc/latex/totalcount/README @@ -0,0 +1,36 @@ +========================================================================== + +The `totalcount' package +Copyright (C) 2010-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) + +License: LPPL = LaTeX Project Public Licence +Maintenance Status: maintained (by Axel Sommerfeldt) + +Home page: + https://gitlab.com/axelsommerfeldt/totalcount + +If you need help for installation please visit: + https://texfaq.org/FAQ-inst-miktexstar + https://texfaq.org/FAQ-installthings + https://texfaq.org/FAQ-privinst + +If you need help using this package please visit: + https://latex.org/forum/ + https://tex.stackexchange.com/ + https://golatex.de/ (German) + https://texwelt.de/ (German) + +If you think you may have found a bug in this package, +or want to report a suggestion for improvement, please either visit + https://gitlab.com/axelsommerfeldt/totalcount/issues (preferred) +or send an e-mail to + axel.sommerfeldt@f-m.fm + +-------------------------------------------------------------------------- + +The `totalcount' package v1.0 offers commands for typesetting total values of counters. + +User Manual: totalcount.pdf (English) + +========================================================================== + diff --git a/Master/texmf-dist/doc/latex/totalcount/SUMMARY b/Master/texmf-dist/doc/latex/totalcount/SUMMARY new file mode 100644 index 00000000000..543fd186a67 --- /dev/null +++ b/Master/texmf-dist/doc/latex/totalcount/SUMMARY @@ -0,0 +1 @@ +This LaTeX package offers commands for typesetting total values of counters. diff --git a/Master/texmf-dist/doc/latex/totalcount/totalcount.pdf b/Master/texmf-dist/doc/latex/totalcount/totalcount.pdf new file mode 100644 index 00000000000..9eb12213085 Binary files /dev/null and b/Master/texmf-dist/doc/latex/totalcount/totalcount.pdf differ diff --git a/Master/texmf-dist/source/latex/totalcount/totalcount.dtx b/Master/texmf-dist/source/latex/totalcount/totalcount.dtx new file mode 100644 index 00000000000..291484587f7 --- /dev/null +++ b/Master/texmf-dist/source/latex/totalcount/totalcount.dtx @@ -0,0 +1,384 @@ +% \iffalse meta-comment +% +% This is file `totalcount.dtx'. +% +% Copyright (C) 2010-2018 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm) +% +% -------------------------------------------------------------------------- +% +% 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. +% +% \fi +% \CheckSum{126} +% +% \iffalse +%<*driver> +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesFile{totalcount.drv}[2013/05/12 v1.0 Total values of counters] +\hbadness=9999 \newcount\hbadness \hfuzz=74pt % Make TeX shut up. +%\errorcontextlines=3 +% +\documentclass{ltxdoc} +\setlength\parindent{0pt} +\setlength\parskip{\smallskipamount} +% +\usepackage{ifpdf} +\ifpdf + \usepackage{mathptmx,courier} + \usepackage[scaled=0.90]{helvet} +% \addtolength\marginparwidth{15pt} +\fi +% +\usepackage[bottom]{footmisc} +\usepackage{hypdoc} +\ifpdf\usepackage{hypdestopt}\fi +\hypersetup{pdfkeywords={LaTeX, package, totalcount},pdfstartpage={},pdfstartview={}} +% +\usepackage{totalcount}[2008/02/16] +% +\newcommand*\purerm[1]{{\upshape\mdseries\rmfamily #1}} +\newcommand*\puresf[1]{{\upshape\mdseries\sffamily #1}} +\newcommand*\purett[1]{{\upshape\mdseries\ttfamily #1}} +\let\package\puresf +\let\env\purett \let\opt\purett +% +\newcommand*\csmarg[1]{\texttt{\char`\{#1\char`\}}} +\newcommand*\csoarg[1]{\texttt{\char`\[#1\char`\]}} +\newcommand*\version[2][]{$v#2$} +% +\usepackage{marvosym} +\makeatletter +\newcommand*\INFO{\@ifstar{\@INFO{}}{\@INFO{\vbox to \ht\strutbox}}} +\newcommand*\@INFO[1]{\MARGINSYM{#1{\LARGE\Info}}} +\makeatother +% +\begin{document} + \DocInput{totalcount.dtx} +\end{document} +% +% \fi +% +% \def\thispackage{the \package{totalcount} package} +% \def\Thispackage{The \package{totalcount} package} +% +% \GetFileInfo{totalcount.drv} +% \let\docdate\filedate +% \let\docversion\fileversion +% \GetFileInfo{totalcount.sty} +% +% \title{\texorpdfstring{\Thispackage\thanks{%^^A +% This package has version number \docversion.}}%^^A +% {The totalcount package}} +% \author{Axel Sommerfeldt\\ +% \url{https://gitlab.com/axelsommerfeldt/totalcount}} +% \date{\docdate} +% \maketitle +% +% \begin{abstract} +% This package offers commands for typesetting total values of counters. +% \end{abstract} +% +% \iffalse\clearpage\fi +% \setcounter{tocdepth}{2} +% \tableofcontents +% +% \iffalse\clearpage\fi +% \pagebreak[3] +% \section{Loading the package} +% +% Load this package using +% \begin{quote} +% |\usepackage|\oarg{options}|{totalcount}|\quad, +% \end{quote} +% where \meta{options} is a list of names of \LaTeX\ counters, e.g.: +% \begin{quote} +% |\usepackage[figure,table]{totalcount}|\quad. +% \end{quote} +% \pagebreak[3] +% This way the commands |\total|\-|figures| and |\total|\-|tables| will be defined which +% are typesetting the total number of figures resp.~tables, e.g.: +% \begin{quote} +% |This document contains \totalfigures\ figures.| +% \end{quote} +% \pagebreak[3] +% Furthermore the commands |\if|\-|total|\-|figures| and |\if|\-|total|\-|tables| are offered +% for typesetting text only if the document contains figures resp.~tables at all, e.g.: +% \begin{quote} +% |\iftotalfigures|\\ +% | \listoffigures|\\ +% |\fi| +% \end{quote} +% \pagebreak[3] +% This should work with other counters as well (for example |equation|, +% or |lst|\-|listing| offered by the \package{listings} package~\cite{listings}), +% but please note that using the |page| counter here is not supported. +% +% \pagebreak[3] +% \section{\cs{DeclareTotalCounter}} +% \begin{quote} +% |\DeclareTotalCounter|\marg{counter} +% \end{quote} +% actually defines the commands |\total|\meta{counter}|s| and |\if|\-|total|\meta{counter}|s|. +% +% \pagebreak[3] +% So in fact +% \begin{quote} +% |\usepackage[figure,table]{totalcount}| +% \end{quote} +% is identical to +% \begin{quote} +% |\usepackage{totalcount}|\\ +% |\DeclareTotalCounter{figure}|\\ +% |\DeclareTotalCounter{table}| +% \end{quote} +% +% \pagebreak[3] +% \section{Spacing} +% The space after all \LaTeX\ commands without (optional or mandatory) arguments +% like |\total|\-|figures| will not be typeset, +% so these commands needs to be finished with an additional backslash or an empty +% pair of curly braces right before the space character, +% or to be finished with a tilde (swung dash), +% so \TeX\ will be prevented from omitting the following space character. +% +% \pagebreak[3] +% This could be avoided by defining new commands with the help of +% the \package{xspace} package~\cite{xspace}. +% When using \thispackage\ with the package option |xspace| this will be actually done, +% so after +% \begin{quote} +% |\usepackage[figure,table,xspace]{totalcount}| +% \end{quote} +% code like +% \begin{quote} +% |This document contains \totalfigures figures.| +% \end{quote} +% will give correct results without a missing space between the total number of figures +% and the word ``figures''. +% +% \pagebreak[3] +% \section{Thanks} +% I would like to thank Herbert Vo\ss\ since the implementation of this package is +% based on an idea from him which could be found at +% \url{http://texnik.dante.de/cgi-bin/mainFAQ.cgi?file=counter/counter#number}. +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \StopEventually{%^^A +% \begin{thebibliography}{9} +% \bibitem{listings} +% Carsten Heinz \& Brooks Moses:\\ +% \href{http://www.ctan.org/pkg/listings}% +% {\emph{The Listings Package}},\\ +% 2007/02/22 +% \bibitem{xspace} +% David Carlisle and Morten H\o gholm:\\ +% \href{http://www.ctan.org/pkg/xspace}% +% {\emph{The xspace package}}, +% 2009/10/20 +% \end{thebibliography} +% } +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \DoNotIndex{\\,\_,\ ,\@@par} +% \DoNotIndex{\@bsphack} +% \DoNotIndex{\@car,\@cdr,\@classoptionslist,\@cons,\@currext,\@currname} +% \DoNotIndex{\@ehc,\@ehd,\@empty,\@esphack,\@expandtwoargs} +% \DoNotIndex{\@for,\@firstofone,\@firstoftwo} +% \DoNotIndex{\@gobble,\@gobblefour,\@gobbletwo,\@hangfrom} +% \DoNotIndex{\@ifnextchar,\@ifpackagelater,\@ifpackageloaded} +% \DoNotIndex{\@ifstar,\@ifundefined,\@latex@error,\@namedef,\@nameuse} +% \DoNotIndex{\@onlypreamble,\@parboxrestore,\@plus,\@ptionlist} +% \DoNotIndex{\@removeelement,\@restorepar,\@secondoftwo,\@setpar} +% \DoNotIndex{\@tempa,\@tempboxa,\@tempdima,\@tempdimb,\@tempdimc,\@tempb,\@tempc} +% \DoNotIndex{\@testopt} +% \DoNotIndex{\@undefined,\@unprocessedoptions,\@unusedoptionlist} +% \DoNotIndex{\p@,\z@} +% \DoNotIndex{\active,\addtocounter,\addtolength,\advance,\aftergroup} +% \DoNotIndex{\baselineskip,\begin,\begingroup,\bfseries,\box} +% \DoNotIndex{\catcode,\centering,\changes,\csname,\def,\divide,\do,\downarrow} +% \DoNotIndex{\edef,\else,\empty,\end,\endcsname,\endgraf,\endgroup,\expandafter} +% \DoNotIndex{\fi,\footnotesize,\global} +% \DoNotIndex{\hangindent,\hbox,\hfil,\hsize,\hskip,\hspace,\hss} +% \DoNotIndex{\ifcase,\ifdim,\ifnum,\ifodd,\ifvoid,\ifvmode} +% \DoNotIndex{\ifx,\ignorespaces,\itshape} +% \DoNotIndex{\Large,\large,\leavevmode,\leftmargini,\leftskip,\let,\linewidth} +% \DoNotIndex{\llap,\long,\m@ne,\margin,\mdseries,\message} +% \DoNotIndex{\newcommand,\newdimen,\newlength,\newline,\newif,\newsavebox} +% \DoNotIndex{\next,\nobreak,\nobreakspace,\noexpand,\noindent,\numberline} +% \DoNotIndex{\normalcolor,\normalfont,\normalsize,\or,\par,\parbox,\parfillskip} +% \DoNotIndex{\parindent,\parskip,\prevdepth,\protect,\protected@edef,\protected@write} +% \DoNotIndex{\providecommand,\quad} +% \DoNotIndex{\raggedleft,\raggedright,\relax,\renewcommand,\RequirePackage} +% \DoNotIndex{\rightskip,\rmfamily} +% \DoNotIndex{\sbox,\scriptsize,\scshape,\setbox,\setlength,\sffamily,\slshape} +% \DoNotIndex{\small,\string,\space,\strut} +% \DoNotIndex{\textheight,\the,\toks@,\typeout,\ttfamily} +% \DoNotIndex{\unvbox,\uparrow,\upshape,\usebox,\usepackage} +% \DoNotIndex{\value,\vbox,\vsize,\vskip,\wd,\width,\z@skip} +% \DoNotIndex{\AtBeginDocument,\AtEndOfPackage,\CurrentOption,\DeclareOption} +% \DoNotIndex{\ExecuteOptions,\GenericWarning,\IfFileExists,\InputIfFileExists} +% \DoNotIndex{\NeedsTeXFormat,\MessageBreak} +% \DoNotIndex{\PackageError,\PackageInfo,\PackageWarning,\PackageWarningNoLine} +% \DoNotIndex{\PassOptionsToPackage,\ProcessOptions,\ProvidesPackage} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \setlength{\parskip}{0pt plus 1pt} +% \changes{v1.0}{2008/02/16}{First version} +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \clearpage +% \section{The implementation} +% \iffalse +%<*package> +% \fi +% +% \subsection{Identification} +% +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +\ProvidesPackage{totalcount}[2018/01/21 v1.0a Total values of counters (AR)] +% \end{macrocode} +% +% \subsection{Initial code} +% +% \begin{macro}{\DeclareTotalCounter} +% \changes{v1.0}{2013/05/12}{Usage of \cs{totalcount@counters} delayed} +% |\DeclareTotalCounter|\marg{counter name} +% \begin{macrocode} +\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}}% +% \@nameuse{totalcount@set@#1}% + \AtBeginDocument{\@ifundefined{c@#1}% + {\PackageError{totalcount}{Undefined counter `#1'}\@ehc}% + {\@cons\totalcount@counters{{#1}}}}} +\@onlypreamble\DeclareTotalCounter +% \end{macrocode} +% \begin{macrocode} +\let\totalcount@counters\@empty +% \end{macrocode} +% \end{macro} +% +% \subsection{Declaration of options} +% +% \begin{macrocode} +\newcommand*\totalcount@xspace{} +\DeclareOption{xspace}{\renewcommand*\totalcount@xspace{\xspace}} +% \end{macrocode} +% \begin{macrocode} +\DeclareOption*{\expandafter\DeclareTotalCounter\expandafter{\CurrentOption}} +% \end{macrocode} +% +% \subsection{Execution of options} +% +% \begin{macrocode} +\ProcessOptions\relax +\ifx\totalcount@xspace\@empty\else + \RequirePackage{xspace} +\fi +% \end{macrocode} +% +% \subsection{Main code} +% +% \begin{macro}{\totalcount@addtocounter} +% |\totalcount@addtocounter|\marg{counter name} +% \begin{macrocode} +\newcommand*\totalcount@addtocounter[1]{% + \@ifundefined{c@totalcount@#1}{}{% + \addtocounter{totalcount@#1}{\value{#1}}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@stpelt} +% |\@stpelt|\marg{counter name} +% \begin{macrocode} +\let\totalcount@stpelt@ORI\@stpelt +\renewcommand*\@stpelt[1]{% + \totalcount@addtocounter{#1}% + \totalcount@stpelt@ORI{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\totalcount@set} +% \changes{v1.0a}{2018/01/21}{A negative counter value will be handled correctly now} +% |\totalcount@set|\marg{counter name}\marg{value} +% \begin{macrocode} +\newcommand*\totalcount@set[2]{% + \@ifundefined{c@totalcount@#1}% +% {\global\@namedef{totalcount@set@#1}{\totalcount@set{#1}{#2}}}% + {}% + {\global\@namedef{total#1s}{#2\totalcount@xspace}% + \ifnum#2<1\relax \else + \global\@nameuse{total#1strue}% + \fi}} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\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}}% +% \end{macrocode} +% +% \iffalse +% +% \fi +% +% \iffalse +% --------------------------------------------------------------------------- % +% \fi +% +% \Finale +% +\endinput diff --git a/Master/texmf-dist/source/latex/totalcount/totalcount.ins b/Master/texmf-dist/source/latex/totalcount/totalcount.ins new file mode 100644 index 00000000000..a1e82fb5616 --- /dev/null +++ b/Master/texmf-dist/source/latex/totalcount/totalcount.ins @@ -0,0 +1,42 @@ +\def\batchfile{totalcount.ins} +\input docstrip + +\askforoverwritefalse +\keepsilent + +\preamble + +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. + +\endpreamble + +\generate{\file{totalcount.sty}{\from{totalcount.dtx}{package}}} + +\Msg{***********************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the file} +\Msg{* `totalcount.sty' into a directory searched by TeX.} +\Msg{*} +\Msg{* To produce the documentation run the file} +\Msg{* `totalcount.dtx' through LaTeX.} +\Msg{*} +\Msg{***********************************************************} 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'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index fa07f7cab80..de32c901f03 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -751,7 +751,7 @@ my @TLP_working = qw( tlc-article tlc2 tlcockpit tlmgrbasics tocbibind tocdata tocloft tocvsec2 todo todonotes tokcycle tokenizer toolbox tools topfloat topiclongtable topletter - totcount totpages toptesi + totalcount totcount totpages toptesi tpic2pdftex tpslifonts tqft tracklang trajan tram translation-array-fr diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index b35a0d00db7..ba7d41a33fc 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -1206,6 +1206,7 @@ depend tokenizer depend toolbox depend topfloat depend topiclongtable +depend totalcount depend totcount depend totpages depend translations diff --git a/Master/tlpkg/tlpsrc/totalcount.tlpsrc b/Master/tlpkg/tlpsrc/totalcount.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3