summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/regcount/regcount.dtx
blob: a06f3adfd30952c91fbbd16493bd17776509d7b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
% \iffalse
%% Package `regcount' to use with LaTeX 2e
%% Copyright (C) 1997, 1998, 1999 Jean-Pierre F. Drucbert, all rights reserved
%%
%% You may use and distribute this file freely, provided that
%% you don't pretend that you wrote it.
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.1
% 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.1 or later is part of all distributions of LaTeX 
% version 1999/06/01 or later.
%
%<package>\NeedsTeXFormat{LaTeX2e}[1999/06/01]
%<package>\ProvidesPackage{regcount}
%<package>         [1999/08/03 v1.0 Register counting (JPFD)]
%
%<*driver>
\documentclass{ltxdoc}
\AtBeginDocument{\DeleteShortVerb{\|}}
\IfFileExists{regcount.sty}{\usepackage{regcount}}{}
\def\filedate{1999/08/03}
\def\fileversion{v1.1}
\EnableCrossrefs         
%\DisableCrossrefs   % Say \DisableCrossrefs if index is ready
\RecordChanges                  % Gather update information
% \CodelineIndex                  % Index code by line number
\title{The \pkg{regcount} package}
\author{Jean-Pierre F. Drucbert\\\texttt{drucbert@onecert.fr}}%
\def\bs{\texttt{\char'134}}
\let\pkg\textsf
\newcommand\file[1]{\texttt {#1}}
\begin{document}
\date{Printed \today, file dated \filedate}
\maketitle
\DocInput{regcount.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{102}
%% \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
%%   Lower-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
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
%
% \changes{v1.0}{1999/08/03}{(JPFD) First officially released version.}
% \changes{v1.1}{1999/08/03}{(JPFD) Corrected typos.}
%
% \DoNotIndex{\@Mii,\@Miv,\@cons,\@currlist,\@dblarg,\@dbldeferlist}
% \DoNotIndex{\@dblfloat,\@dottedtocline,\@eha,\@Esphack,\@float}
% \DoNotIndex{\@floatpenalty,\@ifnextchar,\@ifundefined,\@latexerr}
% \DoNotIndex{\@mkboth,\@namedef,\@nameuse,\@parboxrestore,\@spaces}
% \DoNotIndex{\@starttoc,\@tempa,\@tempboxa,\@tempdima,\@warning}
% \DoNotIndex{\addcontentsline,\addtocounter,\advance,\arabic,\bfseries}
% \DoNotIndex{\bgroup,\box,\chapter,\columnwidth,\csname,\def,\dimen,\docdate}
% \DoNotIndex{\edef,\egroup,\else,\endcsname,\endinput,\expandafter,\fi}
% \DoNotIndex{\filedate,\fileversion,\global,\hbadness,\hbox,\hfil,\hrule}
% \DoNotIndex{\hsize,\ht,\if@twocolumn,\ifdim,\iffalse,\ifnum,\iftrue,\ifvbox}
% \DoNotIndex{\ifx,\ignorespaces,\intextsep,\kern,\let,\long,\moveleft,\newbox}
% \DoNotIndex{\newcommand,\newcounter,\newif,\newsavebox,\noexpand,\normalsize}
% \DoNotIndex{\numberline,\PackageError,\PackageWarning,\par,\parindent}
% \DoNotIndex{\penalty,\prevdepth,\protect,\refstepcounter,\relax}
% \DoNotIndex{\renewcommand,\rmfamily,\section,\setbox,\setcounter,\space}
% \DoNotIndex{\textheight,\the,\typeout,\unvbox,\uppercase,\vadjust,\value}
% \DoNotIndex{\vbox,\vrule,\vskip,\vspace,\wd,\z@,\item\subitem}
%
% \GetFileInfo{regcount.sty}
%
% \MakeShortVerb{\|}
%
% \begin{abstract}
% This package\footnote{%
% \begin{tabular}[t]{l}
% Copyright \copyright\ 1997, 1998, 1999 by\\
% Jean-Pierre F. Drucbert\vphantom{bp}\\
% ONERA/Centre de Toulouse SRI\vphantom{bp}\\
% Office National d'\'Etudes et de Recherches A\'erospatiales\vphantom{bp}\\
% Centre de Toulouse\vphantom{bp}\\
% Service R\'eseaux et Informatique\vphantom{bp}\\
% Complexe Scientifique de Rangueil\vphantom{bp}\\
% \\
% 2, Avenue \'Edouard Belin\vphantom{bp}\\
% BP 4025 F-31055 TOULOUSE CEDEX\vphantom{bp}\\
% FRANCE\vphantom{bp}\\
% \vphantom{bp}\\
% Email: \texttt{drucbert@onecert.fr}\vphantom{bp}\\
% \end{tabular}}
% writes in the \file{.log} file the allocation status of various \TeX\
% registers (counters, lengths, skips, etc.). It \emph{does not produces
% anything} in the document.
% \end{abstract}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{The \pkg{regcount} package}
% \DescribeMacro{\rgcounts}
% This package defines the \cs{rgcounts} macro who writes in the \file{.log}
% the allocation status of the various kinds of \TeX\ registers. The user
% can call this macro at any time, but it is always invoked at the
% |\begin{document}| and |\end{document}| limits. The \cs{rgcounts} does not
% write anything in your document.
%
% The main use of this package and of the \cs{rgcounts} macro is to see the needs in \TeX\
% registers of the packages you are loading in your document, so you can add \cs{rgcounts}
% commands before and after the \cs{usepackage} commands.
%
% \StopEventually{\setcounter{IndexColumns}{2}}
%
% \clearpage
% \section{Implementation}
%
% \begin{macro}{\rgcounts}
%    \begin{macrocode}
%<*package>
%    \end{macrocode}
% \end{macro}
% There is one internal macro for each kind of \TeX\ register. I hope I do not
% forget some ones. The allocation counters are dependent of the release, but it
% seems stable.
% \begin{enumerate}
%    \item Counter registers:
% \begin{macro}{\rgc@counts}
%    \begin{macrocode}
\def\rgc@counters{\GenericInfo{}{%
        (regcount)\@spaces Allocated counter registers= \the\count10\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Dimension registers:
% \begin{macro}{\rgc@dimens}
%    \begin{macrocode}
\def\rgc@dimens{\GenericInfo{}{%
        (regcount)\@spaces Allocated dimen registers= \the\count11\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Skip registers:
% \begin{macro}{\rgc@skips}
%    \begin{macrocode}
\def\rgc@skips{\GenericInfo{}{%
        (regcount)\@spaces Allocated skip registers= \the\count12\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Muskip registers:
% \begin{macro}{\rgc@muskips}
%    \begin{macrocode}
\def\rgc@muskips{\GenericInfo{}{%
        (regcount)\@spaces Allocated muskip registers= \the\count13\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Box registers:
% \begin{macro}{\rgc@boxes}
%    \begin{macrocode}
\def\rgc@boxes{\GenericInfo{}{%
        (regcount)\@spaces Allocated box registers= \the\count14\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Token registers:
% \begin{macro}{\rgc@tokens}
%    \begin{macrocode}
\def\rgc@tokens{\GenericInfo{}{%
        (regcount)\@spaces Allocated token registers= \the\count15\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Input channels:
% \begin{macro}{\rgc@inputs}
%    \begin{macrocode}
\def\rgc@inputs{\GenericInfo{}{%
        (regcount)\@spaces Allocated input channels= \the\count16\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Output channels:
% \begin{macro}{\rgc@outouts}
%    \begin{macrocode}
\def\rgc@outputs{\GenericInfo{}{%
        (regcount)\@spaces Allocated output channels= \the\count17\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Math families:
% \begin{macro}{\rgc@mathfamilies}
%    \begin{macrocode}
\def\rgc@mathfamilies{\GenericInfo{}{%
        (regcount)\@spaces Allocated math families= \the\count18\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Languages:
% \begin{macro}{\rgc@languages}
%    \begin{macrocode}
\def\rgc@languages{\GenericInfo{}{%
        (regcount)\@spaces Allocated languages= \the\count19\@spaces}}
%    \end{macrocode}
% \end{macro}
%    \item Insertions:
% \begin{macro}{\rgc@insertions}
%    \begin{macrocode}
\def\rgc@insertions{\GenericInfo{}{%
        (regcount)\@spaces Allocated insertions= \the\count20\@spaces}}
%    \end{macrocode}
% \end{macro}
% \end{enumerate}

% \begin{macro}{\rgcounts}
% This (user) macro calls all the preceeding ones, and add some text.
%    \begin{macrocode}
\def\rgcounts{%
\GenericInfo{}{(regcount)\@spaces===========ALLOCATIONS===================\@spaces}%
\rgc@counters
\rgc@dimens
\rgc@skips
\rgc@muskips
\rgc@boxes
\rgc@tokens
\rgc@inputs
\rgc@outputs
\rgc@mathfamilies
\rgc@languages
\rgc@insertions
\GenericInfo{}{(regcount)\@spaces=========================================\@spaces}%
\ignorespaces}
%    \end{macrocode}
% \end{macro}

% And we add two automatic calls:
%    \begin{macrocode}
\AtBeginDocument{\rgcounts}
\AtEndDocument{\rgcounts}
\endinput
%    \end{macrocode}

%
% \PrintChanges
% \PrintIndex
% \Finale
% \end{document}
\endinput