Replies: 5   Views: 1475
How to increase the font size of mathml in addmathequation and mathml alignment
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  · 12-05-2017 - 07:05


Sorry but there's no trial of the DOCXPath functionality, as it's only available in Advanced and Premium licenses.

This is a simple sample about how to set left alignment in equations using DOCXPath:


require_once 'classes/';

$docx = new CreateDocx();

$mathML = '<math xmlns="">
                <mfenced open="[" close="]">

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

$wordML = new WordFragment($docx);
$wordML->addWordML('<m:oMathParaPr><m:jc m:val="left"/></m:oMathParaPr>');

$referenceNode = array(
        'customQuery' => '//m:oMathPara/m:oMath',

$docx->insertWordFragment($wordML, $referenceNode, 'before');


Although you can accomplish it using DOCXPath as this script illustrates, after you have purchased an Advanced or Premium license please send us an email to contact[at], and we'll generate a patch to be able to set alignment using a new option with addMathEquation.