gitbook-plugin-mathjax

Insert math and LaTeX equations in your pages.

Apache-2.0 16 个版本
安装
npm install gitbook-plugin-mathjax
yarn add gitbook-plugin-mathjax
pnpm add gitbook-plugin-mathjax
bun add gitbook-plugin-mathjax
README

Math integration with GitBook

This plugin uses MathJax to display Math/TeX formula. This is an official plugin. Versions >=0.1.0 require GitBook >=2.0.0.

How to use it?

Add it to your book.json configuration:

{
    "plugins": ["mathjax"]
}

Install your plugins using:

$ gitbook install ./

You can now add TeX formula to your book using the {% math %} block:

When {% math %}a \ne 0{% endmath %}, there are two solutions to {% math %}(ax^2 + bx + c = 0){% endmath %} and they are {% math %}x = {-b \pm \sqrt{b^2-4ac} \over 2a}.{% endmath %}

You can also use the shortcut $$:

When $$a \ne 0$$, there are two solutions to $$(ax^2 + bx + c = 0)$$ and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

Configuration

You can force the use of svg pre-processed by adding to your book.json:

{
    "pluginsConfig": {
        "mathjax":{
            "forceSVG": true
        }
    }
}
版本列表
2.0.0 2017-02-20
1.1.2 2016-12-08
1.1.1 2016-12-08
1.1.0 2016-05-05
1.0.2 2015-10-21
1.0.1 2015-09-05
1.0.0-alpha.2 2015-02-14
1.0.0-alpha.1 2015-02-12
1.0.0-alpha 2015-02-05
1.0.0 2015-06-29
0.0.6 2014-09-02
0.0.5 2014-08-20
0.0.4 2014-07-23
0.0.3 2014-04-21
0.0.2 2014-04-21
0.0.1 2014-04-20