jianzhongli / MathView

A library for displaying math formula in Android apps.
Apache License 2.0
1.01k stars 188 forks source link

Able to style formulas with text aligned right? #14

Closed Payge closed 7 years ago

Payge commented 8 years ago

Hello there,

Thanks for Mathview, it's been very helpful for styling math formulas so far :)

I wanted to know if there is a way to have a MathView style itself so it is right to left? or text aligned right?

Thanks for the great library!

jianzhongli commented 8 years ago

Hello @Payge , you can tweak MathJax with more configuration by calling MathView.config(), for example, to right align your formula, you can call

MathView.config("MathJax.Hub.Config({\n" +
    "jax: [\"input/TeX\",\"output/HTML-CSS\"],\n" + 
    "displayAlign: \"right\"});"
);

This will effectively insert the configuration statement into the html document which your MathView formula is embedded in. Please check MathJax's document if you want more options.

BunnyCinnamon commented 7 years ago

MathJax is slow for me tho, 1 second to format and align the text, looks bad :/ and I dont think Katex has that... :<