davidlai3

MathTerm — Development skill for Claude Code

Development community

A macOS terminal that typesets LaTeX in any program's output (Claude Code, cat, nvim).

How to install MathTerm

This entry records only its repository, not the path inside it, so there is no exact command to give. Open davidlai3/MathTerm and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What MathTerm does

A macOS terminal that typesets LaTeX in any program's output (Claude Code, cat, nvim).

Alternatives in Development

  • MCP Base — tilth — code intelligence MCP server 349 ★
  • Calyx — A native macOS terminal app built on Ghostty for running and supervising coding agents 298 ★
  • Device Control Agent — You are an autonomous macOS agent with full control of this device via two CLI tools: - steer — GUI automation 250 ★

README

mathterm

A terminal that typesets LaTeX. Any `$...$` that shows up on screen is rendered with KaTeX as real vector text, the same way Obsidian or a browser shows it. That includes `cat` output, Claude Code's replies, and the file you're editing in nvim. No plugins, and no cooperation from the program.

https://github.com/user-attachments/assets/fc305b93-685c-445c-b600-f4ab60ab0228

![Claude Code explaining the Riemann hypothesis in mathterm: inline and display math typeset in its replies](docs/claude-code.png)

How it works

mathterm is a normal terminal: xterm.js in a Tauri window, with your login shell in a pty. After every redraw it scans the visible text for `$...$`, `$$...$$`, `\(...\)` and `\[...\]`. It then lays typeset math over the cells where the source sits, in the source's own colors.

  • Editors: the line under the cursor (or a $$ block containing it) shows the raw LaTeX, so you can edit it, like Obsidian's live preview. Line numbers and splits are handled.
  • Room to breathe: display math grows into the blank lines around it, which is how Claude Code and most markdown lay out equations, so it renders at full size instead of being squeezed into one row.
  • Few false positives: $5 and $10 stays text, code fences and `inline code` are skipped, and anything KaTeX can't parse is left alone.
  • Tables: markdown tables (| a | b | with a |---| row) are drawn as real tables in their own rows, with column alignment and math, code, bold and italic in cells.
  • No gaps: math usually renders narrower than its LaTeX source, so the text after it is redrawn flush against it.
  • Copy works: the cells still hold the source, so copying an equation gives you its LaTeX.

![nvim editing a markdown file in mathterm: the math is typeset in place, the cursor line shows its source](docs/nvim.png)

Cmd-Shift-M toggles detection.

Install

macOS only for now (Apple silicon and Intel).

  1. Download mathterm-macos.zip from [Relea