[texhax] Matrices/alignment -- Repeated template at beginning?
Matthew Leingang
leingang at math.harvard.edu
Sat Apr 7 16:55:31 CEST 2007
Hi,
I'm trying to typeset matrices where the last column is separated from the
rest by a vertical bar. Normally I can use
\left[\begin{array}{rrr|r}
1 & 2 & 4 & 0 \\
...
0 & 0 & 1 & 2
\end{array}\right]
This is a suitable workaround. But I also like to use the gauss package to
typeset row operations. To have *both* the vertical bar and the rowops, I
need a matrix-like environment that does the vertical bar automatically.
Then I can pass that environment to the gauss package.
Looking in the TeX by Topic Book, I've found that the matrix-like
environments use \ialign, and a feature of that that allows for an arbitrary
number of columns: If the preamble has a && rather than a &, the rest of
the preamble can be repeated as much as needed. So the matrix environment
uses a preamble something like {\hfil$#$\hfil && \quad\hfil$#$\hfil\crcr}
This preamble allows for the first column, or first group of columns, to be
different from the rest. Is there a way to make the *last* column different
from the rest?
Any clues would be appreciated. TIA.
--Matt
--
Matthew Leingang
Preceptor in Mathematics
Harvard University
http://www.math.harvard.edu/~leingang/vCard.vcf
More information about the texhax
mailing list