On Mon, Nov 28, 2011 at 3:16 PM, Brion Vibber <br...@pobox.com> wrote:

> On Mon, Nov 28, 2011 at 3:05 PM, MZMcBride <z...@mzmcbride.com> wrote:
>> Brion Vibber wrote:
> [snip my notes about removing the non-PNG non-source options, wanting
> higher-resolution renderings]
>> Did you have a chance to evaluate MathJax? <http://www.mathjax.org/> I
>> know
>> it's come up in past math discussions and that a lot of math folks think
>> it
>> looks promising. A technical analysis of its feasibility on Wikimedia
>> wikis
>> would be great. Killing the less-used, ancient math options is great, but
>> perhaps adding one wouldn't be too bad to do too. :-)
> That's an excellent thing to bring up -- MathJAX *does* look very
> promising, and things seem to render pretty nicely. Need to make sure that
> we can either do that type of rendering cleanly with the PNG fallback
> (older browsers will still need the PNGs, so it may still be worth spending
> the time to fix baselines).

I've done a quick experimental mode commit:

definitely promising in terms of things look nice. :)

Total library size is pretty large but that includes a bunch of fallback
images which will be rarely used; don't have a good sense of the 'weight'
of including the library yet. It does load a bit slowly, but hopefully
won't interfere much while it does so.

The initial method I'm using is to output the latex source in a <script
type="math/tex"> which MathJax recognizes, and then putting the image or
text source form in a <noscript> next to it. Browsers with JS off or
unavailable will use the fallback image/text silently, while those with
script will get the pretty math inserted at runtime.

This isn't perfect though, and for instance breaks on MobileFrontend
because the <script> that actually _loads_ MathJax doesn't get loaded, and
on top of that the fallback images are still in <noscript>. ;) Also,
browsers that have script support but don't work with MathJax won't load
images, so this is insufficient.

Most compatible thing is probably to let it include the images/text form
as-is, then make sure MathJax goes over and replaces them in-place. It
might need tweaks to understand the images (source in alt text).

I'm hoping to get some feedback and advice from folks who have worked with
MathJax previously; I'll whip up some detail notes as an RFC page in a bit.

-- brion
Wikitech-l mailing list

Reply via email to