Script is intended only for web browswer use with UserScript extension, Violentmonkey.
The script should work with other UserScript extentions as it is or with minimum changes though it has not been tested yet.
Script does not change the content.
It merely changes the display after the contents are loaded.
For the script to work properly, you need at least one math block present in the page where you want to render inline LaTeX.
This script is based on the script by Evert Heylen for my own math notes on notion.so.
I made it available for public so that it would be useful to others.
I meant no harm in writing this personal script.
I cannot take responsibility for loss of data or other harms.
So, even though the script only changes the display and it is harmless at my best knowledge, please use it at your own risk, especially with untested mobile installation/usage described below.
Last but not least, this project/script is in no way affiliated nor sponsored by notion.so.
Like features on Notion Hacks, this is a personal/community hack/workaround.
You need at least one math block present in the page where you want to render inline LaTeX.
Render at startup will not work when the page is loaded dynamically within Notion. Quick fix is just click a neutral key like shift for render at keyup to pick up the keyup cue.
To-Do-List
Figure out a way to eliminate the need for the presence of math block for the script to work.
Figure out how to avoid cursor shifting to the beginning of the block after each render.
Customization
Small value for startUpWaitTime and keyUpWaitTime can make the script load improperly.
Add delimiters as desired though delimiters other than default one have not been tested yet.
Contribution
Please start an issue if you find a bug or have any question.
Please submit PR if you have any update to the project or would like to contribute. Thanks in advance!
请发表评论