简体   繁体   English

jqMath:如何在Android应用程序的webview上改进向量和超级/下标的显示

[英]jqMath: how to improve the display of vectors and super/subscripts on an android app's webview

I have jqMath up and running within an android app. 我有一个Android应用程序中的jqMath并运行。 The output of jqMath is shown within an android's webview. jqMath的输出显示在android的webview中。 It works really well and it is really fast. 它工作得很好,而且非常快。 I have noticed, however, that when typesetting 但是,我注意到排版的时候

(1) a vector,eg {AB}↖{→}. (1)一个向量,例如{AB}↖{→}。 The baseline of the created vector is lower than that of the surrounding text, like this: "Text before vector text after". 创建的向量的基线低于周围文本的基线,如下所示:“ 向量文本之后的文本”。 I would like to adjust the baseline of the created vector. 我想调整创建的矢量的基线。

(2) a chemical isotope eg {}_6^{12}C the superscript and subscript are not aligned with each other. (2)化学同位素,例如{} _6 ^ {12} C,上标和下标不相互对齐。 I would like to have them right-justified instead. 我想让他们正确对齐。

Which part of the code or the css style sheet could be modified to improve these issues? 可以修改代码的哪一部分或css样式表来改善这些问题?

Thank you in advance, 先感谢您,

Marco 马尔科

jqMath cannot be as pretty as you want on Android currently, sigh, because Android's webview doesn't implement MathML. jqMath目前在Android上不能像你想要的那样漂亮,感叹,因为Android的webview没有实现MathML。 These examples look fine on iOS 7, Safari 6.1+, or Firefox. 这些示例在iOS 7,Safari 6.1+或Firefox上看起来很好。 They also look good in Chrome 24 FWIW, because I volunteered for a year and got MathML working ok there, but Google turned it off in Chrome 25 because I couldn't afford to keep maintaining it for free. 他们在Chrome 24 FWIW中看起来也不错,因为我自愿参加了一年并且让MathML在那里工作得很好,但谷歌在Chrome 25中将其关闭,因为我无法继续免费维护它。 (Yes, grumble. Donate your nickels to Google.) You might try MathJax, which is a lot slower and bigger than jqMath but produces beautiful output, if you need perfect typesetting. (是的,抱怨。把你的镍币捐给谷歌。)你可以尝试MathJax,它比jqMath慢很多,但是如果你需要完美的排版,它会产生漂亮的输出。 jqMath's goal is to produce readable output quickly in all cases, and rely on the underlying MathML implementation to make it pretty in modern browsers. jqMath的目标是在所有情况下快速生成可读输出,并依赖底层MathML实现在现代浏览器中使其变得漂亮。 I thought Google and Microsoft would prioritize MathML in their web browsers for eg digital textbooks soon, but so far they haven't. 我认为谷歌和微软很快会在他们的网络浏览器中优先考虑MathML,例如数字教科书,但到目前为止他们还没有。 Maybe if all math and science and education apps switch to iOS they'll change their minds. 也许如果所有的数学和科学和教育应用都转向iOS,他们会改变主意。 Hope this helps. 希望这可以帮助。 (I am the jqMath author.) (我是jqMath作者。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM