latex3 / latex3/hyperref

theorem's target anchor is sometimes placed in the heading of the previous page if heading contains a \vbox

Open
#332 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TeX
Stars
205
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Test case (pdflatex):

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{hyperref}
\newtheorem{thm}{Theorem}
\textheight60pt
\begin{document}
1\\2\\3\\4\\5\\6

\begin{thm}\label{th}
Theorem text.
\end{thm}
Ref to Theorem \ref{th}.
\end{document}

Checked with recent versions, each fails since 7.00w, 7.00v (and previous versions) are OK. (Perhaps since Feb 13, 2023 [new thm implementation]?)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by compiling the supplied minimal test case with pdflatex and compare the theorem anchor placement across the reported hyperref versions, especially 7.00w and 7.00v. Trace the new theorem implementation and hyperlink anchor handling to identify why the target moves to the previous page; done means the anchor is placed with the theorem on the correct page while the reference still resolves.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.