Hi all,
Now this sure caused some head scratching. In the process of unicode-math testing some code which otherwise worked started breaking; here's a minimal example:
\documentclass{article}
\usepackage{etex}
\newcount\ii
\loop
\advance\ii by 1\relax
\expandafter\newcount\csname count@\number\ii\endcsname
\ifnum\ii<145 % <- exactly!
\repeat
\DeclareMathVersion{xits}
\begin{document}
The culprit being largely the following line in \new@mathversion:
\global\expandafter\newcount\csname c@\expandafter \@gobble\string#1\endcsname
When the lower level of registers runs out, etex.sty's \alloc@ redefines \newcount to use the extended pool; the execution of this branch throws an error when preceded by \global.
As far as I know writing \global\newcount is the same as \newcount, so I'll change this in the 2e code.
-- Will