• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Penguinlay/notion-inline-latex: User Script for Inline LaTeX Rendering in notion ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Penguinlay/notion-inline-latex

开源软件地址(OpenSource Url):

https://github.com/Penguinlay/notion-inline-latex

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

notion-inline-latex

UserScript for Inline LaTeX Rendering in notion.so


Feature

  • Render LaTeX at Startup (default two seconds latency for smoother experience but customizable)
  • Render LaTeX at Keyup (default two seconds latency for smoother experience but customizable)
  • $ $ as Default LaTeX Delimiter (customizable)

Acknowledgement

Attention (Please read this before proceeding.)

  • 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.

Installation

  • Install Violentmonkey.
  • Click on the extension icon and click plus icon. A new text editor window by extension will be opened in new tab.
  • Copy/paste the script notion-inline-latex.js.
  • Save and close the editor.
  • Go to notion.so and enable the script if it has not been already.

Usage

Mobile Installation/Usage (Untested)

  • Note: The workaround below has never been tested or tried out. Just an idea for those of you adventurous. Use with extreme caution!!!
    • Install a browser with plugin/extension support which has userscript plugin/extension available (For example, Opera with Tampermonkey).
    • Use the script with that plugin/extension.

Example to Test

Duplicatable Sample Notion Page

Known Limitations

  • 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!

Reference





鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap