有什么方法可以从某些HTML元素中排除MathJax处理? [英] Is there any way to exclude MathJax processing from certain HTML elements?

查看:52
本文介绍了有什么方法可以从某些HTML元素中排除MathJax处理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从某些HTML元素中排除MathJax处理?

Is there any way to exclude MathJax processing from certain HTML elements?

例如,如果我知道< div> 中没有任何数学运算,则可以通过一种方法对其进行标记,以便MathJax处理器跳过该< div> ?

If for example I know that there is not any math in a <div>, is there a way to mark it so that the MathJax processor skips that <div>?

推荐答案

MathJax的TeX和AsciiMath输入预处理器均提供配置选项 ignoreClass 来按类名忽略元素,例如,参见 tex2jax文档.MathML预处理器没有这样的选项,请参见.此功能请求.

Both MathJax's TeX and AsciiMath input pre-processors offer a configuration option ignoreClass to ignore elements by class name, see e.g., the tex2jax documentation. The MathML pre-processor does not have such an option, cf. this feature request.

不过,除非DOM非常大(并且数学的发生非常局限在本地),否则预处理并不是明显的性能瓶颈.

Still, except in cases where the DOM is very large (and the occurrence of math is very localized), the pre-processing is not a significant performance bottleneck.

这篇关于有什么方法可以从某些HTML元素中排除MathJax处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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