1.0.3: pictures fill the free width or height of their page, long table heads stay with their table

A picture takes the full line width or the full free height, whichever it reaches first; a drawing moves to the next page only below picturekeep of its full-page size; inside a sentence at most half the page, inside a figure at most the top float share. A long table is marked directly in front of its first head, so a page break before it prints no head or foot on the heading's page. Review findings fixed, full suite green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Marc WäckerlinandClaude Opus 5.5 committed 2026-11-19 00:03:38 +01:00
1 parent d7aac52ac7
commit 5f56145fb3
16 files changed
+667 -91

No files matched your search

+14
View File
@@ -2,6 +2,20 @@
Defects of the suite, each with its cause, its correction and the test that measures it.
## A table header appears before its heading
- **Found:** 2026-11-18, a table at a page boundary printed its header before its heading and again below it; a table with a continuation footer could also print that footer before the table.
- **Cause:** longtable had installed its output routine when TeX selected a break before the heading, so it treated that break as a table continuation.
- **Fix:** every long table gets a number of its own, set as a mark directly in front of its first head, and continuation output prints a header or footer only when the preceding page contains the current table. The mark stands after longtable's own break in front of the table, so a break there leaves no head or foot on the page of the heading, and a table with an empty `\LTcaptype`, which longtable's own counter skips, still gets its number. A patch that no longer matches a longtable release warns instead of stopping every build.
- **Test:** `tests/layout.py` › `longtable_boundary` checks both boundary cases and all rows, headers and footers of a separate multi-page table, and a table whose first rows are joined at the foot of a page (`tests/longtable-joined.tex`): it moves with its heading, with one head, no foot before it and all four rows.
## A picture shrinks until unreadable or leaves free room empty
- **Found:** 2026-11-18, twice: a diagram with a detailed legend became too small to read after preceding content moved it lower on the page; and a tall swimlane diagram under the title block stopped at half the text height and left the lower half of its page empty, with nothing after it on that page.
- **Cause:** the picture scaler reduced lying vector diagrams to any remaining page height, and capped upright pictures at half the text height whatever the page still had free. A picture made as high as the whole text height also did not fit under the invisible material a document starts with, and left its first page empty.
- **Fix:** every picture takes the full line width or the full free height, whichever it reaches first. A drawing moves to the next page and fills it only where it would keep less than `picturekeep` (default half) of its size on a page of its own, or where less than a quarter of the page is free; a raster keeps its remaining-space and enlargement limits. The height of a page of its own is the text height less the space between paragraphs and the line the picture stands on. Inside a sentence a picture takes at most half the page, because its line would otherwise break the paragraph; inside a figure at most the top share LaTeX allows a float, less the caption, because a larger figure waits for the end of the document.
- **Test:** `tests/layout.py` › `pictures` (F6.5, F6.7): an upright picture alone fills the text height, a lying one under 28 lines and an upright one under 10 lines fill the free room of their page, an upright one under 25 lines moves and fills the next page, the picture under 10 lines ends at the foot of the text, with `picturekeep=0.3` the picture under 25 lines stays, a lying picture under 40 lines moves, a picture inside a sentence stays within half the page, and an upright figure with `[!ht]` and with `[ht]` under 25 lines stands on the next page; isolated original/fixed comparison.
## Search through every folder below the document
- **Found:** 2026-11-14, converting a document at the root of a checkout of 68377 folders: the conversion took 56 minutes 24 seconds, of which the probe 12 minutes 39 seconds and the first of the two LaTeX runs of the document 21 minutes 41 seconds.