add counters package to print all counters to aux file

This commit is contained in:
Maximilian Keßler 2021-09-17 19:35:35 +02:00
parent b9052b2168
commit d71eb1005d

View file

@ -0,0 +1,14 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mkessler-counters}[2021-09-06 - Write counters to auxiliary file]
\RequirePackage{etoolbox}
\newwrite\mkessler@counters@out
\immediate\openout\mkessler@counters@out\jobname.cnt\relax
\AtBeginDocument{
\let\mkessler@counters@saved@stepcounter\stepcounter
\def\stepcounter#1{
\mkessler@counters@saved@stepcounter{#1}
\immediate\write\mkessler@counters@out{#1: \csname the#1\endcsname}}
}