From 2c6e3c300d72054f7da264970c4157851f6c22ed Mon Sep 17 00:00:00 2001 From: Cristian Olvera Lara Date: Thu, 22 Aug 2024 16:28:02 -0400 Subject: [PATCH 1/2] [Website] Use mathjax svg renderer We identified an issue where mathjax would fail to render certain math symbols. This happens on MacOS versions Ventura and later (13+) because of a change in the OS-supplied STIX fonts. We fix this here by changing the renderer from HTML+CSS (which tries to use local STIX fonts) to SVG. More details on the issue can be found here: https://meta.stackexchange.com/a/389308 The [official docs](https://docs.mathjax.org/en/stable/output.html#mathjax-output-formats) outline a couple considerations for using the SVG renderer, the biggest being lack of IE8 support. If IE8 support is crucial then we should consider alternate approaches. An alternative fix could be to upgrade our mathjax version as later versions may not be as reliant on local STIX fonts but the 3.0 update was a complete rewrite and appears to [not be a straightforward upgrade](https://docs.mathjax.org/en/latest/upgrading/v2.html). --- website/siteConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/siteConfig.js b/website/siteConfig.js index a0472fa1c6..ab3a608745 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -74,7 +74,7 @@ const siteConfig = { 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js', // Mathjax for rendering math content `${baseUrl}js/mathjax.js`, - 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_HTML', + 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_SVG', ], // CSS sources to load From d3708aa52c6d50c737f12e1a4767d0d1927f20d5 Mon Sep 17 00:00:00 2001 From: Cristian Lara Date: Fri, 23 Aug 2024 15:10:57 -0400 Subject: [PATCH 2/2] Use latest 2.x mathjax version Co-authored-by: Max Balandat --- website/siteConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/siteConfig.js b/website/siteConfig.js index ab3a608745..8329137916 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -74,7 +74,7 @@ const siteConfig = { 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js', // Mathjax for rendering math content `${baseUrl}js/mathjax.js`, - 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_SVG', + 'https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS_SVG', ], // CSS sources to load