MathType for Oxygen XML Web Author
Note
You may be interested in this article if you are looking for our solution for Oxygen XML Author or use both desktop and web solutions.
Requirements
Oxygen XML Web Author 18.x or 19.x Installed
A valid license to install the integration in a production environment; otherwise, you can use the downloaded file just for demo purposes.
Installation
There are two ways to install MathType integration depending on Oxygen version.
Install MathType integration adding it to the Oxygen XML Web author (method 1)
Go to your Oxygen's Administration Page.
Select "Plugins" and click Add integration and choose a integration file to upload.
Click OK to upload a file. The integration should appear in the list on this page.
Restart the server.
Enable the integration on Plugins Oxygen's Administration Page.
Try that works.
For further information see Oxygen's Documentation.
Install MathType integration copying the files (method 2,only for Oxygen18.x)
Stop the Java server.
Unzip MathType integration for Oxygen XML inside Oxygen XML plugins.zip file. By default,
plugins.zip
file are on youroxygenwebapp/WEB-INF
directory.Restart the Java server.
Compatible documents with MathType integration
Currently MathType integration for Oxygen is compatible with DITA documents, as well as xhtml, DocBook and JATS. If you want MathType integration working with another type of document please contact us at support@wiris.com
Customize MathType toolbar
In order to customize the default MathType toolbar, one can call mathTypeAction.setCustomToolbar(toolbar)
and MathTypeEnhancer.prototype.setCustomToolbar(toolbar)
methods. With these methods MathType toolbar can be customized at any application level: from application level to document level.
setCustomToolbar
admits a string as parameter:
A string with a predefined toolbar:
default
,quizzes
,evaluate
,PARCC_Grade3_5
, 'PARCC_Grade6_8
andPARCC_Grade9_12
.A XML string containing a custom toolbar definition. For further information about custom toolbar definitions see the Custom toolbar section
Examples
The following example shows how to use a predefined toolbar. It's important to call mathTypeAction.setCustomToolbar(toolbar)
and MathTypeEnhancer.prototype.setCustomToolbar(toolbar)
methods once Oxygen editor has been loaded. For that purpose, we use the Oxygen's event BEFORE_EDITOR_LOADED
with the Google Closure Library:
goog.events.listen(workspace, sync.api.Editor.EventTypes.BEFORE_EDITOR_LOADED, function(e) { mathTypeAction.setCustomToolbar('PARCC_Grade3_5'); MathTypeEnhancer.prototype.setCustomToolbar('PARCC_Grade3_5'); });
The following example shows how to use a custom toolbar defined by an XML file. As in the example above, we use the BEFORE_EDITOR_LOADED
event to call the setCustomToolbar()
method.
goog.events.listen(workspace, sync.api.Editor.EventTypes.BEFORE_EDITOR_LOADED, function(e) { const xml = '<toolbar ref="general"><tab ref="advanced" before="contextual"/></toolbar>'; mathTypeAction.setCustomToolbar(xml); MathTypeEnhancer.prototype.setCustomToolbar(xml); });
Customize MathType icons
By default, MathType inserts a Math Editor icon and a Chemistry Editor icon into Oxygen's specific document toolbar (like DITA toolbar or DocBook toolbar). In order to disable a specific icon, the disableToolbar(editor)
method should be used. Note it's important to call the disableToolbar(editor)
method once Oxygen XML Web Author editor is loaded.
Disable MathType icon:
goog.events.listen(workspace, sync.api.Editor.EventTypes.BEFORE_EDITOR_LOADED, function(e) { mathTypeAction.disableToolbar(e.editor, 'open.wirismathtype'); });
MathType icon:
goog.events.listen(workspace, sync.api.Editor.EventTypes.BEFORE_EDITOR_LOADED, function(e) { chemTypeAction.disableToolbar(e.editor, 'open.wirischemtype'); });