I am trying to get alternative math delimiters and other configurations to work in MathJax version 3. I am following the guide here to use the script config, i.e.
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
},
svg: {
fontCache: 'global'
}
};
</script>
<script type="text/javascript" id="MathJax-script" async src="@3/es5/tex-mml-svg.js"></script>
Despite this, I cannot get the MathJax code to render properly using dollar signs inline, although I can get the \\(
and \\)
to render fine. When I use inspection on the web browser, I can see that the HTML class is noted as span class="math math-inline"
when using the dollar signs but class="MathJax CtxtMenu_Attached_0"
when I use \\(
and \\)
.
So, it looks like it's detecting the dollar signs as math, but not using the correct classes?
For background, the website has a Rust backend, using Tera for HTML templating, and pulldown_cmark
for Markdown to HTML conversion.
I've looked through the latest documentation, and followed the latest advice. I am expecting the configuration above to allow using dollar signs for inline math.
I am trying to get alternative math delimiters and other configurations to work in MathJax version 3. I am following the guide here to use the script config, i.e.
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
},
svg: {
fontCache: 'global'
}
};
</script>
<script type="text/javascript" id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-svg.js"></script>
Despite this, I cannot get the MathJax code to render properly using dollar signs inline, although I can get the \\(
and \\)
to render fine. When I use inspection on the web browser, I can see that the HTML class is noted as span class="math math-inline"
when using the dollar signs but class="MathJax CtxtMenu_Attached_0"
when I use \\(
and \\)
.
So, it looks like it's detecting the dollar signs as math, but not using the correct classes?
For background, the website has a Rust backend, using Tera for HTML templating, and pulldown_cmark
for Markdown to HTML conversion.
I've looked through the latest documentation, and followed the latest advice. I am expecting the configuration above to allow using dollar signs for inline math.
Share Improve this question edited Jan 20 at 16:01 swain-mote-further asked Jan 20 at 15:56 swain-mote-furtherswain-mote-further 311 silver badge1 bronze badge1 Answer
Reset to default 1This was actually a problem with pulldown_cmark
, I believe, using incorrect class names for the version of MathJax.