我们可以从MathJax获取MathML输出吗 [英] Can we get MathML output from MathJax

查看:187
本文介绍了我们可以从MathJax获取MathML输出吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否存在将MathJax输出转换为MathML的方法.

I was wondering if there are ways to convert MathJax output to MathML.

我通读了几篇文章,说MathJax支持MathML.右键单击MathJax公式时,我还可以看到选项'Show MathML'.我的问题是,我可以从MathJax获取MathML输出到网页吗?我对MathJax并不熟悉,我不确定它是如何工作的.任何资源或教程页面都很好!

I read through several articles that saying MathJax supports MathML. I can also see the option 'Show MathML' when I right click the MathJax formulas. My question is, can I get the MathML output to the webpage from MathJax? I am not familiar with MathJax and I am not sure how it works. Any resources or tutorial pages would have been nice!

推荐答案

@Peter,我认为OP可能会问如何从MathJax获取MathML字符串,而不是如何将MathML标记直接插入页面.因此,也许在MathJax论坛上的讨论描述了如何使用toMathML 就能解决问题.

@Peter, I think the OP may be asking how to get a MathML string from MathJax, rather than how to insert the MathML tags into the page directly. So perhaps the discussion on the MathJax forums that describes how to use toMathML will do the trick.

基本思想是为要转换的数学获取元素jax(使用MathJax.Hub.getAllJax),然后调用其toMathML方法.但是您需要为此加倍注意,因为toMathML可以异步运行.上面的链接将详细介绍.

The basic idea is to get the element jax (using MathJax.Hub.getAllJax) for the math you want to convert, then to call its toMathML method. But you need to use some care for this, as toMathML can operate asynchronously. The link above goes through the details.

编辑:通过 MathJax-node 项目,您可以从命令行执行此操作,因此您可能还需要检查一下.

EDIT: The MathJax-node project allows you to do this from the command line, so you might want to check that out as well.

这篇关于我们可以从MathJax获取MathML输出吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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