Forum


Replies: 2   Views: 3462
Mathml fix
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@peerageofscience.org  · 16-03-2013 - 20:37

Just to help out if someone else has this same problem:

The function addMathMML() fails because there is no MML2OMML_n.xsl file in the ..phpdocx_pro_conv/xsl folder (shouldn't this be included in the paid pro+ distribution?). Also at least on my localhost the syntax in CreateMath.inc ("load('../ ") was looking for that file in root, not phpdocx directory.

Fix:

Your windows probably has the required file though, in the folder Program Files(x86)/Microsoft Office/Office

Mine was named MML2OMML.xsl (without the "_n").

Copy (not move!) that file into ..phpdocx_pro_conv/xsl

Then go edit (use a proper editor and be sure to keep utf-8 encoding; I use Bluefish) this line in CreateMath.inc -file (at ...phpdocx_pro_conv/classes ):

$objXSL->load('../xsl/MML2OMML_n.XSL');

into this:

$objXSL->load(dirname(dirname(__FILE__)).'/xsl/MML2OMML.XSL');

(of course use the correct xsl filename if your's is different)