diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/counttexruns/counttexruns.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/counttexruns/counttexruns.sty | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/counttexruns/counttexruns.sty b/Master/texmf-dist/tex/latex/counttexruns/counttexruns.sty new file mode 100644 index 00000000000..317b46d8f58 --- /dev/null +++ b/Master/texmf-dist/tex/latex/counttexruns/counttexruns.sty @@ -0,0 +1,28 @@ +%% See file 'counttexruns.dtx' for copyright and licence. +\NeedsTeXFormat{LaTeX2e}[1998/12/01] +\ProvidesPackage{counttexruns} + [2012/08/27 v1.00 Counts the TeX runs] +%% ^^A \% is ignored ... +\newcounter{counttexruns} +\newwrite\@counttexrunsfile +\RequirePackage{kvoptions} +\DeclareStringOption[ctr]{extension} +\ProcessLocalKeyvalOptions* +\IfFileExists{\jobname.\counttexruns@extension}{ +\immediate\openin\@counttexrunsfile=\jobname.\counttexruns@extension +\immediate\read\@counttexrunsfile to \counttexruns +\immediate\read\@counttexrunsfile to \counttexruns +\immediate\closeout\@counttexrunsfile +\setcounter{counttexruns}{\counttexruns} +}{} %% \value{counttexruns} is still zero +\stepcounter{counttexruns} +\immediate\openout\@counttexrunsfile=\jobname.\counttexruns@extension +\catcode`\%=11\relax +\immediate\write\@counttexrunsfile{%% This file + '\jobname.\counttexruns@extension' was generated by the package counttexruns} +\catcode`\%=14\relax +\immediate\write\@counttexrunsfile{\arabic{counttexruns}} +\immediate\closeout\@counttexrunsfile +\endinput +%% +%% End of file `counttexruns.sty'. |