How can I use \newenvironment?

For example, let us say that I want to use macro to typeset matrices. Just in case I later decide that I want to somehow change how they look, I can then change it in one place - in this macro.

MathJax Documentation says that \newenvironment works. But if I try the same syntax I use in TeX, it does not seem to work.

Example:

$\newenvironment{mymatrix}{\left(\begin{smallmatrix}}{\end{smallmatrix}\right)}\begin{mymatrix}a&b\\-b&a\end{mymatrix}$ does not work $\left(\begin{smallmatrix}a&b\\-b&a\end{smallmatrix}\right)$ works

$\newenvironment{mymatrix}{\left(\begin{smallmatrix}}{\end{smallmatrix}\right)}\begin{mymatrix}a&b\\-b&a\end{mymatrix}$ does not work
$\left(\begin{smallmatrix}a&b\\-b&a\end{smallmatrix}\right)$ works

• This should be working now (v2.4 includes the fix). May 19, 2014 at 22:01
• And indeed it does work, as can be seen also from the example in my post. Thanks for your work! May 20, 2014 at 7:31
• @DavideCervone I flagged this post since I think that it should be tagged (status-completed), but this tag can only be added by mods. Perhaps you could also update your answer and mention there, that the bug has already been fixed. (This information will be more visible in answer than in comment.) May 20, 2014 at 8:03
• I have added a note to my answer as well. Thanks for the suggestion. May 20, 2014 at 13:22

It's a bug in MathJax's processing of \begin{x}...\end{x}. I'm opening an issue tracker for it on the MathJax GitHub site.