[Using Sakai] [Building Sakai] fMath or MathJax? Why I'm thinking MathJax...

Matthew Jones matthew at longsight.com
Fri Jul 5 14:41:06 PDT 2013


3 FYI's:

1) The tag created by the fmath plugin saves the mathml source to a img
attribute data-mathml which is read by the editor if you click on the image
for re-editing it. I've tested this with some simple equations and it works
okay. It looks like this is broken in trunk at the moment but works in 2.9,
probably a bug related to CKEditor 4 (The movie player plugin doesn't work
yet either)

<img border="0"
data-mathml="%3Cmrow%3E%0A%20%20%20%20%20%20%20%20%3Cmtext%20selected%3D%22true%22%3E1+1%3D2%3C/mtext%3E%0A%3C/mrow%3E"
id="MathMLEq1" src="
http://nightly2.sakaiproject.org:8087/access/content/user/instructor/fmath-equation-FF23506E-D557-901B-65FB-9326AA78F1AA.png"
/></p>

2) To have mathjax render, you have to put the contents in a special div or
span that mathjax can parse like <span class="math"> . . . </span> If you
for some reason don't do this and have it parse the page for latex it will
render false positives and seriously slow down the client. So this would
really need a simple plugin (like the paste plugin) where you put the
contents of your math in this special span for those that don't know about
it. I'd considered this but didn't write this plugin (probably just a few
hours).

3) Currently mathml tags aren't allowed in trunk. There was a patch for the
old text formatter (https://jira.sakaiproject.org/browse/SAK-22527) but
we've changed to AntiSamy and no patch yet for that. It's basically just
putting every possible tag into an xml file rather than a properties file
like there is here. Someone would have to do that too.

I think both are good ideas, having the WYSIWYG is something a lot of
people tend to want though as you said, especially undergrads. Nobody hand
writes mathml, that's generated by something else. Latex is relatively easy
to generate for equations though.


On Fri, Jul 5, 2013 at 4:16 PM, Keli Sato Amann <kamann at stanford.edu> wrote:

> Hi
> I was going to write this just for our local team, but I figure it might
> be useful to post here to spark comment. We would like to support equation
> creation within the CLE, but particularly in Tests & Quizzes. We have been
> talking about MathJax, then more recently fMath, but now I'm leaning back
> to MathJax. Here is why, in the context of Tests & Quizzes:
>
> Installing MathJax on our instance would allow anyone to write an equation
> into CKEditor, so long as they know LaTeX (or MathML). Most instructors and
> grad students do;  intro-level undergrads don't but in theory, they could
> get an external editor that has a wysiwyg editor that would help them if
> they needed to respond. The equation is stored as code and therefore
> travels with the rest of the text that it is embedded in and can be
> reedited easily (again, assuming you know LaTeX). There are some
> performance hits, but this can be mitigated by limiting use of MathJax to
> Samigo using skin manager (
> https://confluence.sakaiproject.org/display/SM/Home)
>
> fMath is a Flash plug-in for CKEditor. It brings up a WYSIWYG editor that
> lets you create an image of your equation, which maybe handy for intro
> students who don't know LaTeX. However, once that image is saved, if edits
> need to be made, it needs to be erased and redone--you can't open an image
> in fMath editor. Also that image is stored in Resources at the top
> directory, which means that students can see all equations that their
> instructor is creating within an exam. Finally, while undergrads may be
> able to more easily use it due to it's WYSIWYG interface, for essay
> responses in both T&Q and Assignments, it currently doesn't save these
> equation images in a way that they can be displayed--only a generic image
> icon shows, not the equation.
>
> Here are 3 JIRAS that would need to be addressed for fMath to be viable
> for use with T&Q (I didn't write the equivalent to SAK-23768 for
> Assignments tool):
> SAK-23686 (fMath plugin should store generated images in a configurable
> subfolder)
> SAK-23044 (Ability to hide a folder while allowing access to files inside
> it)
> SAK-23768 (When student responds to SAMigo Essay Question with an equation
> using fMath, equation images don't show up)
>
> So in general, I'm wary of using images, especially since they don't
> travel well with the questions, or with the student responses. I haven't
> tested what happens when you want to import questions that have fmath image
> references into a new course, either directly or via Common Cartridge, but
> I suspect there are complications there as well. Granted, all those images
> still exist for embedded images as well, and there are reasons you might
> want to embed non-equation images like photos, into a question, but I think
> these are often attached, so those concerns don't exist.
>
> I will be conferring with our local developers to see if some of my
> concerns can be overcome, but in general, I'm now leaning toward MathJax.
> I'd welcome any thoughts, though.
>
> Keli Amann
> User Experience Specialist
> Academic Computing Services, Stanford University
> _______________________________________________
> 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-user/attachments/20130705/f85c8fa3/attachment.html 


More information about the sakai-user mailing list