Martin McBride
Martin McBride

Reputation: 498

mediawiki mathjax need to use escape $x$

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).

Upvotes: 5

Views: 1393

Answers (1)

Davide Cervone
Davide Cervone

Reputation: 12205

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

Upvotes: 7

Related Questions