Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.38 KB

File metadata and controls

37 lines (26 loc) · 1.38 KB

mathpaste

ChatGPT equations used to paste into Word as real math. Now you just get raw LaTeX like \frac{dv}{dt}. mathpaste fixes that: copy the LaTeX, hit one hotkey, paste a real equation.

Install

git clone https://github.com/eliasmocik/mathpaste.git
cd mathpaste
./setup

Needs macOS, Python 3.9+, Hammerspoon, and Word for Mac. Remove it with ./setup --uninstall.

Use

  1. Copy math (LaTeX) anywhere — a normal Cmd+C.
  2. In Word, press ⌘⇧V (command + shift + V) — your "math paste".

That single press converts the clipboard and pastes the equation. If the clipboard has no math it just pastes as-is, so ⌘⇧V is always a safe paste. Cmd+C is never intercepted — ordinary copy/paste is untouched. Mixed prose + equations keep their formatting.

Pasting synthesizes a Cmd+V, so Hammerspoon needs Accessibility permission (System Settings → Privacy & Security → Accessibility) — grant it on first use.

Earlier versions ran a background watcher that auto-converted on plain Cmd+C. That silently mangled ordinary copies whose text merely looked mathy (a $, an underscore in a filename like platform_linux.py), so it was replaced by the explicit hotkey above.

Where it works

  • Word for Mac => native equation.
  • Apple Mail, rich web editors => works.
  • Google Docs => no (can't import MathML).