nani-3191 downloadsCopy notes or selections to clipboard as HTML with math formulas rendered as MathML/KaTeX for Microsoft Word, Google Docs, Anki, and Web.
An Obsidian plugin that copies notes or text selections to your system clipboard as rich HTML, with mathematical formulas rendered as native MathML or KaTeX representations for seamless pasting into Microsoft Word, Google Docs, Apple Pages, LibreOffice, Gmail, and Anki.
It also features smart paste cleanup for ChatGPT & web formulas (Ctrl + V), eliminating duplicated text and automatically formatting math as clean Obsidian LaTeX.
Standard copy plugins and Obsidian's default copy leave math formulas inside $...$ or $$...$$ as raw LaTeX text. This plugin automatically parses and converts them into:
<math>): Pastes directly into Microsoft Word and converts into native, editable Office Math equations! Also fully supported in Google Docs, Apple Pages, and LibreOffice.
Ctrl + V)Copying responses with math from ChatGPT, Claude, or Wikipedia usually causes ugly duplication issues when pasting with Ctrl + V into Obsidian (e.g. pip_i, ii, nn, or formulas glued together without $ signs).
This plugin intercepts Ctrl + V and automatically:
$...$ for inline math and $$...$$ for block display equations.\[...\] and \(...\) into standard Obsidian $$...$$ and $...$.#f5f5f5 shaded background if you prefer traditional gray code boxes.$E = mc^2$ and display $$\sum_{i=1}^n x_i$$)
You can trigger these commands from the Command Palette (Ctrl + P / Cmd + P) or assign custom hotkeys:
| Command | Suggested Hotkey | Action Details |
|---|---|---|
| Copy selection or document to clipboard | Ctrl + Shift + C |
Copies selection with rendered math; if nothing is selected, copies the whole note. |
| Copy entire document to clipboard | — | Copies the entire note as rich HTML with math. |
| Copy current selection to clipboard | — | Copies only the selected text with rendered math. |
| Copy current selection directly as MathML | — | Copies the selected LaTeX formula directly as pure MathML. |
Go to Settings → Copy as HTML with Math:
MathML (Recommended): Converts to standard MathML. Pastes as native, editable Word equations.HTML + MathML (KaTeX): Full KaTeX rich HTML structure for web and email.Leave as raw code: Copies the literal $ ... $ text.#f5f5f5 background.<h1> header when copying the full document.<head> and <html> wrapper when only snippet pasting is needed.Search for Copy as HTML with Math in Obsidian's in-app Community Plugins browser (Settings → Community Plugins → Browse).
https://github.com/NANI-31/obsidian-copy-html-with-mathmain.js, manifest.json, and styles.css from the Releases page.your-vault/.obsidian/plugins/copy-html-with-math/.# Clone the repository
git clone https://github.com/NANI-31/obsidian-copy-html-with-math.git
cd obsidian-copy-html-with-math
# Install dependencies
npm install
# Build production bundle
npm run build
# Start live dev watcher
npm run dev