0

According to the totcount guide, I can define multiple auxiliary files within the same document, by using different \regtotcounter[auxfile=]{} commands. I want to do that because I want to keep different total counters in different files. However, as the following simple example shows, only the last-defined auxiliary file will contain the values of all total counters registered.
Is this a bug in totcount's code?

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter

\usepackage{lipsum}
\usepackage{totcount}
\regtotcounter[auxfile=eqscount.tc]{equation}
\regtotcounter[auxfile=figscount.tc]{figure}


\makeatother

\usepackage{babel}
\begin{document}
\lipsum[1]
\begin{equation}
a=b\label{eq:e1}
\end{equation}

\lipsum[2]
\begin{equation}
c=d\label{eq:2}
\end{equation}

\lipsum[3]

\begin{figure}

\caption{Fig. \label{fig:1}}
\end{figure}

\lipsum[4]
\end{document}
2
  • looks like a bug. But you really don't want to use this option. The package allocates for each one a new write register and keeps it open. write registers are scarce resources and this is wasting them for no use at all. Commented Jul 26, 2021 at 17:45
  • How so? I intend to load and use these total counters in other documents.
    – rgaelzer
    Commented Jul 26, 2021 at 18:37

0

You must log in to answer this question.

Browse other questions tagged .