HTML drops a division's blocks when its only specialized division is a "worksheet" or "handout"
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- xml
- 領域
- backend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- XSLT
- スター
- 466
- フォーク
- 251
- 平均マージ
- 4分
- マージ済み PR(30日)
- 13
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PreTeXtBook/pretext のほかの issue
-
The print preview leaves writing space short by the margins of hidden headers, footers and solutionsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PreTeXtBook/pretext#3329 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
PreTeXtBook/pretext#3305 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PreTeXtBook/pretext#3297 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
PreTeXtBook/pretext#3285 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PreTeXtBook/pretext#3283 ·
メンテナーはふだん 1 日以内に返信
PreTeXtBook/pretext の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sfbrigade/pocket-gardens#60 ·
メンテナーはふだん 5 日以内に返信
-
backlog priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
storytold/vectorcraft#8352 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:storage kind:test priority:p3 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
samuelclay/NewsBlur#2214 ·
メンテナーはふだん 1 日以内に返信