HTML drops a division's blocks when its only specialized division is a "worksheet" or "handout"
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
- 56/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- xml
- Área
- backend
Línea de trabajo
Start by reading the "is-leaf" template in xsl/pretext-common.xsl and the "intermediate" template in xsl/pretext-html.xsl; the issue identifies how they interact. Build the supplied reproduction as HTML with a publication file containing only <publication/> and inspect the generated chapter pages. Done means the preceding paragraph and listing appear on a page, or the schema rejects this placement, with no silent loss.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
A division may hold paragraphs and other blocks followed by specialized divisions, and the schema accepts a worksheet or handout among those. When a worksheet or handout is the only specialized division, the HTML conversion puts the blocks ahead of it on no page, and reports nothing.
The Guide shows it. The Basics Reference chapter "Worksheets" (basics-ch-worksheets in doc/guide/basics/basics-part.xml) opens with a paragraph and Listing 17.0.1, "Structure of worksheet", followed by its worksheet. The chapter's HTML page has only a link to the worksheet. The paragraph and the listing are on no page: cross-references to the listing point to basics-ch-worksheets.html#basics-l-worksheet, which has no such element, and only their knowls show it. The Guide validates with no message about this chapter.
This book reproduces it, and validates with no messages:
<?xml version="1.0" encoding="UTF-8"?>
<pretext>
<book xml:id="repro">
<title>Worksheet Reproduction</title>
<chapter xml:id="ch-worksheet" label="ch-worksheet">
<title>Paragraph Then Worksheet</title>
<p>PARAGRAPH-BEFORE-WORKSHEET</p>
<worksheet xml:id="ws-one" label="ws-one">
<title>The Worksheet</title>
<p>INSIDE-WORKSHEET</p>
</worksheet>
</chapter>
<chapter xml:id="ch-introduction" label="ch-introduction">
<title>Introduction Then Worksheet</title>
<introduction>
<p>PARAGRAPH-IN-INTRODUCTION</p>
</introduction>
<worksheet xml:id="ws-two" label="ws-two">
<title>Another Worksheet</title>
<p>INSIDE-SECOND-WORKSHEET</p>
</worksheet>
</chapter>
<chapter xml:id="ch-handout" label="ch-handout">
<title>Paragraph Then Handout</title>
<p>PARAGRAPH-BEFORE-HANDOUT</p>
<handout xml:id="ho-one" label="ho-one">
<title>The Handout</title>
<p>INSIDE-HANDOUT</p>
</handout>
</chapter>
<chapter xml:id="ch-exercises" label="ch-exercises">
<title>Paragraph Then Exercises</title>
<p>PARAGRAPH-BEFORE-EXERCISES</p>
<exercises xml:id="ex-one" label="ex-one">
<title>The Exercises</title>
<exercise><statement><p>INSIDE-EXERCISES</p></statement></exercise>
</exercises>
</chapter>
</book>
</pretext>
Built as HTML on current master, with a publication file that is only <publication/>, the build reports nothing, and the contents land here:
| Chapter | Its paragraph | Its specialized division |
|---|---|---|
Paragraph, then worksheet |
on no page | its own page |
introduction, then worksheet |
the introduction's own page, linked from the chapter's page | its own page |
Paragraph, then handout |
on no page | its own page |
Paragraph, then exercises |
the chapter's page | the chapter's page |
The "is-leaf" template in xsl/pretext-common.xsl answers false for a division that has a worksheet or handout and no other specialized division. Its comment speaks of "a division full of only "worksheet" or "handout"", but the test does not look for blocks. Such a division becomes a summary page, and the "intermediate" template in xsl/pretext-html.xsl writes the heading and links to the subdivisions only: "everything else on a summary page gets dropped". The same test serves every division; the reproduction uses chapters.
Either the conversion places those blocks, or the schema stops accepting them ahead of a worksheet or handout that is the only specialized division. For the Guide's chapter, an introduction around the paragraph and the listing would put them on a page now.
Claude Opus 5.5, 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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PreTeXtBook/pretext
-
The print preview leaves writing space short by the margins of hidden headers, footers and solutionsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PreTeXtBook/pretext#3329 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
PreTeXtBook/pretext#3305 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PreTeXtBook/pretext#3297 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
PreTeXtBook/pretext#3285 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PreTeXtBook/pretext#3283 ·
Los mantenedores suelen responder en 1 día
Todos los issues de PreTeXtBook/pretext
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
sfbrigade/pocket-gardens#60 ·
Los mantenedores suelen responder en 5 días
-
backlog priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
storytold/vectorcraft#8352 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:storage kind:test priority:p3 ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
samuelclay/NewsBlur#2214 ·
Los mantenedores suelen responder en 1 día