Class MathConverter

java.lang.Object
writer2latex.xhtml.ConverterHelper
writer2latex.xhtml.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 Details

    • 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 Details

    • convert

      public void convert(Element image, Element onode, 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(Element onode, Element hnodeBlock, Element hnodeInline, int nMode)