Closed u-fischer closed 4 months ago
When setting up the \theHcounter representation hyperref doesn't expand commands in the counter name at definition time (differently to the kernel):
\theHcounter
\documentclass[11pt]{article} \usepackage{hyperref} %\makeatletter %\def\@definecounter#1{% % \H@definecounter{#1}% % \expandafter % \gdef\csname theH#1\expandafter\endcsname\expandafter % {\expandafter\@arabic\csname c@#1\endcsname}}% %\makeatother \def\blub{duck} \newcounter{\blub} \show\theduck \show\theHduck \begin{document} \refstepcounter{duck} xxx \end{document}
gives
> \theduck=macro: ->\@arabic \c@duck . l.199 \show\theduck ? > \theHduck=macro: ->\arabic {\blub }.
This is a problem if temporary commands are used which have changed their meaning when the counter is actually used. See https://tex.stackexchange.com/questions/709519/hyperref-conflicting-with-enumitem
resolved in 7.01i
When setting up the
\theHcounter
representation hyperref doesn't expand commands in the counter name at definition time (differently to the kernel):gives
This is a problem if temporary commands are used which have changed their meaning when the counter is actually used. See https://tex.stackexchange.com/questions/709519/hyperref-conflicting-with-enumitem