Adds an ability to render LaTeX and AsciiMath formulas in SillyTavern chats.
  • JavaScript 100%
Find a file
2026-03-17 22:30:14 +02:00
assets bracket multiline and trailing space fix 2025-11-02 15:27:48 -08:00
dist Fix npm audit 2026-02-08 01:18:33 +02:00
src Add KaTeX CSS and fonts 2025-05-07 19:56:38 +09:00
.gitignore Initial commit 2024-10-17 21:37:40 +03:00
LICENSE Initial commit 2024-10-17 21:37:40 +03:00
manifest.json Add KaTeX CSS and fonts 2025-05-07 19:56:38 +09:00
package-lock.json Fix npm audit 2026-03-17 22:30:14 +02:00
package.json Add readme with regex polyfills. Tweak performance 2024-10-20 15:00:32 +03:00
README.md Rename legacy scripts accordingly 2025-05-07 21:02:49 +03:00
webpack.config.js Add readme with regex polyfills. Tweak performance 2024-10-20 15:00:32 +03:00

Extension-LaTeX

Render math formulas in LaTeX/AsciiMath format in SillyTavern chats.

How to use

  1. Install the "LaTeX" extension from the "Download Extensions & Assets" menu in the Extensions panel.
  2. Use the latex or asciimath code block to render math formulas in LaTeX or AsciiMath format respectively.

Alternative syntax

In the assets folder you'll find a collection of regex scripts for alternative LaTeX syntax options. Import them with the Regex extension to use them in your chats.

Legacy syntax

To use the legacy syntax with $$ (LaTeX) and $ (AsciiMath) delimiters in Markdown, import the following scripts with the Regex extension.

Example

Code blocks

```latex
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
```
```asciimath
int_{-oo}^{oo} e^{-x^2} dx = sqrt{pi}
```

With regex scripts

$$\boxed{\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}}$$
$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$
\[ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} \]
\( \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} \)

License

AGPL-3.0