Closed muzimuzhi closed 3 weeks ago
It works ok for me. You must ensure that the format has been built with the newest firstaid version. You can check that by looking into the hook label:
\documentclass{article}
\usepackage{hyperref}
\usepackage{cleveref}
\begin{document}
\ShowHook{label}
\section{title}\label{key}
\cref{key} % typesets "??"
\end{document}
it should show the cleveref hook:
-> The hook 'label' (1 argument):
> Code chunks:
> nameref -> \def \label@name {#1}\label@hook
> firstaid/cleveref -> \ifx \@currentcounter \@empty \else \firstaid@cref@updatelabeldata {\@currentcounter } \fi
> Document-level (top-level) code (executed last):
> ---
> Extra code for next invocation:
> ---
> Rules:
> ---
> Execution order:
> nameref, firstaid/cleveref.
<recently read> }
It works ok for me.
You're right. The problem disappears if I use the format built from this repo, on tag release-2024-11-01. Perhaps some changes taken place between the last pre-release and the stable release of 2024-11-01 help.
I'll close this issue once double checked using LaTeX 2024-11-01 updated from tlmgr
.
Perhaps some changes taken place between the last pre-release and the stable release of 2024-11-01 help.
It's 3d8c18544 (firstaid for gh1393 and tagging-project733 (#1494), 2024-10-21).
I'll close this issue once double checked using LaTeX 2024-11-01 updated from
tlmgr
.
Confirm fixed, thank you again.
Brief outline of the bug
Loading
hyperref
andcleveref
in LaTeX 2024-11-01, the use of\refstepcounter{<counter>}
won't update\cref@currentlabel
thus a corresponding\cref{<counter>}
will typeset "??".This may be related to the changes in
hyperref
: when used with LaTeX 2024-11-01, it doesn't redefine\refstepcounter
anymore.Found when running
l3build check --dev
fromctex
directory, https://github.com/CTeX-org/ctex-kit repository.Minimal example showing the bug
In
.aux
Log file (required) and possibly PDF file
cleveref-refstepcounter.log