Skip to content

v0.4.2

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Oct 02:51
· 112 commits to main since this release

Changes

  • Plotly figures. \interactiveruntime[runtime=plotly@1, alt={...}]{charts/fig.json} shows a figure saved with Python's fig.write_json(), with Plotly's hover. It takes the paper's style in light and dark mode: backdrop, ink, font, palette, colour scales, hover labels and tables. Colours Plotly Express copied from its default template follow the paper too. Anything you set yourself wins, and template=figure keeps the figure's own template. Leave out poster= and Maleficium renders the poster.
  • Reader styles reach the widgets. The --m-* theme tokens a \maleficiumreaderstyle stylesheet sets on .m-reader and .m-reader[data-theme=dark] now reach every widget and rendered poster, not only the page. Set --m-cat-1 to --m-cat-8 to recolour every chart that uses the paper's palette. A value the theme does not allow is left out with an export warning.
  • One macro for every runtime widget. \interactivemodel, \interactivechart, \interactivetable and \interactivevideo are gone. Write \interactiveruntime[runtime=model@1, ...]{models/mesh.glb} (or chart@1, table@1, video@1) with the same options as before. A paper that still uses the old macros stops compiling until it is changed. \interactive for your own HTML is unchanged.
  • Table and video options work from LaTeX. A table (runtime=table@1) takes sort=, filter=, columns=, format= and maxrows=, and a video (runtime=video@1) takes loop= and muted=. The runtimes read them, but the package refused them, so no paper could set them. Separate the items of a list with ;. A key the widget's runtime does not declare fails the compile and names the widget type.
  • Exported papers load widgets as you reach them. Each interactive figure shows its poster until you scroll near it, and only then starts its widget, so a paper opens faster and a widget you never scroll to never runs. A folder bundle does not even download it. A widget also waits while its tab is in the background, and one held back for approval never starts. Once started, a widget stays live.
  • Video posters from a moment of the video. A video takes at=, a time in seconds: with it, poster= is optional, and Maleficium renders the frame at that time as the poster when you compile. The live video starts at the same frame. The frame is rendered in a separate process that is stopped when it overruns its time limit, so a video that never finishes seeking cannot hang the editor. A frame that comes back blank is refused rather than used, and the widget keeps its placeholder. Tested on Linux; on macOS and Windows it is untested.

Fixes

  • The Linux .deb installs on Ubuntu 26.04. It depended on libicu74, libpng16-16t64 and libxml2, which do not exist under those names on Ubuntu 26.04 (or on Debian 12), so apt refused it there. The engine now carries ICU, libxml2, libxslt, graphite2, FreeType, fontconfig and libpng inside itself, and the package depends only on GTK 3, WebKitGTK 4.1 and libstdc++6. Checked in CI with a dry-run install on Ubuntu 24.04 and 26.04. The oldest base is unchanged (glibc 2.39, Ubuntu 24.04), and the engine grows from about 80 to 118 MB.
  • The macOS app needs nothing installed first. The bundled engine linked ICU, FreeType, libpng and graphite2 from Homebrew, so on a Mac without Homebrew every compile failed with Library not loaded: libicuuc.78.dylib. The engine now carries those libraries inside itself and links only what macOS ships. Checked in CI with Homebrew and the developer tools hidden; not yet on a Mac that never had them.

For contributors

  • Paper bundles are format 2. Built-in widgets bind through their runtime.json the way custom runtimes do: options arrive typed and defaulted, PDF-only ones like pdfrows stay out, and the manifest's runtimes lists every runtime a live widget runs, each flagged builtin or not. The new paper-bundle-2 schema leaves the widget type open, and the reader mounts whatever runtimes lists instead of keeping its own list of kinds. The Article tab logs where each figure settled (article.widget).

  • Built-in runtimes have manifests. Model, video, table and chart each declare a runtime.json beside their source, read from one registry in the app; a test fails when any list of widget kinds drifts from it. A custom runtime's runtime.json that uses kit, params or extends is refused as reserved for a later contract.

  • Widget behaviour follows the manifests. Which source a widget needs, which role may be remote=, how its poster is made (rendered, cropped from the PDF, or given by the document) and which poster options it takes now come from its runtime's runtime.json, not from code per kind. The generated TypeScript WidgetType is a plain string for now. Poster errors name the runtime and why: table@1 posters are cropped from the PDF, nothing to render.

  • The package smoke test checks that a release needs nothing installed first. CI runners have Homebrew, vcpkg, MSYS and the Visual C++ runtime, so a package that quietly depended on any of them passed. e2e/package-smoke.py now lists every binary's libraries on each OS and fails on any outside the system's own or the package's (macOS otool -L over the whole .app, Windows PE imports over every .exe and .dll, Linux ELF DT_NEEDED against the C library and the .deb's Depends, or against the AppImage's contents plus the host libraries AppImages assume), with one report format. macOS runs its compile and launch probes with Homebrew and the developer tools moved aside; Windows runs them with only System32 on PATH. The Windows Visual C++ denylist is now an allowlist of the 17 system DLLs the binaries import.

  • CI shares its npm and engine steps. .github/actions/npm and .github/actions/engine replace the copies in the build, e2e and fixture jobs, and the macOS Homebrew packages are listed in scripts/macos-brew.txt beside linux-deps.txt and vcpkg-ports.txt. The macOS engine builds graphite2 1.3.14 statically from a checksum-pinned release, because Homebrew ships only a dynamic one.

  • Pre-commit. Whitespace hooks (trailing whitespace, end of file, line endings, UTF-8 BOM) run, pre-commit and the release scripts run through uv, and the large-file check skips binary media and HTML. .gitattributes marks vendored and generated files so they stay out of the language statistics.