diff --git a/docs/javascripts/mathjax.js b/docs/javascripts/mathjax.js new file mode 100644 index 00000000000..0be88e0419d --- /dev/null +++ b/docs/javascripts/mathjax.js @@ -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() +}) diff --git a/docs/what_combine_does/model_and_likelihood.md b/docs/what_combine_does/model_and_likelihood.md index e3e2a8dda84..911ab924752 100644 --- a/docs/what_combine_does/model_and_likelihood.md +++ b/docs/what_combine_does/model_and_likelihood.md @@ -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])}. $$ diff --git a/mkdocs.yml b/mkdocs.yml index 370bc538c0d..07fc6eb40f2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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