Skip to content

SillyTavern/Extension-LaTeX

Repository files navigation

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

About

Adds an ability to render LaTeX and AsciiMath formulas in SillyTavern chats.

Topics

Resources

License

Stars

Watchers

Forks