Forum


Replies: 13   Views: 4122
Add mathequation with bold-itlatic not working
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 13-10-2015 - 07:44

Hello,

We have dome some tests. The MathML to the Word format is done through a XSL file, so you need to use the correct input; for example instead of mi tags, use mn ones.

Phpdocx replaces automatically these tags, but only if they don't have attributes, so maybe you have removed that lines of the code.

This example works perfectly with MS Office 2013:

$mathML = '
<math xmlns="http://www.w3.org/1998/Math/MathML">
    <mrow>
        <mn mathvariant="bold-italic">x</mn>
        <mn>y</mn>
    </mrow>
</math>';

$docx->addMathEquation($mathML, 'mathml');

Regards.