Problem
The TRIOS PhD monograph renderer can lay out hero panels as a gallery / image train when section breaks and figure placements interact badly. Two failure modes seen in recent builds:
- A section heading sits orphaned at the bottom of a page with its hero image floating to the next page.
- Hero figures from neighbouring sections collapse onto a single page, producing a multi-image "image train" without semantic context.
A previous attempt to fix this by inserting a hard \clearpage before every section produced short title-only pages and was rejected by manual QA.
Rule (non-negotiable)
TRIOS_PHD_NO_IMAGE_TRAIN: each hero panel must travel with the nearest substantive heading and its body text. Use a SOFT keep-together reservation; never a hard \clearpage.
Required implementation
- Add
\usepackage{needspace} to docs/phd/main.tex and templates/chapter.template.tex.
- Wrap
\section and \chapter to prepend \Needspace*{0.58\textheight} (soft keep-together; the starred form skips the break when already at top of page).
- Wrap
\chapterhero so heading + hero figure cannot be split.
- Keep hero images large and centered — this is a placement rule, not a sizing rule.
- Document the rule in
docs/pdf-rendering.md (canonical) and link it from AGENTS.md and docs/phd/README.md.
QA baseline to preserve
150 A4 pages; qpdf --check clean; 0 duplicate long paragraphs; 0 duplicate numbered headings; 0 Cyrillic hits in the body; 0 secret / stale / math anomaly hits; 0 very-short non-empty pages; at most 1 image-heavy / low-context page (the title page).
Problem
The TRIOS PhD monograph renderer can lay out hero panels as a gallery / image train when section breaks and figure placements interact badly. Two failure modes seen in recent builds:
A previous attempt to fix this by inserting a hard
\clearpagebefore every section produced short title-only pages and was rejected by manual QA.Rule (non-negotiable)
TRIOS_PHD_NO_IMAGE_TRAIN: each hero panel must travel with the nearest substantive heading and its body text. Use a SOFT keep-together reservation; never a hard\clearpage.Required implementation
\usepackage{needspace}todocs/phd/main.texandtemplates/chapter.template.tex.\sectionand\chapterto prepend\Needspace*{0.58\textheight}(soft keep-together; the starred form skips the break when already at top of page).\chapterheroso heading + hero figure cannot be split.docs/pdf-rendering.md(canonical) and link it fromAGENTS.mdanddocs/phd/README.md.QA baseline to preserve
150 A4 pages;
qpdf --checkclean; 0 duplicate long paragraphs; 0 duplicate numbered headings; 0 Cyrillic hits in the body; 0 secret / stale / math anomaly hits; 0 very-short non-empty pages; at most 1 image-heavy / low-context page (the title page).