Forum


Replies: 10   Views: 4737
Mathml tag
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 asantos  · 02-09-2014 - 18:41

Hello, I've tried to embed an HTML content in Docx. It contains MathML tag. The embedHTML() function does not convert the MathML tag properly. I've tried to with OOML also. The PHP code is: [code] $doc = new CreateDocx(); $doc->embedHTML( $strHtmlContent ); $doc->createDocx('test'); [/code] The HTML code sample is: [code]
What is the answer for FRES=CX?ρ?A2v2 ? (lorem ipsum)
[/code] I'm using PHPdocX version 4.0.

Posted by admin  · 03-09-2014 - 06:50

UPDATE: phpdocx Premium licenses allow adding MathML embedded in HTML using embedHTML and replaceVariableByHTML methods.

Posted by asantos  · 03-09-2014 - 17:42

Hello. I already tested this function, addMathEquation(), this works fine, but it's not my case. I have a HMTL code with MathML, I need convert all HTML to Docx, how I should do? Sample of code: [code] <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body id="wrapDiv"> What is the aswer of <math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msub><mrow><mi>F</mi></mrow><mrow><mi>R</mi><mi>E</mi><mi>S</mi></mrow></msub><mo>=</mo><mfrac><mrow><msub><mrow><mi>C</mi></mrow><mrow><mi>X</mi></mrow></msub><mo>?</mo><mtext> </mtext><mtext> </mtext><mo>⋅</mo><mtext> </mtext><mtext> </mtext><mi>ρ</mi><mo>?</mo><mtext> </mtext><mtext> </mtext><mo>⋅</mo><mtext> </mtext><mtext> </mtext><mi>A</mi></mrow><mrow><mn>2</mn></mrow></mfrac><mo>⋅</mo><msup><mrow><mi>v</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow></math> ? <span style="color:red"> (lorem ipsum) <math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msub><mrow><mi>F</mi></mrow><mrow><mi>R</mi><mi>E</mi><mi>S</mi></mrow></msub><mo>=</mo><mfrac><mrow><msub><mrow><mi>C</mi></mrow><mrow><mi>X</mi></mrow></msub><mo>?</mo><mtext> </mtext><mtext> </mtext><mo>⋅</mo><mtext> </mtext><mtext> </mtext><mi>ρ</mi><mo>?</mo><mtext> </mtext><mtext> </mtext><mo>⋅</mo><mtext> </mtext><mtext> </mtext><mi>A</mi></mrow><mrow><mn>2</mn></mrow></mfrac><mo>⋅</mo><msup><mrow><mi>v</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow></math> <br><br><strong>test after mathml</strong> </span> </body> </html> [/code] How can I convert this HTML code to Docx ? Regards.

Posted by admin  · 04-09-2014 - 07:00

UPDATE: phpdocx Premium licenses allow adding MathML embedded in HTML using embedHTML and replaceVariableByHTML methods.

Posted by asantos  · 04-09-2014 - 16:18

So, how I supposed do? I have this case: [code] (lorem ipsum) FRES=CX?ρ?A2v2 [/code] I can't use the embedHTML() function here, because this SPAN tag has a MathML inner, but if I use the addMathEquation() function I can't get the text that exists before MathML and I also lost the style of SPAN tag. Can you help-me ? Cheers

Posted by admin  · 05-09-2014 - 06:41

Hello, What license of phpdocx are you using? Regards.

Posted by asantos  · 05-09-2014 - 13:33

Pro trial version

Posted by admin  · 05-09-2014 - 15:34

Hello, No, you can't do that with the trial version. Regards.

Posted by asantos  · 05-09-2014 - 19:25

Deleted by admin · 06-09-2014 - 09:37

Posted by phatchai28  · 16-09-2014 - 08:31

So what kind of functionality do you offer in the Pro version to parse mathml inside an Html code like this?

Posted by admin  · 16-09-2014 - 11:54

UPDATE: phpdocx Premium licenses allow adding MathML embedded in HTML using embedHTML and replaceVariableByHTML methods.