Skip to content

v2.1.28

Choose a tag to compare

@github-actions github-actions released this 20 Aug 12:15
· 33 commits to main since this release

The preview lives at http://mathpreview.localhost:<port> — per-site browser settings that stick.

Viewer URL

  • Previews open on mathpreview.localhost instead of a bare IP
    (contributed by @gi1242, #6). Browser extensions and per-site settings —
    zoom, vimium keybindings, dark-mode toggles — key on the hostname and
    ignore ports, so previews no longer share a "site" with every other
    localhost service, and one mathpreview.localhost rule covers every
    preview port. *.localhost resolves to loopback inside every modern
    browser (RFC 6761; Chrome/Firefox resolve it internally, Safari via the
    macOS resolver — all verified), so it works with no setup on Linux and
    macOS alike.
  • Rebinding-safe by construction. The daemon's Host/Origin guard
    accepts any name whose last label is localhost — public DNS cannot
    serve the reserved .localhost TLD, and localhost.evil.com stays
    rejected (new adversarial tests cover the edge cases). The plugin's
    internal requests stay on 127.0.0.1, so nothing depends on the OS
    resolver.
  • viewer_host option: setup({ viewer_host = "thesis.localhost" })
    picks a fixed custom name, "127.0.0.1" reverts to the old address, and
    the "{stem}.localhost" template gives each paper its own origin from
    its filename (My Paper_v2.tex → http://my-paper-v2.localhost:<port>/)
    — recognizable tabs and per-paper browser settings, where the shared
    default gives one-time extension setup covering every preview. A
    non-loopback value warns at setup instead of opening a tab the daemon
    would reject.

Downloads. Prebuilt mathpreview-cli daemon tarballs for macOS (arm64,
x86_64) and Linux (x86_64, arm64), each paired with a SHA-256 checksum.