问题
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).
回答1:
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
来源:https://stackoverflow.com/questions/8773586/mediawiki-mathjax-need-to-use-escape-x