[]
Used to convert GcWord content to MathML, or append MathML content to GcWord Office Math objects. When converting multiple objects, creating and reusing the same instance of this class improves performance.
public class MathMLConverter
Creates a new instance of the MathMLConverter class.
public MathMLConverter()
Adds MathML content to a OMath.
public ContentObject[] FromMathML(XmlReader mathML, OMath to)
mathML
System.Xml.XmlReaderThe source System.Xml.XmlReader containing the MathML content to convert.
to
OMathThe target OMath where to add the converted content.
The array of created ContentObjects.
Adds MathML content to a OMathElement.
public ContentObject[] FromMathML(XmlReader mathML, OMathElement to)
mathML
System.Xml.XmlReaderThe source System.Xml.XmlReader containing the MathML content to convert.
to
OMathElementThe target OMathElement where to add the converted content.
The array of created ContentObjects.
Adds MathML content to a OMathParagraph.
public OMath FromMathML(XmlReader mathML, OMathParagraph to)
mathML
System.Xml.XmlReaderThe source System.Xml.XmlReader containing the MathML content to convert.
to
OMathParagraphThe target OMathParagraph where to add the converted content.
Adds MathML content to a RangeBase.
public ContentObject[] FromMathML(XmlReader mathML, RangeBase range, InsertLocation location = InsertLocation.End)
mathML
System.Xml.XmlReaderThe source System.Xml.XmlReader containing the MathML content to convert.
range
RangeBaseThe target RangeBase where to add the converted content.
location
InsertLocationThe target InsertLocation for the insertion.
The array of created ContentObjects.
Converts a ContentObject to MathML.
public void ToMathML(ContentObject content, XmlWriter result)
content
ContentObjectThe source ContentObject to convert.
result
System.Xml.XmlWriterThe target System.Xml.XmlWriter where to write the MathML content.
Converts a RangeBase to MathML.
public bool ToMathML(RangeBase range, XmlWriter result)
range
RangeBaseThe source RangeBase to convert.
result
System.Xml.XmlWriterThe target System.Xml.XmlWriter where to write the MathML content.
true if the range is converter successfully; otherwise false