[Xy-pic] Typesetting row operations in matrices

Ross Moore ross at ics.mq.edu.au
Tue Mar 28 03:17:58 CEST 2006


Hi Matthew,

On 28/03/2006, at 1:13 AM, Matthew Leingang wrote:

> Dear Ross,
>
> Thanks very much for the reply, and thanks for creating such a rich  
> and
> fascinating package!
>
> This does get me exactly what I want...except I'm used to using square
> brackets for matrices.  I noticed there's no support for a  \frm{[}  
> bracket.
> Maybe I'll be brave and vparse xyframe.tex.

Yeah. I was looking for that too.
Maybe Kris left it out because you can draw square brackets anyway
with Xy-pic.

e.g.  have a look at the following definitions,
and the first of the subsequent examples:


\newcommand{\circled}[1]{\xybox{*+[Fo]{\scriptstyle#1}}}
\newcommand{\labelrow}[1]{%
\POS "#1,1"!L!D(.6),*+++{},\ar@{.}+/l1.5cm/*+!R!D(.4){\circled{#1}}\POS}
\def\xylbrack{\save="here",+UL+/l3pt/*@_{|},\ar@{-}"here"+DL+/ 
l3pt/,*@_{|}\restore}
\def\xyrbrack{\save="here",+UR+/r3pt/*@_{|},\ar@{-}"here"+DR+/ 
r3pt/,*@_{|}\restore}
\def\xybrack{\xylbrack \xyrbrack\POS}

\[
\begin{xy}
*!C\xybox{\xymatrix{
1 & 1 & 1 & 1 & 0 \\ 0 & 1 & -1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0
}\POS!C,\xybrack \labelrow{1} \labelrow{2} \labelrow{3}%
,"3,5"+/r.5cm/,\ar@/_3ex/"1,5"+/r.5cm/_{\circled{1}\,-\,\circled{3}}
}\end{xy}
\]

\[
\begin{xy}
*!C\xybox{\xymatrix{
1 & 1 & 1 & 1 & 0 \\ 0 & 1 & -1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0
}\POS!C,*+<6pt,0pt>\frm{(},*\frm{)}
\labelrow{1} \labelrow{2} \labelrow{3}%
,"3,5"+/r.5cm/,\ar@/_3ex/"1,5"+/r.5cm/_{\circled{1}\,-\,\circled{3}}
}\end{xy}
\]


Cheers,

	Ross

>
> --Matt
>
>
>
> -- 
> Matthew Leingang
> Preceptor in Mathematics
> Harvard University
>
> URL: http://www.math.harvard.edu/~leingang/
> vCard: http://www.math.harvard.edu/~leingang/vCard.vcf
>
------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------




More information about the xy-pic mailing list