gstack/make-pdf
Garry Tan 89c35352cc
feat(make-pdf): width directives + conservative auto-landscape via CSS named pages
`![a](x.png){width=full|<pct>|<dim>}` and `{page=landscape|portrait}`
suffixes translate to data-gstack-* attrs in render() (before the sanitizer,
which keeps data- attributes; unrecognized brace groups stay visible text).
Default width rule needs no code: intrinsic CSS-px capped at the content box,
never upscaled — figure img max-width owns it.

Auto-landscape promotes a block to `@page wide { size: <pagesize> landscape }`
only when aspect >= 1.8 AND intrinsic width > 2.5x the content box (~1600px on
letter) AND diagram provenance (rendered fences) or a whole-word alt token
(diagram|architecture|flowchart|chart|graph) for plain images. {page=...}
forces or vetoes; fence info strings accept page=... too. preferCSSPageSize
is passed to Chromium only when a promotion exists, so every other document
prints exactly as before. False negatives are cheap; false positives feel
broken (eng-review P4, Codex challenge accepted).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 00:06:45 -07:00
..
src feat(make-pdf): width directives + conservative auto-landscape via CSS named pages 2026-06-12 00:06:45 -07:00
test test(make-pdf): diagram pre-pass unit suite + e2e render gates 2026-06-11 23:59:40 -07:00
SKILL.md v1.57.4.0 refactor(ethos): rename Boil the Lake principle to Boil the Ocean (#1912) 2026-06-08 05:41:07 -07:00
SKILL.md.tmpl v1.52.2.0 fix(make-pdf): render emoji instead of tofu (▯) on Linux (#1787) 2026-05-29 18:06:19 -07:00