Class MathConverter


  • public class MathConverter
    extends ConverterHelper
    This class converts formulas: Either as MathML, as an image or as plain text (StarMath or LaTeX format)
    • Constructor Detail

      • MathConverter

        public MathConverter​(OfficeReader ofr,
                             XhtmlConfig config,
                             Converter converter,
                             boolean bSupportMathML)
        Create a new MathConverter
        Parameters:
        ofr - the OfficeReader to query about the document
        config - the configuration determining the type of export
        converter - the converter instance
        bSupportMathML - true if the formula should be exported as MathML
    • Method Detail

      • convert

        public void convert​(org.w3c.dom.Element image,
                            org.w3c.dom.Element onode,
                            org.w3c.dom.Node hnode,
                            boolean bAllowDisplayStyle)
        Convert a formula
        Parameters:
        image - image version of the formula (or null if no image is available)
        onode - the math node
        hnode - the xhtml node to which content should be added
      • convertTexMathsEquation

        public boolean convertTexMathsEquation​(org.w3c.dom.Element onode,
                                               org.w3c.dom.Element hnodeBlock,
                                               org.w3c.dom.Element hnodeInline,
                                               int nMode)