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