Forum


Replies: 0   Views: 3568
Insert math equation (mathml type) into a table cell or another word fragment rather then directly t
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 srveiga  · 10-07-2015 - 14:09

I have something like this: $docx = new CreateDocx(); $mathEquation = new WordFragment($docx); $image = new WordFragment($docx); $link = new WordFragment($docx); $mathML = '50,2'; $mathEquation->addMathEquation($mathML, 'mathml'); $imageOptions = array('src' => 'vf.gif', 'scaling' => 50, 'float' => 'right', 'textWrap' => 1); $image->addImage($imageOptions); $linkOptions = array('url'=> 'http://www.google.es', 'color' => '0000FF', 'underline' => 'single'); $link->addLink('link to Google', $linkOptions); $text = array(); $text[] = $image; $text[] = $mathEquation; $text[] = $link; $docx->addText($text); In this case, the image and the link worked fine. The mathEquation was ignored. ----------------------------- If I add the mathlml like this $docx->addMathEquation($mathML, 'mathml'); it works just fine. But what I really need is to add it in a table cell or in the same line as other text and/or images. Is there any way to add a math equation (of the 'mathml' type) to a table cell or between text in the same line ?