Dear all,
I have Premium version 14 and want to embed HTML code that contains MathML via embedHMTL (actually upgraded only because of this MathML functionality). According to the documentation, this is included in the version 14 Premium package. My code is:
require_once '../phpdocx/classes/CreateDocx.php';
$htmlString = '<p>A math equation using MathML:</p><math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>A</mi><mo>=</mo></mrow></math><p>Paragraph after the math equation.</p>';
$docx = new CreateDocx();
$docx->embedHTML($htmlString);
It inserts HTML code without problems, just the MathML is rendered as text. I tried with other MathML, which rendered correctly when displayed within website. Same with this MathML
require_once '../phpdocx/classes/CreateDocx.php';
$htmlString = '<p>A math equation using MathML:</p><math xmlns=\"http://www.w3.org/1998/Math/MathML\"><mrow><mi>A</mi><mo>=</mo></mrow></math><p>Paragraph after the math equation.</p>';
$htmlString = '<p>This is now the equation</p><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <munderover> <mo data-mjx-texclass="OP">∑</mo> <mrow data-mjx-texclass="ORD"> <mi>i</mi> </mrow> <mrow data-mjx-texclass="ORD"></mrow> </munderover> <msub> <mi>F</mi> <mi>i</mi> </msub> <mo>⋅</mo> <mo stretchy="false">(</mo> <msup> <mi>δ</mi> <mrow data-mjx-texclass="ORD"> <mn>18</mn> </mrow> </msup> <msubsup> <mtext>O</mtext> <mtext>VSMOW</mtext> <mi>i</mi> </msubsup> <mo>−</mo> <msup> <mi>δ</mi> <mrow data-mjx-texclass="ORD"> <mn>18</mn> </mrow> </msup> <msubsup> <mtext>O</mtext> <mtext>VSMOW</mtext> <mtext>air</mtext> </msubsup> <mo stretchy="false">)</mo> <mo>=</mo> <mn>0</mn> </math>';
$docx = new CreateDocx();
$docx->embedHTML($htmlString);
Has anyone the same experience?
Andy