Re: [Wikitech-l] MathJax integration to stock MediaWiki Math extension? (was RFC: math options)

2011-12-05 Thread Brion Vibber
On Tue, Nov 29, 2011 at 12:44 AM, Roan Kattouw wrote:

> On Tue, Nov 29, 2011 at 1:42 AM, Brion Vibber  wrote:
> > 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).
> >
> You may want to do a quick check for MathJax support in a script in
> the  (which executes before the browser renders the page) which
> then adds some CSS that ensures the images aren't loaded but the space
> is still reserved (something like visibility: hidden; on the image).
>

I've started on integrating some of User:Nageh's customizations for the
loader & configuration, which includes special support to find the latex
source bits as we label them with 'tex' class and replace them in-place.

It should be possible to tweak that a bit further so that the image forms
can also get detected and transformed (since the source is on the alt text,
we can use that).

This last update also bundles the MathJax source (Apache license) with the
extension, minus the 112 megabytes of PNG "font" fallbacks. We'll have to
check whether we actually need to be able to use those images for some
browsers or something...

-- brion
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] MathJax integration to stock MediaWiki Math extension? (was RFC: math options)

2011-11-29 Thread Carl (CBM)
On Mon, Nov 28, 2011 at 7:42 PM, Brion Vibber  wrote:
> I've done a quick experimental mode commit:
> 

This sounds great. MathJax is used on some other math-intensive sites,
e.g. MathOverflow.net, and in general it does a very nice rendering
job.

When the Mediawiki support for MathJax gets to the right stage, it
would be helpful to have it enabled on the labs wiki, so people can
test it out.

- Carl

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] MathJax integration to stock MediaWiki Math extension? (was RFC: math options)

2011-11-29 Thread Roan Kattouw
On Tue, Nov 29, 2011 at 1:42 AM, Brion Vibber  wrote:
> 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).
>
You may want to do a quick check for MathJax support in a script in
the  (which executes before the browser renders the page) which
then adds some CSS that ensures the images aren't loaded but the space
is still reserved (something like visibility: hidden; on the image).

Roan

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Re: [Wikitech-l] MathJax integration to stock MediaWiki Math extension? (was RFC: math options)

2011-11-28 Thread MZMcBride
Brion Vibber wrote:
> On Mon, Nov 28, 2011 at 3:16 PM, Brion Vibber  wrote:
> 
>> On Mon, Nov 28, 2011 at 3:05 PM, MZMcBride  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?  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. :)
> 

Sweet, thanks! I forwarded it to some math folks.

I also saw your comments at
https://bugzilla.wikimedia.org/show_bug.cgi?id=31406#c6

Nice work. :-)

MZMcBride



___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


[Wikitech-l] MathJax integration to stock MediaWiki Math extension? (was RFC: math options)

2011-11-28 Thread Brion Vibber
On Mon, Nov 28, 2011 at 3:16 PM, Brion Vibber  wrote:

> On Mon, Nov 28, 2011 at 3:05 PM, MZMcBride  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?  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