From 103740bbaf7870e7f7dd7ec7431e6afcad1c04e3 Mon Sep 17 00:00:00 2001 From: Aliya Nigamova Date: Thu, 21 Mar 2024 09:29:53 +0100 Subject: [PATCH] Update the mathjax version to fix the \vec{} rendering in Safari (#919) * update the mathjax version to fix shifted \vec{} * add spaces --------- Co-authored-by: Aliya Nigamova --- docs/javascripts/mathjax.js | 19 +++++++++++++++++++ .../what_combine_does/model_and_likelihood.md | 4 ++-- mkdocs.yml | 14 ++++++++------ 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 docs/javascripts/mathjax.js 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