[Building Sakai] MathJax to replace jsMath in rWiki?

Matthew Jones jonespm at umich.edu
Tue Aug 17 15:28:22 PDT 2010


Hi Mathieu, nice find! I thought this was pretty cool so I went and also
enabled it site-wide in ctnightly. (a local test instance) We have been
waiting until we could roll out a math solution for everyone in all tools.
We know that we could have enabled it in wiki but I hve a feeling it would
be desired in more places, such as test and quizzes, announcements,
assignments.

I was thinking of using the google api to render math (create a editor
plugin with a textbox to draw an image), but this seems better. It should be
able to be replaced jsMath in rwiki pretty easily. However there are still
some issues I noticed:

*Overall issues:*
- I don't see mathml being supported unless we allowed all of the tags
required. (Looks like a lot)

*RWiki replacement issues:*

- Looking at this library, it seems to process the entire page and convert
anything that is TeX. This is pretty cool but a nice thing about jsMath is
that for rwiki all of the {math} was in <div id=math> (or something) so that
if there were no divs to process then the library wouldn't load at all. It
doesn't look like this is a current option for mathjax, but this relatively
easy to write. (For Rwiki)

*Site Wide Implementation issues:*

- Pages load a little slower because it has to load the mathjax javascript
and process all content on the page. By default tex2jax searches everything
on the page with inlineMath.
- To actually get the math to work in FCKEditor you have to click "Edit
Source". Perhaps renaming that to "Edit Source/Math" might be more
appropriate if this was implemented. ;) Otherwise the characters are encoded
and crazy formatting is added. Not sure about mixing Math and non math
either. (Edit: looks like this is okay)
- Some characters (like <) are still being converted to htmlencoded &lt.
This 'might' be able to be fixed in the mathjax, I don't think it's going to
be fixed in sakai. A few other samples wouldn't render, but one semi complex
one (in the picture at the bottom) came out nice!
- It might be possible to do the same as with rwiki and scan for div tags
with special ids, but a then plugin would really be necessary (with a
textarea to insert the div) as instructors wouldn't know what div tag to
make. It would be pretty inconvenient otherwise even if it were possible.
- Perhaps a site property that enables/disables math on the site overall
would be a good performance workaround. So that math heavy sites (or
professors who know about latex) could request this feature turned on?


Either way, this is a very cool find, just have to document what it would
take to get it able to be easily implemented. I'll continue looking at it.
Getting math support was something we've always been interested in here, but
I was never very happy with jsMath. I really like this library though.

[image: Picture 32.png]

On Tue, Aug 17, 2010 at 4:02 PM, Mathieu Plourde <mathieu at udel.edu> wrote:

> Hi Dev list!
>
> Is there an easy way to migrate from jsMath in rWiki to MathJax? Is that
> something that's possible or planned?
>
> Mathieu
>
> ---------- Forwarded message ----------
> From: Dean Nairn <dnairn at udel.edu>
> Date: Tue, Aug 17, 2010 at 3:59 PM
> Subject: Fwd: [Webdev] MathJax
> To: Mathieu Plourde <mathieu at udel.edu>
>
>
> Question for the Sakai team: are there any plans to support MathJax, which
> is designed as a replacement for jsmath?
>
> Begin forwarded message:
>
> *From: *"White, Douglas A." <dw at UDel.Edu>
> *Date: *August 16, 2010 1:41:41 PM EDT
> *To: *UD Web Developers <webdev at usag.udel.edu>
> *Subject: **[Webdev] MathJax*
> *Reply-To: *UD Web Developers <webdev at usag.udel.edu>
>
> MathJax is an open source JavaScript display engine for LaTeX and MathML
> that works in all modern browsers.
>
> http://www.mathjax.org/
>
> Doug
>
> *************************************************
> Douglas White - Ocean Information Center (OCEANIC)
> University of Delaware, College of the Earth, Ocean, and Environment
> 700 Pilottown Rd, Cannon Rm 217, Lewes, DE  19958
> Tel: (302) 645-4225  Email: dw at udel.edu
> http://oceanic.cms.udel.edu
> Follow us on Twitter at http://twitter.com/oceandata
> *************************************************
>
> _______________________________________________
> Webdev mailing list
> Webdev at usag.udel.edu
> http://usag.udel.edu/mailman/listinfo/webdev
>
>
>  Dean Nairn
> IT - Client Support & Services
> University of Delaware
>
>
>
>
>
>
> --
> =================================
>
> Mathieu Plourde, MBA
> Project Leader, LMS/Instructional Designer
> IT-Client Support & Services
> mathieu at udel.edu
> Office: 302-831-4060
>
> =================================
>
> TOP LINKS:
>
> Technology Troubleshooting: http://www.udel.edu/help
> Sakai at UD Support and Training: http://www.udel.edu/sakai/training
>
> =================================
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100817/99d062bd/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 26227 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100817/99d062bd/attachment.png 


More information about the sakai-dev mailing list