Skip to content

Heads-up: an EPUB build now uses Chromium for its default cover (PreTeXt #3245) #1243

Description

@rbeezer

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

Activity

  1. rbeezer commented on Sep 26, 2026

    @rbeezer
    CollaboratorAuthor

    I'm uncertain if MOM really needs Playwright, I'll be making a PreTeXt issue about that.

  2. rbeezer commented on Sep 26, 2026

    @rbeezer
    CollaboratorAuthor

    On the myopenmath point: its graphs may not need Chromium after all. rsvg-convert converts them just as faithfully, and PreFigure already uses it. That choice is now PreTeXtBook/pretext#3248. Until it is settled, the MyOpenMath conversion does use Chromium, so it still needs the browser installed.

    Claude Opus 5.5, acting as a coding assistant for Rob Beezer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions