<equation> tag when inserting MathML in Author
Oxygen general issues.
-
- Posts: 3
- Joined: Tue Jul 12, 2011 8:05 pm
<equation> tag when inserting MathML in Author
Greetings.
We have just configured MathFlow as default MathML editor for Oxygen 12.1
Our content is based on several levels of specialization of DITA.
When inserting MathML equations, the resulting XML is surrounded by <equation> tags. This does not work for us, since we have our own element (driven from DITA Learning Specialization) <lcEquation> - resulting in invalid XML.
Is there a way to configure oXygen not to wrap MathML with <equation> tags or replace then with <lcEquation>?
Thank you.
We have just configured MathFlow as default MathML editor for Oxygen 12.1
Our content is based on several levels of specialization of DITA.
When inserting MathML equations, the resulting XML is surrounded by <equation> tags. This does not work for us, since we have our own element (driven from DITA Learning Specialization) <lcEquation> - resulting in invalid XML.
Is there a way to configure oXygen not to wrap MathML with <equation> tags or replace then with <lcEquation>?
Thank you.
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: <equation> tag when inserting MathML in Author
Hi,
Unfortunately the Author operation which inserts the equation is quite hard-coded and only inserts the <equation><math>.... wrapper tags.
We will discuss making it more flexible in order to be able to use it in a DITA specialization.
But you have several alternatives:
1) The easiest one would be to modify the default Author action for inserting a MathML equation in the Author page. In the Oxygen Preferences->Document Type Association page you can edit the DITA document type, in the Author tab go to the Actions category, edit the action called insert.equation and make it use an which takes as a parameter the XML fragment to insert which can be like:
Then the operation will insert the XML fragment when pressed and you will be able to double click it to edit the MathML fragment in the MathFlow editor.
You can share your document type modifications with others:
http://www.oxygenxml.com/doc/ug-oxygen/ ... aring.html
2) You can also create a new code template in Oxygen which inserts the equation start formula (code template which will appear in the Author content completion window), use the code template to insert the equation and then again double click it to edit.
3) The editing support Oxygen offers for DITA is not hard coded but can be customized by using our Java Author SDK:
http://www.oxygenxml.com/developer.html ... horing_SDK
The SDK comes with the Java sources for all DITA operations which can be modified and re-packed in the dita.jar library.
Regards,
Radu
Unfortunately the Author operation which inserts the equation is quite hard-coded and only inserts the <equation><math>.... wrapper tags.
We will discuss making it more flexible in order to be able to use it in a DITA specialization.
But you have several alternatives:
1) The easiest one would be to modify the default Author action for inserting a MathML equation in the Author page. In the Oxygen Preferences->Document Type Association page you can edit the DITA document type, in the Author tab go to the Actions category, edit the action called insert.equation and make it use an
Code: Select all
ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation
Code: Select all
<lcEquation>
<math>
</math>
</lcEquation>
You can share your document type modifications with others:
http://www.oxygenxml.com/doc/ug-oxygen/ ... aring.html
2) You can also create a new code template in Oxygen which inserts the equation start formula (code template which will appear in the Author content completion window), use the code template to insert the equation and then again double click it to edit.
3) The editing support Oxygen offers for DITA is not hard coded but can be customized by using our Java Author SDK:
http://www.oxygenxml.com/developer.html ... horing_SDK
The SDK comes with the Java sources for all DITA operations which can be modified and re-packed in the dita.jar library.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Tue Jul 12, 2011 8:05 pm
Re: <equation> tag when inserting MathML in Author
Thank you.
For the 1st option, using "Developer" role I can't edit the arguments section. I can add them - but the little wrench icon stays disabled/grayed-out. How do I modify an argument for the operation to add my custom code?
For the 1st option, using "Developer" role I can't edit the arguments section. I can add them - but the little wrench icon stays disabled/grayed-out. How do I modify an argument for the operation to add my custom code?
-
- Posts: 3
- Joined: Tue Jul 12, 2011 8:05 pm
Re: <equation> tag when inserting MathML in Author
Actually - there are no arguments listed under "1" tab at all for this operation. So what I meant was - that I can add those number tabs(1,2,3) - but not arguments in them.
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: <equation> tag when inserting MathML in Author
Hi,
So for option number (1) you should have chosen a new type of operation called: instead of:
which indeed allows no parameters.
The customization should be like:

If the customization is successful then you should be able to insert the MathML equation in the Author and then by double clicking it you should be able to edit it using the MathFlow equation editor.
Regards,
Radu
So for option number (1) you should have chosen a new type of operation called:
Code: Select all
ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation
Code: Select all
ro.sync.ecss.extensions.dita.topic.InsertEquationOperation
The customization should be like:

If the customization is successful then you should be able to insert the MathML equation in the Author and then by double clicking it you should be able to edit it using the MathFlow equation editor.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service