Copy MD + LaTeX

Marx Einstein
2026-01-05T14:11:27Z

Copy selection/article/page as Markdown, preserving LaTeX from KaTeX/MathJax/MathML. Enhanced code block language detection for AI chat platforms. Self-contained with modern UI.

Copy MD + LaTeX

Copy web content as Markdown with math preserved (KaTeX/MathJax/MathML) — perfect for notes, research, and AI chat transcripts.

✨ Key Features

📋 Three copy modes

Selection: copy only what you select

Smart Article: automatically detect and extract the main article content

Entire Page: copy the whole page

🧮 Preserve math perfectly

Extracts LaTeX reliably from major math renderers, so your output works in editors that support LaTeX:

✅ KaTeX

✅ MathJax (v2 & v3)

✅ MathML (including Wikipedia-specific structures)

💻 Code block language detection

Automatically detects the language and emits fenced blocks like ```lang for proper syntax highlighting:

100+ language labels supported

Enhanced for AI chat platforms: Claude, ChatGPT, Grok, Gemini, Copilot, Perplexity, etc.

Special handling for LMArena

Optional content-based heuristic inference

🎨 Modern UI / UX

Draggable floating button

Right-click quick menu

Toast notifications

Auto light/dark theme

Built-in settings panel

🌏 Languages

English

繁體中文

简体中文

📖 How to Use

Option 1: Floating button

1. A floating Markdown button appears on the page.

2. Left click: perform the configured action (auto/selection/article/page/download).

3. Right click: open the quick menu to choose mode or open settings.

4. Drag: move the button to another corner.

Option 2: Hotkey

Default hotkey: Alt + M

If you have a selection: copy selection

Otherwise: copy Article or Page depending on your settings

Option 3: Userscript menu

Use the userscript manager menu to trigger:

Copy Selection

Smart Article

Copy Entire Page

Download as .md

Settings

⚙️ Settings Overview

General

Show/hide floating button

Button position, size, opacity, hover opacity

Auto-hide button (with delay & hidden opacity)

Left-click action

Theme (auto/light/dark)

Language (auto / English / 简中 / 繁中)

Conversion

Default mode when no selection (Article/Page)

Absolute URLs for links/images

Wait for MathJax rendering

Strip common indent in block math

Escape Markdown special characters

Extract Shadow DOM

Extract same-origin iframes

Markdown formatting

List marker (- / * / +)

Emphasis marker (* / _)

Strong marker (** / __)

Horizontal rule (--- / *** / ___)

Code block settings

Enable content-based language inference

LMArena enhanced detection

AI chat platform enhanced detection

Advanced

Article detection thresholds

Visibility strategy (loose/strict/dom; optional offscreen detection)

Formatting strategies (bold/italic across blocks, complex tables, details handling)

Capture timing (wait before capture, wait after DOM idle)

🌐 Notable Site Support

AI chat platforms

Claude, ChatGPT, Grok, Gemini, Copilot, Perplexity, Poe, LMArena, DeepSeek, Kimi, Tongyi, Mistral Chat and more.

Math / academic sites

Wikipedia math (including special wrappers and fallback images)

Any site using KaTeX or MathJax

Tech documentation

Works well on GitHub, Stack Overflow, MDN, blogs, and documentation sites.

💡 Typical Use Cases

Research notes: copy math-heavy content into Obsidian/Notion/Markdown editors

Export AI conversations with well-formatted code blocks

Save technical docs as clean Markdown for offline use

Build a personal knowledge base quickly

⌨️ Hotkey

Default: Alt + M (fully customizable in settings)

📝 Changelog

v3.1.0

Improved code block language detection (100+ languages)

Enhanced detection for AI chat platforms and LMArena

Optional content-based heuristic language inference

Fixes for Wikipedia math, formatting across blocks, and complex tables

Code cleanup and maintenance improvements

📜 License

CC0-1.0 (Public Domain)

🐛 Feedback

Please report issues and suggestions via the Greasy Fork discussion / feedback section.