From 347c4e7e7dbe345b97c8de9ea4443029e51a764e Mon Sep 17 00:00:00 2001 From: Alex Jordan Date: Sun, 15 Feb 2026 20:42:07 -0800 Subject: [PATCH] HTML: Move MathJax packages and macros to its configuration --- xsl/pretext-html.xsl | 70 ++++++++++++----------------------------- xsl/pretext-jupyter.xsl | 25 +++++++++------ 2 files changed, 35 insertions(+), 60 deletions(-) diff --git a/xsl/pretext-html.xsl b/xsl/pretext-html.xsl index 5dba3348ae..350afd3146 100644 --- a/xsl/pretext-html.xsl +++ b/xsl/pretext-html.xsl @@ -6888,8 +6888,7 @@ along with MathBook XML. If not, see . - -
+
@@ -9940,7 +9939,6 @@ along with MathBook XML. If not, see . -
@@ -11270,7 +11268,6 @@ along with MathBook XML. If not, see .
-
@@ -13127,7 +13124,7 @@ TODO: base - + extpfeil ams @@ -13135,6 +13132,9 @@ TODO: color newcommand knowl + + + @@ -13158,7 +13158,9 @@ TODO: }); } - + + () => {} + @@ -13175,6 +13177,9 @@ TODO: [tex]/color [tex]/newcommand [pretext]/mathjaxknowl3.js + + [tex]/ + @@ -13188,9 +13193,17 @@ TODO: false - pageReady() { + MathJax.tex2mmlPromise(String.raw` + + + + + \newcommand{\sfrac}[2]{{#1}/{#2}} + + `); + return MathJax.startup.defaultPageReady().then(function () { console.log("in ready function"); rsMathReady(); @@ -13971,49 +13984,6 @@ TODO: - - - - - - - - - - - \require{ - - - } - - - - - - - - - - - - - - - - - diff --git a/xsl/pretext-jupyter.xsl b/xsl/pretext-jupyter.xsl index 82cd835703..76cd0da878 100644 --- a/xsl/pretext-jupyter.xsl +++ b/xsl/pretext-jupyter.xsl @@ -375,22 +375,27 @@ along with MathBook XML. If not, see . - - - - - - - - - + + + + + - + + + + \require{ + + + } + + +