2 title = "Render TeX/LaTeX Mathematics with MathJax"
4 date = 2023-02-27T00:00:00Z
5 updated = 2023-02-27T00:00:00Z
9 This hack will allow TeX/LaTeX mathematic markup to be rendered within a page on
10 BookStack using [MathJax](https://www.mathjax.org/).
12 Inline math can be surrounded with `$` and math blocks can be surrounded with
13 `$$` or `\[...\]`. Additionally LaTeX environments and `\ref{...}` commands will be processed.
15 This can be used with both the WYSIWYG editor and the Markdown editor and will
16 affect everything on a given page, meaning this can be used in titles,
17 book/chapter headings, etc.
21 - This relies on JavaScript to parse and render content on page load.
22 - This loads the MathJax JavaScript from an external CDN (jsdelivr.net) server.
23 - Math rendering may not work in all areas of the application, notedly:
24 - No rendering in the Markdown live preview.
25 - No rendering in many export formats, including PDF.
26 - This could introduce rendering of Math where not intended.
30 It is possible to further [configure MathJax as documented here](https://docs.mathjax.org/en/latest/web/configuration.html).
34 {{<hack file="head.html" type="head">}}