Skip to content

zn v0.12.2: math = "latex" says plainly that TeX is yours to install - #20

Merged
adibhanna merged 2 commits into
mainfrom
zn-0.12.2
Oct 27, 2026
Merged

adibhanna merged 2 commits into
mainfrom
zn-0.12.2

Conversation

@adibhanna

Copy link
Copy Markdown
Contributor

zn draws LaTeX math with pdftex and pdftocairo from the user's own computer and ships neither. Until now, with them missing, LaTeX blocks quietly showed their source, and zn doctor named the tools without saying how to get them.

  • Preview: the first LaTeX block of a note shows a notice naming the missing tools, saying zn does not include them and pointing at zn doctor. Later blocks of the note stay quiet.
  • Settings: switching to latex without the tools shows the same message as a toast.
  • zn doctor: the failing check says zn does not include the tools and prints install commands for the system it runs on (macOS, Debian/Ubuntu, Fedora, Arch, Windows, or a generic line); --json carries them as hint.
  • Docs: README (a note under Install and a "LaTeX math needs TeX on your computer" section with per-platform commands), in-app help, the starter config.toml and the Homebrew caveats.
  • docs/embedded-latex-coverage: the coverage audit that decided against bundling TeX for now, kept with its harness and results.

Verified: go vet ./..., go test ./... (new tests for the hints per system, doctor text and JSON, the once-per-note notice and the settings toast), Homebrew formula tests and brew style, and the binary driven with no TeX on PATH (notice once above the first block; doctor prints the macOS steps). The Debian/Ubuntu, Fedora and Arch commands were run in clean Ubuntu 24.04, Fedora 42 and Arch containers and rendered zn's default preamble. The Windows line is not tested here.

zn draws LaTeX math with pdftex and pdftocairo from the user's own
computer and ships neither, but nothing said so where it mattered. With
the tools missing, every LaTeX block quietly showed its source: the
preview gave no reason, and zn doctor named the tools without saying how
to get them. The README covered macOS only.

Now the first LaTeX block of a note carries a notice that names the
missing tools, says zn does not include them and points at zn doctor;
later blocks of the note stay quiet, so a page of formulas is not a page
of warnings. Switching to latex in the settings without the tools raises
the same message as a toast. zn doctor's failing check says zn does not
include the tools and prints the install commands for the system it runs
on (macOS, Debian and Ubuntu, Fedora, Arch, Windows, or a generic line),
also as a hint list in --json. The README, the in-app help, the starter
config.toml and the Homebrew caveats say the same, with copy-paste
commands for each platform.

The Debian/Ubuntu, Fedora and Arch commands were run in clean Ubuntu
24.04, Fedora 42 and Arch containers, where the resulting pdftex and
pdftocairo rendered zn's default preamble. The Windows line (MiKTeX and
scoop's poppler) is not tested here.
Before deciding whether zn could draw LaTeX math without the user
installing TeX, a 124-case corpus ran through zn 0.12.0's pdftex path
(the baseline, 120 render), d2lang/mathjax-go and the desktop's
node-tikzjax engine. Neither embedded option matches the TeX path
without real work: mathjax-go draws 68 of 86 math cases and drops
equation numbers silently; tikzjax draws 75 of 86 math and 33 of 34
TikZ, lacks mhchem and crashes on a missing bold-math font.

The decision is to keep using the user's own TeX. This folder keeps the
corpus, the harness to rerun all three engines and the per-case results,
with the numbers and the route to take if the question comes back. The
Go harness files end in .txt so they stay out of zn's module.
@adibhanna
adibhanna merged commit 3f1f638 into main Oct 27, 2026
5 checks passed
MichaelC001 pushed a commit to MichaelC001/zennotes that referenced this pull request Oct 28, 2026
The bundled CLI is the floor a desktop build guarantees, and 0.12.2 is
the newest release (ZenNotes/tui#20). It brings LaTeX to the terminal
preview: with [terminal] math = "latex", zn draws display math and TikZ
through the TeX installed on the user's computer (ZenNotes/tui#17), says
plainly that zn does not include TeX and prints the install commands in
zn doctor, and fits preview pictures to the pane as it grows or shrinks.
The pin is the release's terminal-release.json copied byte for byte
after it verified against packaging/release-signing/zn-release-1.pub in
ZenNotes/tui (source commit 3f1f638a, integration protocol 1, all four
archives it names matching checksums.txt). Staged through
`npm run terminal:stage`; the native darwin-arm64 binary reports
zn v0.12.2. The in-app manual's CLI card says 0.12.2 and what 0.12.0 to
0.12.2 change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant