Re: Making exported Maths display in HTML

From: Dominic Lachowicz <domlachowicz_at_gmail.com>
Date: Sat Jun 13 2009 - 14:58:41 CEST

After a bit of research, it appears that there is no good way to do
this without either:

1) Changing your suffix to .xhtml. However, most people believe that
serving up XHTML is actively harmful. Given how often AbiWord is used
in back-office situations to produce HTML, I'd be afraid of doing
this.
2) Waiting for HTML5 to solve the issue. This could take years before
HTML5 browsers are in most users' hands.
3) Embedding a piece of JavaScript code which frobs the DOM

#1 is out of the question. #2 is a long while off. This leaves us
with #3. So long as the JavaScript code is embedded only if MathML or
SVG content is present, I support this course of action.

Best,
Dom

On Fri, Jun 12, 2009 at 11:19 PM, Martin Sevior<martines@unimelb.edu.au> wrote:
> Hi Dom,
>        here is an interesting document with lots of maths. See if you
> can this to export nicely to HTML :-)
>
> Cheers
>
> Martin
>
>
>
> On Fri, 2009-06-12 at 11:15 -0400, Dominic Lachowicz wrote:
>> My best guess is that we probably need to add the SVG and MathML
>> namespaces to the document, and maybe prefix the SVG and MathML
>> content with the appropriate namespace.
>>
>> On Fri, Jun 12, 2009 at 10:57 AM, Jean
>> Bréfort<jean.brefort@normalesup.org> wrote:
>> >
>> > Le samedi 13 juin 2009 à 00:42 +1000, Martin Sevior a écrit :
>> >> Hi Folks,
>> >>             Currently when we export MathML to the html none of the
>> >> MathML directives are actually obeyed by Firefox even though the codes
>> >> are perfectly valid mathml.
>> >
>> > Except if you use .xhtml as extension. In that case, you don't need any
>> > script to have firefox display the formula.
>> >
>> >
>> >> After a bit of digging on the web I discovered a piece of java-script
>> >> that when embedded in the HEAD of our exported HTML makes the mathML
>> >> display correctly.
>> >>
>> >> Have a look at:
>> >>
>> >> http://abisource.com/~msevior/math-auto.html
>> >>
>> >> The secret source is this piece of javascript.
>> >>
>> >> http://abisource.com/~msevior/mathmlAndSvgForHTML4.js
>> >>
>> >> I have written a patch to embed this in our html. I must admit that
>> >> this seems a bit extreme so I would like to here of alternative ways
>> >> we could make MathMl appear correctly in our html documents.
>> >>
>> >> One things that would be rather easy would be to only emits this
>> >> script if the document contains maths.
>> >>
>> >> Opinions, other ideas?
>> >>
>> >> Cheers
>> >>
>> >> Martin
>> >>
>> >
>> >
>>
>>
>>
>

-- 
When life gives me broccoli, I make broccoliade.
Received on Sat Jun 13 14:59:03 2009

This archive was generated by hypermail 2.1.8 : Sat Jun 13 2009 - 14:59:03 CEST