How to add MathML support to DITA customization?
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
How to add MathML support to DITA customization?
Post by Frank Ralf »
Hi,
We use a customized DITA framework and want to add MathML support. I've already tried adding adding the DTD, MOD, and ENT files from the mathml DITA-OT plug-in to our customization along with referencing them from our customized topic DTD but I'm not sure that this is the right approach. Any pointers welcome.
TIA
Frank
We use a customized DITA framework and want to add MathML support. I've already tried adding adding the DTD, MOD, and ENT files from the mathml DITA-OT plug-in to our customization along with referencing them from our customized topic DTD but I'm not sure that this is the right approach. Any pointers welcome.
TIA
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to add MathML support to DITA customization?
Hi Frank,
If it helps you, the DITA OT distribution which comes with Oxygen contains a mathml plugin inside it which you could use as a starting point:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\mathml
besides contributing XSLT for publishing PDF and XHTML-based topics with the equations embedded the plugin contributes a new Public ID for a DITA composite-type topic which can contain inside it the equation wrapped in two DITA specialized elements, an equation element which extends DITA fig and a mathml element which extends DITA foreign.
You can create in Oxygen using the File->New dialog a Composite with MathML file and see that in action.
Regards,
Radu
If it helps you, the DITA OT distribution which comes with Oxygen contains a mathml plugin inside it which you could use as a starting point:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\mathml
besides contributing XSLT for publishing PDF and XHTML-based topics with the equations embedded the plugin contributes a new Public ID for a DITA composite-type topic which can contain inside it the equation wrapped in two DITA specialized elements, an equation element which extends DITA fig and a mathml element which extends DITA foreign.
You can create in Oxygen using the File->New dialog a Composite with MathML file and see that in action.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: How to add MathML support to DITA customization?
Post by Frank Ralf »
Hi Radu,
Thanks for the pointers.
PDF transformation
Actually, I already had a look at the mathml plugin and the additional document type. But because we don't want to create a separate document type I copied over the files from the mathml plugin to our own DITA-OT plugin and integrated them into our DTD. This does work already in oXygen and the files validate but the PDF transformation still breaks because of some unresolved references. So I suppose I should have a closer look at the XSLT files from the mathml plugin to see how the MathML is rendered in the PDF.
Multiple MathML plugins
In addition, I had a closer look at the DITA-OT plugins and found that there is also a MathML plugin for DITA4Publishers (net.sourceforge.dita4publishers.math) which comes with two additional document types, mathml2 and mathml3. There I stumbled across the following comment in mathml2.dtd:
Kind regards,
Frank
Thanks for the pointers.
PDF transformation
Actually, I already had a look at the mathml plugin and the additional document type. But because we don't want to create a separate document type I copied over the files from the mathml plugin to our own DITA-OT plugin and integrated them into our DTD. This does work already in oXygen and the files validate but the PDF transformation still breaks because of some unresolved references. So I suppose I should have a closer look at the XSLT files from the mathml plugin to see how the MathML is rendered in the PDF.
Multiple MathML plugins
In addition, I had a closer look at the DITA-OT plugins and found that there is also a MathML plugin for DITA4Publishers (net.sourceforge.dita4publishers.math) which comes with two additional document types, mathml2 and mathml3. There I stumbled across the following comment in mathml2.dtd:
So which is the plugin with the most current implementation of MathML? And which files should I reference?<!-- WEK:
Removed use of public identifier here to ensure that we always
get this version of the mathml2-qname-1.mod and not one
from another source, especially in tools like OxygenXML
where there could be any number of copies of MathML
referenced from different catalogs.
-->
Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How to add MathML support to DITA customization?
Hi Frank,
The Oxygen provided mathml plugin does not come with MathML DTDs.
Instead, its modules refer to it using the public ID -//W3C//DTD MathML 2.0//EN.
Also the catalog.xml from our plugin has an entry like:
which means that we wanted the XML catalog from the "mathml" framework we bundle with Oxygen to be actually used to resolve that public ID.
What MathML 2 DTD gets used in the end I'm not sure, it depends on the order of the catalog entries in the catalog-dita.xml. It probably does not matter much though.
Regards,
Radu
The Oxygen provided mathml plugin does not come with MathML DTDs.
Instead, its modules refer to it using the public ID -//W3C//DTD MathML 2.0//EN.
Also the catalog.xml from our plugin has an entry like:
Code: Select all
<nextCatalog catalog="../../../../mathml/catalog.xml"/>
What MathML 2 DTD gets used in the end I'm not sure, it depends on the order of the catalog entries in the catalog-dita.xml. It probably does not matter much though.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: How to add MathML support to DITA customization?
Post by Frank Ralf »
Hi Radu,
Many thanks for this explanation, that will help me a lot.
Kind regards,
Frank
Many thanks for this explanation, that will help me a lot.
Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
Return to “DITA (Editing and Publishing DITA Content)”
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