[texhax] matrices

Philip G. Ratcliffe philipratcliffe at tiscali.it
Wed Sep 10 00:21:37 CEST 2003


> I'm new to this list,

And to lists in general: first of all, please don't REPLY to some random
mailing to start a new thread - it b***ers up the nice grouping that many
e-mail clients allow.  Just start a fresh e-mail to 'texhax at tug.org'.

> and new to TeX hacking, though I've been using
> LaTeX to typeset math for about 4 or 5 years.

Enough to glance at one of the manuals though:  Doob's oft-cited "Gentle
Introduction to TeX" is the only one I have to hand and on p.43 you'll find
the answer.

> One thing that I haven't
> been able to get satisfied with is the way one has to enter matrices,
> viz.,
>
> $\left ( \begin{array}{ccc}
> a & b & c \\ d & e & f \\ g & h & i
> \end{array} \right )$
>
> I would like to compress all of this into a macro like
> the following:
>
> $\matrix{a & b & c \\ d & e & f \\ g & h & i}$

Did you try it?  Actually, you need to use \cr instead of \\, but with that
it works.

I would, however, recommend using the 'amsmath' & Co. packages (and reading
the manual); they provide better alternatives (for this and other math).

Cheers, Phil



More information about the texhax mailing list