MathType Integration
Implementing MathType Support
Quark XML Author can be configured to support the insertion of Design Science MathType equations. In order to include MathType equations in a Quark XML Author document, MathType must be installed on the local machine. The version of MathType that is required depends on the version of Word and Quark XML Author being used. For information on which version of MathType is required, refer to the Quark XML Author ReadMe documentation.
To configure MathType support, add an element definition that facilitates MathType equations to the XAS.
The Element Definition uses the <OLE> node as a child of <Section>. Details on this node are located in Section 14.5. An example of a MathType element definition is shown below.
<!-- MathType support -->
<ElementDef name="content" friendly="Math Equation">
<OLE readonly="false">
<MathTypeEquation exportFormat="GIF" saveOLEObject="true" translator="MathML2 (no namespace).tdl" includeTranslator="true" includeMathTypeData="true"/>
</OLE>
<Attributes>
<!-- Attribute information omitted -->
</Attributes>
</ElementDef>
<ElementDef name="foreign" friendly="Math Equation Section" style="Paragraph_InV">
<Section>
<Sequence>
<OLEType name="content"/>
</Sequence>
</Section>
<Attributes>
&univ-atts;
<AttributeType name="class"/>
<AttributeType name="outputclass"/>
</Attributes>
</ElementDef>
Quark XML Author can read and write both MTEF and MathML data formats.
All error codes returned by MathType are recorded by Quark XML Author and they can be looked up in the MathType SDK help manual. Also, if MathType is not installed, or the installed copy is a prior version or not valid, the presence of a MathType definition in the Quark XML Author configuration files will result in non-editable images of the equations displayed on the Word canvas. Equation content will be properly preserved and round-tripped.
For a given translator, if you encounter an issue where characters, translator names or MathType data are not saved, please contact Design Science technical support for assistance. If a translator is not producing valid XML, that XML will not be saved by Quark XML Author.
Serialization
The saveOLEObject attribute must be used instead of saveMTEF to reliably preserve and render MathType equation dimensions.
Developer Notes
Serialization of equations has been changed to use the same methodology as embedded Word documents using Open XML. The attributes for height, width, heightDpi, widthDpi will continue to be serialized, but will be extracted from the Open XML whenever the XML Author document is saved or rendered for viewing. See "Image sizing logic".
This should help to improve performance for save and open operations and will stabilize XML Author to render correctly sized equations. Do note that there may still be some 'undefined' behavior related to equation sizing. This is particularly true of Word 2003 especially when opening the first XML Author instance document during a Word session. Though not as severe as the behavior in 2003, Word 2010 exhibits undesirable, first instance behavior when opening legacy documents where equations exceed the canvas margins (galley).
