Home
        XY-pic User's Guide
         Contents
1.    amp    circ       typesets    As you see  labels are set separately on each segment     Exercise 12  Typeset the    lambda cube          Aw AC  7 a  A2 En AP2  Aw         APw  Z a  A gt         AP    Hint     going under    an empty entry leaves a small  gap at that location  The compactness is achieved  using a trick described in section 3 3     2 8 More bending arrows    Finally  arrows can bend around entries  just insert     dt  i e   a backquote and a direction d followed by  a target t  for each    turn    that starts out in the d   direction and ends in a quarter turn towards the tar   get t  This is different from the curving described  earlier in that all turns consist of a straight part end   ing in a turn which is a multiple of 1 g circle segments   and each segment allows separate labels    The possible directions are those of section 1 6  and 2 6  and the possible targets include all those  discussed above  Actually the direction is only re   quired for the first in a series of turns since the final  direction of one turn is the obvious choice for the fol   lowing turn  Furthermore  turns can be changed from  the default by adding either  d for anticlockwise turn  to d or _d for clockwise turn to d  where d is the    exit  direction    of the turn    Finally  the turns will have radius 10pt by default   but this can be changed to any dimension R from a  particular turn and onwards by inserting  R imme   diately after the        of the turn  Here is an example 
2.   tips using this form  thus it is necessary to include all  three of tail  shaft  and head  when using it  The ad   vantage is that it is possible then to    fill with a tip      Furthermore  the following additional possibilities are  available when using this notation        HEF oc te  ee ee ff eee  Pak te    SSP  sw     r  ot SLEP g AEP Geet     f7  ae ed P  5 AN       The even more general form  object can be used   where object refers to any of the constructions de   scribed in section 2 2     Exercise 9  Typeset AaB      2 4 Sliding arrows sideways    It is often desirable to have several parallel arrows  between two objects  This can be done by sliding ei   ther or both arrows sideways a distance given as a  TX dimension enclosed in   lt  gt s  it specifies how far     sideways    the arrow should be moved  e g       xymatrix   A  ar  lt iex gt  dr  a_         amp  B  ar  lt iex gt  ul  b  ar  lt 1ex gt  r  c   amp  C  ar  lt 1ex gt  1  da_         will typeset    A  nC  Beor  C  d    an    A positive distance will slide the arrow in the        direction     e g   the two arrows above are slid in the  direction of the labels a  b  c  and d  respectively   a negative distance in the    _ direction     The dis   tance  lt  1ex gt  is often appropriate since it corresponds  roughly to the height of letters like    x     in the type  size being used     Exercise 10  Typeset A    SB      2 5 More targets    The target address can be given in a large number of  formats call
3.   variant tail shaft head    variant  head        that in describes arrows with the indicated tail  shaft   and head  on the first form the tail and head can be  omitted  the second style defaults to having no tail  and a standard shaft         The plain TX command  hbox corresponds to  mbox in IATFX and  text in the A  S variants     The following possibilities exist for head and tail  which we will denote tips  here shown as heads          lt  ave Do eee x  x   lt  lt  e  gt  gt   gt    F    lt  PE a  gt   RSA   a    lt  lt  al  gt  gt   A     a     pac yD o o    zl J A       and the shaft should be one of the following           The variant should be empty or one of the follow   ing           above    variant  _    below    variant  2    double    variant  3    triple    variant       Here are some standard arrows in this notation  all  from A to B as usual                 lt   gt   A B      lt   gt   A B   _  lt   gt   A B   2  lt   gt   A4 B   3  lt   gt   A lt  B    As a special convenience   and   are provided as ab   breviations for   and   with variant forced to 2    As it can be seen  the variant will affect the entire  arrow  Sometimes this is not what is wanted  In that  case a local variant can be used by entering any of  the tail  shaft  and head  on the following form        variant tip   variant shaft        Here are some arrows where this is required     A    gt  B  A    B         F  gt        _  gt       Notice that there is no distinction between shafts and
4.  1 A ar    gt  gt    r   amp B      typesets A   B   The second argument  here      can be used to specify a point size  10    11   or   12   if desired  the default is  10 5    cm  can be  replaced by  eu  and  xy  to get tips in    Euler    and  the default technical style  respectively  The declara   tion respects T   X grouping     Exercise 15  Typeset A     gt B   Hint  With the  construction  objectobject one can typeset an Xy pic  object  anything that could follow a   in section 2 2   in any context     3 More Entries    This section explains what can go in an entry and  how the general form of the entries is changed     3 1 Manual entry formatting    All the entries we have seen thus far have been simple  math objects  However  it is possible to change the  format of an individual entry by using the form         xobject arrows       This allows complete control over what object is  placed in the entry  overriding any spacing and other  conventions for the entry  This was how the frame  was obtained in the figure in section 1 2    A simple use of this is to insert text in entries us   ing  txt objects just like labels as described above in  section 2 2      xymatrix      txt A very long and stupid  program    ar  rr      txt weird  arrow      amp  amp   txt lt 2pc gt  Com  pli  cated  Code      will typeset    weird Com     A very long and stupid arrow pli   program cated  Code       Exercise 16  Typeset       3 2 Extra entries outside the matrix    It is possible to 
5.  7  adjust  5   adjusting position  7   apit   12    ar   2 4   arc  12   arrow  2  4   arrow head  5   arrow passing under  7  arrow shaft  5   arrow style  3  5  arrow tail  5    base entry  2  7  bend  8    bpit   12  break  3    centered  5   changing position  7  changing turn radius  8  circle segments  8  circular  10   columns  2  6   combined objects  5  8  commutative diagrams  1  4  compatibility  11   CompileMatrices   4   composite   5  8  computer modern fonts  9  coordinates  3    15    COPYING  11  copyright  11   cover  11   crossing arrows  5  7  cube  7   current direction  7  current entry  6  curve  4  8    d  2   dashed arrow  6  dashed frame  5  default modifier  10  default spacing  5  defining arrows  8  degrees  7   directed graphs  12  direction  4  7  8  directionals  8  dotted arrow  6  dotted frame  5  double arrow  6  double frame  5    elliptical  10   entries outside matrix  9  entries with text  9  entry  2  9   entry format  9   entry outside matrix  3  entry style  10  excursion  9   explicit positioning  4  extra entries  9    format  9  frame  5   free software  11   frm   5   ftp  11    GNU General Public License   11   going around  8   graph  12   grouping  10   grow  5   half arrow  6    hbox   5   head  5    hole   3   hop  2  6   intersects  5   invisible arrow  3     jot  4    knot  12    1  2   label  3  4  8   label centered on arrow  3  label style  10   label with any object  5  labels as targets  10  labels with text  9   labe
6.  involving all of these features      xymatrix      circ   ar    r d   a     Crr   b      4pt rr   c       rrr   d     _dl drrr    e     arrr   f   amp    circ   amp    circ   amp    circ        circ   amp    circ   amp    circ   amp    circ       typesets    a e  o o  b d  c  f  o o o o    The example illustrates the following points     e If the segment can not be made as short as re   quired then it will point    past    the target  This  is useful for    going around    entries     e There is one     per turn thus each target ap     pears as many times as there are turns towards  it  except the last target that appears one more  time namely both with     for each turn towards  it and once as an    ordinary    target to set the  final stretch     e The sizes of the intermediate targets are ig   nored     Exercise 13  Typeset A B    1    2 9 Defining new arrow types    Last in this treatment of arrows we will explain how  new arrows can be defined  The crucial fact is that  the characters used for tips and shafts are restricted  to the following         gt  lt  ox  O  uo tip characters  Senis shaft characters       When an arrow is interpreted by Xy pic it is first split  into the three components and then each component  is looked up in a library of so called    directionals      It is possible to add new such directionals using the  command        newdir  directional    composite         where directional should be a sequence either of  tip characters or of shaft characte
7.  outlining the size of the picture     2 More Arrows and Labels    In this section we explain a number of variations of  the arrow commands that are useful in commutative  diagrams     2 1 Explicit label positioning    The label commands explained in section 1 4 place  the label text near the point along the arrow halfway  between the centers of the base and target entries   This  however  may be changed by inserting a place  between the    _  or    and the actual label  in fact    is a place   In general you may insert the following     e  lt  will place the label at the point where the  actual arrow begins  i e      appears from under     the base  so   xymatrix 1 A ar  r    lt     amp B      will typeset AB     e Similarly   gt  will place the label at  the point where the actual arrow ends   i e      disappears below  the target   so   xymatrix 1 A ar r   gt     amp B   will    typeset A 3B     e  lt  lt  and  gt  gt  will place the following la   bel at a point just a bit   further from  the beginning and end of the arrow   so   xymatrix 1 A ar r   gt  gt     amp B   will    typeset A     B  Using more  lt s or  gt s will  move the label further in     5The temporary files are named the same as your document but  tex is replaced by  n xyc where n is a sequence number     6A bit    is in fact a TEX  jot which is usually 3pt     e A factor in   s   a  indicates that the  label should be    tied    to the point a of  the way from the center of the base en   try  called  0  
8.  p 9   The author typed     xymatrix 1    A  ar r      SelectTips cm    object   gt  gt       gt   SelectTips eu    object   gt       amp  B     Answer to exercise 16  p 9   The author typed     xymatrix     0  bullet    ar      dr   U 1   ar      drr   U 2   ar     drrr  U 3         amp     F   txt x     amp     F   txt x  x    amp     F   txt x  x  x        Answer to exercise 17  p 10   The author en     tered the display     xymatrix dr C 1pc   a  ar r  ar    gt  gt   d   amp  a     ar    gt  gt    a      b  ar    gt  gt   r   amp  b         Answer to exercise 18  p 10   The author typed     xymatrix   A  ar r   a  a   amp  B  ar r   b  b   amp  C   ar   7  Nal Wp    Notice the use of both explicit base and target in the  arrow between the labels     14    Answer to exercise 19  p 11   The author added    the Xy code     save      dd    ddrr     rr    F   frm    back    restore    in the entry with Aw  and     save      dd    ddrr     rr    F   frm      ar      UL  back  UL  ar      UR  back  UR   ar      DL  back  DL  ar      DR  back  DR   restore    in the entry with A2 to produce                he ee  PL coaB  A2 in AP2  Aw           APw  FA Hee aie  A        AP o  References    1  Adobe Systems Incorporated  PostScript Lan   guage Reference Manual  second edition  1990     2  Donald E  Knuth  The TRXbook  Addison Wesley   1984     3  Leslie Lamport  ATEX   A Document Preparation  System  Addison Wesley  2nd edition  1994     4  Ross R  Moore  Typesetting Neural Nets u
9.  to the center of the tar   get  called  1   instead of in the middle   so   xymatrix 1 A ar  r     3     amp B   will    typeset A eee    e A factor can be given after some  lt  or   gt s  in which case the place is computed  as if the base was specified by the  lt s  and target specified by the  gt s  Hence    xymatrix 1 A ar  r    lt  0      amp B   will    typeset A  gt B     e Finally  there is a simple way to denote the  place on an arrow where it intersects with a  straight line between two points  the place    t  t2  places the label relative to the point  on the arrow where the line from the target t    to the target t   crosses it  Bug  Only works  for straight arrows at present     As usual more possibilities can be found in the refer   ence manual  8  fig  2      Exercise 6  Typeset    1000000x       1 1000000  a  S  1000 E 2000    2 2 Labeling with any object    Xy pic supports a general format for entering any TEX  text as labels  as well as entries to be explained later    The character   is reserved for this  in its simplest  form   math  will typeset the math material as an  object  This is like  math  except that the default  style is ignored and there is no added blank margin    However  in general the following form of   object  is available         modifiers text        where modifiers can be used to change the shape  and size of the constructed object  The following are  the most common  the full list of possibilities can be  found in the reference manua
10. 1 Basics  EL  Leading  rss   amp  ade eetaega a  amp   amp  Eat  U2     Entries  ad fx ee ey epee Gs WE ee  123   MATEOWSxe  4 eae TE wet set ee dae es ee Be A  TA Dabelsits  4 2 6 2  4  of bee ee dad  L5 Breaks    3  xcveya  ete  a a Bae EN  6 CUTIE a eoon eins 4 ay alae doadeder ah    1 7 Speeding up typesetting             2 More Arrows and Labels  2 1 Explicit label positioning          2 2 Labeling with any object           2 3 More arrow styles              2 4 Sliding arrows sideways           2 5 More targets             0    2 6 Changing the target             2 7 Arrows passing under            2 8 More bending arrows             2 9 Defining new arrow types            3 More Entries  3 1 Manual entry formatting           3 2 Extra entries outside the matrix  3 3 Spacing and rotation             3 4 Entry style                  3 5 Naming for later use as targets  3 6 Grouping objects                 4 Availability and Further Information  4 1 Getting Xy pic     2     4 2 Backwards compatibility           4 3 Further reading      oaoa  FA  Credits a  4  ee oer decks R E A    A Answers to all exercises  References    Index    2 oNN DA AA KK rR Wwwnnnw WN    ooo       10  10    11  11  11  12  13    13    14    15      Laboratoire de l Informatique du Parall  lisme  Ecole Normale Sup  rieure de Lyon  46  All  e d   Italie  F 69364 Lyon 7  France     Preface    This guide explains some features of Xy pic that are  relevant to typesetting of    matrix like diagrams    a
11. Xy pic User   s Guide    Kristoffer H  Rose     krisrose ens lyon fr       Version 3 7  February 16  1999    Abstract    Xy pic is a package for typesetting graphs and diagrams  using Knuth   s TEX typesetting system  Xy pic works with  most of the many formats available  e g   plain Tex   ISTeX  and AMS T   X  Several styles of input for various  diagram types are supported  they all share a mnemonic  notation based on the logical composition of visual com   ponents  This guide concentrates on how to typeset     matrix like    diagrams  such as commutative diagrams   in the following style        was typeset by the Xy pic input lines     xymatrix   U  ar  _  ddr _y  ar     drr  x   ar    gt    dr      x y        amp  X  times_Z Y  ar d    q  ar r _p   amp  X  ar d _f      amp  Y  ar r l g  amp Z      Such diagrams have the following characteristics     e Specified as a matrix of entries that are automati   cally aligned in rows and columns     e Any entry may be connected to any other en   try using a variety of arrow styles all rotated and  stretched as required     e Arrows may be decorated with labels that are tied  to a specified point along the arrow and extend in  a particular direction  and arrows may be paired   cross  and visit bend around other entries    on the  way      Several other styles of input are supported  a short survey  of the possibilities is included last at the end along with  information on how Xy pic can be obtained     Contents    Preface 2       
12. a    tail    is not supported  Fiz   Use the supported   lt     notation     Finally note that sometimes the spacing with ver   sion 3 7 is    improved    relative to earlier versions       Please report all other things that do not work the  same in version 2 6 and 3 7 to the author     4 3 Further reading    The reference manual  8  describes several more in   put modes that are useful when the diagram is not  organised as a matrix  We   ll give some examples of  such diagrams but refer to the reference manual for  the details     e The    graph    feature allows input of data struc     tured as directed graphs to make it easy to pro   duce such pictures as    cas  Cm   ta    e The    knot    feature allows drawing of mathe   matical knots and links like    simple link figure 8 knot cinquefoil    e The    2cell    feature provides special support for    12    categorical twocells like    B     lt   2  Q    e The    poly    feature allows polygon like struc     e The    web    feature allows composition in lat   tices such as                               a8  gt  o        e The    arc    feature is suitable for effects like       In each case the figure is produced with relatively few  lines using techniques documented in the respective  sections of the reference manual together with the de   tails of the Xy pic kernel and extensions     arrow     and     matrix    features as used in this guide  further exten   sions provide support for use of colour  POSTSCRIPT  effects  a
13. an put labels on arrows  Labels are conceptual   ized as sub  and superscripts on arrows such that they  are placed in the usual positions  as    limits      i e      reads    above    and _    below    on an arrow pointing  right  Notice that the positions depend only on the  direction of the arrow  the absolute notions of    up         down     etc  are not important  For example       xymatrix if   X ar r 7a_b  amp  Y  amp  Z ar 1 7A_B       will set X  lt y gt  Z  the  1 is a special code    that can be used for    one line    diagrams to improve  the placement on the line  more such spacing codes  are described in section 3 3     It is possible to use labels that are not single let   ters  digits  or control sequences  if a simple math  formula in the default style  script style  is desired  then simply enclose in        In practice anything  can be used as a label as described in section 2 2    Each label is placed perpendicular to the arrow at  the point halfway between the centers of the base and  target objects  This is usually the most   sthethic   however  in diagrams where the sizes of the entries  vary much it is sometimes nicer to place the label  at the center of the actual arrow  This behaviour is  requested by inserting a    minus  right after the      or_  Ax BxCx D     B was typeset by      xymatrix 1f   A times B times C times D  ar r        amp B         it becomes Ax B x C x D     gt B without the      In fact   is in just one of the may possible placing
14. declaring  the default modifiers to be applied to all entries that  do not override them  cf  section 2 2       entrymodifiers     o   F       SelectTips cm       xymatrix   l1pc         txt start   ar r     amp  0  ar  r u    b  ar r _a    amp  1  ar r  b  ar  r d   _a    amp  2  ar r  b   ar    dr_1 1     amp       o   F    3    ar    ur71 111     drf 111  b  111    ar    dr_1 11     _ur 11   11          ur 1  _a  1     will typeset          Notice how we obtain the double ring using the   xobject form which then has to include all the desired  modifiers  and how the use of computer modern tips  is nice for diagrams as these      3 5 Naming for later use as targets    If you build an entry with a long and complicated  excursion then you might wish to be able to refer to  it later  Xy pic provides a mechanism for this  there  is a special target form which we haven   t discussed  yet        t   name        This will introduce the new target  name  which will  refer to the target just before the    This is particu   larly useful inside excursions  of course  and can also  be used after labels     a AS b  Exercise 18  Typeset A        gt  B        gt  C     3 6 Grouping objects    Sometimes you wish to frame or otherwise treat a  rectangle of objects as a single object  This is pos   sible with the last two target position forms that we  will mention        t s merge t with simple s   t  make t simple       The first will enlarge t to also    cover    the    simple     s  simp
15. documents but if you distribute any part of  Xy pic  including modified versions  to someone then  you are obliged to ensure that the full source text of  Xy pic is available to them  the full text of the license  in the file COPYING explains this in somewhat more  detail             4 2 Backwards compatibility    The first widely distributed version of Xy pic was ver   sion 2  from release 1 40 to release 2 6   A special  compatibility mode is used automatically if the old  style of loading is used  using files named xypic tex  and xypic sty   You can also mix old and new di   agrams in a document if you load as described in  section 1 1 and add the declaration  xyoption v2    This provides almost full backwards compatibility   the following are the only known exceptions     e Automatic    shortening    of arrow tails by   lt  lt   break was a bug and has been    fixed    so it does  not work any more  Fiz  Put a   lt  hole break  before it as described in section 2 3     e The release 2 6   position operator is not avail   able  Fix  Use the   and    operators  de   scribed in detail in the reference manual  8       e Using t   t2   x y  as the target of an arrow  command does not work  Fir  Enclose it in  braces  i e   write  ty  t2   x y        e The old  pit   apit  and  bpit commands are  not defined  Fix  Use     gt    or  tip  with  variants and rotation     e The even older notation where an argument in  braces to  rto and the others was automati   cally taken to be 
16. e of the following directions   u        ul ur       d  y dr  d    In this case the curving is computed such that the  curve begins at the base entry in the in direction  and ends at the target entry from the out direction   this means that   d    d2  and   d2 d1  are mirror  images  See section 2 6 for more directions      Exercise 5  Typeset    anaes       1 7 Speeding up typesetting    One thing that you will notice is that Xy pic is some   times slow in typesetting diagrams  this is to be ex   pected considering the number of drawing operations  performed as reflected by the number last in each  xymatrix message   If you follow the rule of start   ing all entries with a  nonexpandable  character or    then you can insert the declaration        CompileMatrices       in the preamble of your document  this will create  temporary files    containing compiled versions of each       matrix that can be loaded very quickly  they are au   tomatically recreated when a matrix is changed    If this causes some diagrams to not work  then  such compilation can be explicitly switched off by  using  xymatrixnocompile in place of  xymatrix   Compilation can be switched off completely with   NoCompileMatrices  which respects TeX grouping  as does  CompileMatrices  by the way     And if you are still not satisfied with the speed  then you can add the following         OnlyOutlines       which will omit all compiled pictures  the additional  command  ShowQutlines will add a dotted rectangle 
17. ed positions  The full range of possibili   ties is described in the reference manual  8  fig  1    here is a number of useful ones in addition to the hop  format described in section 1 3     e  r c   where r c are integers  denotes the rela   tive entry found r rows below and c columns to  the right of the current entry  the current entry  itself is thus  0 0    This always corresponds  to a  hop   e g    1 2  is the same as  drr   and   2 0  is the same as  uu      e  r c   where r c are positive integers  denotes  the absolute entry found in the rth row and cth  column of the diagram  The top left entry is    1 5 1        e t    t   where t is any target  changes the base  entry of the present arrow to t      and then sets  the target to t relative to the original base en   try  For example      xymatrix  A     B  amp  C  ar  lt 1ex gt   ul    ar  lt 1ex gt   ul           typesets  A    n    i e   the second  ar ul  arrow starts at the   ul  entry and ends in the current entry     See section 3 5 for how to use a label as a target     2 6 Changing the target    It is possible to overwrite a target with another by  appending something of the form  object to it  This  has the effect of typesetting the object at the current  position  thus effectively on top of the target  and  then use what was typeset as the target    A target may also have its position changed by  one of the following constructions     e  vector or  vector which changes the target to  be a zero sized one a
18. f sec   tion 2 2 with the same meaning  i e   replace    set     with    increase        increase to at most        decrease      and    decrease to at least     respectively  For exam   ple    xymatrix 1  Opt M Opt A amp B  C amp D   in the  text typesetsAB   CD  In case uniform spacing is desired  several alter   native forms exist           force all spaces equal     0     and ignore entry sizes    R force equal row spacing    C force equal column spacing       Finally a special notation allows rotation of an entire  matrix         d rotate towards d       Only the matrix grid will rotate  however  not the  actual contents     Exercise 17  Typeset the    strip lemma       a  ra 3  al  b    Eg    b     3 4 Entry style    As mentioned above  the entries of a diagram are set  in math mode in text style  You may change this  by redefinining the macro  objectstyle  and the la   bel style by redefining  labelstyle  We can combine  this with the above to get    small diagrams     e g   typ   ing    left     def objectstyle  scriptstyle    def labelstyle  scriptstyle    vcenter  xymatrix   1 2pc Our    A  ar r   a   amp  B  ar d   b      A     ar u   a      amp  B    ar 1     b          right      in a paragraph will typeset      A    You can even abandon the use of math mode en   tirely  the command  def  objectstyle   hbox   will change the format of entries to plain text     10    Similarly  all entries are rectangular by default   but it is possible to change this to round by 
19. l  8  fig  3           grow    lt dimen gt  grow by dimen          grow to enclosing square  E shrink     lt dimen gt  shrink by dimen      shrink to contained square    do not center    o  round                    1   r   u   a  adjust left  right       F   F   frame     double     F    F    dotted   dashed                    F     F   lt 3pt gt   shaded   rounded      Since objects specified this way start with no mar   gin  a single   is usually included to get the default  spacing        Exercise 7  Typeset 4p      There can only be one bosing  This can be any  box generation command  The following are the most  useful boxing text  combinations         variant tip  tip  or shaft  object   txt      ordinary text   composite          combined objects   frm   repeat last object        the possibilities for variant and tip are given in the  following section   Finally   hbox       is a quick  way to ensure text mode interpretation of a single ob   ject  However   txt allows the use of    in teat to cre   ate a line break  and the special form  txt lt 6pc gt        will constrain the text to a centered 6pc wide column   By the way   txt can be used outside of Xy pic con   structions    Finally  several objects can be combined using the  last form  the  s serve to separate the composed ob   ject     High  label  Exercise 8  Typeset AAKXKKKHB      2 3 More arrow styles    The arrow styles described in section 1 3 are all ex   amples of the general arrow style constructions      
20. l describe a few here  and some more in section 2  In its simplest form an  arrow is entered as  ar  hop  where hop is a sequence  of single letters  u for up  d for down  1 for left  and  r for right  e g   the arrow  ar  ur  reads    typeset an  arrow from the current entry to that one up and one  right        If you use the version 2 loading command  input xypic  or the xypic document style option  then the v2 option described in    section 4 2 will be loaded automatically   3PosTScRIPT is a registered Trademark of Adobe  Inc   1      4Thus when using Xy constructions involving  amp  inside other tabular constructions then enclose the Xy pic construction in an extra    pair of braces     Exercise 1  Which entry does    refer to     The relative coordinates specified in this way are  purely logical  e g   if the diagram contains very wide  entries then    diagonal    arrows will be nearly horizon   tal  The constructed arrows are aligned along the line  between the centers of the base and target entries   they will not automatically disappear under entries  that they cross  we discuss how this is achieved in  section 2 7     The arrow style kan be changed by writing the  command as  ar style  hop   This will be described  in more detail in section 2 3  here we just list the most  common  styles  obvious variations also work          gt       gt       gt       gt        gt    f             5 l        _ R  N K q y    Exercise 2     5    Typeset        4    1 4 Labels    You c
21. le means that it cannot have changes etc  at   tached unless encapsulated in   s   Here is an exam   ple where we merge and frame      xymatrix  R 1pc    1 1 1 2 1 3 1 4 amp  1 5      2 1  amp  2 2  amp  2 3  amp  2 4  amp  2 5    save  1 2   2 4   F   frm     ar 1 1   ar 2 1   ar 1 5   ar 2 5    restore      will typeset    iie 1 9 1 3 1 4   1 5    2 2 2 3 2 4 2 5    As you can see  the center of the merged object is the  same as the one of the target before the            Finally a more advanced example where we create  two merged objects with center in their    real    center   name them and then connect to them  It also shows  how macros can be used inside diagrams  they should                always expand to    commands    like  ar     etc    A    gt B A age bB  l  C  D C   lt     D    can be typeset by    def g 1  save         dr   C  g 1    F   frm   restore     xymatrix      g1 A ar r  amp B ar  d   amp  g2 A    ar r  amp B    ar d     C ar  u   amp D ar  1   amp  C    ar  u   amp D     ar  1     ar     gt    g1    1 4     ar      gt    2 1   g2       Then we can make arrows from to the two frames by  using the two new targets  g1  and  g2  as shown     Exercise 19  Change the lambda cube of exer   cise 12 such it is enclosed in a transparent  i e   dot   ted  cube     4 Availability and Further In   formation    Below we describe how to and the conditions for ob   taining Xy pic version 3 7  the compatibility with pre   vious versions  and we conclude with a few appe
22. lstyle   10  TATRX 2    2   license  11   line break  5   links  12   loading  2       merge  11  moving target  7    name  11   new arrows  8    newdir   8   NoCompileMatrices   4    0  6   object  5    object  9   object modifier  5  8  10   objectstyle   10  old style of loading  11   OnlyOutlines   4  overwrite  7   parallel  6    pit   12   plain text entries  10  poly  12    polygon like  12  position  6  7  ps  2    quarter turn  8    r  2   radius  8   relative angle  7  relative entry  6  relative vector  7  repeat last object  5  retrieving Xy pic  11  rotation  8  10  round  10   round shape  5  rounded frame  5  rows  2  6    segment  7   SelectTips  cm     9  shaded frame  5  shaft  5  8   shaft as tip  6  shaft characters  8  shape  5   ShowOutlines   4  shrink  5   sideways  6   size  5   sliding  6   spacing  9   square  5   squiggly arrow  6    tail  5  target  6  7  10    16    target entry  2  text  5   text in entries  9  text label  5  text style  2   tip  5  8   tip characters  8  tip in shaft  6  triple arrow  6  turn  8   twocells  12   txt   5 9    u  2  uniform spacing  10   usepackage   2    v2  2   va    7   variant  5  8   vector  7   vector coordinates  7  vector in direction  7  vector to corner  7  version 2  11    warranty  11    web  12   World Wide Web  11  x  6    xymatrix   2     xymatrixnocompile   4   xyoption   2  11  xypic sty  11  xypic tex  11    
23. nce man   ual  8      1 2 Entries    A diagram is created by the command        xymatrix                TIATEX 2e  3  users can use  usepackage  a11   xy      where the           should be replaced by entries to be  aligned in rows and columns where   e entries in a row are separated by  amp    and   e entire rows are separated by        For example        was typeset by     xymatrix   A  amp    F   sum_ i n  m  i72        amp    bullet   amp  D  ar ul       Notice the following     e entries are typeset as mathematics  using    text  style      entries should not start with a macro   as illustrated by the use of    around  bullet     e all entries are centered and the separation be   tween rows and columns is usually quite large  in a diagram     e empty entries at the end of rows may be omit   ted     e    Xy decorations     here  ar ul   in entries al   low drawing of arrows and such relative to the  entries without changing the overall layout  and    e    Xy modifiers     here    F   first in entries al   low changing the format and shape in many  ways     1 3 Arrows    An    arrow    in an Xy pic diagram is a generic term  for the drawn decorations between the entries of the  basic matrix structure  In Xy pic all arrows must be  specified along with the entry in which they start  this  is called their base entry  Each particular arrow com   mand then refers explicitly to its target entry  This  is obtained using the  ar command which accepts  many options of which we wil
24. nd much more    Finally  the following documents might prove use   ul  How to Typeset Pretty Diagram Arrows with  TEX  6  presents some of the design decisions be   hind Xy pic  Xy pic and Notation for Categorical Di   agrams  7  explains how the modularity of Xy pic can  be used to obtain complex effects with commuta   tive diagrams  and Typesetting Neural Nets using X   pic  4  explains how neural networks can be typeset    eR    using the package  Finally  a collection of complex  examples is maintained on the Xy pic home page and  the ftp servers discussed above     4 4 Credits    Xy pic version 2 was a small package created by the  author  The present version 3 7 is the result of more  than three years of continued collaboration with Ross  Moore     and would never have been developed with   out his support and T   X nical expertise     This in   cludes many of the modes mentioned above which  were created for use within specialised branches of  mathematics  however  the notations are designed to  fit quite naturally within the framework of Xy pic and  are useful more generally  Finally  we are grateful to  Y amp Y Inc  for making very nicely done POSTSCRIPT  versions of the Xy pic fonts available     A Answers to all exercises    Answer to exercise 1  p 2   The target    is the  current entry itself     Answer to exercise 2  p 3   The author did     xymatrix      bullet   ar       d   ar      dr   ar      r    amp    bullet   ar      a         bullet   amp    bullet   a
25. put extra entries in your diagrams  that are not part of any    entry    of the matrix cre   ated by  amp  and     This is done with the excursion  command        save t  restore       where t should be a target in one of the formats de   scribed in sections 2 5 2 6     can do any kind of type   setting desired  for example      xymatrix    A  ar      dr     amp    save     lt 3cm  Ocm gt   txt lt 8pc gt     This is a very big commentary  but it does not otherwise affect  the diagram       ar 1   ar d   restore      amp  B  ar     r   amp  C  ar     r   amp  D       will typeset    x    It illustrates how a    down    arrow does not necessar   ily have to point particularly straight down     in this  case because it is based in the displaced pseudo entry     This is a very big  commentary but it  does not otherwise  affect the diagram     A       B        C        D    3 3 Spacing and rotation    The  object form described above can be used to  space individual objects differently  however  it is also  possible to change the overall spacing of a matrix by  inserting the following codes between  xymatrix and  the following            dimen set spacing    R dimen set row spacing   C dimen set column spacing   M dimen set entry default margin   W dimen set entry default width    8Except when Xy pic is loaded as a IAT   FX 2e package where the default size is used      H dimen set entry default height   L dimen set label margin         can be replaced by any of           and    o
26. r 1       Notice how e has been enclosed in    since it is an     expandable    entity  i e   a defined macro  this is rec   ommended     Answer to exercise 3  p 3   The author used     xymatrix    A  ar r  f  ar dr _ f g    amp  B  ar d  g  ar dr   g h       amp  C  ar r _h  amp  D      Answer to exercise 4  p 3   The author entered     xymatrix   A  ar d _f  ar r  f    amp  B  ar d1    i_B   ar d  g     B  ar r _g  amp  C      Answer to exercise 5  p 4   The author did   xymatrix    x  ar  ul dl       id   ar      rr   f    amp  amp  f x   ar     11    f      1           Note that both arrows are curved    above    relative to  their direction     Answer to exercise 6  p 5   The author used the  display     xymatrix   1  ar rr      1000000x    ar dr  _     2  2000x      d    rr    hole   amp  amp  1000000     1000  ar r  _ 2x    ar  urr  _ gt  gt  gt  gt  x72    amp  2000      In particular notice how the break was specified to  happen exactly where the two arrows cross  For an  easier but not so general method see exercise 12 last  in section 2 7     Answer to exercise 7  p 5   The author typed   xymatrix 1  A  ar r     o   F    x   amp  B      Answer to exercise 8  p 5   The author did     xymatrix 1    A  ar      composite       times      rr          txt High  label     amp  amp  B     Answer to exercise 9  p 6   The author entered     xymatrix   A  ar       f   lt   _  gt     r    ar   _  O     x       r   amp  B      Answer to exercise 10  p 6   The author typed     x
27. rs  and composite  should be a list of objects separated with   just like  the argument to  composite described in section 2 2   If arrows of a particular variant  always one of the let   ters  _23  needs an alternate definition then another  declaration can be given with the variant inserted be   tween  newdir and the first      There is one object modifier which is very useful  in this context  in addition to those of section 2 2          vector shift object vector        where the possibilities for vector are described in  section 2 6   Combined with the direction code this  is very powerful  for example    newdir   gt       1 4  5pt O      1   2      gt      1   2  _  gt       defines a new tip that makes   xymatrix  A  ar      gt    r   amp  B      typeset A   gt B Notice how the    relative di   rection    is used here to rotate some of the composed  components        Exercise 14  Often tips used as    tails    have their  ink on the wrong side of the point where they are  placed  Fortunately space     is also a tip charac   ter so we can define the directional u gt  to generate a     tail spaced    arrow  Do this such that     xymatrix  A  ar    gt   gt     lt  2pt gt   r    ar     gt   gt     lt  2pt gt   r   amp  B      typesets  A  B    Finally  when Xy pic diagrams are used in con   junction with Knuth   s computer modern fonts then  the declaration        SelectTips  cm          will change the tips to some that look similar  e g        SelectTips cm      xymatrix
28. s  of labels described in section 2 1     Exercise 3  Typeset the second axiom of category  theory as    A   B    a    1 5 Breaks    It is also possible to    break    an arrow with a label us   ing the   character    xymatrix 1 A ar  r    f amp B    will set A   f B    If you just want an empty break you should  use the special  hole break  the arrow A     B  was typeset by including   xymatrix 1   A ar r   hole  amp  B    in the text    A different use of breaks is to place a label some   where in a diagram outside the normal matrix mesh   this is accomplished by    breaking    an invisible arrow  obtained using the     arrow style  the square       _   _  gt     I     nn    was typeset by     xymatrix  ar      dr        A  ar d   ar r   amp  B  ar d      B  ar r   amp  c      There is more on breaks in section 2 7     Exercise 4  Typeset the first axiom of category  theory as the display    f       gt     F    Bo    N     QA lt  bw    1 6 Curving    Arrows can be made to curve  for example to avoid  going through another entry  using the special style    curving   The simplest styles of curving are the  following  shown applied to an arrow from A to B       7  A      B     _  A B     _1pc  A B  Saa    As the last example shows a dimension can be in   serted just after   or _ if more or less curving is de   sired    In case it is easier to specify the in  and out going  directions of the curving then that is also possible   use        Cin  out        where in and out are on
29. s  used in  for example  category theory  please refer to  the reference manual  8  for complete information on  the described constructions  The guide assumes that  you have some experience in using TX for typeset   ting mathematics  e g   have studied  2  ch  16 19    3   sec  3 3   or  9   and that Xy pic is installed on your  TEX system as described in the INSTALL file accom   panying the distribution    The first section describes what you need to get  started  in particular all that is needed to typeset  the diagram in the abstract  Section 2 and 3 explain  advanced use of arrows and entries  respectively  Fi   nally  section 4 explains where and under what condi   tions Xy pic is available  gives the relation of version  3 7 to previous versions  and lists further sources of  information    Throughout we give exercises that you should be  able to solve as you go along  all exercises are an   swered at the end just prior to the references and  index     1 Basics    This section explains the Xy diagram construction  concepts needed to get started with typesetting  matrix like diagrams     1 1 Loading    The Xy pic setup used in this guide is loaded by in   serting the lines        input xy   xyoption all        in the definitions part of your document   If you wish  to load only the features you use  or you wish to use  non standard facilities like the v2 backwards compat   ibility mode  or the ps POSTSCRIPT  backend then  this is also possible as described in the refere
30. sing  Xy pic  1994  Available through  5      5  Kristoffer H  Rose  The Xy pic home page   URL   http   www ens lyon fr     krisrose Xy pic html            6  Kristoffer H  Rose  How to typeset pretty dia   gram arrows with TRmX   design decisions used in  Xy pic  In Ji     Zlatu  ka  editor  EuroTpx    92     Proceedings of the 7th European TEX Conference   pages 183 190  Prague  Czechoslovakia  Septem   ber 1992  Czechoslovak TREX Users Group     Kristoffer H  Rose  Xy pic and notation for cate   gorical diagrams  Invited talk at ECCT 94  July  1994  Available through  5      Kristoffer H  Rose and Ross R  Moore  Ay pic Ref   erence Manual  DIKU  University of Copenhagen   Universitetsparken 1  DK 2100 K  benhavn      3 0 edition  June 1995     Michael D  Spivak  The Joy of TEX   A Gourmet  Guide to Typesetting with the AMS TEX Macro  Package  American Mathematical Society  second  edition  1990     Index    1 5  7 8       5   amp   2   EST      6  0 5   0   5   1   5     6      5  7 9  12     5 7  10      5  10     3  5 7  10      6      5  10     6      6 8     6  Osh   a    7  Ti   lt   4  6   lt  lt   4 6     10    gt   4 6   gt  gt   4 6   gt  gt    6   gt    6      3  5  10      10      4        4    _   4   1  3    lt  gt   6      9  ec   9   H   10   L   10   M   9   R   9   W   9       3   F     5   F     5     F   lt 3pt gt    5     F    5   F    5   F   5      3 6   a   5   1   5   0   5   r   5    2cell  12  3 1    6    0 7    absolute angle  7  absolute entry 
31. t the position obtained by  adding or subtracting the vector to its center   or    e  vector which moves the center of the target by  the vector     where a vector should have the form    e  lt D  D  gt    where Dz  Dy are TEX dimensions   is the vector with those coordinates     e the following    corner offsets    of a target are vec   tors as shown     U  UL UR  L R  DL DR  D     they must be specified in upper case   and    e  d dimen  is the vector going dimen in the par   ticular direction d which can be either the eight  simple ones in section 1 6  empty to denote that  the current direction  the last direction of an  arrow  should be used  or one of the following        va a  absolute angle   d a a  relative angle in degrees   d  x y  relative vector   d   d_ short for   a  90      a 90          where the d in the last four may be empty to  denote the    current direction        e 0 is the zero vector     Many  many more possibilities are described in the  reference manual  8      Exercise 11  What is the difference between a tar   get t and the target t 0     2 7 Arrows passing under    Arrows can pass under  or via  any other entry  Just  insert    t  i e   a quote  apostrophe  character followed  by a target  for each entry that should be visited ex   cept the last     ordinary  amp  final    entry      xymatrix     circ    ar      gt        dr   a   gt   rr  D   bullet   b   drrr   c   amp    circ   amp    circ   amp    circ        circ   amp    circ   amp    circ
32. tisers  to lure the reader into reading more about Xy pic     11    4 1 Getting Xy pic    The easiest way to retrieve the latest version of  Xy pic is through the Xy pic home page  5  on the  World Wide Web  it is also available by Inter   net ftp from  URL  ftp   ftp  diku  dk diku users kris   TeX   as well as  URL  ftp   ftp mpce mq edu au   pub maths TeX   in files starting with xy  Finally   Xy pic has been contributed to the CTAN archives  where it is located in the directory macros generic   diagrams xypic     License  Xy pic is free software in the sense that it  is available under the following license conditions        Xy pic  Graphs and Diagrams with T   X     1991 1997 Kristoffer H  Rose     1994 1997 Ross Moore          The Xy pic package is free software  you can redis   tribute it and or modify it under the terms of the  GNU General Public License as published by the Free  Software Foundation  either version 2 of the License   or  at your option  any later version    The Xy pic package is distributed in the hope that  it will be useful  but without any warranty  without  even the implied warranty of merchantability or fit   ness for a particular purpose  See the GNU General  Public License for more details    You should have received a copy of the GNU Gen    eral Public License along with this package  if not   write to the Free Software Foundation  Inc   675 Mass  Ave  Cambridge  MA 02139  USA   In practice this means that you are free to use Xy pic  for your 
33. ymatrix 1   A  ar     r   ar      lt  1lex gt  r   amp  B      Answer to exercise 11  p 7   The size  t 0 al  ways has zero size     Answer to exercise 12  p 7   The author con   structed     xymatrix  0f    amp   lambda omega  ar      rr   ar         d   dd    amp   amp   lambda C  ar     dd          lambda2  ar      ur   ar      rr   ar      dd     amp   amp   lambda P2  ar     ur   ar      dd          amp   lambda underline omega  ar       r   rr       Mathematics Department  Macquarie University  Sydney  Australia 2109  e mail  ross mpce mq edu au   10Partial funding for this collaboration has been provided by a Macquarie University Research Grant  MURG   by the Australian  Research Council  ARC   and through a research agreement with the Digital Equipment Corporation  DEC       amp   amp   lambda P underline omega       lambda  to   ar      rr   ar      ur    amp   amp   lambda P  ar     ur        A special thing is added     forces rows and  columns to be equally spaced as discussed in sec   tion 3 3    0 furthermore makes the spacing ignore  the entry sizes  giving a completely fixed grid  The  gaps could also be made with the      crossing nota   tion of exercise 6 last in section 2 1 but the above is  shorter     Answer to exercise 13  p 8   The author typed     xymatrix 1   A  ar  lt  2pt gt     d r      r   r    ar  lt  2pt gt     d r      r   r   amp  B      Answer to exercise 14  p 8   The author used     newdir   gt         5pt    gt       Answer to exercise 15 
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Barco G500 Projector User Manual  Leoxsys11N Wireless 3G Router LEO300N3G User Manual  Procédure d`accréditation 2012  Swingline bind    Copyright © All rights reserved. 
   Failed to retrieve file