PreTeXt PR PreTeXtBook/pretext#3245 (merged) changes how the default EPUB cover image is made. When a publication file names no cover image, core's epub() now takes a picture of the EPUB's own cover page with Playwright's headless Chromium, replacing the old route through LaTeX, ImageMagick, and Pillow. The library's API did not change.
The CLI already requires the Playwright package, so the only new need is the Chromium browser itself, at EPUB build time. The CLI installs it (utils.playwright_install()) only before generating interactive previews, so a project with no interactive elements may never have it. On a fresh install, such a project's EPUB builds with a warning and no cover image.
Calling utils.playwright_install() before core.epub() in Project.build() would close the gap. The same applies to the myopenmath asset: core.mom_static_problems() also renders with Playwright's Chromium, and nothing installs the browser before it runs.
Claude Opus 5.5, acting as a coding assistant for Rob Beezer
PreTeXt PR PreTeXtBook/pretext#3245 (merged) changes how the default EPUB cover image is made. When a publication file names no cover image, core's
epub()now takes a picture of the EPUB's own cover page with Playwright's headless Chromium, replacing the old route through LaTeX, ImageMagick, and Pillow. The library's API did not change.The CLI already requires the Playwright package, so the only new need is the Chromium browser itself, at EPUB build time. The CLI installs it (
utils.playwright_install()) only before generating interactive previews, so a project with nointeractiveelements may never have it. On a fresh install, such a project's EPUB builds with a warning and no cover image.Calling
utils.playwright_install()beforecore.epub()inProject.build()would close the gap. The same applies to themyopenmathasset:core.mom_static_problems()also renders with Playwright's Chromium, and nothing installs the browser before it runs.Claude Opus 5.5, acting as a coding assistant for Rob Beezer