Home

XY-pic Reference Manual

image

Contents

1. crv 10 20 amp 30 20 amp 50 20 amp 60 10 endxy except for the labels which denote the number of en tries in the poslist Extending this code to include the labels is set below as an exercise The operator of 3 note 3h is used to find ar bitrary place s along a curve in the usual way Exercise 16 Extend the code given for the curves in the previous picture so as to add the labels giving the number of control points Using will set the current direction to be tan gential at that place and one can slide specified distances along the curve from a found place using the dimen notation 21 Exercise 17 Suggest code to produce something like the above picture the spline curve is the same as in the previous picture Hints The line is 140pt long and touches 0 28 of the way from A to B and the x is 0 65 of the way from A to B The positions in poslist specify control points which determine the initial and final directions of the curve leaving p and arriving at c and how the curve behaves in between using standard spline con structions In general control points need not lie upon the actual curve A natural spline parameter varies in the interval 0 1 monotonically along the curve from p to c This is used to specify place s along the curve however there is no easy relation to arc length Generally the parameter varies more rapidly where the curvature is greatest The following
2. where in each case the o is at 0 the base vectors have been drawn and the x is at 1 1 When working with cartesian coordinates these three special factor s are particularly useful halfroottwo 0 70710678 y2 partroottwo 0 29289322 1 3v2 halfrootthree 0 86602540 4 3 More can be defined using def or newcommand in ATEX Syntax Action pos coord lt coord pos coord pos ooa pos coord pos coord 3 pos coord pos then skew c a per pos coord lt pos but also covering coord pos coord lt pos then c coord pos coord lt pos swap p and c c coord pos coord pos set base 4 c coord pos coord lt pos dae lt c origin c coord pos object lt pos drop object pos object lt pos connect 8 using object pos place lt pos c place pos stacking lt pos do stacking pos saving c pos do saving 8P coord vector pos is vector with zero size empty c reuse last c do nothing P P x y axis intersection with pe s digit s number stack position digit or number below the top id restore what was saved P as id earlier pos decor the c resulting from interpreting the group vector 0 Zero lt dimen dimen gt absolute lt dimen gt absolute with equal dimensions facto
3. 15 4 D cir lt 1pt gt DL D goto intersection and nametcircle it A B C D x I cir lt 3pt gt make dotted lines I A 1pc 1pc I D xx 1pc 1pc endxy place could also have been used Answer to exercise 5 p 9 to c i e equivalent to p To copy the p value Answer to exercise 6 p 10 When using the kernel connections that are all straight there is no difference e g lt and E denote exactly the same position However for other connections it is not necessarily the case that the point where the connection enters the current object denoted by lt and the point where the straight line from p enters the object denoted by E coincide Answer to exercise 7 p 10 the picture The code typesets Box Answer to exercise 8 p 11 This does the job saving each point to make the previous point avail able for the next piece xy 0 10 10 3 20 5 sO prev prev prev endxy Notice how we close the line by first saving s0 the last point visited such that the first point will be connected to it Answer to exercise 9 p 11 The author used xy DL 2 UR 2 db1 lt 3pc 2pc gt frm db1 frm endxy to typeset the figure in the exercise Answer to exercise 10 p 13 The first type sets a centered around 0 and then moves c to the
4. pos ition The default used for turnradius can be set by the operation turnradius add op dimen that works like the kernel objectmargin etc commands it defaults to 10pt Exercise 23 Typeset Ce using turn s 23g The last segment is exactly as a straight one ex cept that the gt action if any is executed and cleared just after the lt action 23h Sliding a segment means moving each of the p c objects in the direction perpendicular to the current direction at each 23i Labelling means that it is dropped relative to the current segment using a pos ition This thus depends on the user setting up a connection with a pos as one of the actions typically the action is used for this see note 23d for the 40 details The only difference between and _ is that they shift the label in the respectively _ direction for straight segments it is placed in the superscript or subscript position Labels will be separated from the connection by the labelmargin that you can set with the opera tion labelmargin add op dimen that works like the kernel objectmargin com mand in fact labelmargin defaults to use object margin if not set 23j Breaking means to slice a hole in the connec tion and insert it there This is realized by typesetting the connection in question in subseg ments one leading to the break and one contin uing after th
5. Note A introduces an object whereas the directional is typeset by the dir 42 Exercise 27 Typeset KE eer x ee using only one ar command 230 Curving the arrow using d where d is a direction and a dimen sion makes the stem a curve which is similar to a straight line but has had it s center point dragged the distance in d xy POS 0 10 cir lt 2pt gt a 20 10 cir lt 2pt gt b POS a ar 1lex b uparrow POS a ar _lex b downarrow POS 20 10 cir lt 2pt gt a 40 10 cir lt 2pt gt b POS a ar ulex b u POS a ar diex b d endxy was typeset by defaults to 5pc if omitted This is really just a shorthand for curving using the more general form described next d is the same as d 2 which makes the quadratic curve pass through the point de fined by the pos d 23p Using d2 d2 where d d2 simple direction s as described in note 41 except it is not possible to use s will typeset the arrow curved such that it leaves the source in direction d and enters the target from direction d2 are Exercise 28 Typeset 1 o 2 To Do implement this efficiently and properly get rid of the no restriction 23q The final curve form is the most general one control point lists sets the control points explicitly to the ones in the contro
6. Slightly more complicated is when the tangent di rection at p is specified but different from the current direction a unique circular arc can still be defined More complicated is when a specific tangent direction is required also at c In this case the arc produced is a segment of an ellipse If the required tangent at p points to c then a straight segment is drawn as in the circular case described above ellipse dir orient circular ellipse dir orient ne yet elliptical ellipse dir orient dir elliptical ellipse dir orient tn elliptical ellipse coord orient elliptical In these cases dir and dir are direction spec ifications as in figure 3 and note 4l and orient must be either or _ for anti clockwise respec tively defaulting to if empty Beware that the pos decor form must be used for this direction variant as if an object modifier The second and third cases in the above table gen erally give identical results The second is thus optional except in two specific situations 1 orient is empty and dir has or _ as the first token 2 orient is and dir has as first token Without the then would be interpreted by T X as part of a special ligature for a hex adecimal character code If both orient and dir are empty then even the first can be omitted xy 0 r5pc lt 8 1pt gt
7. amp 40 15 endxy With lines connecting control points the default drop object is empty while the connect ob ject is dir for simple straight lines If non empty the drop object is placed at each con trol point The connect object may be used to specify a fancy line style 8g was typeset by xy 0 0 A 50 10 B 4 crv Lo dir oplus 20 20 amp 35 15 endxy 8h When a stack of pos itions has been established using the i and commands these positions can be used and are appended to the poslist Intersection with a curved connection Just as the intersection of two lines 3j can be found so can the intersection of a straight line with a curved con nection or the intersection of a curve with a straight connection B C C g A A D D xy A A pt r5pc O 3 15 B B pt lt ipc 3pc gt C C 23 A lt 4pc 1pc gt D D ar _ C A B oplus endxy quad xy A A p r5pc 0 15 B B pt lt ipc 3pc gt C C A lt 4pc 1pc gt D D A B D ar 0 _ C 0oplus endxy When the line separates the end points of a curve an intersection can always be found If there is more than one then that occurring earliest along the curve is the one found If the line does not separate the end points then there may be no intersection with the curve If there is one the
8. mations do not commute Even successive rotations can give different sized rectangles if taken in the re verse order Sometimes this change of size is not desirable The following commands are provided to modify this behaviour NoResizing prevents size adjustment UseResizing restores size adjustments The NoResizing command is also useful to have at the beginning of a document being typeset using a driver that cannot support scaling effects in partic ular when applied to whole diagrams In any case an unscaled version will result but now the spacing and positioning will be appropriate to the unscaled rather than the scaled size Scaling and Scaled Text The shape modifier can contain either a single scale factor or a pair in dicating different factors in the x and y directions Negative values are allowed to obtain reflections in the coordinate axes but not zero Rotation and Rotated Text Within the are parsed as a direction locally based on the current direction The value of count regis ter Direction contains the information to deter mine the requested direction When no direction is parsed then requests a rotation to align with the current direction The special sequence is provided to pass an angle directly to the back end The Xy pic size and shape of the object with rectangleEdge is unchanged even though the printed form may appear rotated This is a feature that must be impl
9. plained in note 23e 26c To map over a list is simply to save the cur rent node and then interpret the list with the following convention e Start each element of the list with the cur rent node as saved and p as the previous list element and e let the node refer to the saved current node explicitly 26d The amp and special moves are included to make it simple to enter matrix like things as graphs note that they will not be automati cally aligned however for that you should use the M escape amp is the same as r and is the same as r y 0 1 0 0 which uses a kernel es cape to moves to the first column in the next row where the first column is on the y axis of the current coordinate system Note If you use the form for nodes then you don t have to change them if you decide to use an Xy matrix 26e Typeset it and make it the current node Also saves it for later reference using id if it is a simple letter or digit then just as it if it is of the form tert or text then as teat Syntax Action xygraph graph typeset graph graph step interpret step s in sequence step gt node move26 to the node arrow node labels draw26 line to node with labels arrow node labels draw26b arrow to node with labels C list map2 C current node over list node move new node move d
10. xy ar gt 20 7 endxy typesets eee Exercise 25 Typeset these arrows Pwr A 5 The above is a flexible scheme when used in con junction with the kernel newdir to define all sorts of arrowheads and tails For example newdir gt 4 5pt dir 1 2 dir7 gt 1 2 dir_ gt defines a new arrow tip that makes xy 0 0 A ar gt 20 3 B Al endxy typeset pe Notice that the fact that the directional uses only tipchar characters means that it blends natu rally with the existing tips Exercise 26 Often tips used as tails have their ink on the wrong side of the point where they are placed Fortunately space is also a tipchar so we can define dir gt to generate a tail arrow Do this such that xy 0 0 A a 20 3 B b ar gt gt a b lt 2pt gt ar gt gt a b lt 2pt gt endxy typesets SS 23n Specifying a dir as a tip or conn means that dir dir is used for that tip or conn For example xy ar lt 7 gt 20 7 endxy typesets iy a wa When using this you must specify a dummy dir ectional in order to ignore one of the tail stem or tip components e g xy ar gt 20 7 endxy typesets box por ena In particular object is a dir so any object can be used for either of the tail stem or head component xy ar O x y z 20 7 endxy typesets
11. 7 3 Driver options II Extensions 8 Curve and Spline extension 8 1 Curved connections 8 2 Circles and Ellipses 8 3 Quadratic Splines 9 Frame and Bracket extension 9 1 Frames 9 2 Brackets 9 3 Filled regions 9 4 Framing as object modifier 9 5 Using curves for frames 10 More Tips extension 11 Line styles extension 12 Rotate and Scale extension 13 Colour extension 14 Pattern and Tile extension A aan A e DADDADSD 11 15 16 16 18 18 18 19 19 20 20 20 20 24 24 24 24 26 26 27 27 27 27 29 30 31 15 Import graphics extension 16 Movie Storyboard extension 17 PostScript backend 17 1 Choosing the DVI driver 17 2 Why use POSTSCRIPT 18 TPIC backend 19 em TeX backend 20 Necula s extensions 20 1 EXPANSION sean 2 ce oe eee ee 20 2 Polygon shapes III Features 21 All features 22 Dummy option 23 Arrow and Path feature 23 1 Paths 2332 ATTOWS Ani ITPA ap ip thea a er ee 24 Two cell feature 24 1 Typesetting 2 cells in Diagrams 24 2 Standard Options 24 3 NUdSIN Gs ce ey ggg a Be 24 4 Extra Options 24 5 2 cells in general Xy pictures 25 Matrix feature 25 1 Xy matrices 25 2 New coordinate formats 25 3 Spacing and rotation 25 A ENIES is ee ce bb tor bar lo le oa wa 26 Graph feature 27 Polygon feature 28 Lattice
12. Here is the code used to apply the labelling in figure 12 def ellipA resizebox 6cm includegraphics import1 eps xy xyimport 3 7 3 7 1 4 1 4 ellipA frm D lt 2pc 1pc gt U txt framed contents of graphics file endxy qquad qquad xy xyimport 3 7 3 7 1 4 1 4 ellipA D lt 2pc 1pc gt U txt Rational points on the elliptic curve x 3 y 3 7 1 0 U 1 1 0 U 1 0 1 R 1 0 1 R 1 2 1 RU P 1 2 RU P 1 3333 1 6667 UR 2P 1 6667 1 3333 DL 2P 5 1 9 DL 3P 1 9 5 DL 3P 1 2 3 D infty 0 ar 2 2 5 2 3 D infty 0 ar 2 2 2 3 1 L infty 0 ar 2 2 endxy importi eps oo oo N Y 3P P import1 eps 2P 2P 1 1 1 3P 1 p N framed contents of graphics file Rational points on the elliptic curve z y 7 Figure 12 importing a graphic for labelling This example uses the BTIE X 2e standard graphics package to import the graphics file importi eps other packages could have been used instead e g epsfig epsf or the picture or illustration commands in TEXTURES on the Macintosh The only possible problems that can occur are when the graphics package is loaded after Xy pic has been loaded Generally it is advisable to have Xy pic loading after all other macro packages 16 Movie Story
13. syntax is adequate This allows setting of some parameters of the graph setup should be one of the following 1 arrow include with every arrow arrow include with every line modifiers include with every non node letter graph define new graph escape letter These are destructive the previous value is lost the default is established by the sequence making create simple ar rows plain lines and formatting default nodes in math mode with the default objectmargin The last possibility is also available as a com mand newgraphescape letter graph that makes the specified escape generate the graph as a macro with it it is possible to pass arguments to the graph using the standard TEX def method The declaration code newgraphescape i 1 2 0 0 2 lt 10pt gt p 1 o 2 4pt E cir lt 2pt gt 0 p a 30 24pt dir X2 p a 60 24pt X1i dir 37 5 i 2 p a 60 24pt dir o 2 i 2 X1 X2 is rather complicated kernel code that makes the node escape idn typeset an inverter ori ented with the d corner as the output with input named in and output named on such that the graph xygraph iR1 i1 1 x i1 r z Da z The final exercise illustrates much of the above will typeset 53 Exercise 35 Typeset ca Ce ao 27 Polygon featu
14. the xyoption mechanism described in 7 1 2 Logo version and messages Loading Xy pic prints a banner containing the version and author of the kernel small progress messages are printed when each major division of the kernel has been loaded Any options loaded will announce them self in a similar fashion If you refer to Xy pic in your written text please do then you can use the command Xy pic to typeset the Xy pic logo The version of the ker nel is typeset by xyversion and the release date by xydate as found in the banner By the way the Xy pic name originates from the fact that the first version was little more than support for x y coordi nates in a configurable coordinate system where the main idea was that all operations could be specified in a manner independent of the orientation of the co ordinates This property has been maintained except that now the package allows explicit absolute orien tation as well Messages that start with Xy pic Warning are indications that something needs your attention an Xy pic Error will stop T X because Xy pic does not know how to proceed 1 3 Fonts The Xy pic kernel implementation makes its drawings using five specially designed fonts Font Characters Default xydashfont dashes xydash10 xyatipfont arrow tips upper half xyatip10 xybtipfont arrow tips lower half xybtip10 xybsqlfont quarter circles for xybsql
15. 3cm 1cm gt txt Box frm IU R 5 frm bullet endxy Hint frm is defined by the frame extension and just typesets a frame of the kind indicated by the argument Bug Currently only the single letter corners L R D U C E and P will work for any shape the others silently assume that the shape is rectan gular 30 The stack is a special construction useful for stor ing a sequence of pos itions that are accessible using the special coord inates sn where n is ei ther a single digit or a positive integer in s sO is always the top element of the stack and if the stack has depth d then the bottom element of the stack has number s d 1 The stack is said to be empty when the depth is 0 and then it is an error to access any of the sn or pop which means remove the top element shifting what is in si to sO s2 to s1 etc Similarly push means to shift sO to s1 etc and then insert the c as the new s0 The stack is manipulated as follows stacking Action coord push coord coord c lt coord then pop coord load stack with coord coord do coord for c stack i initialise enter new frame leave current frame To load stack means to load the entire stack with the positions set by coord within which means push c 10 3p To do coord for all stack elements means to set c to each element of the stack in
16. 77 spreaddiagramrows 77 80 squarify 76 squash 76 squiggles 5 ssize 75 Ssolid 76 sssize 75 state 7 step 52 stop 76 style 14 style option 5 swap 76 system dependencies 5 TEX reference point 6 Text 75 text 75 Tip 76 tip 76 tips 5 tsize 75 Ttip 76 turn 66 turnradius 40 txt 18 U 6 U 8 10 Ue 6 Up 6 Uc 76 Up 76 UseCrayolaColors 30 usepackage 5 UsePSheader lt filename gt 36 UsePSheader 36 UsePSspecials 35 UseRules 18 UseSingleDriver 20 UseTips 27 v 12 vector 8 version 5 Warning 5 warning messages 4 warranty 3 X 6 x 8 9 X origins 6 X zvase 7 X ybase 7 Xe 6 Xp 6 X mas 6 X min 6 Xc 76 xdashed 77 xdotted 77 xdouble 77 xline 77 Xmax 76 Xmin 76 Xorigin 76 Xp 76 xto 77 Xxbase 76 xy 27 Xy 5 xy 6 7 15 Xy pic 5 Xy picture state 6 xy sty 5 xyatip10 5 xyatipfont 5 Xybase 76 xybox 12 xybsq1l10 5 xybsqlfont 5 xybtip10 5 xybtipfont 5 xycirc10 5 xycircfont 5 xycompile 15 16 xycompileto 16 xydash10 5 xydashfont 5 xydate 5 xyecho 15 xyendinput 19 xyeveryrequest 19 xyeverywithoption 19 xygraph 51 xyidioms tex 5 xyignore 16 xymatrix 14 48 xymatrixcompile 49 xymatrixnocompile 49 xyoption 5 19 xypic sty 77 xypic tex 77 xyprovide 19 xyPSdefau
17. and web feature 29 Circle Ellipse Arc feature 29 1 Full Circles 00 29 2 Ellipses 29 3 Circular and Elliptical Arcs 30 Knots and Links feature 31 Smart Path option IV Drivers 33 34 34 34 35 36 37 37 37 37 37 37 37 38 38 40 43 43 44 44 46 47 48 48 49 49 50 51 53 56 58 58 58 59 61 66 66 32 Support for Specific Drivers 66 32 1 dvidrv driver 0 66 32 2 DVIPS driver 0 00 0 66 32 3 DVITOPS driver 0 0 02 67 32 4 OzTeX driver 0 0 67 32 5 OzTeX v1 7 driver 0 67 32 6 Textures driver 0 68 32 7 Textures v1 6 driver 68 32 8 XDVI driver 0 68 32 9 CMacTeX driver 0 69 33 Extra features using POSTSCRIPT drivers 69 33M Colours aa Yet Bee id cog a ee BPA 70 33 2 Frames 0 02004 70 33 3 Line styles 2 2 0 2 2 70 33 4 Rotations and scaling 70 33 5 Patterns and tiles 0 71 34 Extra features using TPIC drivers 71 BAT AMES ke eo ts ae Ge te ta Gee Ae A 71 Appendices 71 A Answers to all exercises 71 B Version 2 Compatibility 75 B 1 Unsupported incompatibilities 75 B 2 Obsolete kernel features 75 B 3 Obsolete extensions amp features 76 B 4 Obsolete loading 77 B 5 Compiling v2 diagrams 77 C Common Errors 77 References 77 Index 78 List of Figures 1 pos itions o oore
18. arrows Finally there are a variety of ways of specifying the desired radius relative to other parts of the picture being built as in the following example p AE eE xy 0 r5pc dir p DR p pt 5 5 dir c L c dir ellipse lt gt ellipse 5 0 5 5 p 3 c ellipse 5 ellipse lt 5pt gt endxy The following give circles centred at c ellipse lt gt style radius dist p c ellipse lt dimen gt radius is the dimen ellipse num style unit circle scaled num in the current basis Note that if the current basis is not square then the latter variant namely ellipse num will type set an ellipse rather than a circle On the other hand the first two variants always specify true circles In the 2nd case i e when dimen is empty the size of the object at p is taken into account when drawing the circle if this is not desired then kill the size using a null object e g Currently the ellipse macro works only as a decor In future versions there will be an object called arc having elliptical shape via circleEdge with possibly unequal extents Also it will be possible to connect arc which will set the current connec tion so that any place on the full ellipse not just the visible sector will be accessible using an extension to the usual place mechanism To Do make this be 29 2 Ellipses There are several ways to
19. central Arrow is omitted leaving symmetrically placed curved connections with arrowheads at the specified ends A label can be placed where the Ar row would have been If a special arrowhead is specified using see Extra Options 2 below then this will be used instead of the standard dir gt precipitation ye Clouds H20 Oceans Paa a evaporation xymatrixcolsep 5pc diagram relax txt Clouds rtwocel1l lt 10 gt _ hbox tiny evaporation hbox tiny precipitation mathbf H_2 0 amp relax txt Oceans enddiagram theory AEE Mathematics Physics Pe ee S a experiment xymatrixcolsep 5pc diagram relax txt llap Math ematics rtwocell _ hbox tiny experiment hbox tiny theory amp relax txt Physics enddiagram 2 Changing Tips and Module Maps The following commands are provided for specifying the object to be used when typesetting various parts of the twocells command default modmapobject object dir twocellhead object dir gt twocelltail object dir arrowobject object dir gt curveobject object uppercurveobject object lowercurveobject object These commands set the object to be used for all subsequent 2 cells at the same level of TEX grouping curveobject specifies both of the upper and lower curve objects For some of these there is also a way to change the object for the cu
20. described in note 3d 52 To Do Describe the use of move s with place s in detail in particular 1 until perpendicular to and 2 until intercepts with can be coded 26g This escapes into the Xy pic kernel language and interprets the pos decor The current node is then set to the resulting c object and the grid from the resulting base The effect of the pos decor can be completely hidden from Xy graph by entering it as save pos decor restore 26h It is possible to insert a matrix in a graph provided the matrix option described in 25 has been loaded it overwrites the node with the re sult of xymatrix matrix Afterwards the graph grid is set as the top left square of the matrix i e with d and r adjusted as they work in the top left entry Bug dr immediately after the matrix will work as expected e g make the center of 2 2 the current node but others might not e g rr 26i 26j will not necessarily place the current node on top of 1 3 It is possible to insert a polygon or an ellipse in a graph provided the poly option described in 27 or the arc option described in 29 has been loaded respectively it will have c as the current node p as the previous one and the the current base has the hop s r and u as base vectors Note lattices knots etc can also be used but no special syntax is useful since the
21. diagram illustrates this effect for a cubic spline of two segments 3 control points Exercise 18 Write code to produce a picture such as the one above Hint Save the locations of places along the curve for later use with straight connec tions To have the same pos occuring as a multiple control point simply use a delimiter which leaves the pos unchanged Thus curve pos amp uses a cubic spline whereas curve pos is quadratic Repeating the same control point three times in succession results in straight segments to that con trol point Using the default styles this is an expen sive way to get straight lines but it allows for extra effects with other styles Syntax Action curve modifier curve object poslist construct curved connection modifier curve option gt curve object gt empty curve option modifier p P 1 L elc pc pC Pc PC lc 1C Le LC cC empty object curve object object curve object zero or more modifiers possible default is C set curve option show only 4 control points p points joined by lines 1 lines or curve only c curve 8f 8e show control points and curve show lines joining control points and curve amp plot curve twice with and without specified formatting use the appropriate default style specify the drop object and maybe more 8b 8c speci
22. ellipse p x endxy Hint When exploring to find the best location for the control point e g the x in the above ex ample then use xycompile as shown changing the location outside of the compilation This speeds up the reprocessing with the changed value Avoiding overflows If dir and dir are in tended to be equal then the method of the previ ous paragraph should be used However it may hap pen that nearly parallel directions may be specified perhaps by accident There is then the possibility of numerical overflow or a division by zero error The latter may be accompanied by a warning mes sage Xy pic Warning division by 0 in intersect replaced by 50 This indicates that the number 50 has been used as the result of a division by zero In many con texts this will produce an acceptable result How ever it may lead to an overflow in other situa tions or to drawing beyond the normal page bound ary This can be controlled using a decor of type zeroDivideLimit num prior to specifying the ellipse The value 50 will be replaced by num whenever a division by zero would otherwise be en countered in an intersection calculation radius known end points unknown The language for these is a combination of most of that used above but the interpretation of the direction s is different ellipse lt radius gt dir 1 orient dir o ellipse
23. from p to c and then typesets a connection filled with copies of the object as illustrated in 2 3 The exact details of the connection de pend on the actual object and are described in general in 84 The intuition with a connection is that it typesets something connecting p and c and sets the pos operator up accordingly Using will pick a place along the most recent connection typeset with What exactly this means is determined by the object that was used for the connection and by the modifiers described in general terms here The shave modifiers in a place lt and gt change the default factor f and how it is used by moving the positions that correspond to 0 and 1 respectively These are initially set equal to p and c but shaving will move them to the point on the edge of p and c where the connection leaves enters them and change the default f as indicated When one end has already been shaved thus then subsequent shaves will cor respond to sliding the appropriate position s a TeX jot usually equal to 3pt further towards the other end of the connection and past it Fi nally the pick action will pick the position located the fraction f of the way from 0 to 1 where f 0 5 if it was not set by lt gt or explicitly All this is probably best illustrated with some examples each in figure 2 is typeset by a sequence of the form p c place oplus where
24. gt 3b Skewing using just means that the reference point of c is moved with as little change to the shape of the object as possible i e the edge of c will remain in the same location except that it will grow larger to avoid moving the reference point outside c Exercise 3 What does the pos R L do Bug The result of is always a rectangle cur rently 3c A pos covers another if it is a rectangle with size sufficiently large that the other is under neath The operation extends a pos to cover an additional one the reference point of c is not moved but the shape is changed to a rect angle such that the entire p object is covered Bug non rectangular objects are first trans lated into a rectangle by using a diagonal through the object as the diagonal of the rect angle 3d The operations and set the base used for coord inates having the form x y The op eration will set lt X origin Yorigin gt to p lt Xzbase Yrbase gt to c origin and lt Xybases Yybase gt to lt Yibases Xcbase gt this ensures that it is a usual square coordinate system The operation may then be used afterwards to make nonsqare bases by just setting ybase to c origin Here are two examples firstly 0 lt 1cm Ocm gt sets the coordinate system origin while lt icm 5cm gt lt 2cm 1 5cm gt lt icm icm gt defines ybase PA 1 1 before g xbase z N ybase origin
25. illustrate this in each case object frm frm frm lt 6pt gt However filling non rectangular shapes will result in a rectangle unless a driver is used that supports ar bitrary filling With some drivers the above fills will thus all be identical as rectangular 9 4 Framing as object modifier In addition frames may be accessed using the special F frame object modifier shape s that will add the desired frame to the current object The frame ap propriate to the edge of the object will be chosen presently either rectangular or elliptical If shape modifiers need to be applied to the frame alone then they can be included using as separator Thus F red will make a red frame provided the color extension is active of course Additionally the variant of frames using lt dimen gt can be accessed by specifying lt dimen gt Here are some simple examples using this feature text with background bold white on black xy lt 1 5pt gt F white F red txt text with background D dipc F black white txt bf bold white on black endxy Notice that when multiple frame modifiers are used the frames are actually placed in reverse or der so that earlier ones are printed on top of later ones To Do The frame option is not quite com plete yet some new frames and several new brackets should be added 9 5 Using curves for fr
26. in 83 When an Xy picture is entered in math mode then the reference point becomes the vcenter instead i e we use the point lt Xyjin the fontdimen22 gt as reference point 2 2 Objects The simplest form of putting things into the picture is to drop an object at a position An object is like a TREX box except that it has a general Edge around its reference point in particular this has the extents i e it is always contained within the dimensions L R U and D away from the reference point in each of the four directions left right up and down Ob jects are encoded in T X boxes using the convention that the TEX reference point of an object is at its left edge thus shifted lt L 0pt gt from the center so a TEX box may be said to be a rectangular object with L Opt Here is an example TEX reference point The object shown has a rectangle edge but others are available even though the kernel only supports rect angle and circle edges It is also possible to use entire Xy pictures as objects with a rectangle edge 0 as the reference point L Xmin R Xmax D Ymin and U Ymax The commands for objects are de scribed in 4 2 3 Connections Besides having the ability to be dropped at a position in a picture all objects may be used to connect the two current objects of the state i e p and c For most objects this is done by filling the straight line between the centers w
27. in cells per inch Hence when used as an object modifier 30 pa 18 75 pq rotates the pattern by 30 clockwise and uses a smaller pat tern cell larger frequency The default frequency of 12 5 300 8 x 3 means that each pixel in a pat tern cell corresponds on a device of resolution 300dpi to a 3 x 3 square of device pixels on such a device 18 75 uses 2 x 2 squares At 300dpi a frequency of 9 375 300 8 x 4 uses 4 x 4 squares These match the natural size for pixels on a 75dpi screen and are pretty close for 72dpi screens Though appropriate for screen dis plays these are too chunky for high quality printed work Doubling the frequency is too fine for some patterns hence the intermediate choice of 12 5 as de fault In order for printed output to match the screen view a POSTSCRIPT operator macfreq has been de fined to facilitate requests for 9 375 via macfreq The next diagram displays changes to the fre quency filled filled filled filled pattern pattern pattern pattern 9 375 12 5 18 75 37 5 filled filled filled filled pattern pattern pattern pattern 9 375 12 5 18 75 37 5 Saving patterns When styles are saved using word see note 4k of 4 then the current pattern if any is also saved Subsequent use of word recovers the pattern as well as colour and line style settings This includes any explicit variations applied using the Style
28. instructed to use a fixed grid for the matrix with the switches IR C that ensure that the row spacing column spacing and both respectively pretending that all entries have the size of the largest entry without modify ing the real size of the entries of course only the spacing to get the entries to really have the same size use a setup described in 25 4 below The special variants 0 dimen pretend that entries have zero or dimen height and width for computing row and column spacing as above inserting R or C just after the makes this af fect only the row or column spacing e g RO means that the row spacing only is between the centers of the rows Finally the spacing of things that are typeset can be adjusted separately M add op dimen W add op dimen H add op dimen L add op dimen will adjust the entry margin entry width entry height and label separation used the latter is ac tually passed to the arrow feature The spacing can also be changed for en entire TEX group by the declarations dimen dimen xymatrixrowsep add op xymatrixcolsep add op The default spacing for both is 2pc To Do optimize processing of matrices with con stant grid An entire matrix can be rotated by adding a ro tation setup of the form direction This will set the orientation of the rows to direction the def
29. letter indicating which for the xover families Furthermore there is a natural orientation for each crossing as well as along each strand This corresponds to the order in which ink is ap plied to the printed page following the natural parametrization of each strand as a curved con nection or arrow This orientation determines whether a crossing is over mathematically pos itive or right handed or under mathematically negative or left handed It is used in determin ing the location of labels and the direction of arrowheads placed along the strings Note that cross and twist crossings may set the same curves but with different orientation and label positioning Figure 19 displays the orientation on all the crossings grouping them into subfamilies con sisting of right handed left handed and non vcross vcrossneg vuncross y vtwist vtwistneg vuntwist xoverv xunderv xunoverv Zz x yY a a aan ae vover vunder vunover xm XD x x hcross hcrossneg huncross htwist htwistneg huntwist xunderh xunoverh i hunder xoverh Y hover hunover Figure 19 knot crossings with orientations and label positions crossings Also indicated are the default po sitions for labels and arrow tips each piece uses the same code for tips and labels e g vover lt gt gt gt gt lt x y gt z The x crossings do not stack easily since their tangents are at 45 to t
30. of options extensions in part II extend the kernel graphic capabilities features in part III provide special input syntax for particular diagram types and drivers in part IV make it possible to exploit the printing capabilities supported by DVI driver programs For each option it is indicated how it should be loaded The appendices contain answers to all the exercises a summary of the compatibil ity with version 2 and list some reasons why Xy pic might sometimes halt with a cryptic T X error License Xy pic is free software in the sense that it is available under the following license conditions Xy pic Graphs and Diagrams with TEx 1991 1998 Kristoffer H Rose 1994 1998 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 documen
31. option xyoption 16textures Notice that version 1 7 suffers from a printing bug which may cause a POSTSCRIPT error A fix is kludged by making sure the first page has been shown in the viewer before any pages with diagrams are sent to the printer Supported special effects are e colour both on screen and with POSTSCRIPT e crayon colours e PostScript back end e rotated scaled diagrams and text using Post SCRIPT e variable line widths and poly lines using Post SCRIPT e extra frames and fills using POSTSCRIPT e patterns and tiles using POSTSCRIPT 32 7 Textures v1 6 driver Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption 16textures This driver provides support for versions 1 5b and 1 6 of Blue Sky Research s TEXTURES application for Macintosh It incorporates support for POSTSCRIPT colour and the Xy ps PostScript back end This will not work with versions 1 7 and later these require the driver option xyoption textures Supported special effects are e colour using POSTSCRIPT e crayon colours e PostScript back end e rotated scaled diagrams and text using Post SCRIPT e variable line widths and poly lines using Post SCRIPT 17Macintosh is a trademark of Apple Computer Inc 18Macintosh is a trademark of Apple Computer Inc 68 e extra frames and fills using POSTSCRIPT e patterns and tiles using POSTSCRIPT 32 8 XDVI driver Vers 3 3 by Ross M
32. relative to current amp new node in next column row264 id previously saved node currently mapped node node it node with it typeset and saved there node id node saved as id node escape augment node with material in another mode move hop hop s26f dulr from current node hop place move do hop s f but use its place and move again list graph list graph list of subgraphs26 escape gt pos decor perform pos decor 268 M matrix insert matrix 262 P polygon insert polygon 26 E ellipse insert ellipse 26 setup setup parameters 4 Figure 17 graph s With the addition it is possible to save explic itly in case several nodes have the same text or a node has a text that it is impractical to use for reference In fact using the form it id will only save the node as id and not as it As a special convenience thus the empty id al ways refers to the last completed node so adding after a node merely means it should not be saved under its proper name Exercise 34 How did the author typeset this ADT ATA 26f Moving by a series of hops is simply mov ing in a grid as the sequence of dulr for down up left right indicates The grid is a standard cartesian coordinate system with 3pc unit unless the current base is redefined using with an appropriate pos ition contain ing and as
33. reported In case several matrices are used in the same di agram and they refer to each other then it is useful to give the matrices different prefix setup such that they can refer to each other using the following special coordinate forms that all have the same mean ing except the target entry is picked from a particular matrix prefix r c prefix Ar Ac 49 prefix hop prefix hop place In fact absolute references must always be given using prefix row col even inside the matrix itself Here is an example using this A was typeset using the frame extension and arrow feature by xy xymatrix 7 A amp B C amp D POS frm POS 10 3 xymatrix A ar amp B ar F C ar amp D ar POS frm endxy 25 3 Spacing and rotation Any matrix can have its spacing and orienta tion changed by adding setup switches between xymatrix and the opening The default spacing between entries of matrix is changed with the switches R add op dimen C add op dimen add op dimen that change row spacing column spacing and both respectively as indicated by the add op and dimen where the dimen may be omitted and can be given as one of R and C to indicate the current value of the parameter in question Note there is no default In addition Xy pic can be
34. restored it is not a TEX group 5The braces can be replaced by once i e there can be no other braces nested inside it 6One can use instead also here 3m 3n lt 0 lt p is circular 2 QX lt Pa oe Figure 2 Example place s Exercise 5 What effect is achieved by using the coord inate The vector Z where Z is a dimen sion is the same as the vector lt Z cos a Z sin a gt where a is the angle of the last direction set by a connec tion ie with or subsequent placement 7 position It is possible to give a direction as described in the next section figure 3 note 4l in particular that will then be used to set the value of a It is also possible to omit the dimen in which case it is set to a default value of 5pc A corner is an offset from the current lt X_ Y gt position to a specific position on the edge of the c object the two letter ones may be given in any combination The edge point E lies on the edge along the line from p to the centre of the object in contrast to the proportional point P which is also a point on the edge but computed in such a way that the object looks as much away from p as possible Finally a following f suffix will multiply the offset vector by the factor f Exercise 6 What is the difference between the pos itions c lt and ctE Exercise 7 What does this typeset xy lt
35. rotation e The even older notation where an argument in braces to rto and the others was automati cally taken to be a tail is not supported Use the supported lt notation If you do not use these features then your version 2 and earlier diagrams should typeset the same with this option loaded except that sometimes the spac ing with version 3 is slightly different from that of version 2 6 which had some spacing bugs B 2 Obsolete kernel features The following things are added to the kernel by this option and described here idioms obsolete positions obsolete connections and obsolete objects For each we show the suggested way of doing the same thing without this option Removed AMS T X idioms Some idioms from AMS T X are no longer used by Xy pic the definition commands define and redefine and the size commands dsize tsize ssize and sssize Please use the commands recommended for your format for plain T X these are def for the first two and displaystyle textstyle scriptstyle and scriptscriptstyle for the rest The v2 option en sures that they are available anyway Version also 2 used the AMS TFX text and a non object box construction Text which are emulated text is only defined if not already de fined however using the native one of AMS TE X or AMS ETFEX or whatever if possible Please use the txt object construction described in 6 3 directly since it is more general
36. specify an ellipse apart from the method illustrated above in which the ba sis must be changed from square Basically we must specify the lengths of the major and minor axes Also it is necessary to specify an alignment for one axis In the following the ellipse is centred on c and one axis is aligned along the line pc except with the final variant where it aligns with the current basis When used num is treated as a scale factor multiplying an appropriate length ellipse lt dimen dimen gt given axes lengths ellipse lt dimen gt style one axis is p ellipse num style perp axis scaled ellipse num num f scaled axes aligned with basis In the latter variant if the second num is empty then this is equivalent to both num s hav ing the same value which is in turn equivalent to the final variant for circles 58 xy 0 r5pc dir DR 5 p frm p 5 5 dir c dir UL c c ellipse 1 4 ellipse 75 ellipse lt 15pt 10pt gt ellipse lt 10pt gt endxy 29 3 Circular and Elliptical Arcs The xyarc feature handles arcs to be specified in two essentially different ways according to what in formation is provided by the user We call these the radius unknown end points known and the radius known end points unknown cases radius unknown end points known The simplest case though not nece
37. that only drivers also loaded in the preamble are reloaded later and that xyReloadDrivers is used when there is doubt about the state of affairs In case of confusion the special command xyShowDrivers will list all the presently supported and selected driver extension pairs to the TEX log It is not difficult to add support for additional driver s how is described in the T Xnical documen tation Most extensions will print a warning when a capa bility is used which is not supported by the presently loaded driver Such messages are only printed once however for some formats they are repeated at the end Similarly when the support of an extension that exploits a particular driver is used a warn ing message will be issued that the DVI file is not portable Part II Extensions This part documents the graphic capabilities added by each standard extension option For each is indi cated the described version number the author and how it is loaded Many of these are only fully supported when a suitable driver option described in part IV is also loaded however all added constructions are always accepted even when not supported 8 Curve and Spline extension Vers 3 7 by Ross Moore ross mpce mq edu au Load as xyoption curve This option provides Xy pic with the ability to type set spline curves by constructing curved connections using arbitrary directional objects and by encircling objects similarly Warning U
38. the applicability of such effects Furthermore the PostScript dictionary must be available in a file called global ps or ap pended to the OzTeXdict pro However with ver sion 1 8 and later of OZI X there is the alternative of using the dvips driver which does support all the PostScript effects available in Xy pic Note To use Xy pic effectively with OZI X re quires changing several memory parameters In par ticular a Big T X is needed along with an increase in the pool_size parameter Explicit instructions are contained in the file INSTALL 0zTeX of the Xy pic distribution Supported special effects are e colour using PostScript but not of font characters e crayon colours similarly restricted e PostScript back end e variable line widths and poly lines using Post SCRIPT e extra frames and fills using POSTSCRIPT e patterns and tiles using POSTSCRIPT e rotated scaled diagrams and text recognised but not supported 32 5 OzTeX v1 7 driver Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption 17oztex This option provides the necessary interface to sup port the PostScript back end and other Post Script effects when using the DVI driver of ver sion 1 7 of OZI X by Andrew Trevorrow Later versions of OZI X should instead use the driver op tion xyoptionfoztex Upgrading to version 1 9 ofOZI X is recommended Does not support rotations scaling and coloured text
39. the document preamble tells Xy pic that the POSTSCRIPT alterna tive to the fonts should be used provided the means to do this is also specified This is done by also speci fying a dvi driver which is capable of recognising and interpreting special commands Although the file xyps tex is read when the option request is encoun tered the macros contained therein will have no effect until an appropriate driver has also been loaded With ATEX 2 both the backend and driver may be specified along with other options via a single usepackage command see 4 page 317 e g usepackage ps textures color arrow xy The rebindings necessary to support POSTSCRIPT are not effected until the begin document command is encountered This means that an alternative driver may be selected by another xyoption driver at any time until the begin document Only the macros relevant to last named driver will actually be installed The following table describes available support for POSTSCRIPT drivers Please consult the individual driver sections in part IV for the exact current list For each driver there is a corresponding file named xy driver tex which defines the necessary macros as well as a documentation file named xy driver doc The spelling is all lower case designed to be both de scriptive and unique for the 1st 8 characters of the file names driver Description dvips Tomas Rokicki s DVIPS dvi
40. the following sections what setup can be Thus a matrix with mazrow rows and maxcol columns where each entry contains row col is entered as xymatrix 1 1 amp 1 2 amp 1 mazxcol 2 1 amp 2 2 amp 2 mazxcol mazrow 1 amp maxrow 2 amp mazxrow maxcol TEXnically the amp character represents any alignment tab i e character with category code 4 A matrix can appear either in an Xy picture as decor or stand alone The aspects in which xymatrix differs from or dinary matrix constructions such as Plain T X s matrix and BTE X s array environment are e arbitrary Xy pic decor ations may be specified in each entry and will be interpreted in a state where c is the current entry e the entire matrix is an object itself with refer ence point as the top left entry and e a progress message lt xymatrix rowsxcols size gt is printed for each matrix with rows x cols entries and Xy pic complexity size the number of primitive operations performed un less the declaration SilentMatrices is issued e Entries starting with a are special described in 25 4 so use to get a For example xy xymatrix A amp B C amp D drop frm drop cir lt 8pt gt endxy will typeset D Bug Matrix nesting is not safe Matrices are often quite slow to typeset so as a convenience all matrices can be set to compile and not automatically with the declar
41. the study of tensor categories and elsewhere The morphisms are displayed as a pair of curved arrows symmetri cally placed together with an orientation indicated by a short broad arrow or Arrow Labels may be placed on all three components Bug This document still uses version 2 style commmands as described in appendix B diagram A rtwocell f_g amp B enddiagram diagram A ruppertwocell f alpha rlowertwocell_h beta rto_ 35 g amp B enddiagram These categorical diagrams frequently have a matrix like layout as with commutative diagrams To facilitate this there are control sequences of the form rtwocell ultwocell xtwocell analogous to the names defined in xyv2 for use in diagrams produced using xymatrix As this involves the definition of 21 new control sequences many of which may never be used these are not defined im mediately upon loading xy2cell Instead the user must first specify UseTwocel1s As in the second example above just the upper or lower curved arrow may be set using control sequences of the form uppertwocell and lowertwocell These together with the compositemap family in which two abutting ar rows are set with an empty object at the join al low for the construction of complicated pasting dia grams see figure 15 for an example The following initialise the families of control se quences for use in matrix diagrams UseTwocells two curves UseHalfTwo
42. use of Xy pic does not in itself limit the POSTSCRIPT file to a particular resolution e The latest version of Xy pic now enables special effects such as variable line thickness gray level and colour Also rotation of text and por tions of diagrams is now supported with some drivers Similarly whole diagrams can be scaled up or down to fit a given area on the printed page Future versions will allow the use of re gions filled with colour and or patterns as well as other attractive effects 9Most TEX PosTSCRIPT drivers store the images of characters used in the text as bitmaps at a particular resolution This means that the POSTSCRIPT file can only be printed without loss of quality due to bitmap scaling at exactly this resolution Some of the above advantages are significant but they come at a price Known disadvantages of using Xy ps include the following e A DVI file with specials for a particular POST SCRIPT driver can only be previewed if a pre viewer is available that supports exactly the same special format A separate POST SCRIPT previewer will usually be required However recent versions of xdvi sup port viewing of POSTSCRIPT using either the GhostScript program or via Display PostScript The POSTSCRIPT produced by Xy ps can be viewed this way e DVI files created using Xy ps in fact lose their device independence So please do not dis tribute DVI files with POSTSCRIPT specials send either th
43. 0 20 o A 60 0 o B B a crv POS 4 _ UR 0 B crv 30 30 POS 7 D 1 B crv 20 40 amp 40 40 POS D 2 B amp crv 10 20 amp 30 20 amp 50 20 amp 60 10 POS UR 4 endxy Answer to exercise 17 p 21 This is the code that was used to typeset the picture xy 0 20 A 60 0 B crv 10 20 amp 30 20 amp 50 20 amp 60 10 lt dir lt gt dir gt 7 65 oplus LD 5pt x 65 12pt oplus LD 5pt x 28 0 otimes 40pt Q q 100pt P q dir endxy Answer to exercise 18 p 21 Here is the code that was used to typeset the picture def ssz 1 hbox _ 1 xy 0 0 A 30 10 B B dir B crv 5 20 amp 20 25 amp 35 20 lt 0 dir lt a gt 1 dir gt h 1 dir lt b 9 dir gt i 2 dir lt c 8 dir gt j 3 dir lt d 7 dir gt k 4 dir lt e 6 dir gt 1 5 dir a IRC txt ssz lt h ILC txt ssz gt dir b IRD ssz 1 iMeIL sszt 9 dir c IRD ssz 2 j L ssz 8 dir q IRD ssz 3 Me IL sszt j 73 e dirt F e xIRD ssz 4 1 ILD ssz 6 dir ID 3pt ssz 5 endxy Answer to exercise 19 p 26 Here is how xy 0 0 x A frm o 10 7 B frmfo frm endxy
44. 0 gt _57 omit A uurrlowertwocell lt 6 gt omit relax uurrcompositemap lt 2 gt _ f_1 _2 lt 5 gt drtwocel1l1 lt 0 gt _ g_1 omit amp amp amp relax urtwocel1 lt 0 gt omit amp amp relax rtwocell lt 0 gt _6 omit amp relax rlowertwocell lt 3 gt _ g_4 lt 1 gt rcompositemap lt 6 gt _ f_7 _8 omit amp B amp relax urrtwocell lt 0 gt omit xcompositemap 1 4 lt 4 5 gt _ g_2 g_3 omitH enddiagram For the straight arrows it would have been simpler to use to provided xyarrow has been loaded In stead twocel1 lt 0 gt omit was used to illus trate the versatility of nudging and omit thus xy2cell can completely handle a wide range of di agrams without requiring xyarrow Note also the use of relax at the start of each new cell to avoid premature expansion of a complicated macro which can upset the compiling mechanism Answer to exercise 30 p 47 Here is the code used by the author to set the first diagram uppercurveobject lowercurveobject circ xymatrixcolsep 5pc xymatrixrowsep 2pc diagram relax txt FUn rtwocell lt 8 gt amp amp relax txt gaMES enddiagram Here is the code used for the second diagram xymatrixcolsep 2 5pc xymatrixrowsep 4pc diagram relax txt lt 1 5cm gt bf Ground State rrtwocel1 lt 12 gt 2 5pt dir gt _
45. 1 sA L D ar L U D s 2 endxy In the above code notice how the basis is first established then the xylattice typeset Doing this within an xybox allows axes to be sized and placed appropriately Since lattice points are deter mined by their integer coordinate displacements they can be revisited to add extra object s into the overall picture More generally the origin for lattice coordinates is the current pos c when the xylattice command is encountered Easy accessi bility is maintained as seen in the next example When the basis vectors and y are not perpendic ular the collection of points with a b in these ranges will fill out a skew parallelogram Generally it is use ful to plot only those points lying within a fixed rect angle This is the purpose of croplattice with its extra parameters 5 8 determining the cropping rectangle within which lattice points will be typeset Other points will not be typeset even when a and b are within the specified ranges Explicitly the hor izontal range of the cropping rectangle is Xmin to Xmax With Xin being the X coordinate of the vec tor 5 x where 5 is a number not necessarily an integer Similarly Xmax is the X coordinate of 6 x The vertical extents are Ymin and Ymax given by the Y coordinates of 7 x v and 8 x U respectively def latticebody ifnum latticeA 1 ifnum latticeB 1 else drop circ fi else ifnum lattice
46. 10 hooks and squiggles xycircfont 1 8 circle segments xycirc10 The first four contain variations of characters in a large number of directions the last contains 1 8 cir cle segments Note The default fonts are not part of the Xy pic kernel specification they just set a standard for what drawing capabilities should at least be required by an Xy pic implementation Implementations exploiting capabilitites of particular output devices are in use Hence the fonts are only loaded by Xy pic if the con trol sequence names are undefined this is used to preload them at different sizes or prevent them from being loaded at all 1 4 Allocations One final thing that you must be aware of is that Xy pic allocates a significant number of dimension regis ters and some counters token registers and box reg isters in order to represent the state and do computa tions The current kernel allocates 4 counters 28 di mensions 2 box registers 4 token registers 1 read channel and 1 write channel when running under BTEX some other formats use slightly more because standard generic temporaries are used Options may allocate further registers currently loading every thing loads 6 dimen 3 toks 1 box and 9 count registers in addition to the kernel ones 3The v2 feature introduces some name conflicts in order to maintain compatibility with earlier versions of Xy pic 4No description of a TEX program is complete without an explana
47. 20 2 2 30 0 3 endxy typesetting es ae ee because when endxy is seen then the parser knows that the next symbol is neither of the char acters and hence that the last segment is to be expected Instead however the failure con tinuation is inserted and parsed and the path is finished by the inserted material Failure continuations can be nested xy 0 PATH dir 30 0 3 20 2 2 7 10 1 1 endxy will also typeset the connected digits 23d A straight segment is interpreted as follows 1 First p is set to the end object of the previ ous segment for the first segment this is c just before the path command and c is set to the pos starting the segment and the current slide is applied Syntax Action PATH path afterPATH decor path interpret path interpret path and then run decor path action stuff path turn turnradius segment slide labels anchor it alias which labels path stuff path gt segment path lt turn segment path segment diag turnradius cir turnradius empty dimen path pos slide labels gt lt dimen gt anchor it alias labels _ anchor it alias labels I anchor it alias labels empty anchor place empty set actio
48. 7 5pt dir lt lt lt 1 5 gt txt small continuous power _ lt 1 5 gt txt small pulsed emission amp relax N i C d Circled amp relax txt lt 1 50cm gt bf Excited State enddiagram Answer to exercise 31 p 50 The author did xymatrix 1pc 1 A times B ar r A ar d _ B amp B ar d times A A ar r _ B times amp r B times A F 74 Answer to exercise 32 p 50 Modifiers are used to make all entries round with a frame the general form is used to ensure that the sequence is well defined Finally the matrix is rotated to make it possible to enter it as a simple square entrymodifiers lt 1pc gt o F xymatrix Gur A save r dir dr dir d dir restore amp B C amp D Answer to exercise 33 p 51 Here is how xymatrix W 3pc H 1pc R 0pc F 7 save lt 4pc 1pc gt hbox it root ar restore bullet save ar r dd r4pc dd dd restore bullet save ar r d r3pc d d2pc uu 13pc uu uu restore 1 Answer to exercise 34 p 52 The first A was named to allow reference from the last xygraph A A1 r A r A 7 A1 Answer to exercise 35 p 53 The author did SelectTips cm objectmargin 1pt xygraph 0 77 77 0 0 10 gt w r 6 x_1 da z r y u 6 x_2 x_1
49. A 0 ifnum latticeB 1 else drop circ fi else drop circ fi fi xy 2 2 0 0 xybox 0 lt 3pc 1 5mm gt lt 0 72pc 1 65pc gt o croplattice 4 4 4 4 2 6 2 6 3 3 o 0 1 a bullet D alpha o 1 1 b bullet L beta o 0 1 c o 1 1 d sta ct e IDRe a dir e ULe c dir b a f IDLe b dir f UR a dir prer nf AN frm SPSL ot ML L L ar L R L s 1 L D ar L U D s 2 endxy The latticebody macro At each lattice point within the specified range for a b and within the cropping rectangle when croplattice is used a macro called latticebody is expanded This is meant to be user definable so as to be able to adapt to any specific requirement It has a default expan sion given by def latticebody drop bullet The following macros may be useful when specifying what to do at each point of the lattice latticebody expanded at lattice points defaultlatticebody resets to default latticeA a value of lattice point latticeB b value of lattice point latticeX X coord offset in pts latticeY Y coord from lattice origin As in the examples presented above the object dropped at the lattice point can be varied according to its location or omitted altogether In the final example the latticebody macro per forms a calculation to decide which lattice points should be empha
50. Answer to exercise 20 p 26 The cir op eration changes c to be round whereas frm o does not change c at all Answer to exercise 21 p 26 Here is how xy 0 0 A 10 7 B frm x amp frm frm _ endxy The trick in the last line is to ensure that the ref erence point of the merged object to be braced is the right one in each case Answer to exercise 22 p 30 This is how the author specified the diagram UseCrayolaColors xy drop 1 25 xybox P0s 0 0 A 100 40 B lt lt 0_ red o lt 5pt gt heartsuit gt gt gt x _ Plum 0 lt 3pt gt clubsuit x 5pt thicker dir 1 left RD txt label 1 red frm 7 2 gsave newpath xyXpos xyYpos moveto 50 dup rlineto 20 setlinewidth 0 0 1 setrgbcolor stroke grestore psxy 7 2 txtflabel 2 red frm 2 BurntOrange 3 halfsize txt label 3 red frm 375 flip txt label 4 red frm 5 dblsize txt label 5 red frm 7 5 WildStrawberry 7 hflip txt label 6 red frm 8 vflip txt label 7 red frm 9 right LD txt label 8 red frm 7 5 66667 30pt txt special effect aligned text red frm endxy Answer to exercise 23 p 40 Here is what the author did xy A cir lt 10pt gt me PATH ul ur me me gt 1 25 dir gt endxy 73 The
51. Escape mechanism Here is a variation of an earlier example with ex tra effects UsePatternFile xymacpat AliasPattern bricks mac12 LoadPattern mac28 LoadPattern mac05 xy 0 macfreq 45 pa mac28 Bars lt 12pc 4pc gt bricks frm lt 3 5pc Opt gt lt 2 65pc gt o0 Bars frm thicker frm o lt 6pc 0pt gt lt 5pc 2 7pc gt mac05 frm frm white txt Large bf sf Kilroy was here endxy Kilroy was here 15 Import graphics extension Vers 3 6 by Ross Moore ross mpce mq edu au Load as xyoption import This feature provides the ability to easy add labels and annotations to graphics prepared outside T X or BTEX An Xy pic graphics environment is established whose coordinates match that within the contents of the imported graphic making it easy to specify ex actly where a label should be placed or arrow drawn to highlight a particular feature A command xyimport is defined which is used in conjunction with imported graphics to establish a coordinate system appropriate to the particular graphics This enables pos itions within the graphic to be easily located either for labelling or adding ex tra embellishing features It is used in either of the follow ways xyimport width height graphic xyimport width height x off y off graphic Normally the graphics will be a box containing
52. If not then you will have to use a different construction Notes 4a An object is built using objectbox text objectbox is initially defined as def objectbox 1 hbox objectstyle 1 let objectstyle displaystyle but may be redefined by options or the user The text should thus be in the mode required by the objectbox command with the default objectbox shown above it should be in math mode Syntax Action object modifier object apply modifier to object objectbox build objectbox then apply its modifier s objectbox gt text build default4 object library object dir use library object or dir ectional see 6 TEX box text build box object with text using the given TFX box command e g hbox object object wrap up the object as a finished object box composite composite build composite object box44 xybox pos decor package entire Xy picture as object4 modifier gt vector object has its reference point shifted by vector object has the original reference point reinstated add op size change object size h i object is hidden invisible shape object is given the specified shape shape define shape 4 to reestablish current object style a set current direction for this object add op 4 grow shrink set grow to shrink to size empty default s
53. LGOL 60 Communications of the ACM pub twg tds 3 299 314 1960 Index 1 8 ry 8 10 amp 48 5 8 10 gt 39 lt 8 38 40 41 42 QO 8 lt gt 8 1 50 0 8 lt gt 5 39 lt 41 43 0 0 71 8 38 40 10 1 8 gt 8 38 40 41 43 8 39 40 42 48 50 75 8 40 10 8 40 50 8 39 41 49 C 49 8 41 49 GH 50 8 40 0 50 L 50 8 39 50 M 50 Me C 49 GR 49 xyd 15 R 49 W 50 38 39 42 10 41 42 41 8 10 i 10 8 12 41 50 13 78 12 14 30 33 P 37 13 c 14 d 14 dvips 5 1 14 o 13 r 14 textures 5 u 14 48 39 41 _ 89 41 39 s 66 39 41 lt lt 75 39 0 6 8 41 1 41 2 41 3 41 10 27 11 27 12 27 a 8 active characters 4 add op 12 aftergo 76 afterPATH 38 afterPOS 15 16 39 ahook 76 allocation 5 ANS IST EX 5 15 ANS TEX 5 apit 75 ar 14 38 66 array 51 arrow head 41 arrow stem 41 arrow tail 41 astop 76 aTip 76 atip 76 aturn 76 banner 5 bhook 76 BNF 4 body of the option 19 bpit 75 bstop 76 bTip 76 btip 76 bturn 76 C 8 10 c 6 c 8 cartesian coordinate system 6 category code 4 CD 8 cD 76 cH 76 cir 19 cir 18 73 Circled 77 circled 77 circles 5 CL 8 cL 76 cm 27 Col 51 col
54. Xy pic Reference Manual Kristoffer H Rose krisrose brics dk Version 3 7 Abstract This document summarises the capabilities of the Xy pic package for typesetting graphs and diagrams in T X For a general introduction as well as availability information and conditions refer to the User s Guide 14 A characteristic of Xy pic is that it is built around a kernel drawing language which is a concise notation for general graphics e g joe es was drawn by the Xy pic kernel code xy 3 0 A 20 6 B cir dir _ 3pt dir _ 7pt dirt gt dir gt endxy It is an object oriented graphic language in the most lit eral sense objects in the picture have methods describ ing how they typeset stretch etc However the syntax is rather terse Particular applications make use of extensions that enhance the graphic capabilities of the kernel to handle such diagrams as Bend which was typeset by xy 0 lt 40pt gt hbox Round 0 frm oo lt 5em 5em gt 46 11 hbox Square s lt 5em 5em gt o g hbox Bend b frm o g bh xx crvs Oo b s xx crvs gt dir gt endxy frm using the curve and frame extensions All this is made accessible through the use of features that provide convenient notation such that users can en ter special classes of diagrams in an intuitive form e g Ross M
55. a graphic imported using the commands from packages such as graphics epsf or epsfig or using other commands provided by the local TEX implementa tion However the graphic could be any balanced TEX material whatsoever provided it occupies non zero size both vertically and horizontally The width and height are number s given in the coordinate system for the contents of the graphics These are not dimensions but coordinate lengths us ing the units appropriate to the picture displayed by graphic When provided x off y off give the distance in coordinate units from bottom left corner to where the origin of coordinates should be located usually within area covered by the graphic Usually the negatives of these numbers will give the coordinate location of the bottom left corner of the graphic If no offsets are supplied then the origin is presumed to lie at the bottom left corner Normally the xyimport command is used at the beginning of an xy endxy environment It is not necessary to give any basis setup for this is deduced by measuring the dimensions of the graphic and using the supplied width height and offsets The graphic itself defines named pos called import located at the origin and having appropriate extents to describe the area covered by the graphic This makes it particularly easy to surround the graphic with a frame as on the left side of figure 12 or to draw axes passing through the origin
56. acters u the first is a space to have their standard meaning and all other printable characters to have the same category as when Xy pic will be used in particular this means that 1 you should surround the loading of Xy pic with makeatother makeatletter when load ing it from within a PT X package and that 2 Xy pic should be loaded after files that change category codes like the german sty that makes active Some styles require that you reset the catcodes for every diagram e g with french sty you should use the command english before every xymatrix However it is possible to repair the problem in case any of the characters amp lt gt change category code xyresetcatcodes will load the file xyrecat tex version 3 3 to do it BNF is the notation for meta linguistic formulae first used by 10 to describe the syntax of the Algol programming language We use it with the conventions of the TFXbook 6 is read is defined to be is read or and empty denotes noth ing furthermore id denotes anything that expands into a sequence of TFX character tokens dimen and factor denote decimal numbers with respective without a dimension unit like pt and mm number denotes possibly signed integers and text denotes TFX text to be typeset in the appropriate mode We have chosen to annotate the syntax with brief explanatio
57. ads and labels All the pieces ultimately use curves from the curve extension usually indirectly via the arrow fea ture As such processing can be memory intensive and may seem rather slow All the warnings and ad vice given elsewhere on techniques to handle pages and individual diagrams with many curves are espe cially applicable when using this feature DOL simple link cinquefoil Crossings A crossing is intended to represent two strings pass ing close by but not meeting The macros provided Syntax Action knot piece gt piece scale knot labels piece crossing join scale empty C num 7 pos pos pos pos knot labels empty knot tips knot labels where what knot labels adjust knot labels knot tips gt where I adjust ll A gt lt lt adjust gt gt adjust adjust num num num num what gt lt knothole khole text object anchor it l interpret knot piece piece is a crossings or a join 301 30b invert or scale the knot piece alter size and shape 30 using the pos s arrowtips at ends aligned with orientation lis adjust hole of arrowtips breaks and labels30e 30d position for a crossing adjust other parameter for a join arrowtips at both neither end arrowtips30K also at st
58. al thickness lt dimen gt set thickness to dimen l dimen also sets to dimen l word make word set current style settings reuse previous style butt butt cap at ends roundcap round cap at ends projcap projecting square cap Later settings of the linewidth override earlier set tings multiple calls to thicker and thinner compound but the other variants set an absolute thickness The line thickness specification affects arrow tips as well as the thickness of straight lines and curves Three kinds of line caps are available they are discussed below in the section on poly lines _ l P C xy r8pc txt huge C c O x txt huge P p p ar L 1 p c lt 20pt gt p ar L 4 p c lt 14pt gt p ar 10 p c lt 4pt gt p ar 20 p c lt 16pt gt endxy Using the POSTSCRIPT back end the size of the arrow head grows aesthetically with the thickness of the line used to draw it This growth varies as the square root of the thickness thus for very thick lines 20 times normal the arrowhead begins to merge with the stem The diagram in figure 10 page 31 uses different line thicknesses and colours Poly lines By a poly line we mean a path built from straight line segments having no gaps where each segment abuts the next The poly line could be the edges of a polygon either closed or open if the end point
59. aller angles while the value of 1 is equivalent to using bevels at all angles The default miter limit is 10 The path taken by the poly line this is read as the list of pos itions in the current stack ignoring size extents The macro xypolyline is used as a decor it reads the pos itions from the stack but leaves the stack intact for later use The following diagram illustrates the use of line thickness line joins and line caps with poly lines It contains an example of each of the styles xycompileto poly r4pc lt 5pt gt thicker xybox 3 2 X p CU p LU p LD p RD p RU p CU 0 miter xypolyline xypolyline i PUP liad Ceo les i sa CU LU LD RD RU CU 0 gray roundjoin xypolyline 0 gray xypolyline i X 2 1 X CU LU LD RD RU CU 0 white xypolyline 0 bevel xypolyline i X 7 0 txt LARGE A a X 7 0 txt LARGE B b ar 0 butt thinner a b lt 1pc gt ar 0 roundcap thinner a b ar 0 projcap thinner a b lt 1pc gt Note the use of 0 xypolyline to apply style modifiers to a polyline The method for loading the stack gives equivalent results to us ing p since xypolyline ignores the edge extents of each pos in the stack Note also tha
60. ames If the curve option is loaded then circular and ellipti cal frames of arbitrary radius can be constructed by specifying UseCurvedFrames This can be negated by UseFontFrames Both of these commands obey normal TFX grouping Furthermore dotted and dashed frames now have a regular spacing of their constituent objects The usual warnings about mem ory requirements for large numbers of curves apply here also 10 More Tips extension Vers 3 3 by Kristoffer H Rose kris diku dk Load as xyoption tips This extension provides several additional styles of tips for use primarily as arrow heads and makes it possible to define customised tips This is used to support tips that mimic the style of the Computer Modern fonts by Knuth see 7 and 6 appendix F and of the Euler math fonts distributed by the Ams Font selection is done with the command SelectTips family size where the family and size should be selected from the following table Family 10 11 12 xy gt gt gt gt gt gt gt cm gt gt gt gt gt gt gt eu gt 5 gt gt gt Once a selection is made the following commands are available UseTips activate selected tips NoTips deactivate They are local and thus can be switched on and or off for individual pictures using the TEX grouping mech anism e g SelectTips cm 10 xy ar UseTips dir_ l
61. and CMYK colour models and grayscale shadings Colours and shades are described as r g b rgb or c m y k cmyk or s gray where the parameters are numbers in the range 0 lt r g b c m y k s lt 1 The operators link to the built in colour models or in the case of cmyk for ear lier versions of POSTSCRIPT give a simple emulation in terms of the RGB model Saving colour and styles When styles are saved using word see then the current colour setting if any is saved also Subsequent use of word recovers the colour and accompanying line style set tings Figure 10 Rotations scalings and flips Further colour names are defined by the command UseCrayolaColours that loads the crayon option in which more colours are defined Consult the file xyps col doc for the colours and their specifications in the RGB or CMYK models xycrayon tex This option provides the com mand to install definitions for the 68 colours recog nised by name by Tomas Rokicki s dvips driver 11 This command must be called from a driver file which can actually support the colours 14 Pattern and Tile extension Vers 3 4 by Ross Moore ross mpce mq edu au Load as xyoption tile This extension provides the ability to request that a filled region be tiled using a particular pattern This is an effect not normally available within TeX Instead it requires a suitable driver option to provide the necessary special commands together with an
62. and much more efficient 19In addition a few of the experimental facilities supported in v2 7 2 12 are also supported 75 Obsolete state Upto version 2 6 users could access the state variables cL cR cH and cD which are defined From v2 7 to 2 12 users could use the names of the state dimen registers Xmin Xmax Ymin and Ymax Xp Yp Dp Up Lp and Rp Xc Yc Dc We Lc and Rc Xorigin Yorigin Xxbase Yxbase Xybase and Yybase Now the same effect can be achieved using corner s but v2 defines the aliases Obsolete position manipulation In version 2 many things were done using individual decor control sequences that are now done using pos operators Version 2 positioning Replacement go pos POS p pos aftergo decor pos afterPOS decor p pos merge POS p relax swap POS relax Drop text dropt text Obsolete connections These connections are now implemented using direc tionals Version 2 connection Replacement none connect h dir solid connect h dir Solid connect h dir2 Ssolid connect h dir3 dashed connect h dir Dashed connect h dir2 Ddashed connect h dir3 dotted connect h dir Dotted connect h dir2 Ddotted connect h dir3 dottedwith text connect h text Note how the hidden specifier h should be used be cause version 2 connections did not affect the size of dia
63. arge variety of formats For most formats a single line with the command input xy in the preamble of a document file should load the kernel see integration with standard formats below for variations possible with certain formats in par ticular ATEX 9 The rest of this section describes things you must consider if you need to use Xy pic together with other macro packages style options or formats The less your environment deviates from plain TEX the eas ier it should be Consult the T Xnical documenta tion 15 for the exact requirements for other defini tions to coexist with Xy pic Privacy Xy pic will warn about control sequences it redefines thus you can be sure that there are no conflicts between Xy pic defined control sequences those of your format and other macros provided you load Xy pic last and get no warning messages like 3 Xy pic Warning redefined In general the Xy pic kernel will check all control sequences it redefines except that 1 generic tem poraries like next are not checked 2 predefined font identifiers see 1 3 are assumed intentionally preloaded and 3 some of the more exotic control sequence names used internally like are only checked to be different from relax Category codes The situation is complicated by the flexibility of T X s input format The culprit is the category code concept of TEX cf 6 p 37 when loaded X pic requires the char
64. art finish over string on a crossing 30f middle 9 place on a join initial portion of under string on a crossing 30f earlier 9 place on a join final portion of under string on a crossing later 30m 30f place on a join adjustment 30k from current value of parameter set parameter value arrowhead aligned with against orientation leave hole in the string 30k 0i 30 set308 text as label using labelstyle drop object 30h break or label30 as on an arrow null break30k Figure 18 knot piece construction set specify typesetting within a square cell of coordinate values using a non square basis alters this shape but see also note 30c below for the technique that was used in the cinquefoil example above Notes 30a Several families of crossing are provided Those having names as v and h are designed to stack respectively vertically and horizontally More precisely the current pos starts at the top left corner and finishes at either the bottom left or top right Say that a crossing is either a verti cal crossing or horizontal crossing respectively This certainly applies to the cross and twist families see figure 19 in which the strings enter and leave the square all with vertical tangents or all with horizontal tangents Indeed all crossings are either vertical or horizontal with 62 the final
65. ation where the reference point of the current object will be placed Its coordinates are stored with keys xyXpos and xyYpos 33 1 Colour The included file xyps c tex version 3 7 provides POSTSCRIPT support for the effects defined in the color extension in 13 This file is loaded and its effects are activated automatically whenever xyoption color is re quested and the current driver supports colours us ing POSTSCRIPT Should there be any need to turn off this support the following commands are avail able they obey usual TRX groupings NoPScolor remove POSTSCRIPT support UsePScolor reinstate POSTSCRIPT Without POSTSCRIPT support some drivers may still be able to provide some support for colours These commands are not guaranteed to work adequately with all drivers They are provided primarily for test ing and trouble shooting e g with driver configu rations untested by the authors of Xy pic who should be notified of any difficulties 33 2 Frames The included file xyps f tex version 3 7 provides POSTSCRIPT support for the effects defined in the frame extension described in 9 It implements some effects otherwise unattainable This file is loaded and its effects are activated automatically whenever xyoption frame is re quested and the current driver supports POST SCRIPT effects for frames Should there be any need 70 to turn off this support the following commands are available they ob
66. ations CompileMatrices NoCompileMatrices 12 n general it is recommended that entries start with a non expanding token i e an ordinary non active character or relax for compilation to work Matrices can be compiled or not individually by us ing the explicit commands xymatrixcompile and xymatrixnocompile as well as by encapsulating in the usual xycompileto name see note 5e Note Matrices will only compile correctly if all entries start with a nonexpandable token i e or relax or some non active character 25 2 New coordinate formats It is possible within entries to refer to all the entries of the Xy matrix using the following special coord inate forms r c Position and extents of en try in row r column c top left is 1 1 Ar Ac Ar rows below Ac columns right of current entry hop J entry reached by hop s each hop is one of dulr describing one move to a neighbor entry place on straight line to non empty hop hop place So the current entry has the synonyms 0 0 01 r1 ud dudu etc as well as its absolute name r c These forms are useful for defining diagrams where the entries are related e g aS A l B was typeset by xy xymatrix A POS ad dir dr dir B amp C POS 1 dir endxy If an entry outside the Xy matrix is referenced then an error is
67. ault corresponds to r i e rows are oriented left to right 25 4 Entries The appearance of a single entry can be modified by entering it as object pos decor This makes the particular entry ignore the entry mod ifiers and typeset as a kernel object with the same reference point as the center of the default object would have had Additional object modifier s may be added to an otherwise ordinary entry by using the forms shape entry 50 modifier entry The first sets the default shape for objects cf note 4j the second a default size change cf note 4g and the last makes it possible to add any object modifier of 4 e g for recentering en tries after the default entry form which is equivalent to C lt 2 x objectmargin gt with the effect of cen tering the object and add the objectmargin to all sides Exercise 31 Typeset the following diagram A Ax B gt B se xa Aree BxA It is also possible to use these setup s as usual between xymatrix and the leading shape add op size which are equivalent to changing all entries to behave as if they had started with the similar form To Do Allow add op size entry for entries If the default set of entry modifiers should be changed then the following declaration must be issued before the xymatrix command this is the only way to actually switch the initial defaul
68. ax Le Re De U gt lt min L Re De Ue gt The defaults for the first three are set with the commands objectmargin add op dimen objectwidth add op dimen objectheight add op dimen where add op is interpreted in the same way as above The defaults for are such that the result ing object will be the smallest containing largest contained square Exercise 11 How are the objects typeset by the pos itions UR sum and DL sum enlarged Bug Currently changing the size of a circular object is buggy it is changed as if it is a rect angle and then the change to the R parameter affects the circle This should be fixed probably by a generalisation of the o shape to be ovals or ellipses with horizontal vertical axes 4h A hidden object will be typeset but hidden from 4i 4j 13 Xy pic in that it won t affect the size of the entire picture as discussed in 2 1 An invisible object will be treated completely normal except that it won t be typeset i e Xy pic will behave as if it was Setting the shape of an object forces the shape of its edge to be as indicated The kernel provides three shapes that change the edge namely and 0 corresponding to the outlines where the x denotes the point of the reference position in the object the first is a point Ex tensions can provide more shapes however all shapes set the exte
69. ay Alternatively when attempting to use drivers for which no explicit support has been provided some features may work others may not Please inform the authors of Xy pic of any successes or failures of such attempts The included file xyps ps tex version3 7 pro vides support for POSTSCRIPT special commands used by the ps backend extension as well as POST SCRIPT based options to produce special effects not available directly with T X 69 specials POSTSCRIPT escape An extra shape modifier key allows arbitrary POST SCRIPT code to be applied to the current object postscript code for special effects psxy stores current location Normally the postscript code will be a simple com mand to alter the POSTSCRIPT graphics state e g 1 0 O setrgbcolor changes the colour used to render parts of the object Any number of such shape modifiers is allowable however it is more ef ficient to combine them into a single modifier when ever possible It is very important that braces and do not appear explicitly in any postscript code as this may upset the Xy pic object parsing However it is ac ceptable to have a control sequence name here ex panding into more intricate POSTSCRIPT code This will not be expanded until a later safe time Due to differences within the DVI drivers such simple POSTSCRIPT commands need not affect every part of an object In particular the lines curves and arr
70. bjects can be spec ified as many times as desired Only the last specification of each type will actually have any effect This makes it easy to experiment with different styles 8d Complicated diagrams having several spline curves can take quite a long time to process and may use a lot of TRX s memory A convenient device especially while developing a picture is to show only the location of the control points or to join the control points with lines as a stylized approximation to the spline curve The curve option s p and 1 are provided for this purpose Uppercase versions P and L do the same thing but use any curve object s that may be speci fied whereas the lowercase versions use plain de faults small cross for p straight line for 1 Similarly C and c set the spline curve using any specified curve option s or as a default plain curve 8e Use of p 1 etc is extended to enable both the curve and the control points to be easily shown in the same picture Mixing upper and lower case specifies whether the curve option s are to be applied to the spline curve or the lines joining control points See the examples accompanying the next two notes 22 8f By default the control points are marked with a small cross specified by dir x The con nect object is ignored completely x B was typeset by xy 0 0 4A 50 10 B amp crv pC lt jot gt 10 10 amp 20 15
71. board extension Vers 3 5 by Kristoffer H Rose krisrose brics dk Load as xyoption movie This extension interprets the scene primitive of the movie class setting the progress indicators to dummy values The following assumes that your are familiar with the movie class The size of the frame is determined by the com mand MovieSetup width width height height the indicate the other arguments required by the movie class but silently ignored by the Xy pic movie extension Note This extension still experimental and sub ject to change The only documentation is in the movie cls source file 34 17 PostScript backend Vers 3 7 by Ross Moore ross mpce mq edu au Load as xyoption ps Xy ps is a back end which provides Xy pic with the ability to produce DVI files that use POSTSCRIPT specials for drawing rather than the Xy pic fonts In particular this makes it possible to print Xy pic DVI files on systems which do not have the ability to load the special fonts The penalty is that the generated DVI files will only function with one par ticular DVI driver program Hence whenever Xy ps is activated it will warn the user Xy pic Warning The produced DVI file is not portable It contains POSTSCRIPT specials for one particular driver A more complete discussion of the pros and cons of using this backend is included below 17 1 Choosing the DVI driver Including xyoption ps within
72. c 1 0 and v 1pc __ Decorations Decor ations are actual TEX macros that decorate the current picture in manners that depend on the state They are allowed after the pos ition either of the outer xy endxy or inside The possi bilities are given in figure 4 with notes below Most options add to the available decor in particular the v2 option loads many more since Xy pic versions prior to 2 7 provided most features as decor Notes 5a 5b 5c Saving and restoring allows excursions where lots of things are added to the picture without affecting the resulting Xy pic state i e c p and base and without requiring matching s The independence of is particularly useful in con junction with the afterPOS command for ex ample the definition def ToPOS save afterPOS y POS 7 gt 2 gt restore p will cause the code ToPOS pos to construct a double shafted arrow from the current object to the pos computed relative to it such that xy A ToPOS lt 10mm 2mm gt endxy will typeset the picture 4 7 Note Saving this way in fact uses the same state as the grouping so the code p p2 save restore will have c p both at the and at the end One very tempting kind of TEX commands to perform as decor is arithmetic operations on the Xy pic state This will work in simple Xy pictures as described here but be warned it is not portable b
73. cally whenever xyoption rotate is re quested and the current driver supports POST SCRIPT rotations Should there be any need to turn off this support the following commands are avail able they obey usual TEX groupings NoPSrotate remove POSTSCRIPT support UsePSrotate reinstate POSTSCRIPT Without POSTSCRIPT support diagrams can be expected to be displayed unrotated and unscaled These commands are provided primarily for testing and trouble shooting e g with driver configura tions untested by the authors of Xy pic who should be notified of persistent difficulties 33 5 Patterns and tiles The included file xyps t tex version 3 7 provides POSTSCRIPT support for the effects defined in the tile extension described in 14 This file is loaded and its effects are activated au tomatically whenever xyoption tile is requested and the current driver supports POSTSCRIPT pat terns Should there be any need to turn off this support the following commands are available they obey usual T X groupings NoPStiles remove POSTSCRIPT support UsePStiles reinstate POSTSCRIPT Without POSTSCRIPT support tile patterns can be expected to be displayed as solid black These com mands are provided primarily for testing and trouble shooting e g with driver configurations untested by the authors of Xy pic who should be notified of any difficulties 34 Extra features using TPIC drivers Similarly a few extensi
74. cells one curve UseCompositeMaps 2 arrows end to end UseAllTwocells all the above Alternatively 2 cells can be set directly in Xy pictures without using the matrix feature In this case the above commands are not needed This is described in 24 5 Furthermore a new directional dir gt can be used to place an Arrow anywhere in a picture after the direction has been established appropriately It is used with all of the 2 cell types Labels are placed labels on the upper and lower arrows more correctly anti clockwise and clock wise using and _ These are entirely optional with the following token or grouping giving the contents of the label When used with compositemap the and _ specify labels for the first and second arrows respectively 2 USE 7 Za we a p Oe f 7X Figure 15 Pasting diagram Normally the label is balanced text set in TRX s math mode with twocellstyle setting the style The default definition is given by def twocellstyle scriptstyle This can be altered using def in versions of TREX or redefine in TEX However labels are not re stricted to being simply text boxes Any effect ob tainable using the Xy pic kernel language can be set within an xybox and used as a label Alternatively if the first character in the label is then the label is set as an Xy pic object as if with drop lt object gt or lt object gt in the kernel langua
75. d be either lt dimen gt or empty 7 Xy pic options Note ATEX 2e users should also consult the para graph on xy sty in 1 1 Syntax Action cir radius cir cir cle segment with radius radius empty use Re as the radius vector use X of the vector as radius cir empty full circle of radius diag orient diag partial circle from first diag onal through to the second diag onal in the orient ation orient i anticlockwise clockwise Figure 6 cir cles 7 1 Loading Xy pic is provided with a growing number of options supporting specialised drawing tasks as well as exotic output devices with special graphic features These should all be loaded using this uniform interface in order to ensure that the Xy pic environment is prop erly set up while reading the option xyoption option xyrequire option xyoption will cause the loading of an Xy pic option file which can have one of several names These are tried in sequence xy option tex xy option doc xy short tex and xy short doc where short is option truncated to 6 six characters to conform with the TWG TDS 17 xyrequire is the same except it is ignored if an option with the same name is already present thus does not check the version etc Sometimes some declarations of an option or header file or whatever only makes sense after some particular other option is loaded In tha
76. d arrows 1ltou tord are defined as well these are now easy to do with turn s B 4 Obsolete loading The v2 User s Manual says that you can load Xy pic with the command input xypic and as a ATEX 2 09 style option xypic This is made synonymous with loading this option by the files xypic tex and xypic sty distributed with the v2 option xypic tex This file version 3 3 just loads the v2 feature xypic sty Loads xy sty and the v2 feature B 5 Compiling v2 diagrams In order to make it possible to use the new compila tion features even on documents written with Xy pic 77 v2 the following command was added in v2 12 diagramcompileto name enddiagram which is like the ordinary diagram command except the result is compiled see note 5e Note that com pilation is not quite safe in all cases There is also the following command that switches on automatic compilation of all diagrams created with the v2 diagram enddiagram command CompileAllDiagrams prefix NoCompileAllDiagrams ReCompileAllDiagrams will apply xycompileto prefix n to each di agram with n a sequence number starting from 1 Use CompileMatrices and CompilePrefix instead If for some reason a diagram does not work when compiled then replace the diagram command with diagramnocompile or in case you are using the TeX form begin diagramnocompile C Common Errors In this appendix we desc
77. d for an object the collection of style s can be assigned a name using word Then word becomes a new style suitable for use with the same or other objects s Use a single word built from ordi nary letters If word already had meaning the new definition will still be imposed but the following type of warning will be issued Xy pic Warning Redefining style word The latter warning will appear if the definition occurs within an xymatrix This is perfectly normal being a consequence of the way that the matrix code is handled Similarly the message may appear several times if the style definition is made within an ar The following illustrates how to avoid these mes sages by defining the style without typesetting anything setbox0 hbox xy drop ODrangeRed A endxy 14 4l 4m Note 1 The current colour is regarded as part of the style for this purpose Note 2 Such namings are global in scope They are intended to allow a consistent style to be eas ily maintained between various pictures and dia grams within the same document If the same style is intended for several object s occurring in succession the modifier can be used on the later object s This only works when precedes any other style modifiers it is local in scope recovering the last style s used at the same level of TeX grouping Setting the current direction is simply pretending for the typesettin
78. d to change FT into TF These are best used with single pieces as in the following equation ve Pele UseComputerModernTips knottips FT def Conway 1 mathord nabla Bigl raisedpt xybox 0 ripc 1 Bigr Conway htwist Conway htwistneg z Conway huntwist vx Joins The joins are used to connect the loose ends of crossing strings In particular loops and caps are for placing on ends of horizontal or vertical twist and cross crossings leaving the current pos fixed The bends join non adjacent cross ings of the same type either horizontal or verti cal The xcap pieces are designed to join adja cent xover pieces they move c either verti cally or horizontally as appropriate Finally the xbend pieces allow for smooth joins of 45 raw Voy Oc vloop vcap vcap vloop hloop hcap hcap hloop z x yz Zz Yy 2 Yy Y Yy z z x xcapv sbendv zbendv sbendh zbendh xcaph o o o o z or x o YR zy yo Z Y a TRS Ais ee y nO Ys vy x X X A xbendr xbend1 xbendu xbendd xbendd xbendu xbendl xbendr Figure 20 knot joins with orientations labels and shifts slopes to horizontal or vertical slopes For these piece value effect on the actual positioning of the piece see figure 20 cap 25 flatness of cap is not entirely obvious loop 75 flatness of loop Aj a ta Figure 20 displays the orientati
79. dge moves in the clockwise direction This will be the direction of the arrowhead unless it has been reversed using Labels on a compositemap are placed relative to the midpoint of the component arrows Nudges are in units of 1pt Movement is in the usual Xy pic Syntax Action twocell gt 2 cell oa Arrow gt tok switches gt switch gt what label nudge gt 2 cell switches Arrow twocell uppertwocell Llowertwocell compositemap tok text nudge text text tok object nudge object object elas Cpe pes switch switches empty label _ label nudge omit I what object empty e text nudge text object nudge object lt number gt lt omit gt typeset 2 cell with the switches and Arrow typeset two curved arrows typeset upper curved arrow only typeset lower curved arrow only use consecutive straight arrows specifies orientation and label adjust position use default orientation use default position and orientation use object as the label oriented anti clockwise equality no Arrow default is clockwise no Arrow tips on two curved arrows as anti clockwise double headed none list of optional modifications use defaults place label on the upper arrow place label on the low
80. dir dir dir gt dir oO 7 iS gre tame O O a Coe dir gt dir7 lt dir7 dir G dir dir dir dir gt gt air lt lt dir dir l dir gt gt dir tx Dummy dir Plain connectors pe dir2 o dir3 dir2 aS dir3 O dir2 7 ow dir3 7 dir2 7 arr dir3 dir2 pe dir3 Plain tips Peal dir_ gt 7 dir2 gt aw z dir lt Soe dir2 lt Ear MAIE pane Adron wA aa dir_ eet dir_ 2 fee dir_ use r 2 Ndir E ee Constructed tips d eee dir gt gt 7 dir2 gt gt no dir_ lt lt wo dir2 lt lt oe NM Nair 11 oe dir2 A X dir l ee dir2 l Y LA o dir l lt ee dir i lt lt ee e O o dir oet dir Figure 5 Kernel library dir ectionals 17 E W w ee mS os Kg BO OF OF dir3 gt dir3 lt dir3 dir3 gt gt dir3 lt lt 7 dir3 gaira tir eet dir dir o 6b The plain connectors group contains basic direc tionals that lend themself to simple connections By default Xy pic will typeset horizontal and ver tical dir connections using T X rules Un fortunately rules is the feature of the DVI format most commonly handled wrong by DVI drivers Therefore Xy pic provides the decor ations NoRules U
81. dir p frm U p p pt 5 5 dir 0 UL o 0 81 lt 8 1pt gt dir c frm L c o dir c ellipse a 50 _ 0 59 ellipse a 30 _ a 45 ellipse a 40 _ ellipse a 20 7 _ endxy Note that only the slope of dir and dir is significant rotations by 180 being immaterial xy 0 r5pc dir p UR p spt 5 5 dir 0 Lfo dir pt 5 5 dirf s c D c c spt 1 1 dir q L q dir o p e c t ellipse 0 p _ q c ellipse 0o p c q endxy The variant establishes the direction parsing to begin with the direction resulting from dir in stead of the original direction If dir is required to be the original direction then use 0 It cannot be empty since this is interpreted as requiring a circu lar arc with unspecified tangent at c see the example above However when dir and dir are parallel there is a whole family of possible ellipses with the specified tangents With no further hint available a choice is made based on the distance between p and c If the required direction is perpendicular to pc this choice results in a circular arc The optional factor in num is used to alter this choice the default 1 is assumed when nothing follows the This factor is used to stretch the ellipse along the specified di
82. e TX source code expecting the recipient to have Xy pic or send a com pressed POSTSCRIPT file The latter comment applies to files in which any spe cial back end support is required not just to POST SCRIPT Of course it can be ignored when you know the configuration available to the intended recipient POSTSCRIPT header file With some DVI drivers it is more efficient to have the POSTSCRIPT com mands that Xy ps needs loaded initially from a sepa rate header file To use this facility the following commands are available UsePSheader UsePSheader lt filename gt dumpPSdict lt filename gt xyPSdefaultdict Normally it is sufficient to invoke UsePSheader which invokes the default name of xy37dict pro re ferring to the current version of Xy pic The optional filename allows a different file to be used Plac ing dumpPSdict within the document preamble causes the dictionary to be written to the supplied filename See the documentation for the specific driver to establish where the dictionary file should be located on any particular T X system Usually it is suffi cient to have a copy in the current working directory Invoking the command dumpPSdict will place a copy of the requisite file having the default name in the current directory This file will be used as the dictionary for the current processing provided it is on the correct directory path so that the driver can l
83. e a macro that restores the current base The second does not depend on the state at the time of definition at all it is a macro definition 11 You can pass parameters to such a macro by let ting it use coordinates named 1 2 etc and then use 1 2 etc just before every use of it to set the actual values of these Note it is not possible to use a coord of the form id directly write it as id Exercise 9 Write a macro db1 to double the size of the current c object e g changing it from the dotted to the dashed outline in this figure The final form defines a special kind of macro that should only be used after the stack oper ation the entire current stack is saved such that the stack operation id will reload it Note There is no distinction between the name spaces of id s used for saved coordinates and other things 4 Objects Objects are the entities that are manipulated with the and pos operations above to actually get some output in Xy pictures As for pos itions the operations are interpreted strictly from left to right however the actual object is built before all the modifier s take effect The syntax of objects is given in figure 3 with references to the notes below Re mark It is never allowed to include braces inside modifier s In case you wish to do something that requires then check in this manual whether you can use instead
84. e break as described in notes 23a and 23d The special control sequence hole is provided to make it easy to make an empty break 23k Unless it is a full fledged object by using the form it is typeset using a labelbox ob ject initially similar to objectbox of basic Xy pic but using labelstyle for the style Remark You can only omit the s around sin gle letters digits and control sequences 231 A label is an object like any other in the Xy picture Inserting an alias id saves the label object as id for later reference Exercise 24 Typeset label 23 2 Arrows Arrows are paths with a particularly easy syntax for setting up arrows with tail stem and head in the style of 12 This is provided by a single decor ation the syntax of which is described in figure 14 with the added convention that a raised means 0 or more repetitions of the preceeding nonterminal Syntax Action ar arrow path make arrow along path arrow form form Q variant variant tip variant tip conn tip connchar direction dist direction direction control point list shape modifier lt dimen gt anchor it anchor it Q empty o tipchar din val HDI letter space connchar dir connchar gt _ anchor it varian
85. e or web like structure Currently the only routines implemented with this feature are some quick and dirty macros for drop ping objects at the points of an integer lattice To Do More sophisticated routines will be developed for later versions of Xy pic as the need arises Mathematically speaking let and be vectors pointing in independent directions within the plane Then the lattice spanned by w and v is the infinite set of points L given by L a bv fora b integers Within Xy pic the vectors t and v can be established as the current coordinate basis vectors The following macros typeset a finite subset of an abstract lattice xylattice 1 2 3 4 points in lattice croplattice 1 2 3 4 5 6 7 8 in specific rectangle The parameters 1 4 are to be integers amin Qmax Omin and Vmax so that the portion of the lat tice to be typeset is that collection of vectors in L for which Qmin lt Q lt Amax and bmin lt b lt bmax s2 A ore O O 6 O Q fo O o o O 9 fo o o e 3 9 3S oe S o 1 5 9 a 2 9 e O O ames A a Oo S le o O o O 0 O R fo o o O def latticebody ifnum latticeA 1 ifnum latticeB 1 else drop circ fi else drop circ fi xy xybox 0 lt 1 5pc 1mm gt lt imm 1 5pc gt 0 xylattice 4 4 3 3 1 1 a bullet lt 2pt gt UL a 1 1 a frm L L L ar L R L s
86. ecause all Xy pic execution is indi rect and this is used by several options in non trivial ways Check the T X nical documenta tion 15 for details about this Macros that expand to decor will always do the same though xyecho will turn on echoing of all interpreted Xy pic pos characters Bug Not completely implemented yet xyverbose will switch on a 15 5d 5e tracing of all Xy pic commands executed with line numbers xytracing traces even more the entire Xy pic state is printed after each modifica tion xyquiet restores default quiet operation Ignoring means that the pos decor is still parsed the usual way but nothing is typeset and the Xy pic state is not changed It is possible to save an intermediate form of com mands that generate parts of an Xy picture to a file such that subsequent typesetting of those parts is significantly faster this is called com piling The produced file contains code to check that the compiled code still corresponds to the same pos decor as well as efficient Xy code to redo it if the pos decor has changed then the compilation is redone There are two ways to use this The direct is to invent a name for each diagram and then embrace it in xycompileto name this dumps the compiled code into the file name xyc When many diagrams are compiled then it is easier to add xycompilef around the pos decor to be compiled This will assign fi
87. ecor The user can redefine this in fact the ar command described in 23 2 below is little more than a special PATHaction command and a clever defaulting mechanism 23b It is possible to include a number of de fault labels before the labels of the actual segment are interpreted using which labels The specified which deter mines for which segments the indicated labels should be prefixed as follows which applied to lt next segment only gt last segment only every segment when several apply to the same segment they are inserted in the sequence lt gt 38 23c O This is useful to draw connections with a center marker in particular with arrows e g the map sto example explained below can be changed into a breakto example typing xy 0 PATH x dir gt gt dir gt dir 7 10 1 1 20 2 2 30 0 3 endxy will typeset o i n 3 3 Note however that what goes into is labels and thus not a pos it is not an action in the sense explained above Specifying stuff will set the failure contin uation to stuff This will be inserted when the last segment is expected it can even replace it or add more segment s i e xy 0 PATH dir 20 2 2 30 0 3 10 1 1 endxy is equivalent to xy 0 PATH dir 7 10 1 1
88. ect be displayed in a particular colour It requires a suitable driver option to provide the necessary special commands to implement the effects Thus Using this extension will have no effect on the output unless used with a dvi driver that explicitly supports it Colours are specified as a shape modifier which gives the name of the colour requested It is applied to the whole of the current object whether this be text an Xy pic line curve or arrow tip or a compos ite object such as a matrix or the complete picture However some DVI drivers may not be able to sup port the colour in all of these cases colour name use named colour newxycolor name code define colour UseCrayolaColors load colour names If the DVI driver cannot support colour then a re quest for colour only produces a warning message in the log file After two such messages subsequent re quests are ignored completely Named colours and colour models New colour names are created with newxycolor taking two ar guments Firstly a name for the colour is given fol lowed by the code which will ultimately be passed to the output device in order to specify the colour If the current driver cannot support colour or grayscale shading then the new name will be recognised but ignored during typesetting For POSTSCRIPT devices the Xy ps POSTSCRIPT dictionary defines operators rgb cmyk and gray cor responding to the standard RGB
89. ed with any number of vertices by using the as described below The general form for xypolygon is xypolygon number prefix switches where the prefix and switches are optional Their uses will be described shortly A xypolygon establishes positions for the ver tices of a polygon At the same time various things may be typeset according to the specified switches An object may be dropped at each vertex spokes drawn to the centre and successive vertices may be connected as the polygon s sides Labels and breaks can be specified along the spokes and sides Each vertex is automatically named 1 2 number with O as centre When a prefix has been given names prefix O prefix number are used instead While the poly gon is being constructed the macro xypolynum ex pands to the number of sides while xypolynode expands to the number of each vertex spoke and side at the time it is processed This occurs in the following order verterl spokel vertex2 spoke2 sidel verter3 spoke3 side2 vertex n spoke n side n 1 side n where the final side joins the last vertex to the first The macro xypolyname holds the name of the polygon which is prefix if supplied In this case the value of xypolynum is also stored as prefix NUMSIDES accessible outside the polygon As stated above a polygon with up to 12 ver tices is oriented so as
90. emented specially by the back end For example using the POSTSCRIPT back end 45 will show the object rotated by 45 inside a box of the size of the unro tated object To Do Provide example of repeated named transformation Reflections Reflections can be specified by a com bination of rotation and a flip either hflip or vflip Shear transformations To Do Provide the structure to support these then implement it in POSTSCRIPT Example The diagram in figure 10 illustrates many of the effects described above as well as some addi tional ones defined by the color and rotate exten sions Exercise 22 to typeset 10 The actual code is given in the solution to the exercise Use it as a test of the capabilities of your DVI driver The labels should fit snugly inside the accompanying rectangles rotated and flipped appro priately Bug This figure also uses colours alters line thickness and includes some POSTSCRIPT drawing The colours may print as shades of gray with the line from A to B being thicker than normal The wider band sloping downwards may have different width and length according to the DVI driver used this depends on the coordinate system used by the driver when raw POSTSCRIPT code is included Suggest the code used by the author 30 13 Colour extension Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption color This extension provides the ability to request that any obj
91. er arrow set the curvature based on nudge value do not set the curved arrows place modmapobject midway along arrows use object in place specified by what set curves using the specified object use object with upper lower curve use object for arrow head tail set text displaced by nudge set object displaced by nudge use number in an appropriate way e g to position object or label along a fixed axis do not typeset the object label Figure 16 twocell s 45 above and below directions such that a positive nudge is always outside the triangle formed by the arrows and line pc The special nudge value lt omit gt typesets just the Arrow omitting the curved arrows entirely When used with labels the nudge value lt omit gt causes the following label to be ignored Exercise 29 Give code to typeset figure 15 Such code is relatively straight forward using nudg ing and omit to help position the arrows curves and Arrows It also uses an excursion as described below in the subsection Extra Options 3 24 4 Extra Options The following features are useful in non mathematical applications 1 no Arrow This is determined by special values for tok as the first or only character in the central label as in the above description of the standard switches gt arrowheads pointing clockwise arrowheads pointing anti clockwise arrow tips on both ends no tips at all The
92. ey usual T X groupings NoPSframes remove POSTSCRIPT support UsePSframes reinstate POSTSCRIPT Without POSTSCRIPT support ellipses may be shown as circles and all filled regions may be represented as black rectangles These commands are provided primarily for testing and trouble shooting e g with driver configurations untested by the authors of Xy pic who should be notified of any difficulties 33 3 Line styles The included file xyps 1 tex version 3 7 provides POSTSCRIPT support for the effects defined in the line extension described in 11 This file is loaded and its effects are activated au tomatically whenever xyoption line is requested and the current driver supports POSTSCRIPT line styles Should there be any need to turn off this support the following commands are available they obey usual TEX groupings NoPSlines remove POSTSCRIPT support UsePSlines reinstate POSTSCRIPT Without POSTSCRIPT support lines can be expected to be displayed in the default style having thickness of 4pt These commands are provided primarily for testing and trouble shooting e g with driver con figurations untested by the authors of Xy pic who should be notified of any difficulties 33 4 Rotations and scaling The included file xyps r tex version 3 7 provides POSTSCRIPT support for the effects defined in the rotate extension described in 12 This file is loaded and its effects are activated automati
93. fy connect object and maybe more poslist empty pos delim poslist list of positions for control points 7 delim poslist add the current stack to the control points delim amp allowable delimiter Figure 7 Syntax for curves Notes a saving of time and memory this is the default haviour 8a The drop object is set once then dropped penegas 8b many times at appropriately spaced places along the curve If directional the direction from p to cis used Default behaviour is to have tiny dots spaced sufficiently closely as to give the appear ance of a smooth curve Specifying a larger size for the drop object is a way of getting a dotted curve see the example in the next note The connect object is also dropped at each place along the curve However if non empty this object uses the tangent direction at each place This allows a directional object to be spec ified whose orientation will always match the tangent To adjust the spacing of such objects use an empty drop object of non zero size as shown here DA B x gt 7 gt s gt gt 7 gt 7 xy 0 0 A 50 10 B crv lt 4pt gt 10 10 amp 20 0 amp 40 15 x amp crv lt 8pt gt 5pt dir gt 10 20 amp 40 15 endxy When there is no connect object then the tan gent calculations are not carried out resulting in 8c The drop and connect o
94. g a sin gle strand must occur with increasing order of 64 301 parameter position On the crossed string this includes the automatic hole to create space for the other string Hence it is advisable to use just the and variants for small adjust ments and to keep these correctly ordered Adjustment of position along the strings can be achieved using a factor as in vover 1 gt Allowed syntax is sign num where sign is or to increment or decrement from the pre defined value Also allowable are or empty to set the parameter position to num which must lie between 0 and 1 to have any meaning Arrowheads can also be placed at either or both ends of of the strings forming a crossing This is governed by a pair of booleans initially FF It is changed for all subsequent strings in a diagram by knottips where the recognised values are FF FT TF and TT denoting tips T or not F at the start and end of each string To add arrowtips at the start of strings in a par ticular crossing append the 2 character combi nation lt similarly gt adds tips at the ends if not already requested The combinations and specify both TT and none FF respec tively These 2 character pairs can be mixed in with any specifications for labels and breaks etc Multiple pairs compound their effect in particu lar lt gt gives the same result as while lt is neede
95. g of the object and the follow ing modifier s that some connection set it the empty case just inherits the previous direction It is particularly easy to set diag onal directions u ul lu f ur ru l lt gt gt r dl 1d dr rd Alternatively v vector sets the direction as if the connection from 0 to the vector had been type set except that the origin is assumed zero such that directions v z y mean the natural thing i e is the direction of the connection from 0 0 to x y In case the direction is not as simple you can construct pos decor that sets up p and c such that pe has the desired direction Note that you must use the form if this is to appear in an object modifier Exercise 12 What effect is achieved by using modifier s v 1pc and v 1pc Once the initial direction is established as either the last one or an absolute one then the remain der of the direction is interpreted Adding a single or _ denotes the result of rotat ing the default direction a right angle in the pos itive and negative direction i e anti clockwise respectively Note Do not use but only __ to reverse the direction A trailing vector is like v vector but uses the direction to set up a standard square base 5 such that 0 1 and 0 1 mean the same as a 90 and a 90 and as and _ respectively Exercise 13 What effect is achieved by using modifier s v 1p
96. ge The current direc tion is tangential to the curved arrows Extra braces are needed to get a as the label as in or _ The position of a label normal to the tangential direction can also be altered by nudging see below Although it is possible to specify multiple labels only the last usage of each of and _ is actually set pre vious specifications being ignored Similarly a label for the central Arrow must be given after the other labels by enclosing it within braces An empty group gives an empty label this is necessary to avoid misinterpretation of subsequent tokens As above if the first character is then the label is set as an Xy pic object the current direction being along the Arrow 24 2 Standard Options The orientation of the central Arrow may be reversed turned into an equality or omitted altogether In each case a label may still be specified so in effect the Arrow may be replaced by anything at all These effects are specified by the first token in the central label which thus has the form tok label where tok may be one of Arrow points clockwise Arrow points anti clockwise no tip denotes equality no Arrow at all 44 When none of these occurs then the default of _ is assumed If the label itself starts with one of these characters then specify _ explicitly or enclose the la bel within a group See Extra Options 1 for more values of tok Also
97. grams Obsolete tips These objects all have dir names now Version 2 tip Replacement dir dir notip stop 76 astop dir7 bstop dir_ tip dir gt atip dir7 gt btip dir_ gt Tip dir2 gt aTip object lt 5pt gt 32 1 dir7 gt bTip object lt 5pt gt 32 1 dir_ gt Ttip dir3 gt ahook dir bhook dir_ aturn dir bturn dir_ The older commands pit apit and bpit are not provided Obsolete object constructions The following object construction macros are made obsolete by the enriched object format Version 2 object Replacement rotate factor tip object factor factor tip hole object squash tip object 0f tip grow tip object tip grow lt dimen gt tip object lt dimen gt 4 tip squarify text object text squarify lt dimen gt text objectt lt dimen gt text where rotation is done in a slightly different manner in version 3 7 it was never accurate in version 2 B 3 Obsolete extensions amp features Version 2 had commutative diagram functionality corresponding to the frames extension and parts of the matrix and arrow features These are therefore loaded and some extra definitions added to emulate commands that have disappeared Frames The version 2 frame commands are emulated us ing the frame extension as well as the dotframed da
98. he coordinate axes It is the last letter in the name which denotes whether the particular crossing is vertical or hor izontal On the other hand vover vunder etc stack vertically on top of a vcross vtwist etc similarly hover stacks at the left of hcross htwist etc xy 0 ripc vunder vtwist vtwist vunder endxy qquad qquad qquad xy 0 ripc 0 1 5 hover hcross hcross hover endxy KAIA 30b The above examples also show how to use to get the mirror image of a particular crossing Any numerical scale factor can be used by en closing it within e g 2 3 scaling a sin gle piece without affecting the rest of the pic ture The scale factor must occur before any la 63 bel or arrow tip specifiers see below Vertical crossings remain vertical under scalings the cur rent pos still moves by 1 coordinate unit in the down direction Similarly horizontal crossings remain horizontal The single character is a shorthand version for 1 effectively giving a half turn rotation in a rectangular basis 30c A knot piece need not be rectangular By spec ifying pos 1 pos2 poss pos4 the four corners UL UR DL DR are set to the given pos s respec tively The local basis is established so that r hop 3 posz posi poss poss whop 1 pos1 poss posz pos 30d With a non rectangularly shaped piece it will usually be necessary to adjust
99. he following command can be used to cus tomise this limit initially set at 300 for use with XDVI to suit alternative driver s maxTPICpoints num set maximum for paths Of the curves defined in the xycurve extension only solid spline curves are supported This is done by treating the spline as a polygon poly line with many segments The dotted or dashed variants do not work correctly Implementations of TPIC draw dashed polygons such that the start and finish of each segment is solid Since these segments can be very short the effect is simply to create a solid line Similarly the shortness of the segments tends to give nothing at all for large portions of a dotted curve What is needed is an im plementation whereby the on off nature of a dashed or dotted polygon is determined by the accumulated length not the length along just the current segment 19 em TeX backend Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption femtex Eberhard Matte s em T X implementation provides a suite of special commands to facilitate the draw ing of lines both on screen and with various printing devices This back end extension allows the lines in Xy pic diagrams to be drawn using these methods Note that this extension does not have to be used with em T X Better results may be obtained using the POSTSCRIPT back end and DVIPS driver since a version of DVIPS is available for em T X How ever in partic
100. ion for the frames around each cell 26 Graph feature Vers 3 7 by Kristoffer H Rose krisrose brics dk Load as xyoption graph This option implements Xy graph a special combi natoric drawing language suitable for diagrams like flow charts directed graphs and various forms of trees The base of the language is reminiscent of the 13In fact IATFX users can use a graph environment 51 PIC 5 language because it uses a notion of the cur rent location and is based on moves But the central construction is a map combinator that is borrowed from functional programming Xy graph makes use of facilities of the arrow fea ture option of 23 which is therefore required Figure 17 summarises the syntax of a graph with notes below A graph can appear either in an Xy picture as decor or stand alone Note If you use xygraph inside constructions where amp is significant like plain T X s halign or IATRX s array environment then make sure to add an extra level of braces around it Notes 26a A move is to establish a new current node 26b To draw something is simply to draw a line or the specified arrow from the current node to the specified target node The target then becomes the current node All the features of arrows as described in 23 can be used in particular ar rows can be labelled and segmented but with the change that path pos means node as ex
101. ional object All have the structure dir variant main 16 with variant being empty or one of the characters _23 and main some mnemonic code We will classify the directionals primarily in tended for building connections as connectors and those primarily intended for placement at connection ends or as markers as tips Figure 5 shows all the dir ectionals defined by the kernel with notes below each main type has a line showing the available variant s Notice that only some variants exist for each dir when a nonexist ing variant of a dir is requested then the empty variant is used silently Each is shown in either of the two forms available in each direction as applicable connecting a O to ad typeset by dir dir and as a tip at the end of a dotted connection of the same variant i e typeset by the pos dir variant gt dir dir As a special case an entire object is allowed as a dir by starting it with a dir is equivalent to object Notes 6a You may use dir for a dummy directional object in fact this is used automatically by This is useful for a uniform treatment of connections e g making the pos able to find a point on the straight line from p to c without actually typesetting anything dir dir dir dir dir dir gt dir lt dir dir dir dir gt gt dir lt lt
102. ith as many copies as will fit between the objects gag The ways the various objects connect are described along with the objects 2 4 Decorations When the xy command reaches something that can not be interpreted as a continuation of the position being read then it is expected to be a decoration i e in a restricted set of TEX commands which add to pictures Most such commands are provided by the various user options cf 7 only a few are pro vided within the kernel to facilitate programming of such options and user macros as described in 5 2 5 The Xy pic state Finally we summarise the user accessible parts of the Xy picture state of two positions together with the last object associated with each the previous p is the position lt X Y gt with the object Ly Rp Dp Up Edgep and the current c is the position lt Xe Y gt with the object Le Re De Uc Fdgec Furthermore Xy pic has a configurable carte sian coordinate system described by an origin position lt Xorigin Yorigin gt and two base vectors lt X rbase gt Yrbase and lt Xybase gt Yybase gt accessed by the usual notation using parentheses x y lt X origin FTX X xbase yx Xybase Yorigin x Yrbase am y x Yybase gt This is explained in full when we show how to set the base in note 3d of 83 Finally typesetting a connection will setup a placement state for referring to positions on the connection that is accessed
103. ize 8 vector size as sides of rectangle covering the vector direction diag diag onal direction v vector direction of vector q pos decor direction from p to c after pos decor direction vector vector relative to direction 4 direction _ direction 90 clockwise anticlockwise to direction 4 diag empty last used direction not necessarily diagonal ljr dlu left right down up diagonal4 ld rd 1u ru left down diagonal composite gt object first object is required composite object add object to composite object box4 Figure 3 object s 12 Ab Ac Ad 4e 4f 4g An object built from a T X box with dimen sions w x h d will have Le Re w 2 U De h d 2 thus initially be equipped with the adjustment C see note 4f In partic ular in order to get the reference point on the center of the base line of the original TEX box then you should use the modifier to get the reference point identical to the T X reference point use the modifier L TeXnical remark Any macro that expands to something that starts with a box may be used as a TEX box here Takes an object and constructs it building a box it is then processed according to the preceeding modifiers This form makes it possible to use any object as a T X box even outside of Xy pictures because a finished object is always al
104. l point lists where they should be separated by See the curve extension described in 88 for the way the control points are used when the control points list is parsed p is the source and c the target of the arrow 23r and formations define what ob ject modifier s should be used when building ob jects that are part of the arrow This is mostly useful in conjunction with extensions that define additional shape modifiers e g if a red modifier changes the colour of an object to red then red will make the entire arrow red sim ilarly if it is desired to make and entire arrow invisible then i can be used 23s lt D gt will slide each segment of the arrow the dimension D as explained in note 23h 23t reverse the meaning of above and below for this particular arrow All the features of path s described above are available for arrows 24 Two cell feature Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption 2cell This feature is designed to facilitate the typesetting of curved arrows either singly or in pairs together with labels on each part and between The intended mathematical usage is for typesetting categorical 2 cell morphisms and pasting diagrams for which special features are provided These features also al low attractive non mathematical effects 24 1 Typesetting 2 cells in Diagrams Categorical 2 cell morphisms are used in
105. l types gz i Ze is a little different to what might be expected from Tt ee that for xto xline etc For example pulsed emission xtwocell1 hop displace connects to the pos displaced by displace from the 24 5 2 cells in general Xy pictures relative cell location specified by hop The displace ment can be any string of valid Xy pic commands but they must be enclosed within a group When the cell location is the target a null grouping must Two cells can also be set directly within any Xy picture without the matrix feature using either drop or connect be given def myPOS 1 POS def goVia 1 When used with the lt omit gt nudge such excur afterPO0S connect 1 myPOS sions allow a labelled Arrow to be placed anywhere xy within an Xy pic diagram furthermore the Arrow can A A lt 1cm 1 5cm gt B B be oriented to point in any direction lt 2 0cm Opt gt C C t lt icm 1 5cm gt D D A goVia uppertwocell alpha B 4 F ACY CHIVES goVia twocell zeta_ xi gamma C By specifying curveobject an arbitrary object goVia compositemap D may be used to construct the curved arrows In A goVia lowertwocell D deed with a twocell different objects can be endxy 47 Pa aS cu Zz A D The code shown is a compact way to place a chain of 2 cells within a picture It illustrates a standard technique for using af
106. le names numbered consecutively with a prefix which is initially the expansion of jobname but may be set with CompilePrefix prefix This has the disadvantage however that if addi tional compiled Xy pictures are inserted then all subsequent pictures will have to be recompiled One particular situation is provided though when used within constructions that typeset their contents more than once such as most AMS ATEX equation constructs then the declaration CompileFixPoint id can be used inside the environment to fix the counter to have the same value at every passage Finally when many administrative typesetting runs are needed e g readjusting TEX cross references and such then it may be an advan tage to not typeset any Xy pictures at all during the intermediate runs This is supported by the following declarations which for each compilation creates a special file with the extension xyd con taining just the size of the picture MakeOutlines OnlyOutlines ShowOutlines Syntax Action decor command decor empty command gt save pos restore POS pos afterPOS decor pos drop object connect object relax TEX commands xyignore pos decor xycompile pos decor either there is a command or there isn t save state then do pos restore state saved by matcing save interpret pos inte
107. le segments are subsets of this and have the shape that the full circle outlines Partial circle segments with orient ation are the part of the full circle that starts with a tangent vec tor in the direction of the first diag onal see note 41 and ends with a tangent vector in the direction of the other diag onal after a clockwise for _ or anticlock wise for turn e g typesets xy cir lt 4pt gt l r endxy typesets xy cir lt 4pt gt 1_r endxy a xy cir lt 4pt gt dl u endxy 7 hee xy cir lt 4pt gt dl_u endxy a gt xy M cir dr_ur endxy My If the same diag is given twice then nothing is type set e g a xy cir lt 4pt gt u u endxy typesets Special care is taken to setup the diag onal defaults e After the default is the diagonal 90 anticlock wise from the one before the e After _ the default is the diagonal 90 clockwise from the one before the _ The diag before or _ is required for cir objects Exercise 15 with radius 5pt Typeset the following shaded circle O 6 3 Text Text in pictures is supported through the object construction txt width style text that builds an object containing text typeset to width using style in text can be used as an explicit line break all lines will be centered style should either be a font command or some other stuff to do for each line of the text and width shoul
108. lls using POSTSCRIPT patterns and tiles using POSTSCRIPT TPIC drawing commands e em TRX drawing commands 32 3 DVITOPS driver Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption dvitops This file provides support for the DvITOPS driver by James Clark As of September 1995 it has not been fully tested Supported special effects are e colour using direct color specials for gray rgb and hsb colour models and PostScript colour within diagrams e crayon colours e PostScript back end e rotated scaled diagrams and text using DVITOPS specials however these may not be nested e variable line widths and poly lines using Post SCRIPT e extra frames and fills using POSTSCRIPT e patterns and tiles using POSTSCRIPT e TPIC drawing commands 32 4 OzTeX driver Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoptionfoztex This driver provides the necessary interface to sup port the PostScript back end and other Post Script effects when using the DVI driver of versions 1 8 of OZIFX by Andrew Trevorrow gt Earlier ver sions of OzTX should instead use the driver option xyoption 17oztex Effects such as colour line thickness and rotated or scaled diagrams are only partially supported in that the effects cannot be applied to any text or sym bols placed using fonts This is due to the nature of OZI X driver whose optimization of the place ment of font characters precludes
109. lower right corner the second typesets a above the 0 point and does not change c With a at 0 they look like this and 4 Answer to exercise 11 p 13 They have the outlines E ad E because the first is enlarged by the positive offset to the upper right corner and the second by the negative offset to the lower left corner Answer to exercise 12 p 14 The first has no effect since the direction is set to be that of a vector in the current direction however the second reverses the current direction Answer to exercise 13 p 15 None in both cases Answer to exercise 14 p 18 One way is xy pt 6 3 1 5pt dir dir 5pt dir endxy Thus we first create the two s as p and c and connect them with the dummy connection to setup the direction parameters Then we move on top of with 1 and position the four sides of the square using and _ for local direction changes and dimen for skewing the resulting object by moving its reference point in the opposite direction Answer to exercise 15 p 18 One way is to add extra half circles skewed such that they create the il lusion of a shade xy cir lt 5pt gt lt 2pt 2pt gt cir lt 5pt gt dr7ul lt 4pt 4pt gt cir lt 5pt gt dr7ul lt 6pt 6pt gt cir lt 5pt gt dr7ul endxy Answer to exercise 16 p 21 This is the code that was actually used xy
110. ls require all the braces e g gt and gt 2 After all switches have been processed remaining tokens are used to specify the object for each ver tex Such tokens will be used directly after a drop so can include object modifier s as in figure 3 If an object has already been specified using the switch then the following message will be written to the TEX log Xy pic Warning vertex already specified discarding unused tokens with tokens at the end indicating what remains un processed Similarly extra tokens before the generate a message Xy pic Warning discarding unused tokens Nested Polygons When xypolygon is specified within either a lt gt or gt gt switch for another polygon then the inner polygon inherits a name which in corporates also the number of the part on which it occurs as given by xypolynode This name is ac cessed using xypolyname In the following example the inner polygon is placed using lt gt in order to eas ily adjust its orientation to the outward direction of the spokes 2 2 1 3 X X 6B eee 1 2 Ye aes gt 4 ivi 3 1 4 4 Ti 3 2 ae 4 3 gt RE 3 3 4 2 xypolygon4 r5pc lt gt frm lt 8pt gt o xypolygon4 2pc xypolyname xypolynode o lt 5pc gt xypolynode Notice how nested polygons inherit names 1 1 1 2 4 1 4 4 for their vertices If a prefix is supplied at the outerm
111. lt radius gt dir 1 orient dir o where radius is one of the forms used above to de scribe a circle or ellipse Not all of the ellipse will be typeset only that arc starting with dir as tangent vector tracing via orient until the tangent points in direction dir 2 This effectively extends the notation used with cir in 6 2 Note that rotating a given dir by 180 specifies a different arc on the same ellipse circle Reversing the orient no longer gives the complementary arc but this complement rotated 180 xy 0 r5pc dir p DR p p 5 5 dir c UL c dir c ellipse lt 15pt gt _ a 45 ellipse lt gt __ a 30 ellipse 1 4 ellipse 1 4 _ a 120 ellipse 75 ellipse 75 _ 7 endxy 30 Knots and Links feature Vers 3 4 by Ross Moore ross mpce mq edu au Load as xyoption knot This feature provides a language for specifying knots links and general arrangements of crossing strings This knot feature is really a construction kit providing pieces which may be placed appropriately to form knots and links The types of pieces pro vided are of two kinds the crossings representing one string crossing over or under another and joins which are used to connect what would otherwise be loose ends Several types of each are provided along with a simple way of specifying where to place arrow he
112. ltdict 36 xyquiet 15 16 xyrecat tex 4 xyReloadDrivers 20 81 xyrequire 19 xyShowDrivers 20 xytracing 15 16 xyverbose 15 16 xyversion 5 xywithoption 19 Y 6 y 8 9 Yorigins 6 Yrbase 7 Yybase 7 Yo 6 Yp 6 Yax 6 Yin 6 Yc 76 Ymax 76 Ymin 76 Yorigin 76 Yp 76 Yxbase 76 Yybase 76 zero position 6
113. n 2 to stuff add labels prefix for some segments23 gt set failure continuation to stuff make straight segment234 make turning segment 23 make last segment 8 1 4 turn22 starting in diag explicit turn23f use default turn radius set turnradius to dimen segment2 with slide and labels optional slide23h label with it 3 above anchor label with it 34 below anchor break with it 3 at anchor no more labels dimen in the above direction label break placed relative to the place where is a synonym for lt gt 5 it is a default label23 it is an object it is a dir ectional use shape for it optional name for label object22 Figure 13 path s 2 Then the and lt segment actions are ex panded in that sequence and the lt action is cleared The resulting p and c become the start and end object of the segment 3 Then all labels starting with the ones de fined as described in note 23b below 23e A segment is a part of a path between a previ ous and a new target given as a path pos nor mally this is just a pos as described in 3 but it can be changed to something else by changing the control sequence PATHafterPOS to be some thing other than afterPOS 23f A turning segment is one that does not go all the way to the given pos but only as far as re quired to make a turn towards it The c is set to the actual turn object after a
114. n either the line is tangential or necessarily there will also be at least one other intersection A message perhaps no curve intersection or many is written to the log file but a search for an inter section will still be performed and a sensible place found on the curve In the usual case of a single quadratic or cubic segment the place nearest the line is found and the tangent direction is established The following examples show this and show how to get the place on the line nearest to the curve B B A A C C xy A A p r5pc 0 15 B B p lt 5pc 2pc gt C C A lt 6pc 5pc gt D D A ar _25pt B C D 0 dir x E _2pc F E x C D otimes endxy qquad xy A A p r5pc 0 15 B B p lt 5pc 2pc gt C C A lt 7pc 5pc gt D D A ar _40pt B C D x otimes endxy Sometimes TEX will run short of memory when many curves are used without a backend with special sup port for curves In that case the following commands that obey normal TeX groupings may be helpful SloppyCurves splinetolerance dimen allow adjustment of the tolerance used to typeset curves The first sets tolerance to 8pt after which splinetolerance Opt resets to the original de fault of fine curves 8 2 Circles and Ellipses Here we describe the means to a specify circles of arbi trary radi
115. nd all options should be uniquely identifiable by the first 6 six characters only name Descriptive name for the option version Identification of the version of the option author The name s of the author s email The electronic mail address es of the au thor s or the affiliation if no email is available address The postal address es of the author s This information is used not only to print a nice ban ner but also to 1 silently skip loading if the same version was preloaded and 2 print an error message if a different version was preloaded The dummy option described in 22 is a minimal option using the above features It uses the special DOCMODE format to include its own documentation for this document like all official Xy pic options but this is not a requirement 7 3 Driver options The driver options described in part IV require spe cial attention because each driver can support several extension options and it is sometimes desirable to change driver or even mix the support provided by several A driver option is loaded as other options with xyoption driver or through TFX 2e class or package options as described in 1 1 The special thing about a driver is that loading it simply de clares the name of it establishes what extensions it will support and selects it temporarily Thus the special capabilities of the driver will only be exploited in the produced DVI file if s
116. ndxy Next a hexagonal pyramid a rectangular box and an octahedral crystal specified as a triangular anti prism Notice how the switch is used to create non square bases allowing the illusion of 3D perspective in the resulting diagrams xy r2pc A 2 1 5 B A xypolygon6 1 1 0 33 lt gt B endxy quad xy r2pc xypolygon4 A 0 7 7 1 1 xypolygon4 B 8 0 0 75 AL Bi e F AQ BQ OL A3 B3 x A4 B4 endxy quad xy r2pc xypolygon3 A 0 7 7 1 1 xypolygon3 B 85 0 15 8 AL PATH7 B2 A3 B1 gt A2 BQ AL endxy Vertex object Unless the first character is sig nifying a switch then the whole of the braced ma terial is taken as specifying the object for each ver tex It will be typeset with a circular edge using drop o except when there is just a single token tok In this case it is dropped as drop 0 tok having zero size An object can also be dropped at each vertex using the switch in which case it will be circular with the current objectmargin ap plied The next example illustrates three different ways of specifying a circ at the vertices O xy r2pc xypolygon12 circ r5pc xypolygon10 lt gt circ r5pc xypolygon8 circ lt endxy S
117. note that has a special role when used as the first character however it is considered to be part of the label see above 24 3 Nudging Positions of all labels may be adjusted as can the amount of curvature for the curved arrows The way this is done is by specifying a nudge factor num at the beginning of the label Here num is a num ber which specifies the actual position of the label in units of xydash1 the length of a single dash nor mally 5pt except with compositemap see below Movement is constrained to the perpendicular bisec tor of the line cp When nudging the label for the central Arrow it is the whole Arrow which is moved along with its label Curvature of the arrows themselves is altered by a nudge of the form twocell num The sep aration of the arrows along the bisector is set to be num xydashl When num is zero that is twocell lt 0 gt the result is a single straight ar row its mid point being the origin for nudging labels A negative value for num is also acceptable but check the orientation on the Arrow and which of and _ correspond to which component The origin for nudging labels is where the arrow crosses the bisector Positive nudges move the label outwards while negative nudges move towards pe and possibly beyond The default position of a label is on the outside with edge at the origin The origin for nudging the Arrow is at the mid point of pe A positive nu
118. ns of the action associated with each rule here should be read is copied from Integration with standard formats This is han dled by the xyidioms tex file and the integration as a ATRX 9 package by xy sty xyidioms tex This included file provides some common idioms whose definition depends on the used format such that Xy pic can use predefined dimen sion registers etc and yet still be independent of the format under which it is used The current version 3 4 handles plain TX version 2 and 3 6 AMS TeX version 2 0 and 2 1 16 TeX version 2 09 8 and 2e 9 AMS ETFX version 1 0 1 1 2 and 1 2 and eplain version 2 6 3 xy sty If you use TeX then this file makes it possible to load Xy pic as a package using the IATEX 2e 9 usepackage command usepackage option xy where the option s will be interpreted as if passed to xyoption cf 87 The only exceptions to this are the options hav ing the same names as those driver package options of part IV which appear in cf 4 table 11 2 p 317 or the ATEX 2c graphics bundle These will auto matically invoke any backend extension required to best emulate the ATRX2 behaviour This means that e g dvips and textures can be used as options to the documentclass command with the normal effect The file also works as a IAT X 2 09 8 style op tion although you will then have to load options with
119. nt dimensions L R D and U The default shape for objects is and for plain coordinates it is Ak Furthermore the shape s r 1 u and d are defined for convenience to adjust the object to the indicated side by setting the reference point such that the reference point is the same dis tance from the opposite of the indicated edge and the two neighbour edges but never closer to the indicated side than the opposite edge e g the object r hbox Wide text has refer ence point at the x in Wide text but the object d hbox Wide text has reference point at the x in Wid amp text Finally c puts the reference point at the center Note Extensions can add new shape object modifier s which are then called style s These will always be either of the form keyword or character argument Some of these style s do other things than set the edge of the object While typesetting an object some of the prop erties are considered part of the current object style Initially this means nothing but some of the style s defined by extensions have this sta tus e g colours red blue say using the xycolor extension or varying the width of lines using xyline Such styles are processed left to right for example red green NEW blue A will typeset a blue A and define NEW to set the colour to green all provided that xycolor has been loaded of course Saving styles Once specifie
120. nts are preserved and overall re IP3 c 2 5 0 7 gt flection or rotation symmetry is preserved Thus I vover b2 bi at a3 this parameter affects the flatness of a cap or 1 b4 p2 crv c1 F loop or the amount of curvature is s bends and I vover b5 b4 H a2 H a1 z bends For xcap s and xbend s the 45 1 b7 b5 crv c2 angle is altered this is especially useful to match I vover b8 b7 H a3 H a2 the tangents when a knot piece has been specified 1 b1 b8 x crv c3 using the technique of note 30c y The normal range for these parameters is be def TrefoilB xygraph 0 r 75pc tween 0 and 1 Other values can be used with in IP3 a gt PO b 1 3288 0 gt teresting results the parameter determines the IP3 c 2 5 0 gt F location of control points for a B zier cubic curve vover b2 bi at F a3 F 65 vcap7 c1 ci b4 b2 F 1 vover b5 F b4 F a2 at vcap7 c2 c2 b7 b5 F 2 vover b8 b7 F a3 a2 vcap c3 F c3 F bi F b8 FFFF def TrefoilC xygraph 0 r 75pc 1P3 a gt I1P1Q b 1 414 0 7 gt vover b2 b1i F ai a3 save 0 b2 b5 b5 xcaph 1 restore vover b6 b5 F a2 at save 0 b6 b9 b9 xcaph 2 restore vover b10 b9 F a3 F a2 save 0 b10 bi bi
121. ocate it when needed Consult your local system administrator if you experience difficulties l0UNIx is a trademark of Bell Labs 36 18 TPIC backend Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption tpic This option allows the Xy pic fonts to be replaced by TPIC specials when used with a dvi driver capa ble of supporting them Extra capabilities include smoother lines evenly spaced dotted dashed curves variable line widths gray scale fills of circles ellipses and polygonal regions Use of TPIC specials offers an alternative to the Xy pic fonts However they require a dvi driver that is capable of recognizing and interpreting them One such viewer is xdvik Karl Berry s modification to the xdvi viewer on UNIX systems running X windows or a derivative dvipsk Karl Berry s mod ification to dvips also handles TPIC specials so xdvik dvipsk is an good combination for quality screen display and POSTSCRIPT printing Once loaded using xyoption tpic with an ap propriate driver also specified either already or sub sequently the following commands are available to turn the TPIC backend off on NoTPICspecials turns off TPIC specials UseTPICspecials reinstates TPIC specials There is a limit to the number of points allowable in a path For paths constructed by Xy pic which includes spline curves when the limit is reached the path is automatically flushed and a new path com menced T
122. ome of these extensions are also loaded and if the driver is still selected when output is produced Generally the order in which the options are loaded is immaterial Known exceptions affect only internal processing and are not visible to the user in terms of language and expected output In particular one driver can be preloaded in a format and a different one used for a particular document The following declarations control this UseSingleDriver forces one driver only MultipleDrivers allows multiple drivers xyReloadDrivers resets driver information The first command restores the default behaviour that ony one driver is allowed i e each loading of a driver option cancels the previous The sec ond allows consecutive loading of drivers such that when loading a driver only the extensions actually supported are selected leaving other extensions sup ported by previously selected drivers untouched Be ware that this can be used to create DVI files that cannot be processed by any actual DVI driver pro gram The last command is sometimes required to reset the Xy pic driver information to a sane state for example after having applied one of the other two in the middle of a document or when using simple formats like plain TeX that do not have a clearly dis tinguished preamble As the above suggests it sometimes makes sense to load driver s in the actual textual part of a doc ument however it is recommended
123. on for a single 2 cell fer markedly This also works with compositemap or curved part where an indicator is placed on each arrow The ac Objects used to construct curves can be of two tual object can be changed using modmapobject types Either a single object is set once with copies placed along the curve Alternatively a directional object can be aligned with the tangent along the curve In this case use a specification takes the form Any of the standard Xy pic tips may be used for arrow heads This is done using for example dir gt gt gives double headed arrows Similarly lt can be used to place an arrow tail Normally curveobject spacer object the arrow tail is so is not placed but if a non empty Here spacer may be any object of non zero size tail has been specified then it will be placed using Typically it is empty space e g dimen drop No guarantee is offered for the desired result being obtained when an arrow tail is mixed with the i Exercise 30 Give code to typeset the following di features of Extra Options 1 agrams M ieee ee 759 Pra a S ae Pg FUn amp gaMES O 200000099 modmapobject objectbox otimes xymatrixcolsep 5pc diagram P rtwocell dir gt gt dir lt 1 5 gt M _ lt 1 5 gt M f amp S enddiagram continuous power OTT ae ane 3 Excursions Ground Excited State State Syntax for xcompositemap and x twocel
124. on on the joins sbend 75 curvature aB the Ba ea ot zbend 75 curvature in the z Also indicated are default positions for labels and 5 aorta i A arrow tips each piece uses the same code e g ra i CIEN OLLAD SOPE ADAS xbend 5 curvature slope at base vloop lt gt gt gt gt lt x y gt z Furthermore the current pos before the piece is drawn is marked using that afterwards is indicated by or The following example gives three ways of spec ifying a trefoil knot using the poly feature to es tablish the location of the vertices for knot pieces In each the crossing s are calculated to fit together smoothly a different way of creating join s is used 30m The three places referred to by lt gt are all on in Gach Also the third displays subtle changes of the a single string In particular is always at the join control middle of the join whereas lt and gt are at ear lier and later porai values respectively Any adjustments involving breaks should occur in increasing parameter order D 30n A parameter can be altered using adjust to effect subtle adjustments to the shape of any def TrefoilA xygraph 0 r 75pc The ability to scale in size and place arrow tips breaks labels etc apply also to join pieces The only difference is join Within a rectangular basis the horizontal I1P3 a gt P9 b 1 3288 0 7 gt or vertical tange
125. ons are supported better when special commands in the TPIC format are sup ported 34 1 frames The included file xytp f tex version 3 3 pro vides TPIC support for some of the effects de fined in the frame extension This file is loaded and its effects are activated automatically when ever xyoption frame is requested and the current driver supports both TPIc and frames Should there be any need to turn off this support the following commands are available they obey usual TFX group ings NoTPICframes remove TPIC support UseTPICframes reinstate TPIC Appendices A Answers to all exercises Answer to exercise 1 p 7 In the default setup they are all denote the reference point of the Xy picture but the cartesian coordinate pos 0 0 de notes the point origo that may be changed to some thing else using the operator 71 Answer to exercise 2 p 7 lt X Y gt ob Use the pos ition Answer to exercise 3 p 7 It first sets c accord ing to Then it changes c to the point right of c at the same distance from the right edge of c as its width w i e The x S aS w w Answer to exercise 4 p 9 The coord A B C D x returns the cross point Here is how the author typeset the diagram in the exercise xy set up and mark A B C and D 0 0 A cir lt 1pt gt DR A 7 10 B cir lt 1pt gt DR B 13 8 C cir lt 1pt gt DL C
126. oon the curve begins to bend away from the tangent direction Smaller values give tighter curves 0 for straight lines with c be ing the same as c 1 and q is c 66667 that is num 2 The curve produced by the interpolating vari ant i actually passes through the control point x with slope parallel to the line pe Since the tan gents at p and c point toward x the curvature is quite gentle until near x where the curve bends rapidly yet smoothly This is obtained also by using c 1 33333 that is num Since lt num gt gt 1 the convex hull property does not hold indeed the curve is entirely outside the convex hull of p c and x apart from those points themselves The cuspidal variant p is equivalent to c 2 It exhibits a cusp For lt num gt gt 2 the curve is so loose that it exhibits loops The author offers no guarantees on the usefulness of such curves for any particular purpose however they do look nice 14Indeed this is always so The algorithm used for the general case tends toward parallel lines clearly unsuitable 60 xy 0 r6pc dir p UR p p pt 5 5 dir c UL c p t 825 25 x dir t c xycompile ellipse x xycompile ellipse q x xycompile ellipse c x xycompile ellipse c 3 x xycompile ellipse c 2 3 x xycompile ellipse i x xycompile
127. oore ross mpce mq edu au 1999 02 16 the diagram was typeset using the matrix features by the Xy pic input lines xymatrix U ar _ ddr _y ar dr ar drr x amp X times_Z Y ar d q ar r _p amp X ar d _f amp Y ar r g amp Z Features exist for many kinds of input here is a knot typeset using the knots and links feature OD The current implementation is programmed entirely within standard TeX and METAFONT i e using TEX macros no specials and with fonts designed using METAFONT Optionally special drivers make it possi ble to produce DVI files with specials for extra graphics capabilities e g using POSTSCRIPT x BRICS Computer Science Aarhus University bld 540 Ny Munkegade DK 8000 Aarhus C Denmark MPCE Mathematics dept Macquarie University North Ryde Sydney Australia NSW 2109 1 POSTSCRIPT is a registered Trademark of Adobe Inc 1 Contents I The Kernel 1 The Xy pic implementation 1 1 Loading Xy pic 1 2 Logo version and messages Led BONES warara 40 bee ee 1 4 Allocations 2 Picture basics 2 1 Positions 2 2 Objects 2 3 Connections 2 2 4 Decorations 2 5 The Xy pic state 3 Positions 4 Objects 5 Decorations 6 Kernel object library 6 1 Directionals 6 2 Circle segments 6 3 Texte ee ee ee ee 7 Xy pic options Al Loading oaea a a G8 a 7 2 Option file format
128. oore ross mpce mq edu au Load as xyoption xdvi This driver provides support for extensions when us ing variants of the xdvi driver by Eric Cooper Bob Scheifler Mark Eichin and others It has been used successfully with xdvi patchlevel 20 by Paul Vojta and xdvik version 18f by Karl Berry Some of the supported features assume that the implementation of xdvi is linked to a POSTSCRIPT renderer e g Ghostscript or DISPLAY PostScript If such support is not available then invoking xdvi us ing the command xdvi hushspecials will suppress warning messages that might otherwise be produced One drawback of such a setup is that much of the POSTSCRIPT is not rendered until after all of the font characters etc have been placed on the page Thus text that was meant to be placed on top of a filled or patterned region may appear to be obscured by it However when printed using a POSTSCRIPT printer the correct placement is obtained Supported special effects are e colour using POSTSCRIPT Not all versions of xdvi support color specials so there is no direct support for colour However parts of pictures rendered using POSTSCRIPT may appear coloured due to interpretation of colour commands within the POSTSCRIPT e crayon colours e PostScript back end e rotated scaled diagrams and text using Post SCRIPT e variable line widths and poly lines using Post SCRIPT e extra frames and fills using POSTSCRIPT e pattern
129. ost level then the names become prefix i j Specifying a prefix for the inner polygon overrides this naming scheme The same names may then be repeated for each of the inner polygons allowing access afterwards only to the last possibly useful as a memory saving fea ture when the vertices are not required subsequently Four levels of nesting gives a quite acceptable Sierpinski gasket The innermost triangle is pro vided by blacktriangle from the AMS symbol font msam5 at 5 point size Further levels can be achieved using the POSTSCRIPT backend otherwise line seg ments become too small to be rendered using Xy fonts v Aa Aa Aa A font msamv msam5 at 5pt def blacktriangle msamv char 116 def objectstyle scriptscriptstyle 56 xypolygon3 r5 2pc gt 7 lt gt xypolygon3 a 5 0 gt lt gt xypolygon3 b 5 0 gt lt gt xypolygon3 c 5 0 gt lt gt xypolygon3 d 7 5 0 lt gt d 5pt 0 hbox blacktriangle ame dame oe aes Note the use of naming in this example when pro cessing this manual it saves 13 000 words of main memory and 10 000 string characters as well as 122 strings and 319 multi letter control sequences 28 Lattice and web feature Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption web This feature provides macros to facilitate typesetting of arrangements of points within a 2 dimensional lat tic
130. owheads generated by Xy pic use a different mech anism which should give the same result with all drivers This involves redefining some POSTSCRIPT procedures which are always read prior to rendering one of these objects One simple way to specify a red line is as follows the xycolor extension provides more sophisticated support for colour The shape modifiers described in the previous section also use this mechanism so should work correctly with all drivers def colorxy 1 xycolor 1 setrgbcolor def eonnedeli eoiwmy a 0 0 dir Note how the braces are inserted within the expan sion of the control sequence colorxy which happens after parsing of the connection The following table shows which graphics parameters are treated in this way their default settings and the type of Post SCRIPT code needed to change them colour xycolor 0 setgray def line width xywidth 4 setlinewidth def dashing xydash 0 setdash def line cap xycap 1 setlinecap def line join xyjoin 1 setlinejoin def This feature is meant primarily for modifying the rendering of objects specified in TEX and Xy pic not for drawing new objects within POSTSCRIPT No guarantee can be given of the current location or scale which may be different with different drivers However a good POSTSCRIPT programmer will be able to overcome such difficulties and do much more To aid in this the special modifier psxy is provided to record the loc
131. ox 40 labelmargin 40 labelstyle 40 TATREX 5 LaTeXdiagrams 77 TATRX 2s 5 Le 76 LD 8 license 3 list 52 loading 4 5 logo 5 Lp 76 LU 8 makeatletter 4 makeatother 4 MakeOutlines 15 math mode 6 matrix 48 matrix 48 matrix orientation 49 matrix spacing 49 merge 76 messages 5 modifier 12 37 morphism 77 move 52 movie 34 MovieSetup 34 MultipleDrivers 20 newdir 18 41 newgraphescape 53 newxycolor 30 newxypattern 31 next 4 node 52 NoisyDiagrams 77 none 76 NoOutlines 16 NoPSspecials 35 NoRules 18 notip 76 NoTips 27 object 12 object 6 object 12 16 objectbox 12 objectbox 11 40 objectheight 13 objectmargin 13 40 objectwidth 13 OnlyOutlines 15 orient 19 orientation 49 P 8 10 p 6 p 8 package 5 partroottwo 7 PATH 38 PATHaction 38 PATHafterPOS 39 pit 75 place 8 placement state 7 plainT X 5 pos 8 POS 16 38 positions 6 privacy 4 q 12 R 6 R 8 10 Re 6 Rp 6 radius 19 Rc 76 RD 8 redefine 75 redefined 4 relax 4 16 restore 16 rotate 76 rounddashframed 77 Row 51 row spacing 49 Rp 76 RU 8 s 8 save 16 scene 34 SelectTips 27 ShowOutlines 15 SilentMatrices 48 size 12 slide 8 Solid 76 solid 76 spacing 49 spreaddiagramcolumns
132. p Xy pattern so no extension should be specified The pattern is then requested using ei ther the name supplied in the file or by an alias Once UsePatternFile has been used then a null file ar gument to the other commands will still find patterns in the default file The default remains in effect for the current level of TeX grouping For example the following picture E uses filled frames from the frame feature mac01 mac02 mac03 mac04 mac05 mac06 mac07 mac08 mac09 mac10 macll mac12 mac13 mac14 macl5 macl6 macl7 macl8 macl9 mac20 mac21 mac22 mac23 mac24 mac25 mac26 mac27 mac28 mac29 mac30 mac31 mac32 mac33 mac34 mac35 mac36 mac37 mac38 Figure 11 The 38 standard Macintosh patterns AliasPattern bricks mac12 xymacpat AliasPattern bars mac08 xymacpat xy lt 5pc 3 1pc gt bricks frm lt 2 5pc gt o bars frm endxy Pattern data A region is tiled using copies of a single cell regularly placed so as to seamlessly tile the entire region The data appearing as an argu ment to newxypattern is ultimately passed to the dvi driver The simplest form of pattern data is num Hex data where the data is a 16 character string of Hexadecimal digits i e 0 9 A F Each Hex digit equates to 4 binary bits so this data contains 64 bits representing pixels in an 8 x 8 array The num is an intege
133. probably be merged with the arrow feature Part IV Drivers This part describes drivers that customise the parts of the DVI file generated from Xy pictures to exploit special capabilities of particular DVI driver programs through TmXs special command This makes the DVI files non portable but is needed for full support of some of the Xy pic extensions described in part II Figure 21 at the end of this part summarises the extensions supported by all drivers 32 Support for Specific Drivers 32 1 dvidrv driver Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption dvidrv This driver provides support for the emtex special commands when using one of the stan dard dvi drivers dvidot dvihplj dvimsp dviscr or dvivik that come with Eberhard Mattes em T X distribution Supported special effects are e cem T X line drawing specials e variable line widths 32 2 DVIPS driver Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption dvips This driver provides support for all extensions when using the DVIPS driver by Tomas Rokicki 11 It has been tested with dvips version 5 55a and dvipsk ver sion 5 58f Supported special effects are e colour using direct color specials and PostScript e crayon colours e PostScript back end e rotated scaled diagrams and text using Post SCRIPT e variable line widths and poly lines using Post SCRIPT e extra frames and fi
134. ps Karl Berry s dvipsk dvips Thomas Kiffe s DVIPS for Macintosh textures Blue Sky Research s TEXTURES v1 7 16textures Blue Sky Research s TEXTURES v1 6 oztex Andrew Trevorrow s OZI X v1 8 17oztex Andrew Trevorrow s OZI X v1 7 Other DVI drivers may also work using one of these files if they use conventions similar to dvips OZIEX or TEXTURES Alternatively it should not be too difficult to write the files required using these as a basis indicating the type of information needed to support the specific special commands Any one attempting to do this should inform the author and convey a successful implementation to him for inclusion within the Xy pic distribution Note In some previous versions of Xy pic the POSTSCRIPT backend and driver were loaded simultaneously by a command of the form UsePSspecials driver For backward compatibility these commands should still work but now loading the latest version of the given driver However their future use is discouraged in favour of the option loading mechanism via xyoption driver This latter mechanism is more flexible both in handling upgrades of the actual driver support and in being extensible to support more general forms of special commands Once activated the POSTSCRIPT backend can be turned off and on again at will using the user follow ing commands NoPSspecials cancels POSTSCRIPT UsePSspecials restores POSTSCRIPT These obe
135. r factor in current base 4 a number angle in current base corner from reference point to corner of c corner factor The corner multiplied with factor direction dimen vector dimen in direction corner L R D U offset to left right down up side CL CR cCD CcuU cC offset to center of side true center LD RD LU RU offset to actual left down corner E P offset to nearest proportional edge point to p place lt place gt place shave 0 1 to edge of p c f 0 1 factor place f lt factor slide pick place and apply slide pos slide intercept with line setup by pos and apply slide slide dimen slide dimen further along connection empty no slide Figure 1 pos itions 3e 3f 3g 3h 3i An angle in Xy pic is the same as the coor dinate pair cosa sina where must be an integer interpreted as a number of degrees Thus the vector a 0 is the same as 1 0 and a 90 as 0 1 etc To drop an object at c with means to actu ally physically typeset it in the picture with ref erence position at c how this is done depends on the object in question and is described in detail in 4 The intuition with a drop is that it typesets something at lt X Y gt and sets the edge of c accordingly The connect operation will first compute a number of internal parameters describing the di rection
136. r counting the number of 0 s among the 64 bits Taken as a fraction of 64 this number or its complement represents the average density of on pixels within a single cell of the pattern Drivers un able to provide the fine detail of a pattern may simply use this number or its complement as a gray level or part of a colour specification for the whole region to be tiled The file xymacpat xyp contains defining data for the 38 standard patterns available with the Macintosh Operating system Figure 11 displays all these pat terns Rotating and Resizing Patterns Some imple mentations of patterns are sufficiently versatile to al low extra parameters to affect the way the pattern data is interpreted POSTSCRIPT is one such imple mentation in which it is possible to rotate the whole 32 pattern and even to expand or contract the sizes of the basic cell Due to the raster nature of output devices not all such requests can be guaranteed to produce aes thetic results on all devices In practice only rota tions through specific angles e g 30 45 60 and particular scaling ratios can be reliably used Thus there is no sophisticated interface provided by Xy pic to access these features However the POSTSCRIPT escape mechanism does allow a form of access when a POSTSCRIPT driver is handling pattern requests Special POSTSCRIPT operators pa and pf set the pattern angle normally 0 and frequency mea sured
137. rames include frm frm frm frm frm and frmf o They all make rectangular frames that essentially trace the border of a rectangle shaped object The frame s frm and frm allow an op tional corner radius that rounds the corners of the frame with quarter circles of the specified ra dius This is not allowed for the other frames the frm o frame always gives rounded cor ners of the same size as the used dashes when xydashfont is the default one then these are 5pt in radius Exercise 19 How do you think the author typeset the following 9c The frame frm puts a shade built from rules into the picture beneath the assumed rect angular object thereby giving the illusion of lifting it frm lt dimen gt makes this shade dimen deep frm combines a frm with a frm 9d Circles done with frm o have radius as R L 2 and with frm lt dimen gt o have radius as the dimen frmf oo makes a double cir cle with the outermost circle being the same as that of frmfo Exercise 20 What is the difference between cir and frm o 9e Ellipses specified using frmfe have axis lengths R L 2 and U D 2 while those with frm lt dimen dimen gt e use the given lengths for the axes frmfee makes a double ellipse with outermost ellipse being the same as that of frmf e Without special support to render the ellipses either via a d
138. re Vers 3 7 by Ross Moore ross mpce mq edu au Load as xyoption poly This feature provides a means for specifying the loca tions of vertices for regular polygons with any num ber gt 3 of sides Polygons can be easily drawn and or the vertex positions used to constuct com plex graphics within an Xy picture Many non regular polygons can be specified by setting a non square ba sis A polygon is most easily specified using xypolygon number with number sides xypolygon number tok tok at vertices xypolygon number object with a general object at each vertex Here number is a sequence of digits giving the num ber of sides If used within an xy endxy envi ronment then the polygon will be centred on c the current pos However an xypolygon can be used outside such an environment as stand alone poly gon the whole picture must be specified within the xypolygon command In either case the shape is obtained by spacing ver tices equally around the unit circle with respect to the current basis If this basis is non square then the vertices will lie on an ellipse Normally the polygon with at most 12 vertices is oriented so as to have a flat base when specified using a standard square basis With more than 12 vertices the orientation is such that the line from the centre to the first vertex is horizontal pointing to the right Any other de sired orientation can be obtain
139. rection For a nega tive num the orientation reverses xy 3 r5pc lt 10 1pt gt dir p p frm UR p pt 5 5 dir 0 dir UL o 0 81 lt 8 1pt gt dir c frm DL c c ellipse r ellipse r 2 ellipse r 3 ellipse r 2 ellipse r 1 endxy The final variant uses the directions from p and c to the given coord If orient is empty then the orientation is determined to give the shortest path along the ellipse Specifying an orient of or _ will force the orientation even if this means travelling the long way around the ellipse For example see next figure Alternative curves In some cases the circular or elliptic curve can be replaced by a curve with differ ent shape having the same tangent directions at the end points When a full circle ellipse is specified then one gets instead a closed curve constructed from 4 spline segments Other variants use a single segment 2 or 3 segments or some portion of all 4 segments Possibilities are given in the following table ellipse e elliptical as above ellipse q parabolic segments ellipse c cubic segments ellipse i interpolating cubic ellipse p cuspidal cubic cubic segments with looseness ellipse c num In the latter case the num typically between 0 and 1 controls how s
140. ribe some common cases where small mistakes in Xy pictures result in TEX er ror messages that may seem cryptic Box expected A box was supposed to be here This mes sage is common when an Xy pic object is mistyped such that Xy pic expects but does not find a T X box construction LaTeX Error Bad math environment delim iter File ended while scanning use of xycompiled Argument of codeof has an extra These errors can happen while reading an incomplete com piled picture such a beast is created when Xy pic crashes during compilation due to a syntax error or other such problem Missing inserted This happens when endxy was left out To Do Also include the more obscure ones References 1 Adobe Systems Incorporated PostScript Lan guage Reference Manual second edition 1990 American Mathematical Society AMS TpX Version 1 1 User s Guide 1 1 edition 1991 Karl Berry Expanded plain TFX version 2 6 edi tion May 1994 Available for anonymous ftp from CTAN in macros eplain doc 11 Tomas Rokicki DVIPS A TEX Driver Dis tributed with the dvips program found on CTAN archives Kristoffer H Rose How to typeset pretty dia gram arrows with TmxX design decisions used in Xy pic In Ji Zlatu ka editor EuroTRX 92 Proceedings of the 7th European TRX Con ference pages 183 190 Prague Czechoslo vakia September 1992 Czechoslovak TX Users Group Kris
141. river or using the arc feature the ellipse will be drawn as a circle of radius approx imately the average of the major and minor axes To Do Allow frame variant s like those used for directionals i e frm2 should be the same as frm Add frm o and more brackets 26 9 2 Brackets The possible brackets are shown in figure 9 with notes below Notes 9f Braces are just the standard plain TeX large braces inserted correctly in Xy pic pictures with the nib aligned with the reference point of the object they brace Exercise 21 How do you think the author typeset the following _ _QOOr0 B A A Parenthesis are like braces except they have no nib and thus do not depend on where the refer ence point of c is 9g Bug The brackets above require that the com puter modern cmex font is loaded in T X font posi tion 3 9 3 Filled regions In addition to the above there is a special frame that fills the inside of the current object with ink frm and frm the latter is intended for em phasizing and thus strokes the outline using the thinnest black line available on the printer or out put device furthermore it moits the actual filling in case this would obscure further text typeset on top Some alteration to the shape is possible using frm lt dimen gt Hence rectangular oval circular and elliptical shapes can be specified for filling The following examples
142. rpret pos and then perform decor drop object as the pos operation connect with object as the pos operation do nothing any T X commands and user defined macros that neither generates output watch out for stray spaces nor changes the grouping may be used xyverbose xytracing xyquiet tracing commands ignore2d Xy code compile to file prefix no xyc xycompileto name pos decor compile to file name xyc Figure 4 decor ations NoOutlines The first does no more The second uses the file to typesets a dotted frame of the appropri ate size instead of the picture unless the picture has changed and is recompiled then it is type set as always and the xyd file is recreated for subsequent runs The third shows the outlines as dotted rectangles The last switches outline processing completely off 6 Kernel object library In this section we present the library objects provided with the kernel language several options add more library objects They fall into three types Most of the kernel objects including all those usually used with to build connections are directionals de scribed in 86 1 The remaining kernel library objects are circles of 6 2 and text of 6 3 6 1 Directionals The kernel provides a selection of directionals ob jects that depend on the current direction They all take the form dir dir to typeset a particular dir ect
143. rrent 2 cell only This requires a switch which is described below except for the curveobject types which are discussed in Extra Options 4 These effects are specified by placing switches af ter the twocell control sequence e g rtwocell switches labels Each switch is either a sin gle token tok or a tok with a single argument tok arg Possibilities are listed in the following table in which denotes the need for an argu ment omit no arrows Arrow and label only place module map indicator change arrow head to place change tail on arrow s change object used to set curves use object to set upper curve _ use object to set lower curve Here we discuss the use of and omit The description of _ and is given in Extra Op tions 4 46 The default module map indicator places a sin used with the upper and lower curves by specifying gle dash crossing the arrow at right angles located uppercurveobject and lowercurveobject roughly midway along the actual printed portion of These specifications apply to all 2 cells subse the arrow whether curved or straight This takes quently constructed at the same level of TeX group into account the sizes of the objects being connected ing Alternatively using a switch as in Extra Op thereby giving an aesthetic result when these sizes dif tions 2 allows such a specificati
144. s a template for new options it provides neither features nor extensions but it does count how many times it is requested 11The name all hints at the fact that these were all the available options at the time all was added 23 Arrow and Path feature Vers 3 5 by Kristoffer H Rose krisrose brics dk Load as xyoptionfarrow This feature provides Xy pic with the arrow paradigm presented in 12 Note PATH command incompatibly changed for version 3 3 the ar command is unaffected The basic concept introduced is the path a con nection that starts from c the current object ends at a specified object and may be split into sev eral segments between intermediate specified objects that can be individually labelled change style have breaks etc 23 1 is about the PATH primitive including the syntax of paths and 23 2 is about the ar customi sation of paths to draw arrows using Xy pic directional objects 23 1 Paths The fundamental commands of this feature are PATH and afterPATH that will parse the path according to the grammar in figure 13 with notes below Notes 23a An action can be either of the characters The associated stuff is saved and used to call PATHaction action stuff before and after each segment including all labels for and respectively The default PATHaction macro just expands to POS stuff relax thus stuff should be of the form pos d
145. s adie d a a 8 2 Example places 10 3 object s 2 ee 12 4 decor ations 0 16 5 Kernel library dir ectionals 17 6 lt eirldlesn eo ale eee eS 19 7 Syntax for curves 22 8 Plain frames 40 0 25 9 Bracket frame s 0 25 10 Rotations scalings and flips 31 11 The 38 standard Macintosh patterns 32 12 importing a graphic for labelling 34 13 APAtH Sensing mininiai a ue oS 39 14 arrows uae e ee ha hew DA 41 15 Pasting diagram 44 16 twocell s sa mi ap eee a a ai 45 1 taph s sais 4 ie gi atn a aa 52 18 knot piece construction set 62 19 knot crossings with orientations and label positions 63 20 knot joins with orientations labels and Shifts a oa a yn oa De A 65 21 Extension implementation replaced by use of driver specials 69 kris eps ross eps Kristoffer Rose Ross Moore Preface This reference manual gives concise descriptions of the modules of Xy pic written by the individual au thors Please direct any T Xnical question or sug gestion for improvement directly to the author of the component in question preferably by electronic mail using the indicated address Complete documents and printed technical documentation or software is most useful The first part documents the Xy pic kernel which is always loaded The remaining parts describe the three kinds
146. s and tiles using POSTSCRIPT e TPIC drawing commands The following TREX implementation is also supported but currently uses the DVIPS driver driver extension tile ps dvidrv dvips dvitops oztex 17oztex textures 16textures xdvi Figure 21 Extension implementation replaced by use of driver 32 9 CMacTeX driver Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption cmactex Thomas Kiffe s CMacT X application uses DVIPS as its dvi driver Other implementations not specifically mentioned here may well work with one of the named driver s though perhaps not all features will actually be sup ported 33 Extra features using POST SCRIPT drivers This section acknowledges the support for extra fea tures available when using a driver that supports use of special commands with native POSTSCRIPT Extra macros are required to take advantage of this these are loaded automatically in conjunction with extensions specified using the xyoption command provided a driver which supports the extension as indicated in 21 has also been specified Commands are also provided to turn off on use of these features Such switches are particularly use ful when developing complicated diagrams or when the intended output device does not support POST SCRIPT e g for on screen displ
147. s are different The reason for considering a poly line as a sep arate object rather than simply as a path built from straight lines becomes apparent only when the 28 lines have appreciable thickness Then there are sev eral standard ways to fashion the joins where seg ments meet Also the shape of the caps at either end of the poly line can be altered The following modifiers are used to determine the shapes of the line caps and joins J val join style val 0 1 or 2 mitre mitre join same as JO roundjoin round join same as J1 bevel bevel join same as J2 C val end cap val 0 1 or 2 butt butt cap same as CO roundcap round cap same as C1 projcap projecting square cap same as C2 IM num set mitrelimit to num gt 1 These effects are currently implemented only with the POSTSCRIPT back end or when using xypolyline described below with a POSTSCRIPT driver In this case the cap setting can be applied to any segment straight or curved whether part of a poly line or not however the join setting applies only to poly lines Arrow tips are not affected The defaults are to use round joins and round cap ends Adjusting the miter limit affects how far miters are allowed to protrude when two wide lines meet at small angles The num is in units of the line thickness Higher values mean using bevels only at sm
148. s with reference to the notes below These are overlayed with the frm frame above to show the way they are centered on the object Framed with frm _ frame Framed with frm _ frame2 amp Framed with Framed with frm frame gt Framed with frame Framed with frm Framed with frm Framed with Framed with frm lt 8pt gt frm lt 8pt gt 9b frame iramed witht frm o 9b frame Framed with frm lt 5pt gt 9c frame Framed with Frapedwwith frm lt Bt fame Figure 8 Plain frame s ennnenesnnstibianeneensnan Framed with frm frame Goan ge ee ee et Framed with frm frame2 amp Framed with frm frame Framed with frm frame2 amp Figure 9 Bracket frame s 25 Framed with Framed with frm lt 44pt gt frame gt Framed with frm lt 44pt gt frm lt 44pt gt frame gt _ p Framed with frm Framed with frm o framed with frm o frame 4 y i XS 4 Framed with frm e frame 7 Pene 5 Eramed with I frm e frame 4 ni of Framed with frm frame Framed with frm frame2 amp Notes 9a The frm frame is a dummy useful for not putting a frame on something e g in macros that take a frame argument 9b Rectangular f
149. se use p to get the rel ative position Note Do not use or in the pos itions Bug The algorithm assumes that the reference point is always inside the polygon It is possible to frame polygons is also possible Bug This code should be merged with the frame and poly options The example at the end of illustrates the ex tensions Part III Features This part documents the notation added by each standard feature option For each is indicated the described version number the author and how it is loaded The first two all and dummy described in 21 and 22 are trivial features that nevertheless prove useful sometimes The next two arrow and 2cell described in 23 and 24 provide special commands for objects that point The following matrix in 25 graph in 26 poly in 27 and knot in 30 are input modes that support different overall struc turing of parts of Xy pictures 21 All features Vers 3 3 by Kristoffer H Rose krisroseQ brics dk Load as xyoption all As a special convenience this feature loads a subset of Xy pic namely the extensions curve cf 88 frame 9 cmtip 10 line 11 rotate 12 color 813 and the following features matrix 25 arrow 23 and graph 26 22 Dummy option Vers 3 3 by Kristoffer H Rose krisrose brics dk Load as xyoption dummy This option is provided a
150. seRules that will switch the use of such off and on As can be seen by the last two columns these and most of the other connectors also ex ist in double and triple versions with a 2 or a 3 prepended to the name For conve nience dir and dir are synonyms for dir2 and dir2 respectively similarly dir is a synonym for dir2 6c The group of plain tips contains basic objects that are useful as markers and arrowheads mak ing connections so each is shown at the end of a dotted connection of the appropriate kind They may also be used as connectors and will build dotted connections e g gt typesets 7 Se 7 Exercise 14 Typeset the following two s and a tilted square Hint the dash created by dir has the length 5pt here 6d These tips are combinations of the plain tips provided for convenience and optimised for ef ficiency New ones can be constructed using composite and by declarations of the form newdir dir composite which defines dir dir as the composite see note 4d for the details 6 2 Circle segments Circle object s are round and typeset a segment of the circle centered at the reference point The syntax of circles is described in figure 6 with explanations below 18 The default is to generate a full circle with the specified radius e g xy cir lt 4pt gt endxy xy M cir endxy Kay yy All the other circ
151. shframed rounddashframed commands comm unicated to some users by electronic mail Version 2 object Replacement drop frm drop frm lt dimen gt drop frmf drop frm lt dimen gt framed framed lt dimen gt Framed Framed lt dimen gt dotframed drop frm dashframed drop frm rounddashframed drop frm o circled drop frmf o Circled drop frm oo Matrices The diagram rows enddiagram command is pro vided as an alias for xymatrix rows centered in math mode and LaTeXdiagrams changes it to use begin end syntax v2 sets a special internal old matrix flag such that trailing are ignored and entries starting with are safe NoisyDiagrams is ignored because the matrix feature always outputs progress messages Finally the version 2 spreaddiagramrows spreaddiagramcolumns spacing commands are emulated using xymatrixrowsep and xymatrixcolsep Arrows The main arrow commands of version 2 were the morphism and definemorphism commands which now have been replaced by the ar command v2 provides them as well as uses them to define the version 2 commands xto xline xdashed xdotted xdouble and all the derived commands dto urto the arrow commands of the 6 releases of v3 is also provided Instead of commands like rrto and uldouble you should use the arrow feature replacements ar rr and ar ul The predefined turning soli
152. sing curves can be quite a strain on TRX s memory you should there fore limit the length and number of curves used on a single page Memory use is less when combined with a backend capable of producing its own curves e g the POSTSCRIPT backend 8 1 Curved connections Simple ways to specify curves in Xy pic are as follows crv poslist curved connection The kernel support described here is based on the now defunct xydriver include file by Ross Moore 20 crvs dir get poslist from the stack curve poslist as a decor ation in which poslist is a list of valid pos itions The decoration form curve is just an abbreviation for connect crv As usual the current p and c are used as the start and finish of the connection respec tively Within poslist the pos itions are separated by amp A full description of the syntax for crv is given in figure 7 If poslist is empty a straight connection is com puted When the length of poslist is one or two then the curve is uniquely determined as a single segment B zier quadratic or cubic spline The tangents at p and c are along the lines connecting with the adjacent control point With three or more pos itions a cubic B spline construction is used B zier cubic segments are calculated from the given control points The previous picture was typeset using xy 0 20 A 60 0 B crv crv 30 30 crv 20 40 amp 40 40
153. sised gol A gt gol def latticebody dimen0 latticeX pt ifdim dimenO gt Opt divide dimenO by 64 dimen0 latticeY dimenO relax ifdim Opt gt dimenO dimenO dimenO fi ifdim 10pt gt dimenO drop bullet else drop fi else drop fi xy xybox 0 lt 3pc 2 57mm gt lt 83pc 2 25pc gt 0 croplattice 3 5 5 5 1 3 4 5 3 4 4 4 L A L L ar L R x L sigma 1 L D ar L U D sigma 2 endxy 29 Circle Ellipse Arc feature Vers 3 4 by Ross Moore ross mpce mq edu au Load as xyoptionfarc This feature provides a means to a specify circles of arbitrary radius drawn with a variety of line styles Similarly ellipses may be specified having arbitrary major minor axes aligned in any direction A circu lar arc joining two points can be constructed with specified tangent direction at one end All the curves described here circles ellipses and sectors of these are constructed using the curves from the xycurve extension As such any com ments given there concerning memory requirements are equally valid here perhaps even more so Use of the xyps POSTSCRIPT back end is highly recom mended 29 1 Full Circles The xyarc feature allows a much wider range of pos sibilities for typesetting circles than is available with cir Firstly the radius is no longer restricted to a finite collection of sizes Secondly fancy line curve styles are available as with curved
154. so a box Several object s can be combined into a single object using the special command composite with a list of the desired objects separated with s as the argument The resulting box and ob ject is the least rectangle enclosing all the in cluded objects Take an entire Xy picture and wrap it up as a box as described in 2 1 Makes nesting of Xy pictures possible the inner picture will have its own zero point which will be its reference point in the outer picture when it is placed there An object is shifted a vector by moving the point inside it which will be used as the refer ence point This effectively pushes the object the same amount in the opposite direction Exercise 10 What is the difference between the pos itions 0 a DR and 0 DR a A size is a pair lt W H gt of the width and height of a rectangle When given as a vector these are just the vector coordinates i e the vector starts in the lower left corner and ends in the up per right corner The possible add op erations that can be performed are described in the fol lowing table add op description grow shrink set to grow to at least shrink to at most In each case the vector may be omitted which invokes the default size for the particular add op add op default lt 2 x objectmargin gt lt 2 x objectmargin gt lt objectwidth objectheight gt lt m
155. ssarily the most common is that of a circular arc from p to c with ra dius and centre unspecified To uniquely specify the arc the tangent direction at p is taken to be along the current direction given by Direction as set by the latest connect ion If no connection has been used then the default direction is up ellipse_ style clockwise arc from p to c ellipse style counter clockwise arc ellipse style also counter clockwise With this information only a unique circle can be found whose radius and centre need not be specified in advance For a unique arc it is sufficient to specify the orientation around the circle The exception is when the current direction is from p to c in which case no circle exists Instead a straight line is typeset accompanied by the following message Xy pic Warning straight arc encountered The following example shows how given three points o p and c to continue the line op by a cir cular arc to c joining smoothly at p o xy 0 r5pc dir UR p pt 5 5 dir 0 UL o 0 81 lt 6 1pt gt dir frm c DL c o dir c ellipse_ ellipse th so H 1 5 2 dir a UL a o pt _ipc a ellipse_ endxy Note how the remainder of the circle can be specified separately The example also shows how to specify an arc which leaves a particular point perpendicular to a specific direction
156. t gt Se 2 3 tip tipchar gt lt l conn arrow has the form s use variant of arrow build arrow23 using variant of a standard stem and tip for the head build arrow28 using variant of tip conn tip as arrow tail stem and head in that order change stem to the indicated connchar dash the arrow stem by doubling it 230 curve arrow the dist ance towards direction curve to fit with in out directions23P curve setup224 with explicit control points add shape to object modifier s2 for all objects add object modifier s28 for all objects slide arrow2 S the dimen break each segment at anchor with it label each segment at anchor with it reverse meaning of above and below23t variant plain above below double or triple directional named as the sequence of tipchar s any dir ectional23 recognised tip characters more tip characters directional named as the sequence of connchar s any dir ectional23 recognised connector characters Figure 14 arrow s Notes 23m Building an arrow is simply using the spec ified directionals using dir of 6 1 to build a path the first tip becomes the arrow tail of the arrow the conn ection in the middle becomes the arrow stem and the second tip becomes the arrow head If a variant is given before the then that variant dir is used for all three For example
157. t lt NoTips dir gt 20 5 endxy ee regardless of which tips are used otherwise in the doc ument will typeset 11 Line styles extension Vers 3 6 by Ross Moore ross mpce mq edu au Load as xyoption line This extension provides the ability to request vari ous effects related to the appearance of straight lines e g thickness non standard dashing and colour These are effects which are not normally avail able within TeX Instead they require a suitable back end option to provide the necessary special commands or extra fonts together with appropriate commands to implement the effects Thus Using this extension will have no effect on the output unless used with a backend that explicitly supports it The extension provides special effects that can be used with any Xy pic object by defining shape modifiers The modification is local to the object currently being built so will have no effect if this object is never actually used 8This function was earlier supported by the cmtip extension which is still included in the distribution but is now obsolete Adjusting line thickness The following table lists the modifiers primarily to alter the thickness of lines used by Xy pic They come in two types ei ther a single keyword or using the key character with the following text parsed thicker double line thickness thinner halve line thickness I num multiple of usu
158. t case the code should be wrapped in the special command xywithoption option code which indicates that if the option is already loaded then code should be executed now otherwise it should be saved and if option ever gets loaded then code should be executed afterwards Note The code should allow more than one execution it is saved with the catcodes at the time of the xywithoption command Finally it is possible to declare code as some commands to be executed before every ac tual execution of xywithoption option and similarly code to be executed before ev ery xyoption option and xyrequire option 19 collectively called requests xyeverywithoption option code xyeveryrequest option code This is most often used by an option to activate some hook every time it is requested itself 7 2 Option file format Option files must have the following structure hh identification hh copyright etc ifx xyloaded undefined input xy fi xyprovidef option name 4 version author email address body of the option xyendinput The 6 arguments to xyprovide should contain the following option Option load name as used in the xyoption command This should be safe and distinguish able for any operating system and is thus lim ited to characters chosen among the lowercase letters a z digits 0 9 and dash a
159. t centering and spacing off entrymodifiers modifier Exercise 32 lowing matrix How did the author typeset the fol Bug The four constructions add op size and accumulate in re verse order Only entries starting with a single completely override the modifiers setup with a construction Finally the following is specially suited for one line matrices included in text 1 will insert a math strut vphantom into each en try to make its centering appropriate for text This is just an abbreviation using the following declaration which will setup decor that should be inserted before everything else in each entry Initially it is empty but everyentry decor will insert decor first in each entry inside the counter registers Row and Col are set to the current entry s row and column respectively For example everyentry the Row the Col xymatrix F o POS r dir amp POS ur dir will typeset QQ we 7 EY Note When using compilation changes to everyentry and entrymodifiers will not result in recompilation even when the constructed matrix changes you may have to remove the xyc file man ually Exercise 33 How did the author typeset the fol lowing diagram roo Hints The arrow feature was used to make the bend ing arrows and the frame extens
160. t the argument 1 to xypolyline affects what is typeset Allowable arguments are xypolyline solid line xypolyline dotted line xypolyline dashed line xypolyline fill enclosed polygon xypolyline fill enclosed polygon using even odd rule xypolyline use dir for lines xypolyline lt toks gt using dir lt toks gt The latter cases one has dir being used to connect the vertices of the polyline with being needed to get dir Similarly dir is used when a driver is not available to specifically support polylines in particular the two fill options and will result in a dotted polygon outline the region intended to be filled In all cases it is up to the user to load the stack be fore calling xypolyline A particularly com mon case is the outline of an existing Xy pic object as in the example above Future extensions to frm will provide a simplified mechanism whereby the user need not call xypolyline explicitly for such effects 12 Rotate and Scale extension Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption rotate This extension provides the ability to request that any object be displayed rotated at any angle as well as scaled in various ways These are effects which are not normally avail able within TeX Instead they require a suitable back end option to provide the necessary special 29 commands or extra fonts together
161. t vertex and the previous vertex The connection from vertex number to vertex 1 is done last The pyramid above is an example of how this can be used Both lt and lt lt arrow can be speci fied together but only the last will actually be used similarly for gt and gt lt arrow 55 def alphanum ifcase xypolynode or A or B or C or D or E or F or G or H fi xy r3pc xypolygon3 40 xypolygon4 40 gt xypolygon5 40 xypolygon6 40 gt xypolygon11 40 xypolygon50 40 7 gt r8pc xypolygon7 lt lt 7 gt lt lt gt x 7 alphanum gt gt _ alpha_ xypolynode endxy Use of the switch was described earlier When using the more can be done than just setting the base In fact any kernel code can be sup plied here It is processed prior to any other part of the polygon The graphics state has c at the centre of the polygon p at the origin of coordinates within the picture and has basis unchanged from what has previously been established The current point c will be reset to the centre following any code interpreted using this switch A further simplification exists for sides and spokes without arrow s If tok is a single character then gt tok gt tok gt tok all specify the direc tional dir tok similarly with the lt switch On the other hand compound directiona
162. terPOS to find a pos to be used for part of a picture then subsequently reuse it Also it is possible to use drop or decor s to specify the 2 cells giving the same picture xy A A lt 1cm 1 5cm gt B B lt 2cm Opt gt C C lt icm 1 5cm gt D D A B uppertwocell alpha B C twocell zeta_ xi gamma C afterPOS drop compositemap D POS A afterPOS drop lowertwocell D endxy The connect variant is usually preferable as this maintains the size of the object at c while the drop variant leaves a rectangular object having p and c on opposite sides 25 Matrix feature Vers 3 4 by Kristoffer H Rose krisrose brics dk Load as xyoption matrix This option implements Xy matrices i e matrices where it is possible to refer to the entry objects by their row column address We first describe the gen eral form of Xy matrices in 25 1 then in 25 2 we summarise the new coord inate forms used to refer to entries In 25 3 we explain what parameters can be set to change the spacing and orientation of the matrix and in 25 4 we explain how the appearance of the entries can be changed 25 1 Xy matrices The fundamental command of this feature is xymatrix setup rows that reads a matrix of entries in the generic TEX row amp column format i e where rows are separated with and contain columns separated with amp we discuss in
163. th old diagrams The remaining sections list all the obsolete com mands and suggest ways to achieve the same things using Xy pic 3 7 i e without the use of this option They are grouped as to what part of Xy pic replaces them the compilation command is described last Note version 2 is meant to cover all public releases of Xy pic in 1991 and 1992 i e version 1 40 and versions 2 1 through 2 6 The published manual cited above for version 2 6 is the reference in case of variations between these versions and only things documented in that manual will be supported by this option 9 B 1 Unsupported incompatibilities Here is a list of known incompatibilities with version 2 even when the v2 option is loaded e Automatic shortening of arrow tails using lt lt breaks was a bug and has been fixed so it does not work any more Put a lt hole break before it e The version 2 6 position operator is not avail able The version 2 6 construction to t1 x y should be replaced by the rather long but equiv alent construction to p r t 1 pt u x 0 0 1 p r y 0 0 y In most cases to t x possibly with a trailing suffices instead e Using to t x y as the target of an arrow command does not work Enclose it in braces i e write to t y e The older pit apit and bpit commands are not defined Use dir gt or tip with variants and
164. the correspond ing adjacent control point Furthermore the mid point between successive control points lies on the spline with the line joining the control points being tangent there Such curves are specified either as a decor or as an object using qspline style where the start and end of the curve are at p and c respectively The control points are taken from the current stack see 30 If this stack is empty then a straight line is constructed The following example compares the quadratic spline with the gentler curving B spline having the same control points using crvs tC P F xy ri 5pc lt 5pc 3pc gt P p C 2 2 O 2 2 O 2 2 2 0 C C qspline C crvs i endxy 9 Frame and Bracket extension Vers 3 7 by Kristoffer H Rose krisrose brics dk Load as xyoption frame The frame extension provides a variety of ways to puts frames in Xy pictures The frames are Xy pic object s on the form frm frame to be used in pos itions Dropping a frame with frm frame will frame the c object connect ing with frm frame will frame the result of c p Below we distinguish between ordinary frames brackets and fills last we present how some frames can be added to other objects using object modifier shape s 9 1 Frames Figure 8 shows the possible frames and the applicable modifier
165. the place where the hole occurs in the under string This is done by specifying num with 0 lt num lt 1 be ing the parameter value of the new location for the hole 30e The knot feature allows for the easy placement of the following objects along the strings of a crossing e labels on the strings e arrowheads for direction or orientation e holes in strings allowing another string to be drawn passing over 30f The characters lt gt and are used to indi cate to which string portion the object is asso ciated with denoting the string which crosses the other while lt and gt denote the initial and final portions of the crossed string 30g A simple label enclosed in braces for exam ple vcross gt x is set in math mode using the labelstyle at a pre determined place on the string portion shifted in either the above or be low direction from the curve at this point For each crossing depicted in figure 19 only default values are used for the place and shift direction 30h If the first character within the braces 30i 30j is e g htwist gt object then a general object may be placed as a label Furthermore if the first character is or _ or then the in terpretation is e g vtwist lt anchor it as in 14 to place it as a label along an ar of the arrow feature A second character lt or gt specifies that an ar rowhead sho
166. through a special po sition construction this is also discussed in detail in 83 The Xy pic state consists of all these parameters together They are initialised to zero except for A cbast T Yybase 1m The edges are not directly available but points on the edges may be found using the different corner forms described in 3 It is possible to insert an initial piece of pos decor at the start of every Xy picture with the dec laration everyxy text This will act as if the text was typed literally right after each xy command parsing the actual contents as if it follows this thus it is recommended that text has the form pos such that users can con tinue with pos decor 3 Positions A pos ition is a way of specifying locations as well as dropping objects at them and decorating them in fact any aspect of the Xy pic state can be changed by a pos but most will just change the coordinates and or shape of c All possible positions are shown in figure 1 with explanatory notes below Exercise 1 Which of the positions 0 lt Opt Opt gt lt Opt gt 0 0 and Opt is different from the oth ers Notes 3a When doing arithmetic with and then the resulting current object inherits the size of the coord ie the right argument this will be zero if the coord is a vector Exercise 2 How do you set c to an object the same size as the saved object ob but moved lt X Y
167. tion of its name 2 Picture basics The basic concepts involved when constructing Xy pictures are positions and objects and how they com bine to form the state used by the graphic engine The general structure of an Xy picture is as fol lows xy pos decor endxy builds a box with an Xy picture 4T X users may substitute begin xy end xy if they prefer pos and decor are components of the special graphic language which Xy pictures are specified in We explain the language components in general terms in this and in more depth in the following 88 2 1 Positions All positions may be written lt X Y gt where X is the TEX dimension distance right and Y the distance up from the zero position 0 of the Xy picture 0 has co ordinates lt Omm Omm gt of course The zero position of the Xy picture determines the box produced by the xy endxy command together with the four pa rameters Xmin Xmax Ymin and Ymax set such that all the objects in the picture are contained in the following rectangle Ym ax B a X min 0 X max Ymin TEX reference point where the distances follow the up and right gt 0 principle e g the indicated TFX reference point has coordinates lt Xmin Opt gt within the Xy picture The zero position does not have to be contained in the pic ture but Xmin lt Xmax A Ymin lt Ymax always holds The possible positions are described in detail
168. to have a flat base when drawn using a standard square basis Its vertices are num bered in anti clockwise order commencing with the one at horizontal right of centre or the smallest angle above this see example below With more than 12 vertices then vertex 1 is located on the horizontal extending to the right from centre assuming a stan dard square basis By providing a switch of the form angle then the vertex 1 will be located on the unit circle at angle anti clockwise from hor izontal more correctly from the X direction in the basis to be used when setting the polygon which may be established using a switch Exercise 36 Give code to typeset these One important use of prefix is to allow the ver tices of more than one polygon to be accessed sub sequently within the same picture Here are some examples of this incorporating the switch to perform simple rescalings Firstly the edges of a dodecahedron as a planar graph 54 xy 11 5pc xypolygon5 A xypolygon5 B 1 875 0 7 gt xypolygon5 C 2 95 0 7 gt xypolygon5 D 3 75 0 A1 PATH B1 C4 B2 A2 PATH B2 C5 B3 A3 PATH B3 C1 B4 A4 PATH B4 C2 B5 A5 PATH B5 C3 B1 C1 D1 C2 D2 C3 D3 C4 DA exO C5 D5 e
169. toffer H Rose Typesetting diagrams with Xy pic User s manual In Ji Zlatu ka edi tor EuroTRxX 92 Proceedings of the 7th Eu ropean TEX Conference pages 273 292 Prague Czechoslovakia September 1992 Czechoslovak TEX Users Group 4 Michel Goossens Frank Mittelbach and Alexan 13 der Samarin The ATRX Companion Addison Wesley 1994 5 Brian W Kernighan PIC a language for type setting graphics Software Practice and Experi ence 12 1 1 21 1982 14 Kristoffer H Rose Aypic User s Guide DIKU University of Copenhagen Universitetsparken 1 6 oe Bey Penal elie ine epae aAdelsee DK 2100 K benhavn 3 0 edition June 1995 esley 1984 15 Kristoffer H Rose and Ross R Moore Xy 7 Donald E Knuth Computer M odern Typ ef oe pic complete sources with TeXnical commentary volume A of Computers amp Typesetting Addison not yet available June 1995 Wesley 1986 16 Michael D Spivak The Joy of TEX A Gourmet 8 Leslie Lamport ATgX A Document Prepara Guide to Typesetting with the AMS TEX Macro tion System Addison Wesley 1986 Package American Mathematical Society sec ond edition 1990 9 Leslie Lamport ATRX A Document Prepara tion System Addison Wesley 2nd edition 1994 17 TUG Working Group TWG TDS A directory structure for T X files version 0 98 URL May 10 P Naur et al Report on the algorithmic lan 1995 Available with URL ftp jasper ora com guage A
170. trick is getting the arrow head right the modifier to the explicit dir object does that Answer to exercise 24 p 40 The author did xy 0 0 ar gt 30 7 A a POS 10 12 txt label ar a endxy Answer to exercise 25 p 41 Here is the entire Xy picture of the exercise xy lt 1pc 0pc gt POS 0 0 A ar 2 3 A cir ar 2 0 3 A cir ar 3 2 3 A cir POS 6 0 B ar 1 gt gt 2 3 B cir ar 2 gt gt 0 3 B cir ar 3 gt gt 2 3 B cir endxy The first batch use the default gt specification Answer to exercise 26 p 42 The author used newdir gt 5pt dir gt Answer to exercise 27 p 42 The author used xy ar gt gt composite dir x dir lt lt 20 7 endxy Answer to exercise 28 p 42 The author used xy circt b ar ur ul c ar gt dr ul 20 0 bullet endxy Note that it is essential that the curving specification comes after the arrow style Answer to exercise 29 p 46 Here is the code used to typeset the pasting diagram in figure 15 xymatrixrowsep 1 5pc xymatrixcolsep 3pc diagram amp amp relax rtwocell lt 0 gt f_3 omit amp relax ddtwocel1 lt 0 gt omit drtwocel1 lt 0 gt _4 lt 3 gt ddrrtwocell lt omit gt lt 8 gt amp amp amp amp relax drtwocell lt
171. ts but if you distribute any part of Xy pic including modified versions to some one 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 Notational conventions We give descriptions of the syntax of pictures as BNF rules in explana tions we will use upper case letters like X and Y for dimen sions and lower case like x and y for factor s Part I The Kernel Vers 3 7 by Kristoffer H Rose krisrose brics dk After giving an overview of the Xy pic environment in 1 this part document the basic concepts of Xy picture construction in 2 including the maintained graphic state The following sections give the pre cise syntax rules of the main Xy pic constructions the position language in 3 the object constructions in 84 and the picture decorations in 85 6 presents the kernel repertoire of objects for use in pictures 7 documents the interface to Xy pic options like the standard feature and extension options Details of the implementation are not discussed here but in the complete TRXnical documenta tion 15 1 The Xy pic implementation This section briefly discusses the various aspects of the present Xy pic kernel implementation of which the user should be aware 1 1 Loading Xy pic Xy pic is careful to set up its own environment in or der to function with a l
172. turn from the bottom and up and for each interpret the coord Thus the first interpretation has c set to the bottom element of the stack and the last has c set to s0 If the stack is empty the coord is not interpreted at all These two operations can be combined to repeat a particular coord for several points like this xy 0 10 10 3 20 5 P endxy will typeset P P Finally the stack can be forcibly cleared using i however this is rarely needed because of which saves the stack as it is and then clears it such when it has been used and is empty and is issued then it is restored as it was at the time of the Exercise 8 How would you change the exam ple above to connect the points as shown below It is possible to define new coord inates on the form id by saving the current c using the id pos ition form Subsequent uses of id will then reestablish the c at the time of the saving Using a id that was never defined is an error however saving into a name that was previously defined just replaces the definition without warn ing ie id always refers to the last thing saved with that id However many other things can be saved in general saving has either of the forms id id base coord id id reinterprets coord id id reloads this stack restores current The first form defines id to b
173. turning segment such that subsequent turning or other segments will start from there in particular the last seg ment which is always straight can be used to finish a winding line What the turn looks like is determined by the turn form empty Nothing between the and the pos is interpreted the same as giving just the diag last used out of a turn diag Specifying a single diag d is the same as specifying either of the cir cles d or d_ de pending on whether the specified pos has its center above or below the line from p in the diag onal direction cir When a full explicit cir cle is available then the corresponding cir cle object is placed such that its ingoing direction is a continuation of a straight connection from p and the outgoing direction points such that 39 a following straight or last segment will connect it to c with the same slide Here is an example using all forms of turn s x base was typeset by xy lt 4pc 0pc gt 0 0 txt base base PATH dir gt dir gt 1 1 1 A a j 1 1 B b ul 1 0 C c ul l base d base e endxy Bug Turns are only really resonable for paths that use straight lines like the one above Note Always write a valid pos after a turn otherwise any following or _ labels can con fuse the parser So if you intend the r in r to be a label then write r using a dummy
174. ular for screen previewing purposes it may be convenient to use this back end Further more note that DVIPS is capable of supporting em TreX specials Once loaded using xyoptionfemtex with an appropriate driver also specified either already or subsequently the following commands are available to turn the em T X backend off on NoEMspecials turns off em T X specials UseEMspecials reinstates em T X specials Of the curves defined in the xycurve extension only solid spline curves are supported This is done by treating the spline as a polygon poly line with many segments 20 Necula s extensions Vers 0 0 by George C Necula necula cs cmu edu Load as xyoption necula This option contains two extensions of the Xy pic kernel A way to expand T X macros in object modifier s and a way to specify arbitrary polygons as the shape of an object 20 1 Expansion The special syntax e macros is introduced in an object modifier s and coord inates It expands the given TFX macros with edef before reinterpre tation as a modifier of coord respectively This code may become part of the Xy pic kernel at a certain point 20 2 Polygon shapes A polygon shape is specified as P pos pos where P p Dn denotes the shape obtained by tracking the edge with each p a position relative to the object reference point vector s and corner s can be used directly otherwi
175. uld appear at the pre determined place on the chosen string Here gt denotes an arrowhead pointing with the natural orien tation while lt points against Due to the curvature of the strings it is usually best to UseComputerModernTips rather than normal arrow tips To generate a hole use knothole or simply khole as following token This generates a break in the sense of 23j Indeed such a hole is used to separate the two portions of the crossed string Default size for the hole is 5pt which is al terable via knotholesize dimen normally used to set the size for all holes in a diagram 30k If the resulting khole is either too large or perhaps non existent this could be due to a tech nicality in the way breaks in curves are handled This problem should not occur with the standard crossings using a rectangular basis but it may occur with non rectangular bases An easy fix is to include an extra null break on the string using lt gt or which should place the zero sized break at parameter value 5 on the curve The specification should precede a khole at a higher parameter value or come after one at a lower value Multiple breaks arrow heads and labels may be specified along the two strings of a crossing sim ply place their specifications one after another e g lt gt gt gt gt lt x y gt z was used in figure 19 The only proviso is that all breaks alon
176. umn spacing 49 command 16 CompileFixPoint 15 CompilePrefix 15 compiling 15 composite 12 composite 12 13 18 connect 6 connect 16 coord 8 37 COPYING 4 copyright 3 corner 8 CR 8 cR 76 CU 8 current object style 12 14 D 6 D 8 10 De 6 Dy 6 Dashed 76 dashed 76 dashes 5 dashframed 77 Dc 76 Ddashed 76 Ddotted 76 decor 16 decoration 6 default entry 50 define 75 definemorphism 77 diag 12 diagram 77 dimension registers 5 dir 16 18 41 42 direction 12 documentclass 5 79 dotframed 77 Dotted 76 dotted 76 dottedwith 76 Dp 76 driver 20 Drop 76 drop 16 dsize 75 dumpPSdict lt filename gt 36 E 8 10 Edge 6 Edgec 6 Edgey 6 enddiagram 77 endxy 6 15 entry height 50 entry margin 50 entry width 50 entrymodifiers 50 Error 5 escape 52 eu 27 everyentry 51 extension 20 extents 6 el 37 fixed grid 49 fonts 5 format dependencies 5 formats 5 Framed 76 framed 76 free software 3 french sty 4 frm 10 24 frm 26 frm 26 german sty 4 GNU General Public License 3 go 76 graph 52 grow 76 h 12 halfrootthree 7 halfroottwo 7 halign 51 hbox 12 hole 40 76 hooks 5 i 12 idioms 5 input xy 4 input xypic 77 jot 9 L 6 L 8 10 Le 6 Ly 6 label separation 50 labelb
177. us drawn with arbitrary line styles When large sized objects are used they are regularly spaced around the circle Similarly ellipses may be speci fied but only those having major minor axes aligned in the standard directions spacing of objects is no longer regular but is bunched toward the narrower ends Such a circle or ellipse is specified using xycircle vector style where the components of the vector determine the lengths of the axis for the ellipse thus giving a cir cle when equal The style can be any conn as in 14 that works with curved arrows many do Al ternatively style can be any object which will be placed equally spaced about the circle at a separa tion to snugly fit the object s If empty then a solid circle or ellipse is drawn xy 0 r5pc dir spt 5 5 dir c dir UL c c xycircle 1 4 dir lt xycircle 1 1 dir gt xycircle lt 15pt 10pt gt xycircle lt 10pt gt endxy 8 3 Quadratic Splines Quadratic B zier splines as distinct from cubic B zier splines are constructed from parabolic arcs using control points to determine the tangents where successive arcs are joined Various implementations of such curves exist The one adopted here is consistent with the xfig drawing utility and TPIC implementations These have the property of beginning and ending with 24 straight segments half the length to
178. we indicate the place in each case We also give examples of slide s A slide will move the position a dimension fur ther along the connection at the picked position For straight connections the only ones kernel Xy pic provides this is the same as adding a vector 3j 3k 3l in the tangent direction i e A is the same as A This special place finds the point where the last connection intercepts with the line from p to c as setup by the pos thus usually this will have the form coord coord for example Bug Only works for straight arrows at present xy lt 1cm 0cm gt 0 0 O0 2 1 0 times 1 0 A 2 2 B x bullet endxy will typeset B x ae The positions denoted by the azis intersection coord inates x and y are the points where the line through p and c intersects with each axis The following figure illustrates this x ybase rbase oe origin p y Exercise 4 Given predefined points A B C and D stored as objects A B C and D write a coord specification that will return the point where the lines AB and CD cross the point marked with a large circle here A pos decor grouped in braces is inter preted in a local scope in the sense that any p and base built within it are forgotten afterwards leaving only the c as the result of the coord Note Only p and base are
179. witches The allowable switches are given in the following ta ble TAT useful for rescaling x object object at each vertex angle align first vertex lt directional for spokes lt lt arrow use arrow for spokes lt gt labels amp breaks on spokes gt directional for sides gt lt arrow use arrow for sides gt gt labels amp breaks on sides Using lt lt arrow or gt lt arrow is most ap propriate when arrowheads are required on the sides or spokes or when labels breaks are required Here arrow is as in figure 14 so it can be used simply to specify the style of directional to be used Thus lt lt sets each spoke as a default arrow pointing outwards from the centre lt lt suppresses the arrow head while gt lt uses an empty arrow along the sides Labels and breaks are specified with lt gt and gt gt where the use the notation for a label as in figure 13 When no tips or breaks are required then the switches lt and gt are somewhat faster since less processing is needed Labels can still be specified with lt gt and gt gt but now us ing the kernel s place notation of figure 1 In fact any kernel code can be included using these switches With lt gt the current p and c are the centre and vertex respectively while for gt gt they are the cur ren
180. with appropriate commands to implement the effects Thus Using this extension will have no effect on the output unless used with a backend that explicitly supports it The extension provides special effects that can be used with any Xy pic object by defining shape modifiers The modification is local to the object currently being built so will have no effect if this object is never actually used The following table lists the modifiers that have so far been defined They come in two types either a single keyword or a key character with the following text treated as a single argument align with current direc tion direction align to direction number rotate number degrees number scale by number num num scale z and y separately left rotate anticlockwise by 90 right rotate clockwise by 90 flip rotate by 180 same as 1 1 dblsize scale to double size halfsize scale to half size These shape modifiers specify transformations of the object currently being built If the object has a rectangle edge then the size of the rectangle is transformed to enclose the transformed object with a circle edge the radius is altered appropriately Each successive transformation acts upon the re sult of all previous One consequence of this is that the order of the shape modifiers can make a signif icant difference in appearance in general transfor
181. within diagrams and the PostScript dictionary must be available in a file called global ps Note To use Xy pic effectively with OZI X re quires changing several memory parameters In par ticular a Big T X is needed along with an increase in the pool_size parameter Explicit instructions are contained in the file INSTALL 0zTeX of the Xy pic distribution Supported special effects are e colour using PostScript but not of font characters e crayon colours similarly restricted e PostScript back end e variable line widths and poly lines using Post SCRIPT e extra frames and fills using POSTSCRIPT 15OZ2TFX is a shareware implementation of TEX for Macintosh available from many bulletin boards and ftp sites v1 5 and earlier versions were freeware Email contact akt kagi com 16OZTFX is a shareware implementation of TEX for Macintosh available from many bulletin boards and ftp sites v1 5 and earlier versions were freeware Email contact akt kagi com e patterns and tiles using POSTSCRIPT e rotated scaled diagrams and text recognised but not supported 32 6 Textures driver Vers 3 3 by Ross Moore ross mpce mq edu au Load as xyoption textures This driver provides support for version 1 7 of Blue Sky Research s TEXTURES application for Mac intosh It incorporates support for colour and all of Xy pic s PostScript effects Earlier versions of TEXTURES should instead use the driver
182. xcaph 3 restore TrefoilA quad TrefoilB quad TrefoilCc Changing the string style It is not necessary to use solid curves any style avail able to curves and arrows can be chosen using knotstyle char use dir char knotstyles char 4 char two styles knotSTYLE code use code In each case the new style applies to all subse quent knot pieces except that the two styles apply only to crossings The latter case allows use of ob ject modifier s The code consists of two groups each containing arrow forms as in 14 and notes 23m 23r Only the first arrow form is used with join s whereas the two forms are used re spectively with the two strings of a crossing in the order that they are drawn 31 Smart Path option Vers 0 0 by George C Necula neculaQ cs cmu edu Load as xyoption smartpath This extends the arrow feature which is there fore required with a smart path between two pos itions The turn syntax is extended with the construc tion turn gt s diag _ diag turnradius arin_out 5pt which draws a connector leaving p in the in diag onal direction and arrives at c in the out 66 diag onal direction using 5pt turns The connec tor contains only horizontal or vertical lines and 3 sectors of circles of the given optional turnradius Bug Any labels are placed at the end of the con nection Bug This code should
183. y extra commands needed to implement the effects Thus Using this extension will have no effect on the output unless used with a dvi driver that explicitly supports it All effects defined in the tile extension can be im plemented using most POSTSCRIPT driver s loaded as xyoption driver Patterns Patterns are specified as a shape modi fier similar to the way colours are specified by name The pattern is applied to the whole of the current object whether this be text an Xy pic line curve or arrow tip or a composite object such as a matrix 31 or the complete picture However some DVI drivers may not support use of patterns in all cases If the current DVI driver cannot support patterns then a request for one simply produces a warning message in the log file After two such messages sub sequent requests are ignored completely name use named pattern newxypattern name data specify new pattern using data UsePatternFile file sets default file for patterns LoadAl1Patternst file load all patterns in file LoadPattern name file load named pattern from file AliasPattern alias name file let alias denote pattern from file Although pattern data may be specified directly us ing newxypattern it is more usual to load it from a file in which many patterns are defined by name each on a separate line By convention such files al ways end in xy
184. y normal TEX scoping rules for environ ments hence it is sufficient to specify NoPSspecials within an environment or grouping Use of POST SCRIPT will be restored upon exiting from the envi ronment 17 2 Why use POSTSCRIPT At some sites users have difficulty installing the ex tra fonts used by Xy pic The tfm files can always be installed locally but it may be necessary for the pk bitmap fonts or the mf METAFONT fonts to be installed globally by the system administrator for printing to work correctly If POSTSCRIPT is avail able then Xy ps allows this latter step to be bypassed Note with Xy ps it is still necessary to have the tfm font metric files correctly installed as these con tain information vital for correct typesetting Other advantages obtained from using Xy ps are the following e Circles and circle segments can be set for arbi trary radii solid lines are straighter and cleaner e The range of possible angles of directionals is greatly increased Spline curves are smoother True dotted and dashed versions are now possible using equally spaced segments which are themselves curved The POSTSCRIPT file produced by a driver from an Xy ps DVI file is in general significantly smaller than one produced by processing an or dinary DVI file using the same driver One rea son for this is that no font information for the Xy pic fonts is required in the POSTSCRIPT file this furthermore means that the
185. z 0 w s Z y 3 z Wo sx 2 It also shows that one can use s inside delimited arguments provided one adds a space to avoid the s being shaved off Answer to exercise 36 p 54 Here is the code actually used to typeset the xypolygon s within an xygraph It illustrates three different ways to place the numbers Other ways are also possible def objectstyle scriptscriptstyle xy xygraph r2pc P3 A bullet AL 4Ue D 1 AQ LD RU 2Q A3 1 RD LU 3 AO rrr O cir lt 5pt gt 1P6 B lt cir lt 5pt gt B1 1 B2 2 B3 3 B4 4 B5 5 B6 6 BO rrr O0 P9 C xypolynode endxy B Version 2 Compatibility Vers 3 4 by Kristoffer H Rose krisrose brics dk Load as xyoption v2 This appendix describes the special backwards com patibility with Xy pic version 2 diagrams written ac cording to the Typesetting diagrams with Xy pic User s Manual 13 should typeset correctly with this loaded The compatibility is available either as an Xy option or through the special files xypic sty and xypic tex described below There are a few exceptions to the compatibility the features described in B 1 below are not provided because they are not as useful as the author originally thought and thus virtually never used And one extra command is provided to speed up typesetting of doc uments with Xy pic version 2 diagrams by allowing the new compilation functionality wi

Download Pdf Manuals

image

Related Search

Related Contents

Manual - Avolites  Potabilizacion sin bomba de agua  Topcom SOLOGIC B-901 COMBO  HP RP3 3100  Brochure scolaires 2015-2017 : Cordes sur Ciel / Du Pays Cordais  実験実習の安全マニュアル  カタログ - フォモジャパン  MRVIII-S Service Manual    15APR013 QA237 20120315_BDA_Tiervertreiber FE 12x10.indd  

Copyright © All rights reserved.
Failed to retrieve file