Skip to content

Commit a66354c

Browse files
authored
Configure MathJax to support unicode markup (#1527)
Configure MathJax to support unicode markup for format preview to support the same unicode markup that was recently added to the m2svg utility.
1 parent b38211f commit a66354c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/proofers/previewControl.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ window.addEventListener("DOMContentLoaded", () => {
177177
document.getElementById(viewMode).checked = true;
178178
// check if MathJax already loaded. Will break if load more than once
179179
if (previewStyles.allowMathPreview && typeof MathJax === "undefined") {
180+
window.MathJax = {
181+
loader: { load: ["input/tex", "output/svg", "[tex]/unicode"] },
182+
tex: { packages: { "[+]": ["unicode"] } },
183+
};
180184
const mathJaxScriptElement = document.createElement("script");
181185
mathJaxScriptElement.type = "text/javascript";
182186
mathJaxScriptElement.src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js";

0 commit comments

Comments
 (0)