DITA with MathML to WebHelp

Oxygen general issues.
expatriate
Posts: 39
Joined: Wed Dec 31, 2008 12:42 am

DITA with MathML to WebHelp

Post by expatriate »

Hi
We really, really need to publish DITA plus MathML to PDF (no problem), WebHelp and ideally SCORM outputs.

For WebHelp, MathML makes it from Oxygen's Composite topic type to the HTML files -- but Firefox won't render it. If I change the .html extension to .xhtml, Firefox renders the MathML perfectly -- but then renders everything else on the page as unstyled text.

Can you explain how the WebHelp frame persuades Firefox not to render perfectly good MathML?

Thanks
Pat
expatriate
Posts: 39
Joined: Wed Dec 31, 2008 12:42 am

Re: DITA with MathML to WebHelp

Post by expatriate »

OK - now I remember to put a namespace on the html element, and it works: perfectly rendered MathML in WebHelp pages. From Firefox, at least.

That's all it takes: any chance this might be built into the WebHelp transformation for 10.2?

Pat
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA with MathML to WebHelp

Post by Radu »

Hi Pat,

We have an open issue about publishing MathML embeded in a DITA topic to HTML output and have it work in most/all browsers.
Things are not quite clear, indeed Firefox has this support which works only if it believes that the HTML file is XHTML. For example in Firefox 4 I could only get it to render the embeded MathML equation after changing the name of the HTML file to "*.xhtml". From what I remember in an older version of Firefox setting the namespace on the root element was enough.
Even this workaround adding of the namespace on the root element should not be necessary as the associated XHTML Transitional DTD specified this namespace by default but the Firefox browser does not seem to know about it.

Here is a thread on the DITA Users where we've had some discussions in the past (even before we added support in Oxygen for the Composite + MathML):
http://groups.yahoo.com/group/dita-users/message/21263

We were also contemplating somehow converting the MathML to SVG which seems better supported by all browsers.

We'll update this thread if/when we find a solution for this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
expatriate
Posts: 39
Joined: Wed Dec 31, 2008 12:42 am

Re: DITA with MathML to WebHelp

Post by expatriate »

Hi Radu
Thanks, as always, for helpful and interesting comments.
For HTML I should have pointed out that I'm still using Firefox 3.6, but it seems Firefox 4 has similar issues.
For PDF I'm now evaluating the Antenna House formatter which handles MathML very nicely indeed -- at a price!
We were also contemplating somehow converting the MathML to SVG which seems better supported by all browsers.
This would be a perfect, logical, sustainable solution for both HTML and PDF. There is already Justus Piater's pmml2svg (http://sourceforge.net/projects/pmml2svg/) which replaces MathML by beautifully typeset SVG equations, in any available font. Plugging a pmml2svg processing step into the DITA to PDF or to HTML scenarios seems so straightforward. I only wish I had the expertise to do it.

Cheers
Pat
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA with MathML to WebHelp

Post by Radu »

Hi Pat,

Thanks for the tip, we'll look into it. Indeed having XSLT stylesheets which perform the transformation seems a good idea.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
tapo4ek999
Posts: 10
Joined: Thu Jun 08, 2017 2:32 pm

Re: DITA with MathML to WebHelp

Post by tapo4ek999 »

Hi Radu!

I've found this old thread and decided to not create new one.
The problem is: I put a mathMl equation in my dita document

Code: Select all


    <mathml>
<m:math xmlns:m ="http://www.w3.org/1998/Math/MathML">
<m:semantics>
<m:mrow>
<m:msqrt>
<m:mrow>
<m:msup>
<m:mi>a</m:mi>
<m:mn>2</m:mn>
</m:msup>
<m:mo>+</m:mo><m:msup>
<m:mi>b</m:mi>
<m:mn>2</m:mn>
</m:msup>
</m:mrow>
</m:msqrt>
</m:mrow>
</m:semantics>
</m:math>
</mathml>
It looks ok in Author mode, but when i apply Webhelp Classic transformation scenario, equation doesn't appear in my Chrome browser. I tested it in Oxygen XML 17 and 20 and results are the same. The only way to thansform MathML - is to publish document with PDF scenarios what is not enought indeed. How can I use MathML equations in Webhelp output? Thanks!
Radu
Posts: 9048
Joined: Fri Jul 09, 2004 5:18 pm

Re: DITA with MathML to WebHelp

Post by Radu »

Hi,

You should first open the HTML file equivalent of the original topic and see if the mathml equation is still inside it.
If it is, you should follow this procedure:

https://www.oxygenxml.com/doc/versions/ ... odes2.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply