[Xy-pic] Re: XY-pic

Ross Moore ross at ics.mq.edu.au
Sat Sep 25 01:44:10 CEST 2004


Hello Josué,

On 25/09/2004, at 8:25 AM, Josué Huff Jung wrote:

> Hello,
> I’m  from Brazil and I study mathematic. Please,could you answer  
> me a question? I built a lattice as follows:
>
> \xymatrix{
> &\bullet \ar@{-}[dl] \ar@{-}[d] \ar@{-}[dr]  & \\
> a \, \bullet &\hspace{.3cm} \bullet\,{b} & \bullet \, c \\
> &\bullet \ar@{-}[ur] \ar@{-}[u] \ar@{-}[lu] &}
>
> I would like the lines touch the bullets. What must I change above?  
> Could you help me?

You can get close to what you want, using  *=0{\bullet}
in those cells where the bullet is leftmost within the cell;
e.g.

\xymatrix{
&*=0{\bullet} \ar@{-}[dl] \ar@{-}[d] \ar@{-}[dr]  & \\
a \, \bullet &\hspace{.3cm} \bullet\,{b} &*=0{\bullet}\drop+!L{\, c}\\
&*=0{\bullet}\ar@{-}[ur] \ar@{-}[u] \ar@{-}[lu] &}


But to get the 'a' and 'b' cells right too requires a bit more:

\xymatrix @C+.3cm @R+.1cm{
&*=0{\bullet} \ar@{-}[dl] \ar@{-}[d] \ar@{-}[dr]  & \\
*=0{\bullet}\drop++!R{a}&*=0{\bullet}\drop++!L{b}&*=0{\bullet}\drop++! 
L{c}\\
&*=0{\bullet}\ar@{-}[ur] \ar@{-}[u] \ar@{-}[lu] &}

Here the 'a', 'b', and 'c' are just labels on the \bullet nodes,
and do not contribute size to the cells.
In fact this is closer to the role that those letters play
in the mathematics that you are representing.

Note how the spacing of rows and columns is adjusted using:
      \xymatrix @C+.3cm @R+.1cm {
                ^^^^^^^^^^^^^^^ -------  spacing modifiers


Even better, in my opinion, is to use  \xygraph instead of
having redundant blank cells in the \xymatrix .
For example,

\xygraph{
  !{0;p+/r1.3cm/:p+/u1.1cm/::}  % setup the row/column grid spacing
  []*@{*}
  ( - [dl]*@{*} (?*++!R{a}, - [dr]*@{*}="bot")
  , - [d] *@{*} (?*++!L{b}, - "bot" )
  , - [dr]*@{*} (?*++!L{c}, - "bot" )
  )
}

This is neater coding, and better captures the overall structure
of your diagram.

Furthermore, Xy-pic's "filled circle" object, generated by *@{*},
is already of zero size, so you don't need to work with  \bullet
at all.



> Thanks so much!

You're welcome,

	Ross Moore


> J. H. Jung
>
>
> ---
> iBestMail, agora com POP3/SMTP e 120MB de espaço!
> Experimente: http://www.ibestmail.com.br
>
------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia                                  fax: +61 +2 9850 8114
------------------------------------------------------------------------



More information about the xy-pic mailing list