Since Notion already supports inline math as of today. The project no longer needs to be maintained.
This is the official guide. Math Equations Guide
This repository include three js scripts.
- notion-inline-math-equations-web.js
- notiton-inline-math-equations-mac.js
- notion-inline-render-by-inlineCode.js
These scripts are based on:
- https://github.com/evertheylen/notion-inline-math
- https://github.com/Penguinlay/notion-inline-latex
- https://github.com/ghosw/notion-inline-math-equations
- https://gist.github.com/denosawr/8a5e434bd97154fba81ea91e79a8c99b
notion-inline-math-equations-web.js
is valid for Notion.so.
- Firstly, install violentmonkey.
- Open dashboard.
- Left above button - install from url;
- insert url: https://raw.githubusercontent.com/MLZC/inline-math-equation-for-notion/master/notion-inline-math-equations-web.js
- Confirm installation.
- Does not need any norm math block.
- Use "$$" instead of "`$$`", doesn't need
command + e
to enter inline code model before.
Prepare in advance:
- install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- install
npm
brew install npm
- install
asar
npm install -g asar
- Download
notiton-inline-math-equations-mac.js
. - Notion App for mac.
- extract app from app.asar
cd /Applications/Notion.app/Contents/Resources; asar extract app.asar app;
And do the following step:
- Open /Applications folder by using Finder;
- Find Notion and Right-clicking.
- Shown Package Contents;
- Continue into:
/Applications/Notion.app/Contents/Resources/app/renderer/preload.js
- Insert all contents from
notiton-inline-math-equations-mac.js
at the end ofpreload.js
.
Or using the one-click script.
- Download
notiton-inline-math-equations-mac.js
andpatcher.sh
. - Assure this two file are in the same location.
- Grant Permissions:
chmod 777 ./patcher.sh
- Patch
./patcher.sh
Features same as previous one.
notion-inline-render-by-inlineCode.js
is also valid for Notion.so.
- Firstly, install violentmonkey.
- Open dashboard.
- Left above button - install from url;
- insert url: hhttps://github.com/MLZC/inline-math-equation-for-notion/blob/master/notion-inline-math-render-by-inlineCode.js
- Confirm installation.
- Make sure you have at least one normal math block on your page
- Use inline code starting with "$" and end with "$". For example:
$E=mc^2$
, or$E=mc^2$ select the string before and presscommand + E
. - Press
Alt
to rerender all inline math. You can of course change the shortcut in the code below. - The inline math will revert to inline code when the block becomes active.