Inline "exercise" in an "introduction" or "conclusion" has no number (HTML and PDF)

Aperta
#2,906 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
xml
Ambito
tooling

Direzione di ricerca

Start from the minimal example: an inline <exercise> inside <introduction> gets no number in HTML or PDF, while a body exercise does. Read the numbering behavior left by #2904 (the block family numbered from a stamped @serial) and compare how theorems and figures in an introduction are numbered. The fix direction is still open: either number the inline exercise consistently or reject it. Done means the <xref> shows a number in both formats, or the build flags the construct.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A bare inline <exercise> placed directly in the <introduction> or <conclusion> of a traditional division does not get a correct number. As of #2904 (which numbers the block family from a single stamped @serial) it is left unnumbered, identically in HTML and PDF — the surrounding body exercises are numbered, the introduction/conclusion ones are skipped, and a cross-reference to one has no number to show. This matches the PDF, which has never numbered these exercises. (Before #2904 the same exercise received an incorrect, colliding number in HTML.)

This is specific to inline exercises. Other numbered items in an introduction or conclusion — theorems, figures, projects, equations, footnotes — are numbered (an introduction's agree across formats; a conclusion's have a separate cross-format problem, #2905). The inline <exercise> alone falls outside the division's numbering scheme.

Minimal example
<section xml:id="demo">
  <title>Demo</title>
  <introduction>
    <p>Framing text.</p>
    <exercise xml:id="checkpoint-in-intro">
      <statement><p>An inline exercise in the introduction.</p></statement>
    </exercise>
  </introduction>
  <subsection xml:id="demo-body">
    <title>Body</title>
    <exercise xml:id="checkpoint-in-body">
      <statement><p>An inline exercise in the body.</p></statement>
    </exercise>
  </subsection>
</section>

With #2904, building HTML and PDF: the body exercise is numbered (e.g. "Checkpoint 1.1"); the introduction exercise has no number in either format; and <xref ref="checkpoint-in-intro"/> shows no number.

Expected

Either the item carries a consistent, cross-referenceable number, or the construct is flagged. (The Author's Guide advises against numbered items in an introduction or conclusion, suggesting a titled subdivision instead — but nothing enforces that, and the current result is a silent missing number.)

Recorded as a known-behavior bug; the right resolution (number them, or reject them) is open.

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PreTeXtBook/pretext

Tutte le issue di PreTeXtBook/pretext

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.