Skip to content

Commit

Permalink
Update the mathjax version to fix the \vec{} rendering in Safari (#919)
Browse files Browse the repository at this point in the history
* update the mathjax version to fix shifted \vec{}

* add spaces

---------

Co-authored-by: Aliya Nigamova <[email protected]>
  • Loading branch information
anigamova and Aliya Nigamova authored Mar 21, 2024
1 parent ac4377a commit 103740b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
19 changes: 19 additions & 0 deletions docs/javascripts/mathjax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};

document$.subscribe(() => {
MathJax.startup.output.clearCache()
MathJax.typesetClear()
MathJax.texReset()
MathJax.typesetPromise()
})
4 changes: 2 additions & 2 deletions docs/what_combine_does/model_and_likelihood.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ However, some constraints do exist, such as the requirement that bin contents be
The auxiliary constraint terms implemented in combine are Gaussian, Poisson or Uniform:

$$
p_{e} \propto \exp{\left(-0.5 \left(\frac{(\nu_{e} - y_{e})}{\sigma}\right)^2 \right)}\mathrm{;} \\
p_{e} = \mathrm{Poiss}( \nu_{e}; y_{e} ) \mathrm{;\ or} \\
p_{e} \propto \exp{\left(-0.5 \left(\frac{(\nu_{e} - y_{e})}{\sigma}\right)^2 \right)}\mathrm{;~} \\
p_{e} = \mathrm{Poiss}( \nu_{e}; y_{e} ) \mathrm{;\ or~} \\
p_{e} \propto \mathrm{constant\ (on\ some\ interval\ [a,b])}.
$$

Expand Down
14 changes: 8 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ extra_css:
- "mystyle.css"

extra_javascript:
- 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

markdown_extensions:
- pymdownx.arithmatex
- pymdownx.details
- pymdownx.blocks.details
- admonition
- footnotes
- pymdownx.arithmatex:
generic: true
- pymdownx.details
- pymdownx.blocks.details
- admonition

0 comments on commit 103740b

Please sign in to comment.