Design Science MathType 6.7 in OOo

Discuss the formula editor

Design Science MathType 6.7 in OOo

Postby ellend » Mon Aug 29, 2011 6:45 am

I would like to use Design Science MathType 6.7 in Open Office. Is there a way to access the MathType 6.7 equation editor in an Open Office text document through an icon on a toolbar, that is, link it to a toolbar icon? Rather than clicking through insert -> object -> ole object -> further object -> MathType 6.0.

Thank you for any help.
OpenOffice 3.3 on Windows 7
ellend
 
Posts: 3
Joined: Sat Aug 13, 2011 9:37 am

Re: Design Science MathType 6.7 in Open Office

Postby regina » Sun Oct 09, 2011 6:16 pm

I don't know an icon. But in a Writer document you can use an autotext. Insert such an OLE-object. Mark the whole line with that object and generate an autotext from it. This would work similar to the "Fn"-autotext for a Math formula.
regina
 
Posts: 67
Joined: Sat Apr 05, 2008 4:55 pm

Re: Design Science MathType 6.7 in OOo

Postby regina » Tue Oct 11, 2011 3:15 pm

Hi ellend,

you can use a macro to insert a MathType OLE-object. You can bind that macro to a shortcut key. Here a proposal. It is snippet from Mathias Bauer which I found with some google search and which I have adapted and expand for your MathType. I hope the CLSID is correct, it work for me on WinXP.

Kind regards
Regina

Code: Select all   Expand viewCollapse view
sub InsertMathTypeFormulaInWriter
dim oTargetDocument as variant
oTargetDocument = ThisComponent
dim oCurrentController as variant
oCurrentController = oTargetDocument.getCurrentController()
dim oFormula as variant
oFormula = oTargetDocument.createInstance("com.sun.star.text.TextEmbeddedObject")
oFormula.CLSID = "0002CE03-0000-0000-C000-000000000046"
oFormula.AnchorType = com.sun.star.text.TextContentAnchorType.AS_CHARACTER
oFormula.attach(oCurrentController.Selection.getByIndex(0) )
dim oXCOEO as variant: oXCOEO = oFormula.ExtendedControlOverEmbeddedObject
oXCOEO.doVerb(com.sun.star.embed.EmbedVerbs.MS_OLEVERB_PRIMARY)
End Sub
regina
 
Posts: 67
Joined: Sat Apr 05, 2008 4:55 pm


Return to Math

Who is online

Users browsing this forum: No registered users and 2 guests