Skip to content

Commit

Permalink
Properly apply MathJax configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Oct 24, 2024
1 parent da6514a commit 4c2b391
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
11 changes: 0 additions & 11 deletions src/sotoki/assets/static/js/mathjax-config.js

This file was deleted.

14 changes: 13 additions & 1 deletion src/sotoki/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@
<script src="{{ to_root }}static/js/hljs-trigger.js"></script>
{% endif %}
{% if site_mathjax %}
<script type="text/x-mathjax-config" src="{{ to_root }}static/js/mathjax-config.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50) },
tex2jax: { inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ], displayMath: [ ["$$","$$"], ["\\[", "\\]"] ], processEscapes: true, ignoreClass: "tex2jax_ignore|dno" },
TeX: {
extensions: ["begingroup.js"],
noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE", mathsize: "90%" } },
Macros: { href: "{}" }
},
messageStyle: "none",
styles: { ".MathJax_Display, .MathJax_Preview, .MathJax_Preview > *": { "background": "inherit" } },
SEEditor: "mathjaxEditing"
});
</script>
<script src="{{ to_root }}static/js/MathJax.js?config=TeX-AMS_HTML-full"></script>
{% endif %}
</head>
Expand Down

0 comments on commit 4c2b391

Please sign in to comment.