1
0
silverbullet/website/🔌 KaTeX.md

1.3 KiB

type uri repo author
plug github:silverbulletmd/silverbullet-katex/katex.plug.js https://github.com/silverbulletmd/silverbullet-katex Zef Hemel

Silver Bullet KaTeX plug

Installation

Run the {[Plugs: Add]} command and paste in: github:silverbulletmd/silverbullet-katex/katex.plug.json

That's all!

Use

Put a latex block in your markdown:

```latex
c = \pm\sqrt{a^2 + b^2}
```

And move your cursor outside of the block to live preview it!

Note: KaTeX itself is not bundled with this plug; it pulls the JavaScript, CSS and fonts from the JSDelivr CDN. This means this plug will not work without an Internet connection. This limitation is because it is not yet possible to distribute font files via plugs, and KaTeX depends on specific web fonts.

Build

Assuming you have Deno and Silver Bullet installed, simply build using:

deno task build

Or to watch for changes and rebuild automatically

deno task watch

Then, load the locally built plug and add it to your PLUGS note with an absolute path, for instance:

- file:/Users/you/path/to/katex.plug.json

And run the Plugs: Update command in SilverBullet.