\hyper@anchorstart in draft mode wrong number of parameters
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 205
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
Originally \hyper@anchorstart uses one parameter but in draft mode it is redefined to use two parameters (\def\hyper@anchorstart#1#2{#2\Hy@xspace@end}) and here comes bug with natbib.
\documentclass{book}
\usepackage{natbib}
\usepackage[draft]{hyperref}
\begin{document}
\begin{thebibliography}{1}
\bibitem[{Awwad(2016)}]{sss}
x
\end{thebibliography}
\end{document}
Tracing shows that \hyper@anchorstart is with one parameter but expects two:
\hyper@natanchorstart #1->\Hy@raisedlink {\hyper@anchorstart {cite.#1}}
#1<-sss\@extra@b@citeb
\Hy@raisedlink ->
\hyper@anchorstart #1#2->#2\Hy@xspace@end
#1<-cite.sss\@extra@b@citeb
! Argument of \hyper@anchorstart has an extra }.
<inserted text>
\par
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
Reproduce the failure with the minimal book, natbib, and draft-mode hyperref document in the issue. Trace the \hyper@natanchorstart to \Hy@raisedlink call and inspect the draft-mode definition of \hyper@anchorstart. Done means the example compiles without the extra-argument error while preserving draft-mode anchor behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, tex
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100