1

I am creating an arabic app in which user can create Mathematic question with mathematic equation( in RTL format). I have tried with MathML. I want to convert this equation to image and save it. My problem is that i cannot convert it into image. I am using html2canvas as in this link.

What i am trying to convert is this enter image description here

what i am getting after html2canvas conversion is thisenter image description here

is there any solution for this? Or is there any any better way to do the same?

Farook
  • 35
  • 3
  • 10
  • You can take help from here - http://www.hotelkalika.com/formula.aspx – Arindam Nayak May 01 '15 at 09:26
  • @Farook Why you can't use MathML in your app? AFAIK the best option is creating a web app for Firefox and use Mozilla infrastructure to pack it to Android. [MathJax](https://github.com/mathjax/MathJax/issues/610) and [LaTeX](https://tex.stackexchange.com/questions/20666/typesetting-right-to-left-math) does not support RTL. – Raniere Silva May 01 '15 at 11:47
  • @Reniere Silva. I am using MathML. I tried the above example with MathML. Its the only thing i know which support RTL. I tried MathJax and Latex and found they dont support RTL. – Farook May 04 '15 at 10:58
  • Refer to [How to convert mathml to an image?](https://stackoverflow.com/q/32090853/6521116) – LF00 Oct 11 '19 at 00:49

1 Answers1

0

You can use latex code to generate those type of equations. URL for that - http://latex.codecogs.com.

For your case, it will be http://latex.codecogs.com/gif.latex?%5Cinline%20%5Csqrt%5B1/2%5D%7B25%7D.

Here, you need to know the input for querystring - your case it is \sqrt[1/2]{25} . Here %5Cinline%20%5Csqrt%5B1/2%5D%7B25%7D is html encoded querystring.

Arindam Nayak
  • 7,346
  • 4
  • 32
  • 48
  • thank you for your quick reply. I have tried latex but it cannot be made RTL. If you notice the equation it is from Right to Left not Left to Right. I tried many ways to do RTL using Latex but failed. Do you have any choices? – Farook May 01 '15 at 09:40
  • @Farook, that was not specified explicitly for RTL thing, I thought it was mistyped, ok, I will search and let you know. – Arindam Nayak May 01 '15 at 11:19
  • Thank you @Arindam Nayak Please inform me as soon as you get one answer. And sorry that i confused u. – Farook May 04 '15 at 10:59