Closed sumesh1993 closed 4 years ago
Well, that's a question. A very complicated one. The simplest approach would be to render this math into 3 MathViews, then apply styling on the parent container view.
i figured out a way, but \begin{flushleft}
and \end{flushright}
doesnt seem to be working
Try looking into mathjax docs
Does your library use mathjax under the hood for iOS and Android ? Because on web the latex is rendering perfectly using mathjax, but on iOS its not working as expected.
This is the latex When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
On the web it surely wraps content with no issues. MathJax
is designed mainly for web and not long ago they started supporting nodejs
rendering. This library is an adaption of the node version, therefore lacking a true renderer, defaulting to svg.
This is why you can't wrap content, it's svg.
iOS might manage this once rendering will be done by a native library (=no svg, can't say yet, haven't had the time to test) and there might be a very complex way to do this with svg (or component mirroring from web to RN) but it isn't on the roadmap.
PRs are welcome.
BTW the android version has a resizeMode
prop that might help in some manner.
A final thought:
If it's crucial you could use a WebView
and some internals of the mathjax adaptor to render html string.
This should work
I have big question, it is rendering in one line. How do i wrap it such that it comes on the next line