From: Dan Brown Date: Wed, 1 Mar 2023 11:34:39 +0000 (+0000) Subject: Updated mathjax hack text after review X-Git-Url: http://source.bookstackapp.com/hacks/commitdiff_plain/07b224bebba0f718bfdbf6697717235ebde16d4b Updated mathjax hack text after review --- diff --git a/content/mathjax/head.html b/content/mathjax/head.html index 8a51c03..8043c0b 100644 --- a/content/mathjax/head.html +++ b/content/mathjax/head.html @@ -1,9 +1,8 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/content/mathjax/index.md b/content/mathjax/index.md index 4605d4a..dce8c52 100644 --- a/content/mathjax/index.md +++ b/content/mathjax/index.md @@ -1,35 +1,33 @@ +++ -title = "Render LaTeX with MathJax" +title = "Render TeX/LaTeX Mathematics with MathJax" author = "@codemicro" date = 2023-02-27T00:00:00Z updated = 2023-02-27T00:00:00Z tested = "v23.02" +++ -This hack will allow LaTeX equations and markup to be rendered within a page on -Bookstack. +This hack will allow TeX/LaTeX mathematic markup to be rendered within a page on +BookStack using [MathJax](https://www.mathjax.org/). Inline math can be surrounded with `$` and math blocks can be surrounded with -`$$`. +`$$` or `\[...\]`. Additionally LaTeX environments and `\ref{...}` commands will be processed. -This can be used with both the WYSISYG editor and the Markdown editor and will +This can be used with both the WYSIWYG editor and the Markdown editor and will affect everything on a given page, meaning this can be used in titles, book/chapter headings, etc. #### Considerations -This loads MathJax the MathJax JavaScript from a CDN, and will do so for every -page load. - -Live previews of the rendered LaTeX markup will not be rendered in the Markdown -editor's preview. - -Using this markup may create difficulties when using the search engine to find -certain pages. +- This relies on JavaScript to parse and render content on page load. +- This loads MathJax the MathJax JavaScript from an external CDN (jsdelivr.net) server. +- Math rendering may not work in all areas of the application, notedly: + - No rendering in the Markdown live preview. + - No rendering in many export formats, including PDF. +- This could introduce rendering of Math where not intended. #### Options -It is possible to configure MathJax as documented [here](https://docs.mathjax.org/en/latest/web/configuration.html). +It is possible to further [configure MathJax as documented here](https://docs.mathjax.org/en/latest/web/configuration.html). #### Code