gitbook-plugin-math

1.0.3 • Public • Published

gitbook-math

A Gitbook plugin for rendering math expressions, which also supports dark mode color.

npm javascript gitbook gitbook GitHub license npm

Installation

Add the following plugins to your book.json and run the command gitbook install

{
	"plugins": ["math"]
}

Usage

Render with KaTex:

```math:title=title,macros={"\\f":"#1f(#2)"\\,"\\const":"1"},fontSize=16
% \f is defined as #1f(#2) using the macro
\f\relax{x} = \\const + \int_{-\infty}^\infty
    \f\hat\xi\,e^{2 \pi i \xi x}
    \,d\xi
```
  • macros (optional): customized macros
  • title (optional): to specify a title
  • fontSize (optional): to specify the font size

Release History

  • ==================== 1.0.0 Initial release ====================
    • 1.0.1 bug fix
    • 1.0.2 support font size setting and escape separators
    • 1.0.3 use display mode by default

How to contribute

Have an idea? Found a bug? See how to contribute.

📜 License

MIT © aleen42

Dependencies (1)

Dev Dependencies (11)

Package Sidebar

Install

npm i gitbook-plugin-math

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

3.03 MB

Total Files

71

Last publish

Collaborators

  • aleen42