You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book-example/src/format/mathjax.md
+16-6
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,30 @@
1
1
# MathJax Support
2
2
3
-
mdBook supports math equations through [MathJax](https://www.mathjax.org/).
3
+
mdBook has optional support for math equations through [MathJax](https://www.mathjax.org/).
4
4
5
-
**However the normal method for indication math equations with `$$` does not work (yet?).**
5
+
To enable MathJax, you need to add the `mathjax-support` key to your `book.toml` under the `output.html` section.
6
6
7
-
To indicate an inline equation \\( \int x = \frac{x^2}{2} \\) use
7
+
```toml
8
+
[output.html]
9
+
mathjax-support = true
8
10
```
9
-
\\( \int x = \frac{x^2}{2} \\)
11
+
12
+
>**Note:**
13
+
The usual delimiters MathJax uses are not yet supported. You can't currently use `$$ ... $$` as delimiters and the `\[ ... \]` delimiters need an extra backslash to work. Hopefully this limitation will be lifted soon.
14
+
15
+
### Inline equations
16
+
Inline equations are delimited by `\\[` and `\\]`. So for example, to render the following inline equation \\( \int x dx = \frac{x^2}{2} + C \\) you would write the following:
17
+
```
18
+
\\( \int x dx = \frac{x^2}{2} + C \\)
10
19
```
11
20
12
-
To indicate a block equation
21
+
### Block equations
22
+
Block equations are delimited by `\\[` and `\\]`. To render the following equation
0 commit comments