## May 29, 2006

### itex2MML 1.1

One of the annoying misfeatures of itex2MML, heretofore, was that it used a rather nonstandard syntax,

\array{ ... } or
\array{ \arrayopts{...} ... }

to create matrices and aligned equations. I’m not sure of the historical origin of this peculiarly un-LaTeX-like syntax but, for some time now, I’ve been meaning to add support for the standard AMSLaTeX constructs.

With itex2MML 1.1, we now support

\begin{env}
...
\end{env}

where env is any one of the following

matrix
a matrix, $\begin{matrix} a & b \\ c & d \end{matrix}\, .$
pmatrix
a matrix, enclosed in parentheses, $\begin{pmatrix} a & b \\ c & d \end{pmatrix}\, .$
bmatrix
a matrix, enclosed in square brackets, $\begin{bmatrix} a & b \\ c & d \end{bmatrix}\, .$
Bmatrix
a matrix, enclosed in brace brackets, $\begin{Bmatrix} a & b \\ c & d \end{Bmatrix}\, .$
vmatrix
a matrix, enclosed in vertical bars, $\begin{vmatrix} a & b \\ c & d \end{vmatrix}\, .$
Vmatrix
a matrix, enclosed in double vertical bars, $\begin{Vmatrix} a & b \\ c & d \end{Vmatrix}\, .$
smallmatrix
a small matrix, suitable for use in inline equations, $\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}$.
cases
cases construct, $|x|=\begin{cases}x&\text{for}\, x\geq 0,\\ -x& \text{for}\, x\lt 0.\end{cases}$
aligned
produces aligned equations (or sub-blocks thereof).

So

\begin{aligned} A =& \begin{pmatrix}a & b \\ c & d \end{pmatrix} \\ A^{-1} =& \frac{1}{\det A} \begin{pmatrix}d & -b \\ -c & a \end{pmatrix} \\ =& \frac{1}{a d - b c} \begin{pmatrix}d & -b \\ -c & a \end{pmatrix} \end{aligned}

produces \begin{aligned} A =& \begin{pmatrix}a & b \\ c & d \end{pmatrix} \\ A^{-1} =& \frac{1}{\det A} \begin{pmatrix}d & -b \\ -c & a \end{pmatrix} \\ =& \frac{1}{a d - b c} \begin{pmatrix}d & -b \\ -c & a \end{pmatrix} \end{aligned}

Another AMSLaTeX construct I’ve been pining for is \substack{...}, as in

$$A = \sum_{\substack{m,n \in \mathbb{Z} \\ m \geq n }} a_{m,n}$$

which now produces $A = \sum_{\substack{m,n \in \mathbb{Z} \\ m \geq n }} a_{m,n}$

If you’re viewing this in Mozilla/Firefox, you’ll note that the vertical spacing in all these matrices (and in \substack{...}) is screwed-up because of this bug.

For sheer lack of time, I don’t see myself implementing the myriad of other AMSLaTeX constructs anytime soon. But if there are particular ones you’ve been pining for, let me know.

As usual, my distribution comes with precompiled binaries for MacOSX and Linux and a plugin for MovableType.

#### Update (5/31/2006):

Spurred by Urs’s question, I decided it was time to produce some new documentation for itex2MML. It’s not much, but check out the itex Command Summary Page.

In the process of reviewing the features of itex2MML, I made a slew of bugfixes/improvements. So it’s time to release itex2MML 1.1.2 with the following improvements.

• \backslash is now mapped correctly.
• \Box was added as a synonym for \square.
• Several characters were changed from <mo>s to <mi>s.
• Wide and regular-width accents now work as expected (well, except for this bug with \overline).
• Corrected support for \pmod and add support for \mod.
• Status-line messages in \toggle were a NOOP. Dropped.
• Fixed the \href command so that it will play nice with the W3C Validator, and hence will work here1. If you downloaded itex2MML in the past few hours, download it again, to get the fixed-up version (sorry 'bout that!).

#### Update (6/2/2006):

For yet more enhancements, see the next entry.

1 Getting \href to work in comments required a small rejiggering of our sanitize spec.

Posted by distler at May 29, 2006 10:44 AM

TrackBack URL for this Entry:   http://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/822

### Re: itex2MML 1.1

Very nice.

One fine day, there will be xypic support for web-based math. I hope. But I guess that’s out of reach for anything realizable in terms of MathML.

Posted by: urs on May 30, 2006 7:26 AM | Permalink | Reply to this

### XYpic

One fine day, there will be xypic support for web-based math. I hope. But I guess that’s out of reach for anything realizable in terms of MathML.

MathML, yes. SVG, no. (Or maybe MathML with embedded SVG.)

Personally, I prefer to draw figures in an external drawing program (Adobe Illustrator) and export them to SVG. But an XYpic → SVG converter would be very cool.

Beyond my capabilities, though …

For some of your category-theoretic musings, you might want to check out DCpic, which uses a category-theoretic metaphor for drawing commutative diagrams of a rather general sort.

It fits somewhere between what MathML is capable of and what you’d want to render into SVG. But it’s great for LaTeX papers.

Anyway, let me know if there are other must-have features of AMSLaTeX that I should add to itex2MML.

Posted by: Jacques Distler on May 30, 2006 7:58 AM | Permalink | PGP Sig | Reply to this

### Re: XYpic

Anyway, let me know if there are other must-have features of AMSLaTeX that I should add to itex2MML.

Sometimes (at this very moment, actually) I feel like using \Box. It doesn’t seem to be implemented currently.

Posted by: urs on May 30, 2006 3:50 PM | Permalink | Reply to this

### Re: XYpic

amsfonts.sty defines \Box as a synonym for \square. The latter certainly is available in the current itex2MML. Perhaps I should add \Box as a synonym is the next version.

Posted by: Jacques Distler on May 30, 2006 4:13 PM | Permalink | PGP Sig | Reply to this
Read the post 2-Spectral Theory, Part II
Weblog: The String Coffee Table
Excerpt: Complete 2-bases of 2-eigenvectors (with an eye on Hecke eigensheaves and duality defects).
Tracked: May 30, 2006 4:00 PM

Just for fun, here are some famous equations to click on \begin{aligned} \href{http://en.wikipedia.org/wiki/Schroedinger_equation}{H|\psi(t)\rangle= i\hbar \frac{\partial}{\partial t}|\psi(t)\rangle}&\\ \href{http://en.wikipedia.org/wiki/Navier-stokes_equation}{\rho \frac{D \vec{v}}{Dt}= -\vec{\nabla} p +\mu\left(\nabla^2 \vec{v} +\textstyle{\frac{1}{3}}\vec{\nabla}(\nabla\cdot v)\right) },&\quad \text{where}\, \frac{D}{Dt}= \frac{\partial}{\partial t} + v\cdot\nabla \end{aligned}