Repository navigation
v0.12.0
What's new
Display math and TikZ through LaTeX. Set math = "latex" under [terminal] in config.toml and the reading view renders display math with your own pdftex instead of typst, so the LaTeX in your notes (the same LaTeX the desktop app reads with KaTeX) shows as pictures in Kitty and Ghostty: $$ and \[ \] blocks, the amsmath environments (equation, align, gather, multline and the rest), mhchem, bare tikzpicture blocks and ```tikz fences, drawn the way the desktop draws them. Pictures take the theme's text colour, are cropped to the formula, and are cached, so a note you have seen opens without running TeX again. A TeX error shows its first line above the source. typst stays the default. Thanks to @spirit-of-light, who built this (#17).
It needs pdftex and pdftocairo on PATH; zn doctor names a missing one. On macOS: brew install poppler, brew install --cask basictex, then sudo tlmgr install standalone varwidth preview xcolor amsmath amsfonts mhchem pgf. Packages come from preamble.tex next to config.toml, which zn writes once and never rewrites; add your own there. TeX can read any file you can read, so a note can show one in its preview: leave latex off for vaults you do not trust.
Render limits. render_timeout (seconds, default 10) stops a diagram or math render that runs too long, and render_concurrency (default 2) caps how many run at once, for mermaid and typst as well as latex. A render that timed out tries again when you open its note.
Enter closes \[ and \begin{…} under latex, as it already closes $$ and code fences.
What's fixed
$$ math is no longer red in the editor. Display math is now highlighted as LaTeX in the editor under either engine.
Changelog
- c64495b Feat(config): [terminal] math, render_timeout and render_concurrency
- 4d6e3f5 Feat(mcp): ask for bare tikzpicture blocks when math = "latex"
- 4781828 Feat(tui): Enter closes [ and \begin{…} under math = "latex"
- 3f627f3 Feat(tui): render display math through LaTeX with math = "latex"
- 47a0609 Fix(editor): $$ math is highlighted as LaTeX under the default engine too
- 2e3d1f6 Fix(tui): ```tikz fences render under latex, and zn mcp keeps the desktop's instructions
- ab7dede Fix(tui): a LaTeX block wider than the page renders whole instead of clipped
- 21940b4 Fix(tui): the LaTeX cache deletes what it has not used for 30 days
- 844c19f Merge #17: Feat(tui): render display math through LaTeX with math = "latex" (by @spirit-of-light)
Install
With Homebrew on macOS or Linux, run brew install zennotes/tap/zn, then zn tui.
Download the archive for your platform, unpack it, and put zn on your PATH.
With Go installed, go install github.com/ZenNotes/tui/cmd/zn@latest builds the same thing.