Convert MathType equation in word to MathML

4.9k views Asked by At

I have some mathtype equations in word that i would like to convert to mathml. I have tried using the MathType SDK but it kept giving me an exception when trying to call a non managed dll. I have also emailed the support contacts and have heard nothing back. I know that word stores the ole.bin and mwf files for the mathtype equations so i was wondering if someone knew how to parse those files to obtain the mathml information.

2

There are 2 answers

1
dwhite66 On

You can copy-paste the MathML code.

  1. Open MathType
  2. Select Preferences from the top bar.
  3. Click "Cut and Copy Preferences"
  4. Change the radio button to select "MathML or TeX" and your preferred standard.

You should be able to Copy the code from MathType (open the equation editor window, highlight, copy) and paste it directly into the code of whatever editor you're using.

8
Mohamed Alikhan On

If you are having licensed MathType application,

You can download their SDK for .NET from here.

http://www.dessci.com/en/reference/sdk/

Import the DLL and Keep the MT6.DLL in your Project root folder. And Use ConvertEquation class to convert your MathType Equation to TEX or MathML based on the Translators.

/edit/

using ConvertEquations; 
private ConvertEquation ce = new ConvertEquation();
ce = new ConvertEquation(); 
String latexText = ce.Convert(new EquationInputFileWMF(pr2.GetInputFolder(imagefile.Name)), new EquationOutputFileText(pr2.GetOutputFile("txt"), Util.MathTypeTranslaterName));

This Works for me. Hope this helps.