Found while adopting qe-v9 in the LaTeX→MyST converter (QuantEcon/claude-latex-to-myst#186). Verified against myst v1.10.1 (qe-v9).
Summary
In a row-numbered environment, every row gets its own target in the AST, but only the first row's identifier is emitted as a DOM anchor. A {eq} reference to any later row resolves to the correct number, then links to an id that does not exist in the page.
Reproduce
$$
\begin{align}
p &= 1 \label{eq-rowp}\\
q &= 2 \label{eq-rowq}
\end{align}
$$
Refs: {eq}`eq-rowp` and {eq}`eq-rowq`.
AST — both rows have distinct targets, and the block adopts the first row's html_id:
|
identifier |
enumerator |
html_id |
| block |
None |
— |
eq-rowp |
| row 1 |
eq-rowp |
5 |
eq-rowp |
| row 2 |
eq-rowq |
6 |
eq-rowq |
Rendered HTML — only one anchor exists:
| id |
present in _build/html/index.html |
eq-rowp |
yes, on the block <div class="flex my-5 group"> |
eq-rowq |
absent |
Both references resolve and both show the right number — (5) and (6) — so nothing warns. The second link simply has no target to scroll to.
Expected
Each numbered row should carry its own anchor in the rendered output, so a per-row reference lands on that row. If per-row DOM anchors are impractical, having later rows fall back to the block anchor would at least be a working link — the current state is a link to a nonexistent id.
Note on scope
This is a rendering/anchor gap, not a numbering one — numbering from #81 is correct throughout, and I could not fault it. Rows of one environment are adjacent on screen, so the practical impact is modest for short blocks and grows with long ones.
Why it matters downstream
The converter currently keeps multi-label align blocks off the passthrough path and splits them into separate $$ blocks, each of which gets its own real anchor. That is the only reason references in the QuantEcon books still land correctly. It costs the shared & alignment axis that #81 otherwise preserves, so fixing this would let those blocks pass through and render as one aligned system.
Found while adopting
qe-v9in the LaTeX→MyST converter (QuantEcon/claude-latex-to-myst#186). Verified againstmyst v1.10.1 (qe-v9).Summary
In a row-numbered environment, every row gets its own target in the AST, but only the first row's identifier is emitted as a DOM anchor. A
{eq}reference to any later row resolves to the correct number, then links to an id that does not exist in the page.Reproduce
AST — both rows have distinct targets, and the block adopts the first row's
html_id:Noneeq-rowpeq-rowpeq-rowpeq-rowqeq-rowqRendered HTML — only one anchor exists:
_build/html/index.htmleq-rowp<div class="flex my-5 group">eq-rowqBoth references resolve and both show the right number —
(5)and(6)— so nothing warns. The second link simply has no target to scroll to.Expected
Each numbered row should carry its own anchor in the rendered output, so a per-row reference lands on that row. If per-row DOM anchors are impractical, having later rows fall back to the block anchor would at least be a working link — the current state is a link to a nonexistent id.
Note on scope
This is a rendering/anchor gap, not a numbering one — numbering from #81 is correct throughout, and I could not fault it. Rows of one environment are adjacent on screen, so the practical impact is modest for short blocks and grows with long ones.
Why it matters downstream
The converter currently keeps multi-label
alignblocks off the passthrough path and splits them into separate$$blocks, each of which gets its own real anchor. That is the only reason references in the QuantEcon books still land correctly. It costs the shared&alignment axis that #81 otherwise preserves, so fixing this would let those blocks pass through and render as one aligned system.