Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

KaTeX to MathJax

pejakovicpejakovic6k downloads

Converts KaTeX format to MathJax format

Add to Obsidian
  • Overview
  • Scorecard
  • Updates11

A simple plugin for Obsidian that converts KaTeX notation to MathJax, ensuring seamless use of mathematical expressions copied from sources like OpenAI's ChatGPT.


Why This Plugin?

ChatGPT and other platforms often render mathematical expressions using KaTeX, while Obsidian uses MathJax for mathematical notation. This discrepancy can lead to formatting issues when copying and pasting content.

This plugin eliminates the hassle by automatically converting KaTeX expressions to MathJax, making it easier to integrate ChatGPT-generated content or other KaTeX-based math into your Obsidian vault.


Features

  • Default paste conversion: Automatically converts KaTeX expressions on paste (toggleable via settings).

  • Command Palette Actions:

    • Paste with conversion: Manually paste KaTeX content with MathJax conversion applied.
    • Convert current text file: Convert all KaTeX expressions in the current note to MathJax.
    • Convert all files: Batch-convert KaTeX expressions in every markdown file across your vault.
  • Works seamlessly with clipboard operations.

  • Fine-grained settings to control conversion heuristics (see below).


Settings

Open Settings → Community Plugins → Convert KaTeX to MathJax to adjust:

✅ Enable default paste conversion

Automatically convert KaTeX to MathJax when pasting.

Example Paste:

\(a^2 + b^2 = c^2\)

Result:

$a^2 + b^2 = c^2$

✅ Wrap matrix/align environments in $$ … $$

Ensures multi-line math environments are recognized as display math.

Example Paste:

\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}

Result:

$$
\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}
$$

✅ Treat plain parentheses ( … ) as math

Converts outermost parentheses to inline math if contents look LaTeX-like.

Example Paste:

(x^2 + 1)

Result:

$x^2 + 1$

✅ Treat plain brackets [ … ] as math

Same as parentheses, but for square brackets.

Example Paste:

[a,b]

Result:

$[a,b]$

✅ Convert bare inline LaTeX

Wraps common inline LaTeX tokens into $…$.

Examples

  • 90^\circ → $90^{\circ}$
  • \sqrt{4} → $\sqrt{4}$
  • \frac{1}{2} → $\frac{1}{2}$
  • x_i, y^2 → $x_i$, $y^2$

✅ Wrap single math lines into $$ … $$

Automatically converts isolated math-heavy lines into display math.

Example Paste:

a^2 + b^2 = c^2

Result:

$$
a^2 + b^2 = c^2
$$

Installation

Manual Installation

  1. Download or build the plugin files (main.js and manifest.json).

  2. Copy them into your Obsidian vault directory:

    VaultFolder/.obsidian/plugins/obsidian-convert-katex-to-mathjax/
    
  3. Restart Obsidian.

  4. Enable the plugin in Settings > Community Plugins.


How to Use

Default Paste Behavior

  1. Toggle "Enable default paste conversion" in the plugin settings.
  2. Simply paste copied KaTeX content into your Obsidian editor—it's automatically converted to MathJax.

Command Palette Actions

Open the Command Palette (Ctrl + P / Cmd + P) and search for the following commands:

  • Paste with conversion: Pastes clipboard content with conversion applied.
  • Convert current text file: Converts all KaTeX expressions in the current note to MathJax.
  • Convert all files: Scans and converts KaTeX expressions in all markdown files across your vault.

Development

If you'd like to make changes or contribute:

git clone https://github.com/your-repo/convert-katex-to-mathjax.git
cd convert-katex-to-mathjax
npm install
npm run dev

Contributions

Contributions, suggestions, and bug reports are welcome! Feel free to submit a pull request (PR) or open an issue in the repository.


Support

If you find this plugin helpful and would like to support its development, consider buying me a coffee:


License

This project is licensed under the MIT License.

67%
HealthGood
ReviewCaution
About
Convert KaTeX notation to MathJax in your vault to preserve pasted mathematical expressions. Apply automatic paste conversion, use commands to paste with conversion, convert the current file, or batch-convert all files to fix KaTeX-to-MathJax formatting.
LaTeXMathAutomation
Details
Current version
1.1.0
Last updated
8 months ago
Created
2 years ago
Updates
11 releases
Downloads
6k
Compatible with
Obsidian 0.15.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
pejakovicpejakovic
github.com/pejakovic
GitHubpejakovic
  1. Community
  2. Plugins
  3. LaTeX
  4. KaTeX to MathJax

Related plugins

Quick Latex

Simplify and speed up LaTeX math typing.

Calctex

Calculate LaTeX formulas.

Extended MathJax

Enable additional MathJax packages and adds a global preamble for MathJax.

Latex Suite

Make typesetting LaTeX math as fast as handwriting through snippets, text expansion, and editor enhancements.

Typst Mate

Render math expressions with Typst instead of MathJax.

QuickAdd

Quickly add new notes or content to your vault.

Templater

Create and use dynamic templates.

Homepage

Open a note, base, or workspace on startup, or set it for quick access later.

BRAT

Easily install a beta version of a plugin for testing.

Readwise Official

Sync highlights from Readwise to your vault.