Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 919
Martin McBride Avatar asked Jan 07 '12 22:01

Martin McBride


1 Answers

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

like image 161
Davide Cervone Avatar answered Sep 25 '22 23:09

Davide Cervone