Aligned equations in jsMath?

Aligned equations in jsMath?

by Gustav W Delius -
Number of replies: 2
I have given my students a forum called "My favourite piece of mathematics" and asked every student to make one post. This has been a big success, with many students posting very interesting things. A large number of them had the need to typeset multi-line equations, something I would usually do with the eqnarray environment or even better with the AMSLatex equation environments. Davide, do you have any plans of catering for aligned equations in the future?
Average of ratings: -
In reply to Gustav W Delius

Re: Aligned equations in jsMath?

by Davide Cervone -
I'm glad your assignment was a success. Sounds like a good one.

As for aligned equations, jsMath already supports TeX's \eqalign and LaTeX's eqnarray environment, but you need to use it in math mode (so that jsMath will process it). As for the AMS environments, I've considered it, but haven't had the chance to work on them, and I may not be able to get all the features worked out. JsMath also implements TeX's \displaylines macro, and there are the array and various matrix environments.

If these are not sufficient for now, let me know and we'll see what can be worked out.

Davide
In reply to Davide Cervone

Re: Aligned equations in jsMath?

by Gustav W Delius -
Davide,

I had not realized that I can use eqnarray in jsMath. That is very good.

Do you have a full list of the environments and commands that jsMath implements?

I will now extend my filter.php so that it replaces any \begin{eqnarray} by \$\$\begin{eqnarray} and any \end{eqnarray} by \end{eqnarray}\$\$ (Without the backslashes, they are shown only because moodle.org is using a less intelligent TeX filter than yours). Then my students can use eqnarrays in the usual way.

(At first I had thought it might be clever to use <div class="math"> instead of the $$ because then tex2math would have less work to do but then I remembered that <div> is not allowed inside <p> tags.)