在iOS应用程序中,LaTex,MathML和XHTMLMathML之间的权衡? [英] Tradeoff between LaTex, MathML, and XHTMLMathML in an iOS app?

查看:904
本文介绍了在iOS应用程序中,LaTex,MathML和XHTMLMathML之间的权衡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划使用Xcode为iPhone制作一个应用程序,显示高中和大学生经常使用的数学方程式。我用Mathematica完成所有数学计算,它允许我以三种相关格式保存这些方程式。 (1)LaTex(.tex); (2)MathML(.mml); (3)XHTMLMathML。

I plan to use Xcode to make an app for the iPhone that displays math equations that high school and college students often use. I do all my math with Mathematica, and it allows me to save such equations in three relevant formats. (1) LaTex (.tex); (2) MathML (.mml); (3) XHTMLMathML.

Mathemactica文档说第三种格式是带有嵌入式MathML的XHTML。我在此浏览器测试中找到了一些示例。好我的iPhone。所以我可能不会完全依赖MathML。

The Mathemactica documentation says the third format is XHTML with embedded MathML. I found some of the examples at this browser test don't look so good on my iPhone. So I will propbably not rely completly on MathML.

我是Xcode的初学者和我上面提到的三种文件格式,但我对C ++中的OOP有一些经验。假设Mathematica可以很好地编写所需的LaTeX,MathML,XHHTMLMathML,这三种文件格式之间的权衡是什么?我可以在同一个应用程序中混合使用这些格式吗?

I am a total beginner with Xcode and the three file formats that I mention above, but I have some experience with OOP in C++. Assuming Mathematica can do a good job writing the required LaTeX, MathML, XHHTMLMathML needed for whatever equation, what are the tradeoffs between the three file formats? Can I mix the formats in the same app?

推荐答案

我建议使用HTML。包含数学内容的正确方式是MathML - 它是HTML5的一部分(但请参阅下面的使用TeX)。

I would suggest to use HTML. The "right" way to include mathematical content is MathML -- which is part of HTML5 (but see below for using TeX).

iOS的UIwebview是基于webkit的,因此具有相同的部分MathML支持(虽然在iOS5上由于字体错误而显着恶化)所以我还建议使用 MathJax (免责声明:我是MathJax的一部分)。

iOS's UIwebview is webkit based and therefore has the same partial MathML support (though on iOS5 it's significantly worse due to a font bug) so I would also suggest to use MathJax (disclaimer: I'm part of MathJax).

MathJax是一个开源的javascript库,它理解TeX和Asciimath输入,将其中任何一个转换为MathML并将MathML呈现为HTML-CSS或SVG(在任何现代浏览器中)。

MathJax is an open source javascript library which understands TeX and Asciimath input, converts either one to MathML and renders MathML as HTML-CSS or SVG (in any modern browser).

MathJax混合这些输入格式没有问题。此外,它具有比webkit更好的MathML支持(如果需要,您可以随时配置MathJax以使用本机MathML支持 - 例如,当您知道您的内容应该在webkits本机支持中呈现时)。

MathJax has no problem mixing these input formats. Additionally, it has better MathML support than webkit (and you can always configure MathJax to use the native MathML support if you want -- say when you know your content should render fine in webkits native support).

为了帮助您入门,您可以查看此开源应用了解MathJax如何集成到iOS应用程序中。

To get you started, you can take a look at this open source app to see how MathJax can be integrated in an iOS app.

这篇关于在iOS应用程序中,LaTex,MathML和XHTMLMathML之间的权衡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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