Conversation
`task pdf:print` builds the book block for a printed book (BoD, A4, black and white) next to the screen PDF, as planned in tasks/spec.md. - mirrored page furniture, right-hand part starts, title page and imprint with an author list from `task pdf:authors` - links printed as page references and footnotes, images at 300 ppi without transparency, a black-and-white palette - tools/pdf/print.yml shortens the operator reference and the release notes to overview tables; reference categories print as one table - long code lines wrap inside their frame - both editions: tall figures scale to the page, image figures carry no Typst number - fix the transformer reference table, which ended at the Excel map row: the generator turns a fenced block in a description into a code span
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 3c205fa. ♻️ This comment has been updated with latest results. |
rpietzsch
marked this pull request as draft
September 15, 2026 09:10
The imprint listed contributors by their GitHub IDs. - task pdf:authors stores each profile name in tools/pdf/authors.yml and adds new authors to authors.names in tools/pdf/print.yml - print.yml names authors (with titles) and excludes IDs; excluded names are never looked up - the build prints the given name, else the profile name, else the ID, and warns about each ID it prints - use the GitHub CLI token when no token is set, and end a rate limit, a rejected token or a network error with a message
The print edition had no way to leave out single pages or parts of a page, and omit left a title and a note behind. - print.yml keys may name a page; omit drops pages and subtrees without a trace - the class print-exclude replaces a part of a page with a note pointing to the page online; the site and screen PDF are unchanged - omit the cmem-client API and the OSINT tutorial, and the INSERT listing of the Snowflake tutorial: 966 to 666 pages - spec §10 and backlog P18, authoring note in repo-conventions.md
Member
|
open issues
|
- left-hand footers name the part as "Part A: Build" - web addresses become per-part endnote lists instead of footnotes - the author order counts only commits to printed pages and images - facing cards in a two-column grid share one height - print the operator reference as compact entries from data/plugins.json: fields, description without examples, one parameter table and related operators, replacing the overview tables The print edition grows from 666 to 870 pages; the screen PDF is unchanged.
Ghostscript 10.08 crashes on the colour emoji Typst writes as a Type 3 font, and silently drops transparent SVG content when it converts to PDF/X-4, so the print edition renders both to images first. - dec-tool pdf-normalize writes the book block as PDF/X-4 in CMYK, or a greyscale preview with --gray; the ISO Coated v2 profile is fetched into dist/icc/ rather than vendored, as its licence forbids that - dec-tool pdf-preflight checks page size and count, fonts, image resolution, transparency, annotations, page numbers and grey areas; the build runs it before and after the conversion - dec-tool image-widths writes a screenshot's missing width into the Markdown, from its pixels and capture density: 24 widths in 14 pages - the print build lists images below 150 ppi in low-resolution.tsv, minus the ones accepted in print.yml - a short lead line under a heading stays with it, so no heading ends a page alone
The widths came from the density a screenshot was captured at, which left 42 of them printing between 85 and 149 ppi: an image fills the text column unless a width says otherwise, however few pixels it carries. - narrow every raster image below 150 ppi: width = pixels / (column in inches * 150), floored to a whole percent, one step further down where the rounding of the density falls short - read an existing width whether it is quoted or not - write 47 widths into 21 pages; nothing prints below 150 ppi any more, and the book loses eight pages - report the width a page declares next to the density in low-resolution.tsv, so an entry says whether the image is stretched or simply too small - close P15: no screenshot had to be replaced
Contributor
Author
|
all points are addressed. I am checking if any housekeeping is pending and change to ready for review afterwards. |
The text column and the two densities were defined again in each tool, so the report's threshold and the width tool's target could drift apart, and two functions named printed_density measured different things. - move the 16 cm column and the 300/150 ppi densities to tools/print_geometry.py, and import them in the builder, the width tool and the preflight - rename build_pdf.printed_density to typst_density: it mirrors Typst's sizing, while the width tool measures a share of the column - take FOGRA39 from pdf_normalize instead of repeating it in the preflight - run image-widths in `task check` as check:images - correct the status lines, spec §8 and the print.yml comment, which still said a coarse image is replaced rather than narrowed
The first print edition serves users, so what an administrator or a developer needs stays in the online edition. - omit part E (deploy-and-configure/, 34 pages) and part G (develop/, 89 pages) in print.yml; develop/cmem-client-api/ goes with it, since section keys do not nest - the book drops from 864 to 668 pages, and the parts re-letter from E Automate onwards - a reference into an omitted part becomes a web address in its part's endnote list, so none is lost - record the scope in spec §10 and backlog P26
The user guide does not carry a release history; the online edition has it. The two-column list configuration stays as a comment, so switching back is possible.
CI installs from the lock file and had no pypdf, so every test module failed to import: tools/__init__.py loads build_pdf, which loads pdf_normalize. Locally it worked because pypdf sat in the virtualenv from an install outside poetry. - declare pypdf for the PDF reader of pdf_normalize and pdf_preflight - declare click, markdown and requests too: the tools import them directly, but they only arrived as dependencies of other packages
The PDF workflow built only the screen edition, on main, and its artifact had to be dug out of the run page. - build the book block, its PDF/X-4 copy and the greyscale preview too, on main and on the print-on-demand branch, or on demand - install ghostscript and poppler-utils: the preflight report reads the PDFs with pdffonts, pdfimages and pdftotext - upload one artifact per edition and list them in the run summary with page count, size and download link - cache the output intent profile, and pass ghostscript's grey profile as PDF_GRAY_PROFILE, which ensure_gray_profile now honours - give each ref its own concurrency group, so main and a branch no longer cancel each other
Ubuntu ships Ghostscript 10.02, where pdfwrite declares PDFX a boolean, so -dPDFX=4 raises /typecheck in --pdfmark-- and PDF/X-4 cannot be written at all. The workflow installed that one from apt. - build an alpine image with ghostscript and call it through a shim that mounts the workspace and /tmp at the paths the build uses - take the grey output intent profile out of the same image - let build-pdf name the binary with --ghostscript or GHOSTSCRIPT: it ran the conversions with a hardcoded gs, which the runner no longer has - refuse a ghostscript older than 10.03 with the reason, and note one older than the tested 10.08, instead of failing deep inside pdfmark
The step passed but the summary stayed empty: its rows went through a shell function whose redirect never reached GITHUB_STEP_SUMMARY, and a silent non-write survives bash -e. - build the table in one block and tee it, so the editions and their links show up in the step log as well - print the size of the summary file afterwards - fall back to a "missing" row instead of a blank one - pick the screen edition by excluding -print: the glob for it also matched the greyscale copy, whose name ends in a digit too
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add a print edition of the PDF: the book block of a printed book, built next to the screen PDF
💪 What
task pdf:print(dec-tool build-pdf --edition print). It uses the same merge, pandoc run and fonts astask pdf, typeset as the interior of a perfect-bound book (BoD, A4, black and white).style.typbranches on--input edition=print; without it, the screen PDF builds as before.tools/pdf/print.yml. Its author list lives intools/pdf/authors.yml, refreshed from the GitHub contributors bytask pdf:authors.tools/pdf/print.yml(full,list,omit):list, their overview pages plus short tables.Category | Transformerstable instead of empty headings.Excel maprow on the website too. The reference generator now turns a fenced block in a plugin description into a code span, and the two affected lines of generated Markdown are regenerated.🤔 Why
Excel map.stripped_single_linesqueezed the description's fenced block onto one line, andrumdl --fix(MD038) then inserted a blank line that ended the table.listmode left the 24 operator categories as empty numbered headings, because the Transformers overview already lists their pages.Figure 15: Figure 2:. That tutorial numbers its figures in the caption text and refers to those numbers, and the website adds no numbering of its own.👩🔬 How to validate
Needs pandoc 3.11 and typst 0.15.x.