WeBWorK Main Forum

latex in webwork

latex in webwork

by Clinton Ferreira -
Number of replies: 2
Is it possible to use latex's {eqnarray} in webwork directly?

If not, what's the webwork equivalent that I can put my equations into?

Thanks.
In reply to Clinton Ferreira

Re: latex in webwork

by Michael Gage -
The answer to the first question is no.

\begin{equarray} is superseded in ams-latex by \begin{align} which doesn't work either in WeBWorK because only items in math mode ( \( \) )
or display math mode ( \[ \] ) are run through the TeX interpretor.


\begin{align} has the dual effect of both starting math mode and starting the alignment process. It can't be used inside a math mode segment. However \begin{aligned} does just what we want: start alignment but don't start mathmode

\[
\begin{aligned}
y' & = z\\
z' & = -y
\end{aligned}
\]



This works just fine when using images mode but not (yet) in jsMath mode. (Davide, could we impose on you to add "aligned" to the environments jsMath understands?)

I'm not sure about the LatexMathML mode because Firefox on mac's still has some issues with finding the correct fonts.

There may be other cleverer workarounds -- I'm looking forward to hearing about them.

-- Mike

In reply to Michael Gage

Re: latex in webwork

by Davide Cervone -
Mike:

[This is a very old thread, but I noticed it searching for something else.]

The aligned environment was added to jsMath in version 3.5 (March 2008), so that has been taken care of.

Davide