Notion Equation Converter
A Chrome extension that converts LaTeX block equations \[ \] and \( \) to inline equations (unrendered) $ $ in Notion pages.
🚀 Features
- One-click conversion of all
\[equation\] and \(equation\) patterns to $equation$
- Real-time auto-conversion as you type
- Smart filtering - ignores empty brackets
\[\] or \( \) and whitespace-only patterns
- Works on all Notion pages (notion.so and notion.site)
- Simple and lightweight - no permissions beyond active tab
- Preserves equation content - only changes the delimiters
📥 Installation
From Chrome Web Store
- Visit the Chrome Web Store page
- Click “Add to Chrome”
- Confirm installation
From Source (Development)
- Clone this repository:
git clone https://github.com/davidwkk/notion-equation-converter.git
- Open Chrome and go to
chrome://extensions/
- Enable “Developer mode” (top right)
- Click “Load unpacked” and select the
src folder
🎯 Usage
Basic Usage
- Open any Notion page
- Type equations using
\[ and \] or \( and \):
The quadratic formula is \[x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}\]
Einstein's famous equation is \(E = mc^2\)
- Click the extension icon in your toolbar
- Click “Convert [ ] and ( ) to $ $”
- Your equations are now in inline syntax:
The quadratic formula is $x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$
Einstein's famous equation is $E = mc^2$
- Manually select the equation and use shortcut to make it rendered.
- Shortcut:
ctrl/cmd + shift + E
Auto-Convert Mode
Toggle “Auto Convert” in the popup to automatically convert \[ \] and \( \) to $ $ as you type. Empty brackets like \[\] or \( \) are ignored.
Before & After
Before:
After:
🛠️ Technical Details
- Manifest Version: 3
- Permissions:
activeTab, storage
- Content Scripts: Runs on
*.notion.so/* and *.notion.site/*
- Framework: Vanilla JavaScript
- Regex Pattern:
/\\\[(\s*\S[\s\S]*?)\\\]/g and /\\\((\s*\S[\s\S]*?)\\\)/g - captures content with at least one non-whitespace character
🤝 Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Make your changes
- Test thoroughly
- Submit a pull request
Development Setup
# Clone the repo
git clone https://github.com/davidwkk/notion-equation-converter.git
cd notion-equation-converter
# Load in Chrome for testing
# Go to chrome://extensions/, enable Developer mode, click "Load unpacked"
🚀 Future Development Plan
Auto-Rendering Feature
- Goal: Automatically render equations after conversion from
\[ \] to $ $
- Current State: Users need to manually select and use
ctrl/cmd + shift + E to render
- Target: Eliminate manual rendering step for seamless equation conversion
- Technical Challenge: Automatically trigger Notion’s equation rendering after conversion
📝 Changelog
Version 1.0
- Initial release
- Basic equation conversion functionality
- Chrome extension popup interface
Auto-Convert Toggle (v1.1)
- New toggle in the popup for real-time auto-conversion
- Default: OFF (manual one-click conversion only)
- When enabled, any newly typed
\[ ... \] is immediately changed to $ ... $
- Enhanced regex: Now ignores empty/whitespace-only brackets for better accuracy
- Improved performance: Better text node filtering and mutation handling
Security Enhancement (v1.2)
- Removed unnecessary
scripting permission to improve security and privacy
- Minimal permissions now only include
activeTab and storage
- Better extension hygiene by following Chrome Web Store best practices
Parentheses Support (v1.3)
- Added support for
\( ... \) delimiters in addition to \[ ... \]
- Updated UI to reflect support for both delimiter types
- Enhanced regex patterns for both bracket and parentheses formats
- Improved documentation with examples for both delimiter types
🐛 Issues & Support
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
- Built for the Notion community
- Thanks to all contributors and users
Made with ❤️ for Notion users who love math