Latex / MathML support?

Hi,

When do you plan to add MathML / Latex support? I'd like to add some equations to a Word document by specifying their MathML or Latex code? 

Something like .AddEquationFromMathML( 'code​' ) and .AddEquationFromLatex( 'code​' )

Thanks!


9 Replies

LB Lokesh Baskar Syncfusion Team November 17, 2021 04:15 PM UTC

Hi Paolo,

Thank you for contacting Syncfusion support.

Regarding MathML
We have provided support for MathML equation in Word document using DocIO. Please refer the below documentation link to know about working with Mathematical Equation.
UG Link: https://help.syncfusion.com/file-formats/docio/working-with-mathematical-equation
Demo Link: https://ej2.syncfusion.com/aspnetcore/DocIO/CreateEquation#/material
 
Regarding Latex
Currently DocIO don’t have a latex support in Word document. We have already logged this requirement as feature request in our database. We don’t have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features. We will let you know when this feature is implemented.

You can track the status of this feature from the below link:
https://www.syncfusion.com/feedback/30441/support-for-building-mathematical-equation-from-latex-format-string

Please let us know if you have any other questions.

Regards,
Lokesh B
 



PA Paolo November 17, 2021 04:25 PM UTC

Thanks for the reply, I looked at the sample for MathML but it seems not to be what I'm looking for: I have a string containing some MathML code, for example:

<math>
 <mrow>
  <mi>x</mi>
  <mo>=</mo>
  <mfrac>
    <mrow>
      <mrow>
        <mo>-</mo>
        <mi>b</mi>
      </mrow>
      <mo>&PlusMinus;</mo>
      <msqrt>
        <mrow>
          <msup>
            <mi>b</mi>
            <mn>2</mn>
          </msup>
          <mo>-</mo>
          <mrow>
            <mn>4</mn>
            <mo>&InvisibleTimes;</mo>
            <mi>a</mi>
            <mo>&InvisibleTimes;</mo>
            <mi>c</mi>
          </mrow>
        </mrow>
      </msqrt>
    </mrow>
    <mrow>
      <mn>2</mn>
      <mo>&InvisibleTimes;</mo>
      <mi>a</mi>
    </mrow>
  </mfrac>
 </mrow>
</math>


The resulting equation is  x={\frac  {-b\pm {\sqrt  {b^{2}-4ac}}}{2a}}

I simply need a way to pass this MathML code to DocIO so that the equation is rendered. Of course I cannot manually parse the MathML code (unless you already have a class that does this).

Thanks!



LB Lokesh Baskar Syncfusion Team November 18, 2021 01:19 PM UTC

Hi Paolo,

Thank you for your update.

As mentioned earlier, we don’t have a support to build equation from the Latex string(code)/MathML string using DocIO. We have already logged this requirement as feature request in our database. We don’t have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features. We will let you know when this feature is implemented.  

You can track the status of this feature from the below link:
 



PA Paolo November 18, 2021 01:42 PM UTC



LB Lokesh Baskar Syncfusion Team November 19, 2021 06:04 AM UTC

Hi Paolo,

Thank you for your update.

Kindly follow the below steps to resolve this problem at your end. 
1. Log off and login the Syncfusion account. 
2. Then clear cache.

Please let us know if you have any other queries.

Regards,
Lokesh B
 



PA Paolo November 19, 2021 08:04 AM UTC

I tried, but I still get the error. I also tried to use Chrome Incognito mode.

Thanks.



LB Lokesh Baskar Syncfusion Team November 19, 2021 09:49 AM UTC

Hi Paolo,

Thank you for your update.

Now we have changed the feedback status. Could you please check and confirm us whether it is able to access at your end? 

Please let us know if you have any other queries.

Regards,
Lokesh B
 




PA Paolo November 19, 2021 09:55 AM UTC

Yes, now it works! But please edit it by also adding MathML, not only LaTeX.



LB Lokesh Baskar Syncfusion Team November 22, 2021 07:16 AM UTC

Hi Paolo,

Thank you for your update.

DocIO does not support building mathematical equations from external MathML code (<math>…..</math>
). But we can be able to create the MathML Equation at a scratch level using DocIO. Please refer to the below UG. And also, when MathML is present in the existing Word document means then it will be present in converted DOCIO DOM, and also it will preserve in the converted PDF document.
UG Link: https://help.syncfusion.com/file-formats/docio/working-with-mathematical-equation

Regarding building mathematical equations from Latex string or code.
As mentioned earlier, we don’t have support to build equations from the Latex string(code) using DocIO. We have already logged this requirement as a feature request in our database. We don’t have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features. We will let you know when this feature is implemented.

You can track the status of this feature from the below link:
 
Lokesh B 


Loader.
Up arrow icon