W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2012

Re: [Filter Effects][css3-transforms] Using MathML for formulas

From: Rik Cabanier <cabanier@gmail.com>
Date: Sun, 22 Apr 2012 16:51:53 -0700
Message-ID: <CAGN7qDCdPyM0fkfkha_UmyfF7N8J6w9w35J+ANntLhTmCiOMbA@mail.gmail.com>
To: Aryeh Gregor <ayg@aryeh.name>
Cc: Dirk Schulze <dschulze@adobe.com>, "public-fx@w3.org" <public-fx@w3.org>
On Sun, Apr 22, 2012 at 2:11 AM, Aryeh Gregor <ayg@aryeh.name> wrote:

> On Sat, Apr 21, 2012 at 9:48 AM, Dirk Schulze <dschulze@adobe.com> wrote:
> > Even if viewers are not consistent, at least specifications should be.
> Ideally we use MathML and provide some fallback. Sadly I have no idea how
> it can be done without JS (which is not necessarily enabled and shouldn't
> be required to read a specification).
> I think you can do something sneaky using CSS selectors, like
> @namespace mathml "http://www.w3.org/1998/Math/MathML";
> math { display: none }
> mathml|math { display: block }
> mathml|math + .fallback { display: none }
> Then use markup like
> <math><!-- MathML here --></math>
> <img class="fallback" ...>
> In a browser that puts <math> in the MathML namespace in text/html per
> HTML5, and supports CSS Namespaces, the <math> element will be visible
> and the <img> will vanish.  In browsers that don't support MathML or
> don't support CSS Namespaces, the <math> will vanish.  The only case
> in which it will fail unpleasantly is if the browser doesn't support
> CSS at all, in which case you'll get some mangled version of the
> <math> tag as well as the image.
> You still have to contend with the possibility that browsers will have
> bad MathML implementations and would be better served by using the
> <img>, though.
> On Sun, Apr 22, 2012 at 12:10 AM, Rik Cabanier <cabanier@gmail.com> wrote:
> > I really like the way wikipedia creates formulas:
> > http://en.wikipedia.org/wiki/Help:Displaying_a_formula. It's simple and
> the
> > output looks very good.
> > Maybe we can have texcv (http://en.wikipedia.org/wiki/Wikipedia:Texvc
> ) on
> > the server when we send the HTML to the w3c server for post-processing.
> texvc is basically just a thin wrapper around LaTeX, whose primary
> purpose in life is to sanitize input so users can't throw Wikimedia
> servers into infinite loops by defining recursive macros or whatever.
> It's also written in OCaml, and nobody understands it.  You're
> probably better off just shelling out to latex directly.

Does it matter if it's code that only the author understands? It's
obviously working well enough for Wikipedia to create formulas and they
have much more complex math than us.
It seems that we would have to do quite a bit of work ourselves (including
learning LaTex) instead of just using texvc.

Received on Sunday, 22 April 2012 23:52:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 22 June 2015 03:33:47 UTC