LaTeX Macros
One of most useful features of my branch of Instiki is the LaTeX export. If you’ve been developing some ideas with your collaborators, and get to the point where you want to publish something, you click on the “TeX” link at the bottom of the page, and obtain a LaTeX file. Paste the contents into your favourite paper template, and ship it off to the arXivs.
Trouble is, there are some not-insignificant differences between itex and AMSLaTeX, so to make the procedure really smooth, one needs LaTeX macros to implement the various features of itex. And I’d been kinda procrastinating about writing them.
So I was overjoyed when Jason Blevins volunteered to work on this. With a few contributions from me, he managed to generate all the requisite macros (with some caveats1). These are now incorporated in the latest version of Instiki.
I’m particularly pleased with the devilishly clever implementation of \tensor{}{}
and \multiscripts{}{}{}
.
But there was one issue which arose, about which I’d like to solicit the opinions of you, the users of itex2MML. There’s a conflict between the itex implementation of \binom{}{}
and the one in AMSLaTeX. In AMSLaTeX, $$\binom{n}{m}$$
generates
whereas itex (a legacy from its ancestor, webtex) produces
without the parentheses.
The way I see it, there are two ways to resolve the conflict:
- Change the behaviour of itex, to agree with that of AMSLaTeX (with which, I assume, more users are familiar). The downside is that this may break some existing pages.
- Maintain the current behaviour, and have Instiki map
\binom{n}{m}
to{n \atop m}
when generating the LaTeX output.
What do y’all think? Please vote in the comments.
Update (10/5/2007):
Oh heck! Gavin is right. As of itex2MML 1.2.6,\binom{}{}
does what you think it should. And I added an \atop
command, so that you can easily recover the old behaviour.1 Aside from the unresolved issue with \binom{}{}
, there are a few remaining gotchas:
- The plain TeX syntax for fractions,
{A \over B}
is allowed, but will generate a warning in AMSLaTeX. Use\frac{A}{B}
instead. - Webtex’s
\array
command is not implemented. Use one of the existing “matrix-like” environments. \color{}
works when the argument is a named colour, but generates an error if the argument is an RGB colour-spec.\bgcolor{}
isn’t implemented.- There are no suitable Postscript or TrueType fonts in the standard TeX distributions, which provide the glyphs for
- \righttoleftarrow (⟲)
- \lefttorightarrow (⟳)
Re: LaTeX Macros
I vote for changing the behavior itex. Today it may seem reasonable to leave the inconsistency alone, but in three years do you still want to be explaining to people why \binom produces different results in itex and LaTeX? When it comes to fixing things that are just silly, sooner is better than later.