Home

Contents

1 Introduction

2 Using the export filters

3 Using the command line utility

4 Configuration

5 Special features for the EPUB export

6 The LaTeX package ooomath.sty

7 Using Writer2LaTeX from another application

7.1 Using Writer2LaTeX from a Java application

7.2 Using Writer2LaTeX from a Basic macro

7.3 Batch conversion with UNO

7.4 Converting from StarMath with a Basic macro

8 Troubleshooting

    

7 Using Writer2LaTeX from another application

7.4 Converting from StarMath with a Basic macro

In addition to converting a complete document, you can also convert a single formula from StarMath to LaTeX. To do this, the uno service

org.openoffice.da.writer2latex.W2LStarMathConverter

is provided. This service supports two methods

string convertFormula ( [in] string sStarMathFormula );

string getPreamble ( );

This small example is a Basic macro that converts a few formulas and displays the result. Note that the last conversion triggers a definition of the LaTeX macro \defeq in getPreamble().

Dim smc As Object

smc = CreateUnoService( _

    "org.openoffice.da.writer2latex.W2LStarMathConverter")

MsgBox smc.convertFormula("1 over 2")

MsgBox smc.convertFormula("int from 1 to infty f(x)dx")

MsgBox smc.convertFormula("sqrt 3")

MsgBox smc.convertFormula("f(x) def x^2-1")

MsgBox smc.getPreamble()