HTML drops a division's blocks when its only specialized division is a "worksheet" or "handout"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 56/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- xml
- Domain
- backend
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- XSLT
- Stars
- 466
- Forks
- 251
- Avg merge
- 4m
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PreTeXtBook/pretext
-
The print preview leaves writing space short by the margins of hidden headers, footers and solutionsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3329 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
PreTeXtBook/pretext#3305 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3297 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
PreTeXtBook/pretext#3285 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3283 ·
Maintainers usually reply within 1 day
All issues in PreTeXtBook/pretext
Similar issues
-
adapter bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Olanetsoft/agent-lookout#353 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
notify: voice_queue rows are deleted only at startup, so a hub that stays up grows it without boundOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mattabate/life-distributable#232 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
sfbrigade/pocket-gardens#60 ·
Maintainers usually reply within 5 days