Back in the days before TL2020 I’ve been using the xcntperchap
package to get access to the number of subsections within each section. This was very useful for creating custom tocs in beamer, e.g. here a fancy example using a mindmap:
However this quick hack no longer works with the current kernel, so I was wondering if there are any alternatives which would give me the number of subsections in each section?
Minimal (non-)working example:
The issue is not exactly in the kernel, but in the L3 programming layer. \c_zero
was deprecated a while back, because it’s name doesn’t follow the expl3
naming conventions: it’s an int
, but it’s missing the variable type (so we couldn’t have a \c_zero_fp
, for example).
Christian was very kind to fix most of his packages after this deprecation (even if not actively maintaining them anymore), but xcntperchap
seems to have been forgotten.
To work around the issue you can, although not really recommended, use:
xxxxxxxxxx
\ExplSyntaxOn
\cs_set_eq:NN \c_zero \c_zero_int
\ExplSyntaxOff
anywhere in your preamble to make \c_zero
be the same as \c_zero_int
.
For completeness, here’s a full example (exactly the same as yours, with the lines above added):