HTML and PDF disagree on the number of an item in a "conclusion"
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- html, latex, xml
- Ambito
- build-system
Direzione di ricerca
Reproduce with the minimal <chapter> XML in the issue and compare the generated HTML and PDF numbers for thm-intro, thm-body, thm-concl, and their <xref>s. Then trace the HTML assembly-time numbering and the LaTeX/PDF counter reset around <conclusion>; the issue points to #2885 and #2904 as prior changes to the same numbering path. Done when conclusion items and every cross-reference agree across formats, including equations and footnotes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A numbered item (theorem-like block, figure, project, numbered equation, footnote, …) placed in the <conclusion> of a structured division receives a different number in HTML than in PDF. In HTML the conclusion's items continue the division's running count (they are pooled after the body); in LaTeX/PDF the native counters restart, so the same item gets a lower number. The item — and every cross-reference to it — disagrees between the two formats.
This is specific to <conclusion>. Items in an <introduction> agree across formats, because an introduction is the division's first content and both formats begin the count there.
Minimal example
<chapter xml:id="ch">
<title>Chapter</title>
<introduction>
<theorem xml:id="thm-intro"><statement><p>An introduction theorem.</p></statement></theorem>
</introduction>
<section xml:id="s1">
<title>Body</title>
<theorem xml:id="thm-body"><statement><p>A body theorem.</p></statement></theorem>
</section>
<conclusion>
<theorem xml:id="thm-concl"><statement><p>A conclusion theorem.</p></statement></theorem>
</conclusion>
</chapter>
Build HTML and PDF and compare. thm-intro gets the same number in both formats (introductions agree, being the division's first content). thm-concl does not — HTML continues the chapter's running count while LaTeX/PDF restarts in the conclusion — and every <xref> to it inherits the discrepancy. (Exact values depend on the numbering-level configuration.)
Expected
The same item has the same number in every output format.
Background
The cause is structural: HTML derives numbers from a single assembly-time count that pools introduction/conclusion items at a division's edges, while LaTeX/PDF uses native counters that restart per division. Numbered equations and footnotes have used that assembly-time count since #2885, so they already show this disagreement in a conclusion; #2904 brings theorem-like blocks, figures, and projects under the same approach, extending the behavior to them.
Recorded as a known-behavior bug. Related: #2906 (inline exercises in an introduction or conclusion).
Claude Opus 4.8, acting as a coding assistant for Rob Beezer
- Lingua principale
- XSLT
- Stelle
- 466
- Fork
- 251
- Merge medio
- 4m
- PR unite (30g)
- 13
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PreTeXtBook/pretext
-
The print preview leaves writing space short by the margins of hidden headers, footers and solutionsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PreTeXtBook/pretext#3329 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
PreTeXtBook/pretext#3305 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PreTeXtBook/pretext#3297 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
PreTeXtBook/pretext#3285 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PreTeXtBook/pretext#3283 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PreTeXtBook/pretext
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
NativeScript/ios#577 ·
I maintainer di solito rispondono entro 1 giorno
-
bot:ai-assisted component:platform-js status:untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
midnightntwrk/platform-js#38 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
oxc-project/tsrs#1010 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
rubys/roundhouse#2217 ·