summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/regstats/README17
-rw-r--r--Master/texmf-dist/doc/latex/regstats/regstats-example.log142
-rw-r--r--Master/texmf-dist/doc/latex/regstats/regstats-example.pdfbin53897 -> 68454 bytes
-rw-r--r--Master/texmf-dist/doc/latex/regstats/regstats-example.tex25
-rw-r--r--Master/texmf-dist/doc/latex/regstats/regstats.pdfbin299555 -> 310220 bytes
-rw-r--r--Master/texmf-dist/source/latex/regstats/regstats.drv8
-rw-r--r--Master/texmf-dist/source/latex/regstats/regstats.dtx348
-rw-r--r--Master/texmf-dist/source/latex/regstats/regstats.ins6
-rw-r--r--Master/texmf-dist/tex/latex/regstats/regstats.sty150
9 files changed, 480 insertions, 216 deletions
diff --git a/Master/texmf-dist/doc/latex/regstats/README b/Master/texmf-dist/doc/latex/regstats/README
index 63b93cbd867..7837e5d0e20 100644
--- a/Master/texmf-dist/doc/latex/regstats/README
+++ b/Master/texmf-dist/doc/latex/regstats/README
@@ -1,4 +1,4 @@
-README for regstats package, 2011/05/16, v1.0b
+README for regstats package, 2011/06/18, v1.0d
TABLE OF CONTENTS
@@ -18,15 +18,18 @@ TABLE OF CONTENTS
1 INTRODUCTION
==============
-This package allows to count the number of used registers (counter, dimen,
-skip, muskip, box, token, input, output, math families, languages,
-insertions). Therefore the according \count is read. While \count10 should be
-the number of the counters, \count11 the one of the dimens and so on,
+This LaTeX package allows to count the number of used registers (counter,
+dimen, skip, muskip, box, token, input, output, math families, languages,
+insertions). Therefore the according \count is read. While \count10 should
+be the number of the counters, \count11 the one of the dimens and so on,
it is possible to use option proof, in which case a new one of each register
is used and looked at \the\allocationnumber, and this is compared to the
number determined by reading the \count. The result for each register is
compared to the maximum available number of the respective register
(comparison independent of usage of option proof).
+With option |left| additionally the number of remaining registers of each
+type is given, and with option |timer| the time needed for the compilation
+run.
2 DOWNLOAD
@@ -91,6 +94,8 @@ e) Update the databases if necessary, e.g. for teTeX:
regstats loads other packages:
* kvoptions, CTAN:macros/latex/contrib/oberdiek/kvoptions.dtx
* atveryend, CTAN:macros/latex/contrib/oberdiek/atveryend.dtx
+with option timer:
+* intcalc, CTAN:macros/latex/contrib/oberdiek/intcalc.dtx
which again load other packages
(see the result of the \listfiles command in the log-file
of the example).
@@ -99,7 +104,7 @@ which again load other packages
5 PACKAGE COMPATIBILITY
=======================
-regstats should be loaded last (but can be loaded earlier).
+regstats should be loaded very last (but can be loaded earlier).
6 AUTHOR/MAINTAINER
=====================
diff --git a/Master/texmf-dist/doc/latex/regstats/regstats-example.log b/Master/texmf-dist/doc/latex/regstats/regstats-example.log
index 3d9feedc724..c68e345d6bd 100644
--- a/Master/texmf-dist/doc/latex/regstats/regstats-example.log
+++ b/Master/texmf-dist/doc/latex/regstats/regstats-example.log
@@ -1,4 +1,4 @@
-This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010) (format=pdflatex 2011.5.11) 16 MAY 2011 18:05
+This is pdfTeX, Version 3.1415926-1.40.11 (Web2C 2010) (format=pdflatex 2011.5.11) 18 JUN 2011 17:43
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@@ -144,38 +144,42 @@ Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2
)
\Hy@SectionHShift=\skip43
)
-Package hyperref Info: Option `plainpages' set `false' on input line 56.
+Package hyperref Info: Option `plainpages' set `false' on input line 58.
Package hyperref Warning: Option `pdfpagelabels' has already been used,
-(hyperref) setting the option has no effect on input line 56.
+(hyperref) setting the option has no effect on input line 58.
Package hyperref Warning: Option `hyperindex' has already been used,
-(hyperref) setting the option has no effect on input line 56.
+(hyperref) setting the option has no effect on input line 58.
(./regstats.sty
-Package: regstats 2011/05/16 v1.0b Counting used registers (HMM)
-Package regstats Info: e-TeX found. on input line 71.
+Package: regstats 2011/06/18 v1.0d Counting used registers (HMM)
+Package regstats Info: This package will use one counter itself!
+(regstats) (And other packages used by this package
+(regstats) probably use additional resources,
+(regstats) if those packages are not used anyway.)
+(regstats) on input line 78.
) (./regstats-example.aux)
\openout1 = `regstats-example.aux'.
-LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 60.
-LaTeX Font Info: ... okay on input line 60.
-LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 60.
-LaTeX Font Info: ... okay on input line 60.
-LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 60.
-LaTeX Font Info: ... okay on input line 60.
-LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 60.
-LaTeX Font Info: ... okay on input line 60.
-LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 60.
-LaTeX Font Info: ... okay on input line 60.
-LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 60.
-LaTeX Font Info: ... okay on input line 60.
-LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 60.
-LaTeX Font Info: ... okay on input line 60.
+LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 62.
+LaTeX Font Info: ... okay on input line 62.
+LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 62.
+LaTeX Font Info: ... okay on input line 62.
+LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 62.
+LaTeX Font Info: ... okay on input line 62.
+LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 62.
+LaTeX Font Info: ... okay on input line 62.
+LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 62.
+LaTeX Font Info: ... okay on input line 62.
+LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 62.
+LaTeX Font Info: ... okay on input line 62.
+LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 62.
+LaTeX Font Info: ... okay on input line 62.
\AtBeginShipoutBox=\box26
-Package hyperref Info: Link coloring OFF on input line 60.
+Package hyperref Info: Link coloring OFF on input line 62.
(s:/TeXlive2010/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2010/04/30 v2.40 Cross-referencing by name of section
@@ -185,36 +189,57 @@ Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO)
)
\c@section@level=\count97
)
-LaTeX Info: Redefining \ref on input line 60.
-LaTeX Info: Redefining \pageref on input line 60.
-LaTeX Info: Redefining \nameref on input line 60.
+LaTeX Info: Redefining \ref on input line 62.
+LaTeX Info: Redefining \pageref on input line 62.
+LaTeX Info: Redefining \nameref on input line 62.
(./regstats-example.out) (./regstats-example.out)
\@outlinefile=\write3
\openout3 = `regstats-example.out'.
-Underfull \hbox (badness 10000) in paragraph at lines 64--69
+
+Package regstats Warning: Could not find e-TeX.
+(regstats) That can mean that e-TeX was disabled or
+(regstats) that your distribution of TeX does not contain e-TeX
+(regstats) or that you forgot to say \usepackage{etex}
+(regstats) in the preamble of regstats-example.tex.
+(regstats) Some packages will not work without e-TeX,
+(regstats) but should give according messages.
+(regstats) on input line 62.
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 66--72
[]
LaTeX Font Info: External font `cmex10' loaded for size
-(Font) <7> on input line 70.
+(Font) <7> on input line 73.
LaTeX Font Info: External font `cmex10' loaded for size
-(Font) <5> on input line 70.
+(Font) <5> on input line 73.
+
+Underfull \hbox (badness 10000) in paragraph at lines 73--79
+
+ []
-Underfull \hbox (badness 10000) in paragraph at lines 70--73
+
+Underfull \hbox (badness 10000) in paragraph at lines 80--81
+
+ []
+
+
+Underfull \hbox (badness 10000) in paragraph at lines 82--85
[]
-Package atveryend Info: Empty hook `BeforeClearDocument' on input line 77.
+Package atveryend Info: Empty hook `BeforeClearDocument' on input line 92.
[1
{s:/TeXlive2010/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
-Package atveryend Info: Empty hook `AfterLastShipout' on input line 77.
+Package atveryend Info: Empty hook `AfterLastShipout' on input line 92.
(./regstats-example.aux)
-Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 77.
+Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 92.
*File List*
@@ -253,50 +278,53 @@ hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
url.sty 2006/04/12 v3.3 Verb mode for urls, etc.
hpdftex.def 2011/04/17 v6.82g Hyperref driver for pdfTeX
rerunfilecheck.sty 2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
-regstats.sty 2011/05/16 v1.0b Counting used registers (HMM)
+regstats.sty 2011/06/18 v1.0d Counting used registers (HMM)
nameref.sty 2010/04/30 v2.40 Cross-referencing by name of section
gettitlestring.sty 2010/12/03 v1.4 Cleanup title references (HO)
regstats-example.out
regstats-example.out
***********
-Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 77.
+Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 92.
Package rerunfilecheck Info: File `regstats-example.out' has not changed.
(rerunfilecheck) Checksum: D41D8CD98F00B204E9800998ECF8427E;0.
-Package atveryend Info: Executing hook `AtVeryVeryEnd' on input line 77.
+Package atveryend Info: Executing hook `AtVeryVeryEnd' on input line 92.
\c@regstatscount=\count98
Here is how much of TeX's registers you used
(numbers of available registers are estimated!):
- 98 counter registers out of 32767
- 105 dimen registers out of 32767
- 43 skip registers out of 233
- 10 muskip registers out of 32767
- 26 box registers out of 32767
- 14 toks registers out of 32767
- 0 input streams (read) out of 15
- 3 output streams (write) out of 15
- 3 math families (fam) out of 15
- 73 language codes out of 255
- 0 insertions out of 124
+ 98 counter registers out of 233, left: 135
+ 105 dimen registers out of 233, left: 128
+ 43 skip registers out of 233, left: 190
+ 10 muskip registers out of 255, left: 245
+ 26 box registers out of 233, left: 207
+ 14 toks registers out of 255, left: 241
+ 0 input streams (read) out of 15, left: 15
+ 3 output streams (write) out of 15, left: 12
+ 3 math families (fam) out of 15, left: 12
+ 73 language codes out of 255, left: 182
+ 0 insertions out of 101, left: 101
+
+Time elapsed: about 0:00 (m:ss; 24576/65536 s).
)
Here is how much of TeX's memory you used:
- 4128 strings out of 493763
- 61913 string characters out of 3148677
- 136571 words of memory out of 3000000
- 7454 multiletter control sequences out of 15000+200000
+ 4143 strings out of 493763
+ 62174 string characters out of 3148677
+ 140970 words of memory out of 3000000
+ 7469 multiletter control sequences out of 15000+200000
4718 words of font info for 18 fonts, out of 3000000 for 9000
715 hyphenation exceptions out of 8191
- 29i,4n,23p,206b,313s stack positions out of 5000i,500n,10000p,200000b,50000s
+ 29i,4n,23p,216b,313s stack positions out of 5000i,500n,10000p,200000b,50000s
<s:/TeXlive2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb><s:/TeXl
-ive2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><s:/TeXlive2010/tex
-mf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb><s:/TeXlive2010/texmf-dist/font
-s/type1/public/amsfonts/cm/cmss10.pfb><s:/TeXlive2010/texmf-dist/fonts/type1/pu
-blic/amsfonts/cm/cmtt10.pfb>
-Output written on regstats-example.pdf (1 page, 53897 bytes).
+ive2010/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb><s:/TeXlive2010/te
+xmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb><s:/TeXlive2010/texmf-dist/fo
+nts/type1/public/amsfonts/cm/cmr7.pfb><s:/TeXlive2010/texmf-dist/fonts/type1/pu
+blic/amsfonts/cm/cmss10.pfb><s:/TeXlive2010/texmf-dist/fonts/type1/public/amsfo
+nts/cm/cmtt10.pfb>
+Output written on regstats-example.pdf (1 page, 68454 bytes).
PDF statistics:
- 34 PDF objects out of 1000 (max. 8388607)
- 25 compressed objects within 1 object stream
+ 38 PDF objects out of 1000 (max. 8388607)
+ 28 compressed objects within 1 object stream
3 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
diff --git a/Master/texmf-dist/doc/latex/regstats/regstats-example.pdf b/Master/texmf-dist/doc/latex/regstats/regstats-example.pdf
index 5bc279f516d..8eec1d5da6c 100644
--- a/Master/texmf-dist/doc/latex/regstats/regstats-example.pdf
+++ b/Master/texmf-dist/doc/latex/regstats/regstats-example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/regstats/regstats-example.tex b/Master/texmf-dist/doc/latex/regstats/regstats-example.tex
index a2f24de2a43..9f1ae0c42eb 100644
--- a/Master/texmf-dist/doc/latex/regstats/regstats-example.tex
+++ b/Master/texmf-dist/doc/latex/regstats/regstats-example.tex
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: regstats
-%% Version: 2011/05/16 v1.0b
+%% Version: 2011/06/18 v1.0d
%%
%% Copyright (C) 2011 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -40,6 +40,8 @@
%%
\documentclass[british]{article}[2007/10/19]% v1.4h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% \usepackage{etex}[1998/03/26]% v2.0
+%% Uncomment the preceding line, if you want to use eTeX.
\usepackage{hyperref}[2011/04/17]% v6.82g
\hypersetup{extension=pdf,%
plainpages=false,%
@@ -54,7 +56,7 @@
pdfview=Fit,pdfstartview=Fit,%
pdfpagelayout=SinglePage%
}
-\usepackage[proof=false]{regstats}[2011/05/16]% v1.0b
+\usepackage[proof=false,left=true,timer=true]{regstats}[2011/06/18]% v1.0d
\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\listfiles
\begin{document}
@@ -62,9 +64,19 @@
\section*{Example for regstats}
This example demonstrates the use of package\newline
-\textsf{regstats}, v1.0b as of 2011/05/16 (HMM).\newline
-The used option was \texttt{proof=false}.
-This is the default option.
+\textsf{regstats}, v1.0d as of 2011/06/18 (HMM).\newline
+The used options were \texttt{proof=false,left=true,timer=true}.\newline
+\texttt{proof=false} is the default, but neither \texttt{left=true}
+nor \texttt{timer=true} are defaults (\texttt{left=false,timer=false}
+would be the defaults).\newline
+
+If $\varepsilon$-\TeX\ is available with your \LaTeX -distribution
+and you want to use it, uncomment the\newline
+\verb|%% \usepackage{etex}[1998/03/26]% v2.0|\newline
+line in the preamble of this document.\newline
+(Also \verb|\eTeX| instead of \verb|$\varepsilon$-\TeX|
+would be available with it).\newline
+
For more details please see the documentation!\newline
\noindent Save per page about $200\unit{ml}$ water,
@@ -74,6 +86,9 @@ Therefore please print only if this is really necessary.\newline
For the resulting message, please compile regstats-example.tex and
have a look at the end of the log-file.
+Because the compilation time for this example is usually quite short,
+option \texttt{timer} is not demonstrated very spectacular.
+
\end{document}
\endinput
%%
diff --git a/Master/texmf-dist/doc/latex/regstats/regstats.pdf b/Master/texmf-dist/doc/latex/regstats/regstats.pdf
index 4be79416f8a..94c0cdde1ff 100644
--- a/Master/texmf-dist/doc/latex/regstats/regstats.pdf
+++ b/Master/texmf-dist/doc/latex/regstats/regstats.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/regstats/regstats.drv b/Master/texmf-dist/source/latex/regstats/regstats.drv
index 1ff96034db4..d849144ecfe 100644
--- a/Master/texmf-dist/source/latex/regstats/regstats.drv
+++ b/Master/texmf-dist/source/latex/regstats/regstats.drv
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: regstats
-%% Version: 2011/05/16 v1.0b
+%% Version: 2011/06/18 v1.0d
%%
%% Copyright (C) 2011 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -40,13 +40,13 @@
%%
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\ProvidesFile{regstats.drv}%
- [2011/05/16 v1.0b Counting used registers (HMM)]%
+ [2011/06/18 v1.0d Counting used registers (HMM)]%
\documentclass{ltxdoc}[2007/11/11]% v2.0u
\usepackage{pdflscape}[2008/08/11]% v0.10
\usepackage{holtxdoc}[2011/02/04]% v0.21
%% regstats may work with earlier versions of LaTeX2e and those
-%% class and package, but this was not tested.
-%% Please consider updating your LaTeX, class, and package
+%% class and packages, but this was not tested.
+%% Please consider updating your LaTeX, class, and packages
%% to the most recent version (if they are not already the most
%% recent version).
\hypersetup{%
diff --git a/Master/texmf-dist/source/latex/regstats/regstats.dtx b/Master/texmf-dist/source/latex/regstats/regstats.dtx
index e25d3b08b25..b05dcda2c73 100644
--- a/Master/texmf-dist/source/latex/regstats/regstats.dtx
+++ b/Master/texmf-dist/source/latex/regstats/regstats.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: regstats.dtx
-% Version: 2011/05/16 v1.0b
+% Version: 2011/06/18 v1.0d
%
% Copyright (C) 2011 by
% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -80,7 +80,7 @@
\input docstrip.tex
\Msg{******************************************************************}
\Msg{* Installation}
-\Msg{* Package: regstats 2011/05/16 v1.0b Counting used registers (HMM)}
+\Msg{* Package: regstats 2011/06/18 v1.0d Counting used registers (HMM)}
\Msg{******************************************************************}
\keepsilent
@@ -92,7 +92,7 @@
This is a generated file.
Project: regstats
-Version: 2011/05/16 v1.0b
+Version: 2011/06/18 v1.0d
Copyright (C) 2011 by
H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -176,13 +176,13 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\ProvidesFile{regstats.drv}%
- [2011/05/16 v1.0b Counting used registers (HMM)]%
+ [2011/06/18 v1.0d Counting used registers (HMM)]%
\documentclass{ltxdoc}[2007/11/11]% v2.0u
\usepackage{pdflscape}[2008/08/11]% v0.10
\usepackage{holtxdoc}[2011/02/04]% v0.21
%% regstats may work with earlier versions of LaTeX2e and those
-%% class and package, but this was not tested.
-%% Please consider updating your LaTeX, class, and package
+%% class and packages, but this was not tested.
+%% Please consider updating your LaTeX, class, and packages
%% to the most recent version (if they are not already the most
%% recent version).
\hypersetup{%
@@ -213,7 +213,7 @@ and the derived files
%
% \fi
%
-% \CheckSum{422}
+% \CheckSum{511}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -250,11 +250,12 @@ and the derived files
%
% \DoNotIndex{\\}
% \DoNotIndex{\documentclass,\usepackage,\ProvidesPackage,\begin,\end}
+% \DoNotIndex{\message,\MessageBreak}
% \DoNotIndex{\NeedsTeXFormat,\DoNotIndex,\verb}
% \DoNotIndex{\def,\edef,\gdef,\global}
% \DoNotIndex{\ifx,\kvoptions,\listfiles,\mathord,\mathrm,\ProcessKeyvalOptions}
% \DoNotIndex{\SetupKeyvalOptions}
-% \DoNotIndex{\bigskip,\space,\thinspace,\Large,\linebreak,\lipsum,\MessageBreak}
+% \DoNotIndex{\bigskip,\space,\thinspace,\Large,\linebreak,\lipsum}
% \DoNotIndex{\ldots,\indent,\noindent,\newline,\pagebreak,\pagenumbering}
% \DoNotIndex{\textbf,\textit,\textsf,\texttt,\textquotedblleft,\textquotedblright}
% \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX}
@@ -262,7 +263,7 @@ and the derived files
% \DoNotIndex{\value,\setcounter,\addtocounter,\arabic,\csname,\endscname}
%
% \title{The \xpackage{regstats} package}
-% \date{2011/05/16 v1.0b}
+% \date{2011/06/18 v1.0d}
% \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}}
%
% \maketitle
@@ -272,6 +273,7 @@ and the derived files
% (counter, dimen, skip, muskip, box, token, input, output,
% math families, languages, insertions)
% and compare these to the maximum available number of such registers.
+% The time needed for a compilation run can be anounced.
% \end{abstract}
%
% \bigskip
@@ -288,11 +290,11 @@ and the derived files
% $2\unit{g}$ CO$_{2}$ and $2\unit{g}$ wood:\\
% Therefore please print only if this is really necessary.}
%
-% \bigskip
+% \pagebreak
%
% \tableofcontents
%
-% \pagebreak
+% \bigskip
%
% \section{Introduction}
%
@@ -300,14 +302,16 @@ and the derived files
% (counter, dimen, skip, muskip, box, token, input, output,
% math families, languages, insertions).
% Therefore the according |\count| is read. While |\count10| should be the number
-% of the counters, |\count11| the one of the dimens and so on, it is possible to use
+% of the counters, |\count11| the one of the dimens, and so on, it is possible to use
% option |proof|, in which case a new one of each register is used and looked at
% |\the\allocationnumber|, and this is compared to the number determined by reading
% the |\count|. The result for each register is compared to the maximum available
% number of the respective register
-% (comparison independent of usage of option |proof|).\\
+% (comparison independent of usage of option |proof|).
+% With option |left| additionally the number of remaining registers of each type
+% is given, and with option |timer| the time needed for the compilation run.
%
-% \bigskip
+% \pagebreak
%
% \section{Usage}
%
@@ -315,21 +319,34 @@ and the derived files
% \begin{quote}
% |\usepackage[<|\textit{options}|>]{regstats}|
% \end{quote}
-% \noindent in the preamble of your \LaTeXe\ source file. The resulting message
-% will be presented at the end of the compilation messages at the screen and in
-% the \xfile{log} file.
+% \noindent at the end of the preamble of your \LaTeXe\ source file. When you load
+% packages |\AtBeginDocument|, \xpackage{regstats} should be the last one of
+% those packages. The resulting message will be presented at the end of the
+% compilation messages at the screen and in the \xfile{log} file.
%
-% \subsection{Option}
-% \DescribeMacro{option}
-% \indent The \xpackage{regstats} package takes the following option:
+% \subsection{Options}
+% \DescribeMacro{options}
+% \indent The \xpackage{regstats} package takes the following options:
%
% \subsubsection{proof\label{sss:proof}}
% \DescribeMacro{proof}
-% \indent When option \texttt{proof} (or \texttt{proof=true}) is choosen,
+% \indent When option \texttt{proof} (or \texttt{proof=true}) is chosen,
% a new one of each register is used and looked at |\the\allocationnumber|,
% and this is compared to the number determined by reading the |\count|.
% The default is \texttt{proof=false}.
%
+% \subsubsection{left\label{sss:left}}
+% \DescribeMacro{left}
+% \indent When option \texttt{left} (or \texttt{left=true}) is chosen,
+% also the number of remaining registers of each type is given. The default
+% is \texttt{left=false}.
+%
+% \subsubsection{timer\label{sss:timer}}
+% \DescribeMacro{timer}
+% \indent When option \texttt{timer} (or \texttt{timer=true}) is chosen,
+% also the the time needed for the compilation run is given. The default
+% is \texttt{timer=false}.
+%
% \section{Alternatives\label{sec:Alternatives}}
%
% \begin{description}
@@ -339,13 +356,15 @@ and the derived files
% |\AtBeginDocument| and |\AtEndDocument| (but not |\AtVeryVeryEnd|). The number of
% allocated insertions is \emph{wrong} in my opinion, because these are not numbered
% $1, 2,\ldots$, but start at a high number, which is then decreased. The package is
-% compatibel with the \xpackage{regstats} package (i.\,e. you can use both at the same
-% time in one document) and available at \url{http://www.ctan.org/pkg/regcount}.
+% compatibel with the \xpackage{regstats} package (i.\,e.~you can use both packages
+% at the same time in one document) and available at
+% \url{http://www.ctan.org/pkg/regcount}.
%
% \item[-] One can manually search for the last appearance of
% |\count|, |\dimen|, |\skip|, |\muskip|, |\box|, |\toks|, |\read| (input),
% |\write| (output), |\mathgroup| (math familiy), |\language|, and |\insert|,
-% and find the according number there.
+% and find the according number there. (This does not provide any information
+% about the number of remaining registers, of course.)
% \end{description}
%
% \bigskip
@@ -364,6 +383,8 @@ and the derived files
%<*example>
\documentclass[british]{article}[2007/10/19]% v1.4h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% \usepackage{etex}[1998/03/26]% v2.0
+%% Uncomment the preceding line, if you want to use eTeX.
\usepackage{hyperref}[2011/04/17]% v6.82g
\hypersetup{extension=pdf,%
plainpages=false,%
@@ -378,7 +399,7 @@ and the derived files
pdfview=Fit,pdfstartview=Fit,%
pdfpagelayout=SinglePage%
}
-\usepackage[proof=false]{regstats}[2011/05/16]% v1.0b
+\usepackage[proof=false,left=true,timer=true]{regstats}[2011/06/18]% v1.0d
\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\listfiles
\begin{document}
@@ -386,9 +407,19 @@ and the derived files
\section*{Example for regstats}
This example demonstrates the use of package\newline
-\textsf{regstats}, v1.0b as of 2011/05/16 (HMM).\newline
-The used option was \texttt{proof=false}.
-This is the default option.
+\textsf{regstats}, v1.0d as of 2011/06/18 (HMM).\newline
+The used options were \texttt{proof=false,left=true,timer=true}.\newline
+\texttt{proof=false} is the default, but neither \texttt{left=true}
+nor \texttt{timer=true} are defaults (\texttt{left=false,timer=false}
+would be the defaults).\newline
+
+If $\varepsilon$-\TeX\ is available with your \LaTeX -distribution
+and you want to use it, uncomment the\newline
+\verb|%% \usepackage{etex}[1998/03/26]% v2.0|\newline
+line in the preamble of this document.\newline
+(Also \verb|\eTeX| instead of \verb|$\varepsilon$-\TeX|
+would be available with it).\newline
+
For more details please see the documentation!\newline
\noindent Save per page about $200\unit{ml}$ water,
@@ -398,6 +429,9 @@ Therefore please print only if this is really necessary.\newline
For the resulting message, please compile regstats-example.tex and
have a look at the end of the log-file.
+Because the compilation time for this example is usually quite short,
+option \texttt{timer} is not demonstrated very spectacular.
+
\end{document}
%</example>
% \end{macrocode}
@@ -417,7 +451,7 @@ have a look at the end of the log-file.
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
-\ProvidesPackage{regstats}[2011/05/16 v1.0b
+\ProvidesPackage{regstats}[2011/06/18 v1.0d
Counting used registers (HMM)]
% \end{macrocode}
@@ -453,47 +487,98 @@ have a look at the end of the log-file.
%
% \indent See subsection~\ref{ss:Downloads} about how to get them.\\
%
-% We process the option:
+% We process the options:
%
% \begin{macrocode}
\SetupKeyvalOptions{family=regstats,prefix=regstats@}
\DeclareBoolOption{proof}% \regstats@proof
+\DeclareBoolOption{left}
+\DeclareBoolOption{timer}
+
\ProcessKeyvalOptions*
+\ifregstats@proof
+ \PackageInfo{regstats}{%
+ This package will use one of each kind of register itself!\MessageBreak%
+ (And other packages used by this package\MessageBreak%
+ probably use additional resources,\MessageBreak%
+ if those packages are not used anyway.)\MessageBreak%
+ }
+\else
+ \PackageInfo{regstats}{%
+ This package will use one counter itself!\MessageBreak%
+ (And other packages used by this package\MessageBreak%
+ probably use additional resources,\MessageBreak%
+ if those packages are not used anyway.)\MessageBreak%
+ }
+\fi
+
% \end{macrocode}
%
-% We try to determine, whether \eTeX\ is available:
+% But that counter will be created not before |\AtVeryVeryEnd|,
+% therefore if it is the one counter too much, it should not
+% interfere with the creation of the document. (The other kinds
+% of registers are used not before |\AtVeryVeryEnd|, too.)\\
%
% \begin{macrocode}
-\newif\ifetex
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname eTeXversion\endcsname\relax
- \etexfalse
-\else
- \etextrue
+\ifregstats@timer
+ \RequirePackage{intcalc}[2007/09/27]% v1.1
\fi
-\ifetex
- \PackageInfo{regstats}{e-TeX found.}
-\else
- \PackageWarning{regstats}{Could not find e-TeX.\MessageBreak%
- That can mean that e-TeX was disabled or\MessageBreak%
- that your distribution of TeX does not contain e-TeX.\MessageBreak%
- Some packages will not work without e-TeX,\MessageBreak%
- but should give according messages.\MessageBreak%
- }
-\fi
+% \end{macrocode}
+%
+% We try to determine, whether \eTeX\ is available in the
+% \LaTeX\ distribution used to compile the document
+% and really loaded by the user. Because it is possible to
+% load packages |\AtBeginDocument|, but |\@ifpackageloaded|
+% cannot be used after |\AtBeginDocument|, we check for
+% \eTeX\ |\AtBeginDocument| (and herewith ask the user
+% to please load \xpackage{regstats} as very last package,
+% at least after the \xpackage{etex} package):
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \newif\ifetex
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname eTeXversion\endcsname\relax
+ \etexfalse
+ \else
+ \@ifpackageloaded{etex}{\etextrue}{\etexfalse}
+ \fi
+ \ifetex
+ \PackageInfo{regstats}{e-TeX found.}
+ \else
+ \PackageWarning{regstats}{Could not find e-TeX.\MessageBreak%
+ That can mean that e-TeX was disabled or\MessageBreak%
+ that your distribution of TeX does not contain e-TeX\MessageBreak%
+ or that you forgot to say \string\usepackage{etex}\MessageBreak%
+ in the preamble of \jobname.tex.\MessageBreak%
+ Some packages will not work without e-TeX,\MessageBreak%
+ but should give according messages.\MessageBreak%
+ }
+ \fi
+ }
% \end{macrocode}
%
% |\AtVeryEndDocument| we write to |\AtVeryVeryEnd|, thus the code will be executed
-% quite late during the compilation. We define a new command to determine the
-% sigular/plural form.
+% quite late during the compilation. (Please load \xpackage{regstats} as very last
+% package!) We define a new command to determine the sigular/plural form,
+% maximum of available registers, and (if option |left| was chosen)
+% the number of remaining registers of that type.
%
% \begin{macrocode}
\AtVeryEndDocument{%
\AtVeryVeryEnd{%
- \newcommand{\regstats@s}[3]{%
+ \def\regstats@lft{}%
+ \newcommand{\regstats@regstat}[5]{%
+% \end{macrocode}
+%
+% The five parameters are: number of used registers of that type,
+% singular ending, plural ending, number of available registers without \eTeX{},
+% number of availabe registers with \eTeX\ (in this order).
+%
+% \begin{macrocode}
\setcounter{regstatscount}{#1}
\ifnum \value{regstatscount}=0
\setcounter{regstatscount}{2}
@@ -503,12 +588,31 @@ have a look at the end of the log-file.
\else
\gdef\regstats@pl{#2}
\fi
- }
+ \ifetex\edef\regstats@max{#5}\else\edef\regstats@max{#4}\fi
+ \ifregstats@left
+ \setcounter{regstatscount}{\regstats@max}
+ \addtocounter{regstatscount}{-#1}
+ \ifnum \value{regstatscount}>0
+ \edef\regstats@lft{, left: \arabic{regstatscount}}
+ \else
+ \ifnum \value{regstatscount}=0
+ \edef\regstats@lft{, left: \arabic{regstatscount} !!!}
+ \else% \value{regstatscount}<0
+ \edef\regstats@lft{, left: \arabic{regstatscount} **********}
+ \fi
+ \fi
+% \end{macrocode}
+%
+% | \else| |\regstats@lft| will stay |\empty|.
+%
+% \begin{macrocode}
+ \fi
+ }
\newcounter{regstatscount}
\edef\regstats@counter{\the\allocationnumber}
% \end{macrocode}
%
-% When option |proof| was choosen, a new register of the named types is used
+% When option |proof| was chosen, a new register of the named types is used
% and its number compared with the according |count| number.
% We give a warning about the use of additional registers.
%
@@ -516,8 +620,8 @@ have a look at the end of the log-file.
\ifregstats@proof
\PackageWarning{regstats}{%
Package regstats loaded with option 'proof'.\MessageBreak%
- This package itself will use one of each register\MessageBreak%
- for testing!%
+ This package itself will now use\MessageBreak%
+ one of each register for testing!%
}%
\def\regstats@proof{1}
\edef\regstats@test{\the\count10}
@@ -546,11 +650,6 @@ have a look at the end of the log-file.
\else \message{Discrepancy when counting muskip registers.^^J}
\def\regstats@proof{0}
\fi
-% \end{macrocode}
-%
-% \pagebreak
-%
-% \begin{macrocode}
\newbox\regstatsbox
\edef\regstats@box{\the\allocationnumber}
\edef\regstats@test{\the\count14}
@@ -608,16 +707,14 @@ have a look at the end of the log-file.
\edef\regstats@test{0}
\ifx\regstats@proof\regstats@test
\message{Regstats test for register numbers failed.^^J}
- \message{Therefore option 'proof' is necessary to get the right numbers.^^J}
+ \message{Therefore option 'proof' is necessary to get the %
+ right numbers.^^J}
\fi
+ \else
% \end{macrocode}
%
% \pagebreak
%
-% \begin{macrocode}
- \else
-% \end{macrocode}
-%
% Without option |proof|, we just take the values of the various |count|s.
%
% \begin{macrocode}
@@ -649,34 +746,76 @@ have a look at the end of the log-file.
% The number of used registers of each type and the number of available ones
% (estimated, probably dependent on distribution and its version, here just
% distinguished according to availability of \eTeX{}) is written to screen
-% and \xfile{log} file.
+% and \xfile{log} file. (Additional spaces are just for increased ease of
+% readability of the code and will appear neither at the scree output nor
+% in the \xfile{log}~file.)
%
% \begin{macrocode}
\message{^^J}
\message{Here is how much of TeX's registers you used^^J}%
\message{\space (numbers of available registers are estimated!):^^J}%
- \regstats@s{\regstats@counter}{}{s}
- \message{ \regstats@counter\space counter register\regstats@pl\space out of}\ifetex\message{32767}\else\message{233}\fi
- \regstats@s{\regstats@dimen}{}{s}
- \message{^^J \regstats@dimen\space dimen register\regstats@pl\space out of}\ifetex\message{32767}\else\message{233}\fi
- \regstats@s{\regstats@skip}{}{s}
- \message{^^J \regstats@skip\space skip register\regstats@pl\space out of 233}
- \regstats@s{\regstats@muskip}{}{s}
- \message{^^J \regstats@muskip\space muskip register\regstats@pl\space out of}\ifetex\message{32767}\else\message{255}\fi
- \regstats@s{\regstats@box}{}{s}
- \message{^^J \regstats@box\space box register\regstats@pl\space out of}\ifetex\message{32767}\else\message{233}\fi
- \regstats@s{\regstats@toks}{}{s}
- \message{^^J \regstats@toks\space toks register\regstats@pl\space out of}\ifetex\message{32767}\else\message{255}\fi
- \regstats@s{\regstats@read}{}{s}
- \message{^^J \regstats@read\space input stream\regstats@pl\space (read) out of 15}
- \regstats@s{\regstats@write}{}{s}
- \message{^^J \regstats@write\space output stream\regstats@pl\space (write) out of 15}
- \regstats@s{\regstats@fam}{y}{ies}
- \message{^^J \regstats@fam\space math famil\regstats@pl\space (fam) out of 15}
- \regstats@s{\regstats@language}{}{s}
- \message{^^J \regstats@language\space language code\regstats@pl\space out of 255}
- \regstats@s{\regstats@insert}{}{s}
- \message{^^J \regstats@insert\space insertion\regstats@pl\space out of}\ifetex\message{124^^J}\else\message{101^^J}\fi
+ \regstats@regstat{\regstats@counter}{}{s}{233}{32767}
+ \message{ \regstats@counter\space counter register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@dimen}{}{s}{233}{32767}
+ \message{ \regstats@dimen\space dimen register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@skip}{}{s}{233}{32767}
+ \message{ \regstats@skip\space skip register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@muskip}{}{s}{255}{32767}
+ \message{ \regstats@muskip\space muskip register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@box}{}{s}{233}{32767}
+ \message{ \regstats@box\space box register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@toks}{}{s}{255}{32767}
+ \message{ \regstats@toks\space toks register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@read}{}{s}{15}{15}
+ \message{ \regstats@read\space input stream\regstats@pl\space (read) out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@write}{}{s}{15}{15}
+ \message{ \regstats@write\space output stream\regstats@pl\space (write) out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@fam}{y}{ies}{15}{15}
+ \message{ \regstats@fam\space math famil\regstats@pl\space (fam) out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@language}{}{s}{255}{255}
+ \message{ \regstats@language\space language code\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@insert}{}{s}{101}{124}
+ \message{ \regstats@insert\space insertion\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+% \end{macrocode}
+%
+% \pagebreak
+% \end{landscape}
+%
+% When option |timer| (or |timer=true|) was used, the \xpackage{regstats} package
+% additionally gives the time, which was needed for the compilation.
+% If~|\pdfelapsedtime| was reset by another package, the result is not correct,
+% of course, but unfortunately it is not possible to check for this. You could say
+% |\def\pdfresettimer{\relax}| immediately after |\documentclass[...]{...}|
+% to prevent this. Better use\\
+% |\long\def\pdfresettimer{%|\\
+% \ |\PackageError{regstats}{\string\pdfresettimer\space used}}|\\
+% to be notified thereof. This redefinition could be implemented in this
+% \xpackage{regstats} package, but this would have no effect for the use of
+% |\pdfresettimer| before this package is called. Because this package
+% should be called immediately before |\begin{document}|, this would mean
+% that resetting would be possible during the whole loading of all packages.
+%
+% \begin{macrocode}
+ \ifregstats@timer
+ \message{^^J}
+ \setcounter{regstatscount}{\the\pdfelapsedtime}
+ \edef\regstatselapsedtime{\arabic{regstatscount}}
+ \divide \value{regstatscount} by 65536% scaledseconds -> seconds
+ \edef\regstatsseconds{\arabic{regstatscount}}
+ \ifnum \value{regstatscount} > 59
+ \edef\regstatsseconds{\intcalcMod{\value{regstatscount}}{60}}
+ \divide \value{regstatscount} by 60% seconds -> minutes
+ \else
+ \setcounter{regstatscount}{0}% minutes = 0
+ \fi
+ \ifnum \regstatsseconds < 10
+ \message{Time elapsed: about \arabic{regstatscount}:0\regstatsseconds%
+ \space (m:ss; \regstatselapsedtime /65536 s).^^J}
+ \else
+ \message{Time elapsed: about \arabic{regstatscount}:\regstatsseconds %
+ \space (m:ss; \regstatselapsedtime /65536 s).^^J}
+ \fi
+ \fi
}
}
@@ -688,8 +827,6 @@ have a look at the end of the log-file.
%</package>
% \end{macrocode}
%
-% \end{landscape}
-%
% \newpage
%
% \section{Installation}
@@ -729,6 +866,13 @@ have a look at the end of the log-file.
% \CTAN{macros/latex/contrib/oberdiek/atveryend.dtx}
% \end{description}
%
+% When option |timer| is used, additionally
+% \begin{description}
+% \item[-] package \xpackage{intcalc}, 2007/09/27, v1.1,\\
+% \CTAN{macros/latex/contrib/oberdiek/intcalc.dtx}
+% \end{description}
+% is needed.\\
+%
% \DescribeMacro{regstats-example.tex}
% The \texttt{regstats-example.tex} requires the same files as all
% documents using the \xpackage{regstats} package, i.\,e. the ones
@@ -737,7 +881,7 @@ have a look at the end of the log-file.
% \item[-] class \xpackage{article}, 2007/10/19, v1.4h, from \xpackage{classes.dtx}:\\
% \CTAN{macros/latex/base/classes.dtx}
%
-% \item[-] package \xpackage{regstats}, 2011/05/16, v1.0b,\\
+% \item[-] package \xpackage{regstats}, 2011/06/18, v1.0d,\\
% \CTAN{macros/latex/contrib/regstats/regstats.dtx}\\
% (Well, it is the example file for this package, and because you are reading the
% documentation for the \xpackage{regstats} package, it can be assumed that you already
@@ -755,16 +899,16 @@ have a look at the end of the log-file.
% \DescribeMacro{holtxdoc}
% \DescribeMacro{kvoptions}
% \DescribeMacro{atveryend}
+% \DescribeMacro{intcalc}
% \DescribeMacro{pdflscape}
% All packages of \textsc{Heiko Oberdiek's} bundle `oberdiek'
-% (especially \xpackage{holtxdoc}, \xpackage{kvoptions}, \xpackage{atveryend}, and \xpackage{pdflscape})
+% (especially \xpackage{holtxdoc}, \xpackage{kvoptions}, \xpackage{atveryend},
+% \xpackage{intcalc}, and \xpackage{pdflscape})
% are also available in a TDS compliant ZIP archive:\\
% \CTAN{install/macros/latex/contrib/oberdiek.tds.zip}.\\
% It is probably best to download and use this, because the packages in there
% are quite probably both recent and compatible among themselves.\\
%
-% \pagebreak
-%
% \DescribeMacro{hyperref}
% \noindent \xpackage{hyperref} is not included in that bundle and needs to be downloaded
% separately,\\
@@ -940,15 +1084,14 @@ have a look at the end of the log-file.
%
% \section{Acknowledgements}
%
-% I would like to thank \textsc{Heiko Oberdiek}
-% (heiko dot oberdiek at googlemail dot com) for providing
+% I would like to thank \textsc{Heiko Oberdiek} for providing
% the \xpackage{hyperref} as well as a~lot~(!) of other useful packages
% (from which I also got everything I know about creating a file in
% \xext{dtx} format, ok, say it: copying),
% \textsc{Jean-Pierre F. Drucbert} for his \xpackage{regcount} package,
% \textsc{Robin Fairbairns} for pointing me to the \xpackage{regcount} package,
% and the \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex}
-% newsgroups for their help in all things \TeX.
+% newsgroups for their help in all things \TeX{}.
%
% \pagebreak
%
@@ -966,6 +1109,17 @@ have a look at the end of the log-file.
% \item Option |proof| added.
% \item Diverse details.
% \end{Version}
+% \begin{Version}{2011/06/08 v1.0c}
+% \item Bug Fix: Number of available |\skip| registers with \eTeX.
+% \item Change in \eTeX -detection.
+% \item New option |left|.
+% \item Minor details.
+% \end{Version}
+% \begin{Version}{2011/06/18 v1.0d}
+% \item Bug Fix: Information about used registers/counter fixed.
+% \item New option |timer|.
+% \item Some details.
+% \end{Version}
% \end{History}
%
% \bigskip
@@ -973,7 +1127,7 @@ have a look at the end of the log-file.
% When you find a mistake or have a suggestion for an improvement of this package,
% please send an e-mail to the maintainer, thanks! (Please see BUG REPORTS in the README.)
%
-% \bigskip
+% \pagebreak
%
% \PrintIndex
%
diff --git a/Master/texmf-dist/source/latex/regstats/regstats.ins b/Master/texmf-dist/source/latex/regstats/regstats.ins
index bca875ca3b2..889344ac39b 100644
--- a/Master/texmf-dist/source/latex/regstats/regstats.ins
+++ b/Master/texmf-dist/source/latex/regstats/regstats.ins
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: regstats
-%% Version: 2011/05/16 v1.0b
+%% Version: 2011/06/18 v1.0d
%%
%% Copyright (C) 2011 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -41,7 +41,7 @@
\input docstrip.tex
\Msg{******************************************************************}
\Msg{* Installation}
-\Msg{* Package: regstats 2011/05/16 v1.0b Counting used registers (HMM)}
+\Msg{* Package: regstats 2011/06/18 v1.0d Counting used registers (HMM)}
\Msg{******************************************************************}
\keepsilent
@@ -53,7 +53,7 @@
This is a generated file.
Project: regstats
-Version: 2011/05/16 v1.0b
+Version: 2011/06/18 v1.0d
Copyright (C) 2011 by
H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
diff --git a/Master/texmf-dist/tex/latex/regstats/regstats.sty b/Master/texmf-dist/tex/latex/regstats/regstats.sty
index 946a338bf9f..f175cdb2258 100644
--- a/Master/texmf-dist/tex/latex/regstats/regstats.sty
+++ b/Master/texmf-dist/tex/latex/regstats/regstats.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: regstats
-%% Version: 2011/05/16 v1.0b
+%% Version: 2011/06/18 v1.0d
%%
%% Copyright (C) 2011 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -39,7 +39,7 @@
%% regstats-example.tex.
%%
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
-\ProvidesPackage{regstats}[2011/05/16 v1.0b
+\ProvidesPackage{regstats}[2011/06/18 v1.0d
Counting used registers (HMM)]
%% Allows to count the number of used registers
@@ -57,30 +57,57 @@
\SetupKeyvalOptions{family=regstats,prefix=regstats@}
\DeclareBoolOption{proof}% \regstats@proof
+\DeclareBoolOption{left}
+\DeclareBoolOption{timer}
+
\ProcessKeyvalOptions*
-\newif\ifetex
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname eTeXversion\endcsname\relax
- \etexfalse
+\ifregstats@proof
+ \PackageInfo{regstats}{%
+ This package will use one of each kind of register itself!\MessageBreak%
+ (And other packages used by this package\MessageBreak%
+ probably use additional resources,\MessageBreak%
+ if those packages are not used anyway.)\MessageBreak%
+ }
\else
- \etextrue
+ \PackageInfo{regstats}{%
+ This package will use one counter itself!\MessageBreak%
+ (And other packages used by this package\MessageBreak%
+ probably use additional resources,\MessageBreak%
+ if those packages are not used anyway.)\MessageBreak%
+ }
\fi
-\ifetex
- \PackageInfo{regstats}{e-TeX found.}
-\else
- \PackageWarning{regstats}{Could not find e-TeX.\MessageBreak%
- That can mean that e-TeX was disabled or\MessageBreak%
- that your distribution of TeX does not contain e-TeX.\MessageBreak%
- Some packages will not work without e-TeX,\MessageBreak%
- but should give according messages.\MessageBreak%
- }
+\ifregstats@timer
+ \RequirePackage{intcalc}[2007/09/27]% v1.1
\fi
+\AtBeginDocument{%
+ \newif\ifetex
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname eTeXversion\endcsname\relax
+ \etexfalse
+ \else
+ \@ifpackageloaded{etex}{\etextrue}{\etexfalse}
+ \fi
+ \ifetex
+ \PackageInfo{regstats}{e-TeX found.}
+ \else
+ \PackageWarning{regstats}{Could not find e-TeX.\MessageBreak%
+ That can mean that e-TeX was disabled or\MessageBreak%
+ that your distribution of TeX does not contain e-TeX\MessageBreak%
+ or that you forgot to say \string\usepackage{etex}\MessageBreak%
+ in the preamble of \jobname.tex.\MessageBreak%
+ Some packages will not work without e-TeX,\MessageBreak%
+ but should give according messages.\MessageBreak%
+ }
+ \fi
+ }
+
\AtVeryEndDocument{%
\AtVeryVeryEnd{%
- \newcommand{\regstats@s}[3]{%
+ \def\regstats@lft{}%
+ \newcommand{\regstats@regstat}[5]{%
\setcounter{regstatscount}{#1}
\ifnum \value{regstatscount}=0
\setcounter{regstatscount}{2}
@@ -90,14 +117,28 @@
\else
\gdef\regstats@pl{#2}
\fi
- }
+ \ifetex\edef\regstats@max{#5}\else\edef\regstats@max{#4}\fi
+ \ifregstats@left
+ \setcounter{regstatscount}{\regstats@max}
+ \addtocounter{regstatscount}{-#1}
+ \ifnum \value{regstatscount}>0
+ \edef\regstats@lft{, left: \arabic{regstatscount}}
+ \else
+ \ifnum \value{regstatscount}=0
+ \edef\regstats@lft{, left: \arabic{regstatscount} !!!}
+ \else% \value{regstatscount}<0
+ \edef\regstats@lft{, left: \arabic{regstatscount} **********}
+ \fi
+ \fi
+ \fi
+ }
\newcounter{regstatscount}
\edef\regstats@counter{\the\allocationnumber}
\ifregstats@proof
\PackageWarning{regstats}{%
Package regstats loaded with option 'proof'.\MessageBreak%
- This package itself will use one of each register\MessageBreak%
- for testing!%
+ This package itself will now use\MessageBreak%
+ one of each register for testing!%
}%
\def\regstats@proof{1}
\edef\regstats@test{\the\count10}
@@ -178,9 +219,10 @@
\edef\regstats@test{0}
\ifx\regstats@proof\regstats@test
\message{Regstats test for register numbers failed.^^J}
- \message{Therefore option 'proof' is necessary to get the right numbers.^^J}
+ \message{Therefore option 'proof' is necessary to get the %
+ right numbers.^^J}
\fi
- \else
+ \else
\edef\regstats@dimen{\the\count11}
\edef\regstats@skip{\the\count12}
\edef\regstats@muskip{\the\count13}
@@ -199,28 +241,48 @@
\message{^^J}
\message{Here is how much of TeX's registers you used^^J}%
\message{\space (numbers of available registers are estimated!):^^J}%
- \regstats@s{\regstats@counter}{}{s}
- \message{ \regstats@counter\space counter register\regstats@pl\space out of}\ifetex\message{32767}\else\message{233}\fi
- \regstats@s{\regstats@dimen}{}{s}
- \message{^^J \regstats@dimen\space dimen register\regstats@pl\space out of}\ifetex\message{32767}\else\message{233}\fi
- \regstats@s{\regstats@skip}{}{s}
- \message{^^J \regstats@skip\space skip register\regstats@pl\space out of 233}
- \regstats@s{\regstats@muskip}{}{s}
- \message{^^J \regstats@muskip\space muskip register\regstats@pl\space out of}\ifetex\message{32767}\else\message{255}\fi
- \regstats@s{\regstats@box}{}{s}
- \message{^^J \regstats@box\space box register\regstats@pl\space out of}\ifetex\message{32767}\else\message{233}\fi
- \regstats@s{\regstats@toks}{}{s}
- \message{^^J \regstats@toks\space toks register\regstats@pl\space out of}\ifetex\message{32767}\else\message{255}\fi
- \regstats@s{\regstats@read}{}{s}
- \message{^^J \regstats@read\space input stream\regstats@pl\space (read) out of 15}
- \regstats@s{\regstats@write}{}{s}
- \message{^^J \regstats@write\space output stream\regstats@pl\space (write) out of 15}
- \regstats@s{\regstats@fam}{y}{ies}
- \message{^^J \regstats@fam\space math famil\regstats@pl\space (fam) out of 15}
- \regstats@s{\regstats@language}{}{s}
- \message{^^J \regstats@language\space language code\regstats@pl\space out of 255}
- \regstats@s{\regstats@insert}{}{s}
- \message{^^J \regstats@insert\space insertion\regstats@pl\space out of}\ifetex\message{124^^J}\else\message{101^^J}\fi
+ \regstats@regstat{\regstats@counter}{}{s}{233}{32767}
+ \message{ \regstats@counter\space counter register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@dimen}{}{s}{233}{32767}
+ \message{ \regstats@dimen\space dimen register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@skip}{}{s}{233}{32767}
+ \message{ \regstats@skip\space skip register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@muskip}{}{s}{255}{32767}
+ \message{ \regstats@muskip\space muskip register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@box}{}{s}{233}{32767}
+ \message{ \regstats@box\space box register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@toks}{}{s}{255}{32767}
+ \message{ \regstats@toks\space toks register\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@read}{}{s}{15}{15}
+ \message{ \regstats@read\space input stream\regstats@pl\space (read) out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@write}{}{s}{15}{15}
+ \message{ \regstats@write\space output stream\regstats@pl\space (write) out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@fam}{y}{ies}{15}{15}
+ \message{ \regstats@fam\space math famil\regstats@pl\space (fam) out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@language}{}{s}{255}{255}
+ \message{ \regstats@language\space language code\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \regstats@regstat{\regstats@insert}{}{s}{101}{124}
+ \message{ \regstats@insert\space insertion\regstats@pl\space out of \regstats@max \regstats@lft ^^J}
+ \ifregstats@timer
+ \message{^^J}
+ \setcounter{regstatscount}{\the\pdfelapsedtime}
+ \edef\regstatselapsedtime{\arabic{regstatscount}}
+ \divide \value{regstatscount} by 65536% scaledseconds -> seconds
+ \edef\regstatsseconds{\arabic{regstatscount}}
+ \ifnum \value{regstatscount} > 59
+ \edef\regstatsseconds{\intcalcMod{\value{regstatscount}}{60}}
+ \divide \value{regstatscount} by 60% seconds -> minutes
+ \else
+ \setcounter{regstatscount}{0}% minutes = 0
+ \fi
+ \ifnum \regstatsseconds < 10
+ \message{Time elapsed: about \arabic{regstatscount}:0\regstatsseconds%
+ \space (m:ss; \regstatselapsedtime /65536 s).^^J}
+ \else
+ \message{Time elapsed: about \arabic{regstatscount}:\regstatsseconds %
+ \space (m:ss; \regstatselapsedtime /65536 s).^^J}
+ \fi
+ \fi
}
}