Skip to content

Conversation

@Ahmahsamara17
Copy link

added MathJax to base.html so that challenge descriptions and pages in Dojo can display LaTeX math expressions properly instead of raw $...$ text.

@ConnorNelson
Copy link
Member

<script>
  window.MathJax = {
    tex: { inlineMath: [['$','$'], ['\\(','\\)']], displayMath: [['$$','$$'], ['\\[','\\]']] },
    options: {
      ignoreHtmlClass: ".*",         // ignore everything
      processHtmlClass: "math"       // but DO process inside .math
    }
  };
</script>
<script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>

I think an opt in approach like this would make more sense, so we don’t suddenly start doing weird things with $. We would also need to update the markdown render whitelist to allow the math class through.

@zardus
Copy link
Member

zardus commented Aug 28, 2025

👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants