mediawiki mathjax需要使用转义符$ x $ [英] mediawiki mathjax need to use escape $x$

查看:281
本文介绍了mediawiki mathjax需要使用转义符$ x $的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将MediaWiki与MathJax一起使用,因为很多页面都有数学方程式.但是在某些页面上,我还需要按原样显示字符串$ 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.

有什么办法可以逃脱$ x $,以便它不调用MathJax并显示为斜体x?

Is there any way to escape the $x$ so it doesn't invoke MathJax and display as an italic x?

MathJax支持\ $对表达式中的$进行转义,但这不适用于最初的$(当然).

MathJax supports \$ to escape a $ within an expression, but that doesn't work with the initial $ (of course).

推荐答案

如果在配置的tex2jax部分中设置processEscapes:true,则可以转义初始美元符号以允许输入$x$.或者,您可以在不需要MathJax处理的文本周围使用<span class="tex2jax_ignore">...</span>.也许更容易在$x$周围使用<code>...</code>,因为MathJax不会在代码块内处理文本.

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

这篇关于mediawiki mathjax需要使用转义符$ x $的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆