[texhax] matrices

Philip G. Ratcliffe philipratcliffe at tiscali.it
Wed Sep 10 01:23:03 CEST 2003


P.S. the "correct" LaTeX definition is (gleaned from latex.ltx - always
worth a look):

\def\matrix#1{\null\,\vcenter{\normalbaselines\m at th
    \ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
      \mathstrut\crcr\noalign{\kern-\baselineskip}
      #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}

and with adjustable brackets (no prizes for this one):

\def\pmatrix#1{\left(\matrix{#1}\right)}

Still, the 'amsmath' packages are worth looking into for "power" math users.

Cheers,  Phil

----- Original Message ----- 
From: "Hartmut Henkel" <hartmut_henkel at gmx.de>
To: "Philip TAYLOR [PC336/H-XP]" <P.Taylor at rhul.ac.uk>
Cc: <texhax at tug.org>; "Joe Corneli" <jcorneli at math.utexas.edu>
Sent: Tuesday, September 09, 2003 11:32 PM
Subject: Re: [texhax] matrices


> On Tue, 9 Sep 2003, Philip TAYLOR [PC336/H-XP] wrote:
>
> > Well, presumably the only hard bit is interpolating the {ccc}
> > (for $n$ c's, where $n$ is unknown in advance).
>
> Funnily, it's not needed to give the exact number of c's as long as
> there are enough of them. E. g. this seems to work, excuse the hack:
>
> \documentclass{article}
> \begin{document}
> \renewcommand{\matrix}[1]{%
> \left(\begin{array}{cccccccccccccccccccccccccccccccccccccccccc}
> #1\end{array}\right)}
> $\matrix{a \\ b}$
> $\matrix{a & b \\ c & d \\ f & g}$
> $\matrix{a & b & c \\ d & e & f \\ g & h & i}$
> \end{document}
>
> You need more c's?
>
> Greetings Hartmut
>
>
> ------------------------------------------------------------------------
> Hartmut Henkel, Oftersheim, Germany
> ------------------------------------------------------------------------
> _______________________________________________
> TeX FAQ: http://faq.tug.org/
> TeX newsgroup: http://groups.google.com/groups?group=comp.text.tex
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org



More information about the texhax mailing list