Page 1 of 1
mathml and mathflow
Posted: Tue Nov 15, 2011 12:59 pm
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
Re: mathml and mathflow
Posted: Tue Nov 15, 2011 1:12 pm
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
Re: mathml and mathflow
Posted: Tue Nov 15, 2011 3:07 pm
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
Re: mathml and mathflow
Posted: Wed Nov 16, 2011 10:29 am
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
Re: mathml and mathflow
Posted: Wed Nov 16, 2011 2:04 pm
by jonathangudgion
Radu,
excellent
thanks for the quick response
Jonathan