So in Jekyll and Markdown, I can't type $ or its HTML equivalent code, and not \$ nor $\$$. How should I type the dollar sign?
How do you type the dollar sign when you have mathjax installed?
Asked Answered
To prevent MathJax from using the dollar sign as a delimiter, you can put it in a span, like so:
<span>$</span>
Alternatively, you can enable processEscapes
and then you can use the backslash escape \$
for the dollar sign.
what is processEscapes? please! –
Testudo
The span trick isn't working for me--the end tag is interpreted as text in math mode. :-( –
Dissever
Enable processEscapes
:
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
Then you can simply use \$
to get a plain $
.
If using Jekyll, you will need to escape the \\, too, so \\$ will produce a plain
$
. –
Goldfinch I disable dollar signs completely: my settings (in a script tag) are:
MathJax = {
tex: {
inlineMath: [['\\\\(', '\\\\)']],
displayMath: [['\\\\[', '\\\\]']]
},
svg: {
fontCache: 'global'
}
};
so that I have to use \(...\) or \[...\] rather than $x$ and $$y$$.
View the source of w.allsup.co/sandbox/MathJax as an example -- note that dollar signs appear as is, but \(...\) and \[...\] are handled by MathJax. (That site is my personal wiki that I use as a note-taking system ala Obsidian.) –
Horning
© 2022 - 2025 — McMap. All rights reserved.