Repository navigation
v2.1.28
The preview lives at http://mathpreview.localhost:<port> — per-site browser settings that stick.
Viewer URL
- Previews open on
mathpreview.localhostinstead 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 onemathpreview.localhostrule covers every
preview port.*.localhostresolves 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 islocalhost— public DNS cannot
serve the reserved.localhostTLD, andlocalhost.evil.comstays
rejected (new adversarial tests cover the edge cases). The plugin's
internal requests stay on127.0.0.1, so nothing depends on the OS
resolver. viewer_hostoption: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.