排版数学函数的胶乳Android应用程序呈现 [英] Typesetting math functions in LaTeX to render in Android Application
问题描述
有谁知道是否有可能使用的LaTeX标记语言在Android应用程序中的文字格式显示?
Does anyone know if it's possible to use LaTeX markup language to format text for display in an Android application?
例如文本的一个TextView可以采用HTML格式使用 Html.formHtml(字符串)
方法来改变字体大小小标等:
For example the text for a TextView can be formatted with HTML to change the font size to small and superscript etc by using the Html.formHtml("String")
method:
TextView aTextView=(TextView) findViewById(R.id.textview1);
aTextView.setText(Html.fromHtml("2<small><sup>5</sup></small>"));
将显示2 5 在TextView中。
Will display 25 in the TextView.
不过我想也许用LaTeX的重新present数学函数,并有呈现为一个正确格式化一个TextView数学函数(或别的东西)一些更先进的格式文本。
However what I'd like to something more advanced and format text using perhaps LaTeX to represent Math Function and have that render as a correctly format Math Function in a TextView (or something else).
例如LaTeX的标记评估金额$ \的DisplayStyle \总和\ limits_ {i = 0} ^妮^ 3
应该呈现为:
For example the LaTeX markup "Evaluate the sum $\displaystyle\sum\limits_{i=0}^n i^3
" should be rendered to:
如果有一些其他的方式来标记数学函数,使他们在一个Android应用程序正确显示除了使用LaTeX的,我都愿意接受建议!
If there's some other way to mark up Math Functions so they display correctly in an Android App other than using LaTeX I'm all open to suggestions!
推荐答案
乳胶是不是用Java编写的,可能很难获得对Android的 JLaTexMath 是一个Java端口,您可以使用,但可能不会直接开箱。
Latex is not written in java so may be hard to get running on the android JLaTexMath is a java port which you may be able to use, but probably not straight out of the box.
另一个选择可能运行一个服务器,它接受一个公式,并返回一个形象,如果你的公式得到真正复杂的这甚至可能会更快然后在渲染式上的服务。
One other option maybe to run a service on a server that takes a formula and returns an image, if your formulas get really complex this might even be quicker then rendering the formula.
这也将减少你的依赖,在Android平台上,这样你更可能是能够移植应用程序到IPhone和HTML5。
This will also reduce your reliance on the android platform so you are more likely to be able to port your application to IPhone and Html5.
这篇关于排版数学函数的胶乳Android应用程序呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!