I am using MediaWiki with MathJax, because a lot of the pages have maths equations. But on some pages I also need to display the string $x$ as is.
Is there any way to escape the $x$ so it doesn't invoke MathJax and display as an italic x?
MathJax supports \$ to escape a $ within an expression, but that doesn't work with the initial $ (of course).
If you set processEscapes:true
in the tex2jax
section of your configuration, then you will be able to escape the initial dollar sign to allow you to type $x$
. Alternatively, you can use <span class="tex2jax_ignore">...</span>
around the text you don't want MathJax to process. Perhaps easier would be to use <code>...</code>
around the $x$
, since MathJax doesn't process text inside code blocks.
Davide
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With