A simple plugin for Obsidian that converts OpenAI-style equation markup to standard markdown equation syntax. This plugin helps users who copy mathematics from OpenAI interfaces (like ChatGPT) into Obsidian by automatically converting the equation formatting.
- Converts inline equations from
\(equation\)
to$equation$
- Converts display equations from
\[equation\]
to proper multiline format:$$ equation $$
- Preserves proper spacing (no spaces between $ and equations for inline math)
- Handles escaped delimiters correctly
- Available through both ribbon icon and command palette
- Works on the currently active file
- Preserves all other content in the document
- Open Obsidian Settings
- Navigate to Community Plugins
- Search for "Equation Converter"
- Click Install
- Enable the plugin
- Download
main.js
,manifest.json
, andstyles.css
from the latest release - Create a new directory
equation-converter
in your vault's.obsidian/plugins/
directory - Copy the downloaded files into the new directory
- Enable the plugin in Obsidian's Community Plugins settings
- Open the markdown file containing OpenAI-style equations
- Either:
- Click the calculator icon in the left ribbon, or
- Open the command palette (Ctrl/Cmd + P) and search for "Convert Equations"
- All equations in the current file will be automatically converted
Before:
The quadratic formula is \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\)
And here's the equation in display mode:
\[\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}\]
After:
The quadratic formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$
And here's the equation in display mode:
$$
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
$$
This plugin is built using TypeScript and the Obsidian API. To build from source:
- Clone this repository
- Install dependencies with
npm install
- Build with
npm run build
- Copy
main.js
,manifest.json
, andstyles.css
to your vault's plugins directory
If you encounter any issues or have suggestions for improvements:
- Open an issue on the GitHub repository
- Contact me through GitHub
MIT License. See LICENSE for details.
- Initial release
- Basic equation conversion functionality
- Ribbon icon and command palette integration
- Support for both inline and display equations
Created by Nyimbi Odero
If you find this plugin useful, consider:
- Star the repository on GitHub
- Report bugs or suggest features through GitHub issues
- Contributing to the codebase
- Sharing it with others who might find it helpful
- The Obsidian team for creating an excellent platform
- The Obsidian community for their support and feedback