Chevalier
Chevalier

Reputation: 595

Can I Use MathJax In Gitbook.com

I have one gitbook ebook in gitbook.com:here.But the mathjax plugin perform well in editor while the math expression can't seen in online version? is there any setting i need to set?

Upvotes: 2

Views: 1516

Answers (1)

Markus
Markus

Reputation: 3353

Math & TeX

GitBook supports math equations and TeX thanks to plugins. There are currently 2 official plugins to display math: mathjax and katex.

Enable a math plugin:

To enable math support, you need to add one of these plugins to your book.json:

{
    "plugins": ["mathjax"]
}

Differences between MathJax and KaTeX

The mathjax and katex plugins are different implementations of TeX equation rendering, backed by their respective Open Source libraries: KaTeX and MathJax. MathJax supports the entire TeX syntax, but the output is not perfect on ebooks (PDF, ePub and Mobi). KaTeX renders perfectly on all formats (web and ebooks), but doesn't yet support all the syntax.

Add math to your content:

Here is some inline math: $$a \ne 0$$

A block of math should begin with a new line:

Here is a block of math:

$$
a \ne 0
$$

From: http://help.gitbook.com/format/math.html

Upvotes: 2

Related Questions