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

只谈情不闲聊 提交于 2019-12-11 10:17:48

问题


I have jqMath up and running within an android app. The output of jqMath is shown within an android's webview. It works really well and it is really fast. I have noticed, however, that when typesetting

(1) a vector,e.g. {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 e.g. {}_6^{12}C the superscript and subscript are not aligned with each other. 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?

Thank you in advance,

Marco


回答1:


jqMath cannot be as pretty as you want on Android currently, sigh, because Android's webview doesn't implement MathML. These examples look fine on iOS 7, Safari 6.1+, or 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. (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. 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. I thought Google and Microsoft would prioritize MathML in their web browsers for e.g. digital textbooks soon, but so far they haven't. Maybe if all math and science and education apps switch to iOS they'll change their minds. Hope this helps. (I am the jqMath author.)



来源:https://stackoverflow.com/questions/20459202/jqmath-how-to-improve-the-display-of-vectors-and-super-subscripts-on-an-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!