jianzhongli / MathView

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

Automatic line breaking #10

Closed vyndor closed 7 years ago

vyndor commented 8 years ago

MathJax have an option for automatic linebreaking. http://mathjax.readthedocs.org/en/latest/output.html#automatic-line-breaking It is a very useful feature for small viewports and large expressions. Can I enable it somehow in MathView?

jianzhongli commented 8 years ago

Hmm, I am not an expert in MathJax. Rather than providing a pre-configured version of MathJax, I choose to add another method config() to MathView in version 0.0.5.

Now you can call

MathView.config(
"MathJax.Hub.Config({\n"+
            "  CommonHTML: { linebreaks: { automatic: true } },\n"+
            "  \"HTML-CSS\": { linebreaks: { automatic: true } },\n"+
            "         SVG: { linebreaks: { automatic: true } }\n"+
            "});");

before the setText() method to enable auto linebreaking. Please try upgrade to version 0.0.5 and see if this works for you!