writer2latex.latex
Class MathmlConverter
java.lang.Object
writer2latex.latex.ConverterHelper
writer2latex.latex.MathmlConverter
public final class MathmlConverter
- extends ConverterHelper
This class converts mathml nodes to LaTeX.
(Actually it only converts the starmath annotation currently, if available).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MathmlConverter
public MathmlConverter(OfficeReader ofr,
LaTeXConfig config,
ConverterPalette palette)
appendDeclarations
public void appendDeclarations(LaTeXDocumentPortion pack,
LaTeXDocumentPortion decl)
- Overrides:
appendDeclarations in class ConverterHelper
convert
public java.lang.String convert(org.w3c.dom.Node settings,
org.w3c.dom.Node formula)
handleDisplayEquation
public boolean handleDisplayEquation(TableReader table,
LaTeXDocumentPortion ldp)
- Try to convert a table as a display equation:
A 1 row by 2 columns table in which each cell contains exactly one paragraph,
the left cell contains exactly one formula and the right cell contains exactly
one sequence number is treated as a (numbered) display equation.
This happens to coincide with the AutoText provided with OOo Writer :-)
- Parameters:
table - the table readerldp - the LaTeXDocumentPortion to contain the converted equation
- Returns:
- true if the conversion was successful, false if the table
did not represent a display equation
handleDisplayEquation
public boolean handleDisplayEquation(org.w3c.dom.Element node,
LaTeXDocumentPortion ldp)
- Try to convert a paragraph as a display equation:
A paragraph which contains exactly one formula + at most one sequence
number is treated as a display equation. Other content must be brackets
or whitespace (possibly with formatting).
- Parameters:
node - the paragraphldp - the LaTeXDocumentPortion to contain the converted equation
- Returns:
- true if the conversion was successful, false if the paragraph
did not contain a display equation