cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Equations not showing in HTML

akrithalllal
1-Visitor

Equations not showing in HTML

Hi All,

I have created a process where an editor using Arboertext without styler can do an html export from the xml document they are working on.
I basically export a xsl - html file from styler. And they click on a button to run that xsl against the xml.

If the xml has equations it does not show the equations in the html instead it shows the xml.

Attached is a snippet of the equation in the html.

If I publish to HTML from Styler the equations show as is in Arbortext.

How do I get the Equation to show using the xsl ?

Thanks
Ashona Krithallal

4 REPLIES 4

Hi Ashona--

It depends on what kind of equation you mean.

If you mean an equation using MathML entered via MathFlow, then it might be possible to add some code to your conversion that would invoke the MathFlow publishing component to render the MathML and insert the result in your document. You would probably need to consult the MathFlow API documentation to figure out how to do this, and it would take a bit of work.

Another alternative, if you're using MathML, would be to include the MathJax library in your HTML. It's a combination of Javascript and CSS to render math expressions in browsers. If you include this library, you should be able to pass the MathML markup through into the HTML output (with a wrapper element, IIRC) and the MathJax code will render it. You can find more info about MathJax at

My apologies for resuscitating an old thread, but I was wondering whether it was resolved.

We have a set of 5000+ XML documents containing around 1000 equations produced by Arbortext’s equation editor. We are exploring the possibility of using a non-Arbortext process to transform them into HTML – on a repeated basis, the same (updated) set of documents being published several times a year.

I’d be interested to know what solution Ashona found.

David Crowe
EDQM, Strasbourg, France

I never heard otherwise but I would say Clay's comments still hold. You will need Arbortext involved to generate the equations as graphics, either when the equations are updated or at time of publish to HTML. oid_write_graphic() appears to be the ACL function you should use.

If you don't want to use Arbortext going forwards then you need to convert your equations to a non-Arbortext format, such as MathML.

// Gareth Oakes
// Chief Architect, GPSL
// www.gpsl.co

Hi David—

If you have to use a non-Arbortext conversion process, then you will probably have to convert Arbortext’s math markup to something else you can render in the browser. The first thing I’d try is converting the Arbortext math markup to MathML and then use MathJax to handle rendering in the browser.

If you can make that work, it might be worth the effort to do a one-time conversion of all your documents to replace the Arbortext math markup with MathML, and then maintain it that way going forward. That would open up a wider variety of tools to you for editing and publishing the math expressions. (MathFlow, Design Science’s MathML editing and publishing system, has a nice API you should be able to integrate with your publishing pipeline independent of Arbortext.)

Another approach would be to convert the Arbortext markup to (La)TeX, and then use a TeX engine to convert the expressions to graphics in a parallel process using something like TeX4ht.

--Clay
Announcements

Top Tags