Changed behavior of `cleveref` after `\appendix`
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 205
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
(First caught by a test in the ctex bundle, see log of its scheduled job.)
cleveref updates a set of internal commands at \appendix, especially the logic
\ifx\cref@result\@empty%
\def\cref@result{2147483647}%
\else%
\edef\cref@result{2147483647,\cref@result}%
\fi%
is added to \H@refstepcounter.
This logic is now missing as \H@refstepcounter is not used in hyperref any more.
\documentclass{article}
\usepackage{hyperref}
\usepackage{cleveref}
\makeatletter
\def\test{\show\cref@currentlabel}
\makeatother
\begin{document}
\section{title}
\test
\appendix
\section{title}
\test
\end{document}
Loading cleveref only:
> \cref@currentlabel=macro:
->[section][1][]1.
> \cref@currentlabel=macro:
->[appendix][1][2147483647]A.
Loading both hyperref and cleveref:
> \cref@currentlabel=macro:
->[section][1][]1.
> \cref@currentlabel=macro:
->[section][1][]A. % <<< changed, "2147483647" is missing
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal LaTeX document in the issue and inspect how hyperref and cleveref update \appendix, especially the \H@refstepcounter path and \cref@currentlabel. Compare the output with cleveref alone and with both packages; done means the missing appendix information is restored in the combined case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, tex
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100