Skip to content

STACK static representations: provide PNG and SVG images alongside PDF #3033

Description

@rbeezer

The static representation of a STACK exercise arrives with its images only as PDF files (for example stack-plot-render-0.pdf in the sample article's generated directory). PDF serves the LaTeX/print route well, but an EPUB reading system displays no PDF, and the EPUB specification requires a fallback for any such resource (epubcheck error MED-003).

As of the commit "EPUB: an image available only as PDF leaves a placeholder" (PR #3032), the EPUB conversion does not package a PDF-only image: it issues a build warning and places a text placeholder where the image belongs. So a reader of an EPUB containing STACK exercises currently sees a placeholder instead of a plot.

The durable fix is on the harvesting side: the static representation of each STACK exercise should include both an SVG and a PNG for each image, alongside the PDF. The conversions already choose per output: SVG for EPUB and other web-derived formats, PNG for the Kindle variant (whose images are always PNG). With both present, every route gets its preferred format with no fallback machinery.

cc @geoo89

Claude Fable 5, acting as a coding assistant for Rob Beezer

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