[Xy-pic] (no subject)

Jeremy J Graveline jjgraveline at yahoo.com
Fri Feb 25 14:40:41 CET 2011


Hi Ross,

These examples were extremely helpful for me.

I noticed that the horizontal alignment can also affect the vertical placement, but I don't understand the package enough to know why.  I've attached a few example of a three period binomial tree (i.e. a three column matrix).  When I try to right align the first column and left align the last column, the vertical placement changes (as compared to just the default). I used 'LD' in the northeast corner and 'LU' in the southeast corner to help dampen the effect, but this seems like just a bandaid that doesn't totally fix my problem.

I attach a couple of more detailed examples that hopefully illustrate the effect. Is there is a simple way to change the horizontal alignment without affecting the vertical placement?

Thanks again for all of your help.

Jeremy


--- On Thu, 2/24/11, Ross Moore <ross.moore at mq.edu.au> wrote:

> From: Ross Moore <ross.moore at mq.edu.au>
> Subject: Re: [Xy-pic] (no subject)
> To: jjgraveline at post.harvard.edu
> Cc: xy-pic at tug.org
> Received: Thursday, February 24, 2011, 1:57 PM
> Hello Jeremy,
> 
> On 25/02/2011, at 7:49 AM, Jeremy J Graveline wrote:
> 
> > I recently started using xy-pic in my lecture notes,
> but I can't seem to figure out how to horizontally align
> entries in an xymatrix.  I thought that '**[r]' would
> align the entry 'right', while '**[l]' would align the entry
> 'left'.  However, this doesn't seem to be the case with
> the following code (where I would like the 'xymatrix' and
> the 'array' to essentially have the same horizontal column
> alignment) ...
> > 
> > \documentclass[english]{article}
> > 
> > \usepackage[all]{xy}
> > 
> > \begin{document}
> > 
> > \[
> > \xymatrix{
> > A \times B & **[l] C \\
> > **[r] D & E \times F
> > }
> > \]
> 
> ** is wrong, as this introduces a <connection>, not
> an <object>.
> The [l] and [r] have nothing to do with alignments.
> For this you want !L  and !R .
> 
> Try the following solutions:
> 
> \[
> \xymatrix{
> *!R{A \times B}& *!L{C} \\
> *!R{D} & *!L{E \times F}
> }
> \]
> 
> \[
> \xymatrix @R=4pt @C=0pt{
> *!R{A \times B}& *!L{C} \\
> *!R{D} & *!L{E \times F}
> }
> \]
> 
> \[
> \xymatrix{
> *!R=0{A \times B}& *!L=0{C} \\
> *!R=0{D} & *!L=0{E \times F}
> }
> \]
> 
> \[
> \xymatrix{
> A \times B & C\phantom{\times E} \\
> \relax\phantom{E\times}D & E \times F
> }
> \]
> 
> 
> Adjust the @R= and @L=  amounts to adjust
> the space between rows and columns.
> Negative lengths can be used too.
> 
> 
> 
> Hope this helps,
> 
>     Ross
> 
> 
> > 
> > \[
> > \begin{array}{rl}
> > A \times B &  C \\
> > D & E \times F
> > \end{array}
> > \]
> > 
> > \end{document}
> > 
> > Any guidance would be very much appreciated.
> > 
> > 
> > 
> > _______________________________________________
> > xy-pic mailing list
> > http://tug.org/mailman/listinfo/xy-pic
> 
> ------------------------------------------------------------------------
> Ross Moore             
>                
>          ross.moore at mq.edu.au
> 
> Mathematics Department         
>              
>    office: E7A-419      
> Macquarie University         
>                
>    tel: +61 (0)2 9850 8955
> Sydney, Australia  2109       
>                
>   fax: +61 (0)2 9850 8114
> ------------------------------------------------------------------------
> 
> 
> 
> 
> _______________________________________________
> xy-pic mailing list
> http://tug.org/mailman/listinfo/xy-pic
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: BinomialOptionDefault.tex
Type: application/x-tex
Size: 594 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110225/196c39e0/attachment.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BinomialOptionAlign.tex
Type: application/x-tex
Size: 666 bytes
Desc: not available
URL: <http://tug.org/pipermail/xy-pic/attachments/20110225/196c39e0/attachment-0001.tex>


More information about the xy-pic mailing list