ASCII 到 MathML
我有一个输出的 PHP 脚本: ((5^2x^2)^2+3)/(sqrt(sqrt(81)))
我希望它的格式正确,就像你写的那样。
在哪里可以找到这样的 ASCII 到 MathML 转换器: http://www.equationsheet.com/asciitomathml.php 那是 PHP 或 JavaScript 中的 OpenSource,以便我可以在我的网页上使用它来格式化数学分数? (因为这是在 PHP 闭源代码中完成的,但我需要一些可以在我自己的服务器上实现的东西。)
我的脚本输出数学结果,我需要它正确显示
我真的很感激你花时间帮助我! :)
I have a PHP-script that outputs: ((5^2x^2)^2+3)/(sqrt(sqrt(81)))
I want it to be formatted properly like you would write it.
Where can I find a ASCII to MathML converter like this: http://www.equationsheet.com/asciitomathml.php That is OpenSource in PHP or JavaScript so that I can use it on my webpage to format the mathematical fraction? (Because this is done in PHP closed source, but I need something that I can implement on my own server.)
My scripts outputs the math as that, and I need it to be displayed properly
I really appriciate that you spend your time helping me! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我建议您使用 MathJax。
它被许多论坛使用,也被 StackExchange Mathematics 使用!
它支持所有现代浏览器(甚至 Internet Explorer 6!)
非常简单,只需将 MathJax 上传到您的服务器并包含 2 个 CSS/JS 文件!几周前,我在 MediaWiki 安装上安装了它,就像安装 XAMPP 一样简单;)
I recommend you to use MathJax.
It is used by many forums and also by StackExchange Mathematics!
It supports all modern browsers (even Internet Explorer 6!)
Very simple, just upload MathJax to your server and include 2 CSS/JS files! Some weeks ago, I installed it on a MediaWiki installation and it was easy as installing XAMPP ;)
您还可以查看我的 jqMath JavaScript 库 http://mathscribe.com/author/jqmath.html - 它就像 MathJax,但更简单、更小、更快。与 ASCIIMathML 不同,jqMath 可以在任何浏览器(直到 IE6)中运行,并且也是开源的。如果您了解 LaTeX 并希望利用它的全部功能来实现非常高级的数学,并且不介意页面加载缓慢,那么请使用 MathJax。但对于像您这样的示例,jqMath 会更快,并且使用直接基于 MathML 和 Unicode 的更简单的语法。在您的示例中,您需要将 {(5^2x^2)^2+3}/√√81 输入到 jqMath。您可以在我上面链接的页面上尝试一下。
You might also look at my jqMath JavaScript library at http://mathscribe.com/author/jqmath.html - it's like MathJax, but simpler, smaller, and much faster. Unlike ASCIIMathML, jqMath will work in any browser back to IE6, and is also open source. If you know LaTeX and want its full power for very advanced mathematics, and don't mind if pages load slowly, then use MathJax. But for examples like yours, jqMath will be faster, and use a simpler syntax based directly on MathML and Unicode. In your example, you would need to input {(5^2x^2)^2+3}/√√81 to jqMath. You can try this out at the page I linked to above.