Package writer2latex.xhtml

# Class MathConverter

java.lang.Object
writer2latex.xhtml.MathConverter

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

## Constructor Summary

Constructors
Constructor
Description
`MathConverter(OfficeReader ofr, XhtmlConfig config, Converter converter, boolean bSupportMathML)`
Create a new `MathConverter`

## Method Summary

Modifier and Type
Method
Description
`void`
`convert(Element image, Element onode, Node hnode, boolean bAllowDisplayStyle)`
Convert a formula
`boolean`
`convertTexMathsEquation(Element onode, Element hnodeBlock, Element hnodeInline, int nMode)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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)