I've been looking into some (long-overdue) changes to how PreTeXt computes the
numbers of various objects. Since the very beginning, we have looked to LaTeX
as our style guide. Not always a good idea, but for numbering it has served us
well.
Turns out for subnumbered figures (a #figure as a #sidebyside panel, with the
#sidebyside inside an overall #figure), LaTeX likes to write "Figure 26.2(b)",
while in HTML (and elsewhere) we have for a long time been writing "Figure
26.2.(b)". You hadn't noticed? Me either, until today.
And it was not by laboriously scanning HTML output side-by-side with a PDF. I
have, with a little help from Claude, added a flag, debug.numbering.check, which
writes a whole pile of assertions into LaTeX source, indicating the number
PreTeXt computes as an argument to a macro. The macro gets the LaTeX number,
*at compile time*, and will write a warning into the *.log file if there is a
mismatch. Look for lines prefixed with "PreTeXt Warning:". Covers blocks
numbered by tcolorbox and divisions (so not absolutely everything, we do
hard-code some numbers in LaTeX output).
Two minor bugs have surfaced, one known, another new. Quite obscure, it'll take
me some time to attack them.
Should have added this a long time ago. ;-)
See
https://github.com/PreTeXtBook/pretext/pull/2811 for more details.
Rob