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

Abierto
#2,906 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
xml
Área
tooling

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
XSLT
Estrellas
466
Forks
251
Merge medio
4 min
PR fusionados (30 d)
13

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PreTeXtBook/pretext

Todos los issues de PreTeXtBook/pretext

Issues similares

Más issues de DevTools

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.