mathml and mathflow

Are you missing a feature? Request its implementation here.
jonathangudgion
Posts: 8
Joined: Tue Nov 15, 2011 12:53 pm

mathml and mathflow

Post by jonathangudgion »

under preferences, editor, author, mathml you can set mathflow installation directory and mathflow license file

could these values be added to the list of editor variables?

thanks

jonathan
Radu
Posts: 9058
Joined: Fri Jul 09, 2004 5:18 pm

Re: mathml and mathflow

Post by Radu »

Hi Jonathan,

I do not quite understand.

Do you want some predefined editor variables in Oxygen like ${mathflowInstallDir} which would be automatically expanded to the place that you have specified in the preferences? If so, where else would be such an editor variable useful?

Or do you want to be able to use the usual Oxygen editor variables to define the paths to the MathML installation dir and license file?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
jonathangudgion
Posts: 8
Joined: Tue Nov 15, 2011 12:53 pm

Re: mathml and mathflow

Post by jonathangudgion »

Radu

the first option

I want to run EquationComposer, which is also made by design science, to turn MathML into images. I'd like to do this from an AuthorAction inside our document type association

EquationComposer should be installed somewhere inside the mathflow installation directory and needs the licence file to run

So those 2 paths would be very useful to me

thanks

Jonathan
Radu
Posts: 9058
Joined: Fri Jul 09, 2004 5:18 pm

Re: mathml and mathflow

Post by Radu »

Hello Jonathan,

Thanks for the feature request, it will be discussed.

In the meantime the workaround:

Oxygen saves all its preferences in an XML file located in the Oxygen preferences directory.

Using the API (for Oxygen 12.1 or newer) you can get the preferences directory path like:

Code: Select all

File preferencesDirectory = new File(authorAccess.getWorkspaceAccess().getPreferencesDirectory());
Then in the preferences directory you can search for files starting with the prefix oxyOptions and having the current Oxygen version in the file name. The current Oxygen version can be obtained via the API using:

Code: Select all

authorAccess.getWorkspaceAccess().getVersion()
You can parse the XML file with a DOM parser.
The XML file should contain an entry like:

Code: Select all

		<entry>
<String>author.mathml.mathflow</String>
<mathFlowOptions>
<field name="preferredEditorType">
<Integer>0</Integer>
</field>
<field name="installationDirectory">
<File>C:/Program Files (x86)/MathFlow SDK</File>
</field>
<field name="licenseFile">
<null/>
</field>
</mathFlowOptions>
</entry>
which should give you enough information to know the MathFlow location that the user has set in the Preferences.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
jonathangudgion
Posts: 8
Joined: Tue Nov 15, 2011 12:53 pm

Re: mathml and mathflow

Post by jonathangudgion »

Radu,

excellent

thanks for the quick response

Jonathan
Post Reply