| 1 |
\documentclass[12pt]{article} |
| 2 |
\usepackage[ocgcolorlinks=true,allcolors=blue]{hyperref} |
| 3 |
\input diagxy |
| 4 |
\textwidth 6in |
| 5 |
\oddsidemargin 0pt |
| 6 |
\makeindex |
| 7 |
\begin{document} |
| 8 |
\def\xypic{\hbox{\rm\Xy-pic}} |
| 9 |
|
| 10 |
\title{A new diagram package (Version 2015-09-26)} |
| 11 |
\author{Michael Barr\\Dept of Math and Stats, McGill University |
| 12 |
\\[email protected]} |
| 13 |
\date{} |
| 14 |
\maketitle |
| 15 |
\tableofcontents |
| 16 |
|
| 17 |
|
| 18 |
\kern 40pt |
| 19 |
{\narrower |
| 20 |
For the fashion of Minas Tirith was such that it was built on seven levels, |
| 21 |
each delved into a hill, and about each was set a wall, and in each wall |
| 22 |
was a gate. |
| 23 |
|
| 24 |
-- J.R.R.\ Tolkien, ``The Return of the King''\footnote{These macros are |
| 25 |
at the seventh level of nesting. The first level is the code actually |
| 26 |
executed directly by the processor. The second is the microcode, burned |
| 27 |
into the chip, that interprets the assembly language instructions into |
| 28 |
the ones that are directly executed. Level three is the language, |
| 29 |
usually C, but originally Pascal, into which the Web code, the fourth |
| 30 |
level, is compiled. The fifth level is \TeX\ itself, which is best seen |
| 31 |
as a high level programming language for mathematical text processing. |
| 32 |
Level six is the \xypic\ code in which these macros, level seven, are |
| 33 |
written.} |
| 34 |
|
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
\kern 5pt |
| 39 |
Note: This is the first increase in functionality in a couple years. |
| 40 |
Following a suggestion of Gerd Zeibig (who implemented this in a very |
| 41 |
different way), I have added a new feature wherein you can create simple |
| 42 |
identifiers for nodes and then describe arrows between those nodes using |
| 43 |
the identifiers. See~\ref{nodes&arrows} for details, syntax and |
| 44 |
examples. I have also recently added support for loops, both inline and |
| 45 |
in diagrams. |
| 46 |
|
| 47 |
Note (2008-01-21): The main thing that is changed is in the arrow |
| 48 |
specification `.$>$'. What the standard package produces are very fine |
| 49 |
dots. They are actually tiny rules, about .4 pt square. I have changed |
| 50 |
them to being about .7 pt square, which makes them more visible. In |
| 51 |
addition, there is a newdir {d}, used as `{}{d}$>$' (otherwise the {d} |
| 52 |
gets treated as a tail, not a shaft) that substitutes . for those tiny |
| 53 |
rules. The only problem is it works well only for arrows that are |
| 54 |
horizontal or nearly so (up to about 30 degrees). I played with many |
| 55 |
variations of the definition, but could not make any of them work right. |
| 56 |
In principle, I would prefer to get this right, but several hours of |
| 57 |
playing with it did not succeed in solving the `Whack-a-Mole' problem. |
| 58 |
If it looked good at some angles, it was worse at others. I could get |
| 59 |
them looking good for both horizontal and vertical arrows, but then the |
| 60 |
45 degree ones looked awful. Aside from that there are some minor bug |
| 61 |
fixes. |
| 62 |
|
| 63 |
Note (2008-12-02) What has been added are new macros \verb+\Diamond+, |
| 64 |
\verb+\rlimto+, and \verb+\llimto+. \verb+\Diamond+ is capitalized to |
| 65 |
avoid clashing with a standard macro \verb+\diamond+. It has the same |
| 66 |
paramter sets as \verb+\square+. The other two have no parameters and |
| 67 |
are only for the purpose of putting a right, resp. left, arrow to the |
| 68 |
right of or under \verb+\lim+. They will go under in a display or if |
| 69 |
you follow \verb+\lim+ by \verb+\limits+. |
| 70 |
|
| 71 |
Note (2015-09-27) The details of handling \verb.\node. and \verb.\arrow. |
| 72 |
have been changed so that \verb.\node. lays down ink by itself and |
| 73 |
\verb.\arrow. no longer adds the nodes. There are two reasons for this |
| 74 |
change. Someone wrote me complaining that when a node was put in twice |
| 75 |
the regisration was not perfect. I could not see it, but I made the |
| 76 |
change and it satisfied him. Much more importantly, it allows a node to |
| 77 |
appear that has no arrow to or from it. This makes it possible to work |
| 78 |
well with the \verb.\uncover. macro in beamer (see ``Use with beamer'' |
| 79 |
below). |
| 80 |
|
| 81 |
\section{Why another diagram package?} |
| 82 |
|
| 83 |
This started when a user of my old package, diagram, wrote to ask me if |
| 84 |
dashed lines were possible. The old package had dashed lines for |
| 85 |
horizontal and vertical arrows, but not any other direction. The reason |
| 86 |
for this was that \LaTeX\ used rules for horizontal and vertical arrows, |
| 87 |
but had its own fonts for other directions. While rules could be made |
| 88 |
any size, the smallest lines in other directions were too long for |
| 89 |
decent looking dashes. Presumably, Lamport was worried about compile |
| 90 |
time and file size if the lines were too short, considerations that have |
| 91 |
diminished over the years since. Also arrows could be drawn in only 48 |
| 92 |
different directions, which is limiting. My macros were not very well |
| 93 |
implemented for slopes like 4 and 1/4, since I never used such lines. |
| 94 |
|
| 95 |
There was certainly an alternative, \xypic, for those who wanted |
| 96 |
something better. But it was hard to learn and I was not entirely happy |
| 97 |
with the results. The basic interface used an |
| 98 |
\index{\backslash halign}\verb.\halign.. This |
| 99 |
meant that no extra space was allotted to an arrow that had a large |
| 100 |
label. In addition, the different slots could have different horizontal |
| 101 |
size, which could result in a misshapen diagram. I used it in a paper |
| 102 |
that had a `W' shaped diagram whose nodes had different widths and the |
| 103 |
result was quite obviously misshapen. On the other hand, the graphics |
| 104 |
engine underlying \xypic\ is really quite remarkable and it occurred to |
| 105 |
me that I could try to redraft diagram as a front end. The result is |
| 106 |
the current package. It has been tested mainly with version 3.7, so |
| 107 |
there is no guarantee it would work with any earlier version (or, for |
| 108 |
that matter, later). A limited amount of testing with version 3.6 |
| 109 |
suggests that the only thing that does not work is the 2-arrows; these |
| 110 |
come out vanishingly short. |
| 111 |
|
| 112 |
So despite the desire for logical programming, it still seems that for |
| 113 |
some purposes, it is desirable to have a system in which you specify |
| 114 |
what goes where and where the arrows are drawn. |
| 115 |
|
| 116 |
\subsection{The latest version} |
| 117 |
The latest version can be downloaded at |
| 118 |
\verb,ftp://ftp.math.mcgill.ca/pub/barr/diagxy.zip, or by anonymous ftp |
| 119 |
from \verb,ftp.math.mcgill.ca//pub/barr/diagxy.zip,. |
| 120 |
|
| 121 |
|
| 122 |
\subsection{Main features} |
| 123 |
|
| 124 |
\begin{itemize} |
| 125 |
\item A general arrow drawing function |
| 126 |
\index{\backslash morphism}\verb.\morphism.. |
| 127 |
\item Various common diagram shapes such as squares, triangles, etc. |
| 128 |
\item A few special shapes such as cube and $3\times3$ diagrams. |
| 129 |
\item Small 2-arrows that can be placed anywhere in a diagram, much |
| 130 |
like \LaTeX's |
| 131 |
picture |
| 132 |
environment. |
| 133 |
\item A uniform syntax, while allowing access to all of \xypic's |
| 134 |
capabilities |
| 135 |
\item Never expires and does not request acknowledgment. |
| 136 |
\end{itemize} |
| 137 |
|
| 138 |
\subsection{Compatibility} |
| 139 |
The syntax described below is not compatible with the original diagram |
| 140 |
package. Every front end of this sort represents a trade-off between |
| 141 |
simplicity and utility. A package that simply upgraded the syntax to |
| 142 |
allow more dashed (and dotted) lines would have been just as easy to |
| 143 |
implement, but would have made poor use of the wonderful possibilities |
| 144 |
of the underlying \xypic\ package. Also there would have been too many |
| 145 |
different arrow specifications (they would have had to go at least in |
| 146 |
the range $[-9,9]$) for easy memory) and still would not have included |
| 147 |
things like inclusion arrows. To those who would have liked a simpler |
| 148 |
syntax, I apologize. Those who would want more flexibility, I remind |
| 149 |
that the entire \xypic\ package is there for use. |
| 150 |
|
| 151 |
\subsection{Errant spaces} |
| 152 |
There is one point that cannot be made too strongly. {\em Watch for |
| 153 |
errant spaces.} Unlike the old diagram package, which was carried out in |
| 154 |
math mode so that spaces were ignored, \xypic\ is not in math mode and |
| 155 |
spaces will mess up your diagrams. On the other hand, it will not be |
| 156 |
necessary to enclose duplicate nodes inside |
| 157 |
\index{\backslash phantom}\verb.\phantom., since the |
| 158 |
registration between different nodes is perfect. In the old package, |
| 159 |
for reasons that I now understand, objects did not always register |
| 160 |
properly. This was a flaw built in to the very heart of the package and |
| 161 |
is not worth correcting, although it could have been done better in the |
| 162 |
first place. If you see an object in double vision, then the almost |
| 163 |
certain cause is that a space has gotten in there somewhere. I have |
| 164 |
attempted to prevent this by liberal use of |
| 165 |
\index{\backslash ignorespaces}\verb.\ignorespaces. in the |
| 166 |
definitions, but one cannot always be sure and while testing, I found a |
| 167 |
number seemingly innocuous spaces that messed up diagrams. When in |
| 168 |
doubt, always terminate a specification with a |
| 169 |
\index{%}\verb.%.. See the |
| 170 |
examples. |
| 171 |
|
| 172 |
\subsection{Font sizes} |
| 173 |
According to the documentation of \xypic, the declarations |
| 174 |
\begin{verbatim} |
| 175 |
\xyoption{tips} |
| 176 |
\SelectTips{xy}{12} |
| 177 |
\end{verbatim} |
| 178 |
\index{tips} will cause 12 point tips to be used. This does not appear |
| 179 |
to be the case. The only way I can seem to get larger font sizes is to |
| 180 |
add \index{\backslash fontscale{x}}\verb.\fontscale{x}., with \index{x}\verb.x. |
| 181 |
taking on the values \verb.0,h,1,2,3,4,5., after \xypic\ is loaded. |
| 182 |
With \verb.11pt. you will want \verb.h. and with \verb.12pt. you will |
| 183 |
want 1. The others are in case you use larger sizes for transparencies |
| 184 |
or for later reduction, in conjunction with extarticle.cls. While on |
| 185 |
the subject, I might mention that if |
| 186 |
you want thicker arrow shafts without enlarging anything else you could |
| 187 |
add the declaration |
| 188 |
\begin{verbatim} |
| 189 |
\font\xydashfont=xydash scaled \magstep1 |
| 190 |
\end{verbatim} |
| 191 |
or even larger. However, this does not thicken the arrow tips and is |
| 192 |
not really recommended. There is probably no way (short of creating |
| 193 |
your own fonts) to thicken the tips without also lengthening them. |
| 194 |
|
| 195 |
I had some trouble generating the font files at the larger sizes, so the |
| 196 |
file xyfonts.zip, found at my ftp site (ftp.math.mcgill.ca/pub/barr) has |
| 197 |
fonts for the ljfour generated at all sizes from 10--20 points. |
| 198 |
|
| 199 |
\subsection{Acknowledgments} |
| 200 |
First, I would like to thank Kris Rose for a superb programming job |
| 201 |
that made this package possible. The original versions of \xypic\ were |
| 202 |
based on matrices, but this version includes code to place an arrow with |
| 203 |
two nodes (more precisely, their centers) a user-definable distance |
| 204 |
apart and that is exactly what I needed. Second I would like to thank |
| 205 |
Ross Moore who answered innumerable questions about the use of the |
| 206 |
macros that the documentation did not answer or at least I could not |
| 207 |
understand what it said. I thank Donald Arsenau answered several of my |
| 208 |
questions about the internals of \TeX\ that I did not understand |
| 209 |
clearly and Steve Bloom who found a couple |
| 210 |
of typos in the first version of these notes. Finally, I would like to |
| 211 |
thank all those, but especially Charles Wells, who gave me opinions on |
| 212 |
the best syntax. But I made the final decisions and if you have any |
| 213 |
complaints, you can direct them to me. Not that I am likely to change |
| 214 |
anything at this date. |
| 215 |
|
| 216 |
\subsection{License} |
| 217 |
The use of this package is unrestricted. It may be freely distributed, |
| 218 |
unchanged, for non-commercial or commercial use. If changed, it must be |
| 219 |
renamed. Inclusion in a commercial software package is also permitted, |
| 220 |
but I would appreciate receiving a free copy for my personal examination |
| 221 |
and use. There are no guarantees that this package is good for |
| 222 |
anything. I have tested it with LaTeX 2e, LaTeX 2.09 and Plain TeX. |
| 223 |
Although I know of no reason it will not work with AMSTeX, I have not |
| 224 |
tested it. |
| 225 |
|
| 226 |
\section{The basic syntax} |
| 227 |
|
| 228 |
The basic syntax is built around an operation |
| 229 |
\index{\backslash morphism}\verb.\morphism. that is |
| 230 |
used as \index{\backslash morphism} |
| 231 |
\begin{verbatim} |
| 232 |
\morphism(x,y)|p|/{sh}/<dx,dy>[N`N;L] |
| 233 |
\end{verbatim} |
| 234 |
The last group of parameters is required. They are the source and |
| 235 |
target nodes of the arrow and the label. The remaining parameters are |
| 236 |
optional and default to commonly used values. Currently, the |
| 237 |
\verb.L.\index{label} is set in \index{\backslash scriptstyle}\verb.\scriptstyle. |
| 238 |
size, but this can easily be changed by putting |
| 239 |
\index{\backslash let\backslash labelstyle=\backslash textstyle} |
| 240 |
\verb.\let\labelstyle=\textstyle. in |
| 241 |
your file. |
| 242 |
|
| 243 |
The parameters \verb.x. and \verb.y. give the location of the source |
| 244 |
node within a fixed local coordinate system and \verb-x+dx- and |
| 245 |
\verb-y+dy- locate the target. To be precise, the first coordinate is |
| 246 |
the horizontal center of the node and the second is that of the base |
| 247 |
line. These distances are given in terms of \index{\backslash ul}\verb.\ul.'s, |
| 248 |
(for unitlength), which is user assignable, but currectly is .01em. The |
| 249 |
placement parameter \verb.p. is one of \verb.a,b,l,r,m. that stand for |
| 250 |
above, below, left, right, or mid and describe the positioning of the |
| 251 |
arrow label on the arrow. If it is given any value other than those |
| 252 |
five, it is ignored. We describe below why you might want it ignored. |
| 253 |
The label \index{m}\verb.m. stands for a label positioned in the middle |
| 254 |
of a split arrow. When used on a non-vertical arrow, \index{a}\verb.a. |
| 255 |
positions the label above the arrow and \index{b}\verb.b. positions it |
| 256 |
below. On a vertical arrow, the positioning depends on whether the |
| 257 |
arrow points up or down. Similarly, when used on a non-horizontal |
| 258 |
arrow, \index{l}\verb.l. positions the label to the left and |
| 259 |
\index{r}\verb.r. positions it to the right, while on a horizontal arrow |
| 260 |
it depends on which way it points. |
| 261 |
|
| 262 |
The shape parameter \verb.sh. describes the shape of the arrow. An |
| 263 |
arrow is thought of as consisting of three parts, the tail, the shaft |
| 264 |
and the head. You may specify just the head, in which case the shaft |
| 265 |
will be an ordinary line, or all three. However, since the tail can be |
| 266 |
(and usually is) empty, in practice you can also describe the shaft and |
| 267 |
tail. In addition, it is possible to modify the arrow in various ways. |
| 268 |
Although the parameter is shown within braces, the braces can be omitted |
| 269 |
unless one of the modifier characters is \verb./., in which case, {\em |
| 270 |
the entire parameter} must be put in braces. It is important to note |
| 271 |
that it will not work just to put the \verb./. inside the braces, since |
| 272 |
this will interfere with the internal parsing of \xypic. The head and |
| 273 |
tail shapes are basically one of \index{>}\verb.>., \index{>>}\verb.>>., |
| 274 |
\verb.(., \verb.)., \index{>}\verb*+>+, and \index{<}\verb*+<+. Each of |
| 275 |
these may also be preceded by \index{^}\verb.^. or \index{_}\verb._. and |
| 276 |
others are user definable. For details, see the \xypic\ reference |
| 277 |
manual. The first of these is an ordinary head, while the second is for |
| 278 |
an epic arrow. The third is not much used, but the superscripted |
| 279 |
version makes and inclusion tail, as will be illustrated below. The |
| 280 |
reverse ones give reversed arrowheads. The sign \verb*+ + stands for an |
| 281 |
obligatory space and it leaves extra space for a tailed (monic) arrow, |
| 282 |
which otherwise runs into the source node. Although there are many |
| 283 |
possibilities for shafts, including alphanumeric characters, the ones |
| 284 |
that mainly interest us are: \index{-}\verb.-., which is an ordinary |
| 285 |
shaft, \index{--}\verb.--., which produces a dashed arrow, |
| 286 |
\index{=}\verb.=., which gives a double arrow (although with only one |
| 287 |
arrowhead), and ., which makes a dotted arrow. Thus \index{>}\verb.>. |
| 288 |
or \index{->}\verb.->. will produce an ordinary arrow, |
| 289 |
\index{->>}\verb.->>. an epic arrow, \index{ >->}\verb*+ >->+ makes a |
| 290 |
monic arrow, and \index{-->>}\verb.-->>. would make a dashed epic arrow. |
| 291 |
The descriptions \index{<-}\index{<<-}\verb.<-,<<-,. \index{<-< |
| 292 |
}\verb*+<-< +, and \index{<<--}\verb.<<--. give the reversed versions. |
| 293 |
Note that \index{<}\verb.<. does not give a reversed arrow, since |
| 294 |
\xypic\ interprets that as a reversed head, not a tail. |
| 295 |
|
| 296 |
If the shape parameter begins with an \index{@}\verb.@., it is |
| 297 |
interpreted differently. In that case, it has the form |
| 298 |
\index{@{shape}@}\verb.@{shape}@. modifier, where the modifier is as |
| 299 |
described in the \xypic\ reference guide. I just mention a couple of |
| 300 |
them. The parameter \index{@{->}@<3pt>}\verb.@{->}@<3pt>., for example, |
| 301 |
would give an ordinary arrow moved three points in the direction |
| 302 |
perpendicular to that of the arrow. If you give |
| 303 |
\index{{@{->>}@/^5pt/}}\verb.{@{->>}@/^5pt/}., you will get an epic |
| 304 |
arrow that is curved in the direction perpendicular to the direction of |
| 305 |
the arrow by five points. It is imperative that a specification such as |
| 306 |
\index{@{>}@/5pt/}\verb.@{>}@/5pt/. be enclosed in braces because of the |
| 307 |
\index{/}\verb./.s. |
| 308 |
|
| 309 |
\subsection{A word about parameters} |
| 310 |
I have already mentioned the necessity of enclosing certain arrow shape |
| 311 |
specifications in braces. Because of the way \TeX\ operates, I have |
| 312 |
used a number of different delimiters: \index{(}\verb.(., |
| 313 |
\index{)}\verb.)., \index{|}\verb.|., \index{/}\verb./., |
| 314 |
\index{<}\verb.<., \index{>}\verb.>., \index{[}\verb.[., |
| 315 |
\index{]}\verb.]., \index{`}\verb.`., and \index{;}\verb.;.. Any of |
| 316 |
these that appear inside an argument could conceivably cause problems. |
| 317 |
They were chosen as the least likely to appear inside mathematics |
| 318 |
(except for \index{(,)}\verb.(,). which appear in positions that are |
| 319 |
unlikely to cause problems). However, be warned that this is a possible |
| 320 |
cause of mysterious error messages. If this happens, enclosing the |
| 321 |
offending parameter in braces should cure the problem. The exceptions |
| 322 |
come when the braces interfere with \xypic's somewhat arcane parsing |
| 323 |
mechanism. One place it imperative to use braces is if you attempt to |
| 324 |
use a disk as a tip. Although most tips do not have to be enclosed in |
| 325 |
braces, you get a small solid disk tip from \index{{*}}\verb.{*}. and |
| 326 |
not from \index{*}\verb.*. (see the note at the bottom of the first |
| 327 |
column of page 42 in the reference manual. The first three of |
| 328 |
\begin{verbatim} |
| 329 |
\morphism(0,300)|a|/-*/<500,0>[A`B;f] |
| 330 |
\morphism(0,0)|a|/{-*}/<500,0>[A`B;f] |
| 331 |
\morphism(0,0)|a|/{*}/<500,0>[A`B;f] |
| 332 |
\morphism(0,0)|a|/-{*}/<500,0>[A`B;f] |
| 333 |
\end{verbatim} |
| 334 |
give error messages. Only the fourth works: |
| 335 |
$$\bfig |
| 336 |
\morphism(0,0)|a|/-{*}/<500,0>[A`B;f] |
| 337 |
\efig$$ |
| 338 |
|
| 339 |
In addition to the diagrams, there are macros that are intended to be |
| 340 |
used inline to make horizontal arrows, pointing left or right, plain, |
| 341 |
monic, epic, or user-definable shapes, and calculating their own length |
| 342 |
to fit the label. Finally, there is a macro for making short 2-arrows |
| 343 |
that may be placed (actually, \index{\backslash place}\verb.\place.d) anywhere in |
| 344 |
a diagram. |
| 345 |
|
| 346 |
|
| 347 |
\section{Defined diagrams} |
| 348 |
|
| 349 |
Using the basic |
| 350 |
\index{\backslash morphism}\verb.\morphism. macro, I have a defined a number of |
| 351 |
diagrams: squares (really rectangles) and variously oriented triangles |
| 352 |
and a few compound diagrams. The basic shapes are exactly the same as |
| 353 |
in the old diagram package, but the options are done entirely |
| 354 |
differently. Here is the syntax of the |
| 355 |
\index{\backslash square}\verb.\square. macro: |
| 356 |
\begin{verbatim} |
| 357 |
\square(x,y)|pppp|/{sh}`{sh}`{sh}`{sh}/<dx,dy>[N`N`N`N;L`L`L`L] |
| 358 |
\end{verbatim} |
| 359 |
Each of the first four sets of parameters is optional and any subset of |
| 360 |
them can be omitted. (Note that only the sets can be omitted, once you |
| 361 |
give \index{dx}\verb.dx., you also have to give \index{dy}\verb.dy. and |
| 362 |
so on.) The first set gives the horizontal and vertical position (in a |
| 363 |
local coordinate system) of the lower left corner of the square, the |
| 364 |
next four give the label placements using the same five characters |
| 365 |
previously described. The next four give the shapes of the arrows using |
| 366 |
the same syntax as discussed above. The last group is horizontal and |
| 367 |
vertical size of the square. More precisely, the \index{x}\verb.x. |
| 368 |
coordinate is that of the midpoint of the node, while the |
| 369 |
\index{y}\verb.y. coordinate is that of the baseline of the node. This |
| 370 |
is entirely based on \xypic. |
| 371 |
|
| 372 |
In the case of other shapes, discussed below, the positioning parameter |
| 373 |
may be different. The \index{x}\verb.x. coordinate is the midpoint of |
| 374 |
the leftmost node and the \index{y}\verb.y. coordinate is the baseline |
| 375 |
of the lowest node. In the case of the |
| 376 |
\index{\backslash qtriangle}\verb.\qtriangle., |
| 377 |
\index{\backslash Vtriangle}\verb.\Vtriangle., and |
| 378 |
\index{\backslash Ctriangle}\verb.\Ctriangle. described below, these are different |
| 379 |
nodes. What this positioning means is that if you specify the |
| 380 |
coordinates and sizes correctly the shapes will automatically fit |
| 381 |
together. The last example on Page~\pageref{TTTdiag} illustrates this. |
| 382 |
|
| 383 |
Here is a listing of the shapes, together with the groups of parameters. |
| 384 |
In all cases, the first four groups are optional and any subset of them |
| 385 |
will work. However, they must come in the order given. Note that the |
| 386 |
names of the triangles are related to the shape as the shape that best |
| 387 |
approximates the shape of the letter. For example, a |
| 388 |
\index{\backslash ptriangle}\verb.\ptriangle. is a right triangle that has its |
| 389 |
hypotenuse going from upper right to lower left. Triangles with lower |
| 390 |
case names have their legs horizontal and vertical and the dimension |
| 391 |
parameters are the lengths of the legs. Those with capitalized names |
| 392 |
have their hypotenuse horizontal or vertical. In those cases, one of |
| 393 |
\index{dx}\verb.dx. or \index{dy}\verb.dy. is the length of a leg and |
| 394 |
the other is {\em half} the length of the hypotenuse. In all cases, the |
| 395 |
order of the nodes and of the arrows is linguistic, first moving from |
| 396 |
left to right and then down. The defaults are reasonable, but with |
| 397 |
triangles, there is not always a natural direction for arrows. I always |
| 398 |
made mistakes in the order with my macros and this is certainly a |
| 399 |
defect. But the order is the same. In every case the braces around the |
| 400 |
shape specification can be removed unless it includes the following |
| 401 |
delimiter (that is, \index{`}\verb.`. or \index{/}\verb./., as the case |
| 402 |
may be.) |
| 403 |
\begin{verbatim} |
| 404 |
\square(x,y)|pppp|/{sh}`{sh}`{sh}`{sh}/<dx,dy>% |
| 405 |
[N`N`N`N;L`L`L`L] |
| 406 |
\ptriangle(x,y)|ppp|/{sh}`{sh}`{sh}/<dx,dy>[N`N`N;L`L`L] |
| 407 |
\qtriangle(x,y)|ppp|/{sh}`{sh}`{sh}/<dx,dy>[N`N`N;L`L`L] |
| 408 |
\dtriangle(x,y)|ppp|/{sh}`{sh}`{sh}/<dx,dy>[N`N`N;L`L`L] |
| 409 |
\btriangle(x,y)|ppp|/{sh}`{sh}`{sh}/<dx,dy>[N`N`N;L`L`L] |
| 410 |
\Atriangle(x,y)|ppp|/{sh}`{sh}`{sh}/<dx,dy>[N`N`N;L`L`L] |
| 411 |
\Vtriangle(x,y)|ppp|/{sh}`{sh}`{sh}/<dx,dy>[N`N`N;L`L`L] |
| 412 |
\Ctriangle(x,y)|ppp|/{sh}`{sh}`{sh}/<dx,dy>[N`N`N;L`L`L] |
| 413 |
\Dtriangle(x,y)|ppp|/{sh}`{sh}`{sh}/<dx,dy>[N`N`N;L`L`L] |
| 414 |
\Atrianglepair(x,y)|ppppp|/{sh}`{sh}`{sh}`{sh}`{sh}/% |
| 415 |
<dx,dy>[N`N`N`N;L`L`L`L`L] |
| 416 |
\Vtrianglepair(x,y)|ppppp|/{sh}`{sh}`{sh}`{sh}`{sh}/% |
| 417 |
<dx,dy>[N`N`N`N;L`L`L`L`L] |
| 418 |
\Ctrianglepair(x,y)|ppppp|/{sh}`{sh}`{sh}`{sh}`{sh}/% |
| 419 |
<dx,dy>[N`N`N`N;L`L`L`L`L] |
| 420 |
\Dtrianglepair(x,y)|ppppp|/{sh}`{sh}`{sh}`{sh}`{sh}/% |
| 421 |
<dx,dy>[N`N`N`N;L`L`L`L`L] |
| 422 |
\end{verbatim} |
| 423 |
\index{\backslash square} \index{\backslash ptriangle} \index{\backslash qtriangle} \index{\backslash dtriangle} |
| 424 |
\index{\backslash btriangle} \index{\backslash Atriangle} \index{\backslash Vtriangle} |
| 425 |
\index{\backslash Ctriangle} \index{\backslash Dtriangle} \index{\backslash Atrianglepair} |
| 426 |
\index{\backslash Vtrianglepair} \index{\backslash Ctrianglepair} \index{\backslash Dtrianglepair} |
| 427 |
Note that the |
| 428 |
\verb.%. signs are required if you break the |
| 429 |
macro at such points. See also the discussion of errant spaces above. |
| 430 |
|
| 431 |
To make a diagram, you have to enclose it inside \index{\backslash xy ... |
| 432 |
\backslash endxy}.\verb,\xy ... \endxy,. You will usually want it |
| 433 |
displayed, |
| 434 |
for which the simplest way is to enclose it in \index{$$\xy ... |
| 435 |
\endxy$$}\verb,$$\xy...\endxy$$,. In previous versions of this, the |
| 436 |
macros |
| 437 |
\index{\backslash bfig}\verb.\bfig. and \index{\backslash efig}\verb.\efig. be synonyms for |
| 438 |
were synonyms for |
| 439 |
\index{\backslash xy}\verb.\xy. and \index{\backslash endxy}\verb.\endxy., |
| 440 |
resp. They have now been redefined to also put the box produced by |
| 441 |
\verb.\xy. into a \verb.\vcenter. box. The effect of this is that when |
| 442 |
\index{\backslash eqno}\verb.\eqno. is used with a diagram, the |
| 443 |
resulting equation number will be vertically centered. |
| 444 |
|
| 445 |
|
| 446 |
\section{Examples} |
| 447 |
|
| 448 |
Many people---including me---learn mainly by example and |
| 449 |
I will give a number of examples here. The formal |
| 450 |
syntax that is not given here can be learned in the \xypic\ reference |
| 451 |
manual. More samples from an actual paper can be found in |
| 452 |
\verb,ftp.math.mcgill.ca/pub/barr/derfun.tex,. If you want to compile |
| 453 |
that paper, you will need \verb,tac.cls,, available from \verb,tac.ca,. |
| 454 |
We begin with \index{\backslash morphism} |
| 455 |
\begin{verbatim} |
| 456 |
$$\bfig |
| 457 |
\morphism[A`B;f] |
| 458 |
\morphism(0,300)[A`B;f] |
| 459 |
\morphism(0,600)|m|[A`B;f] |
| 460 |
\morphism(0,900)/<-/[A`B;f] |
| 461 |
\morphism(900,500)<0,-500>[A`B;f] |
| 462 |
\morphism(1200,0)<0,500>[A`B;f] |
| 463 |
\efig$$ |
| 464 |
\end{verbatim} |
| 465 |
which gives the diagram |
| 466 |
$$\bfig |
| 467 |
\morphism[A`B;f] |
| 468 |
\morphism(0,300)[A`B;f] |
| 469 |
\morphism(0,600)|m|[A`B;f] |
| 470 |
\morphism(0,900)/<-/[A`B;f] |
| 471 |
\morphism(900,500)<0,-500>[A`B;f] |
| 472 |
\morphism(1200,0)<0,500>[A`B;f] |
| 473 |
\efig$$ |
| 474 |
\begin{verbatim} |
| 475 |
$$\bfig |
| 476 |
\square[A`B`C`D;e`f`g`m] |
| 477 |
\efig$$ |
| 478 |
\end{verbatim} |
| 479 |
produces |
| 480 |
$$\bfig |
| 481 |
\square[A`B`C`D;e`f`g`m] |
| 482 |
\efig$$ |
| 483 |
This can be modified, for example |
| 484 |
\begin{verbatim} |
| 485 |
$$\bfig |
| 486 |
\square/>>`>`>` >->/[A`B`C`D;e`f`g`m] |
| 487 |
\efig$$ |
| 488 |
\end{verbatim} |
| 489 |
produces |
| 490 |
$$\bfig |
| 491 |
\square/>>`>`>` >->/[A`B`C`D;e`f`g`m] |
| 492 |
\efig$$ |
| 493 |
This can be put together with a morphism as follows: |
| 494 |
\begin{verbatim} |
| 495 |
$$\bfig |
| 496 |
\square/>>`>`>` >->/[A`B`C`D;e`f`g`m] |
| 497 |
\morphism(500,500)|m|/.>/<-500,-500>[B`C;h] |
| 498 |
\efig$$ |
| 499 |
\end{verbatim} |
| 500 |
\index{\backslash square} |
| 501 |
which makes a familiar diagram: |
| 502 |
$$\bfig |
| 503 |
\square/>>`>`>` >->/[A`B`C`D;e`f`g`m] |
| 504 |
\morphism(500,500)|m|/.>/<-500,-500>[B`C;h] |
| 505 |
\efig$$ |
| 506 |
The same diagram could have been made by |
| 507 |
\begin{verbatim} |
| 508 |
$$\bfig |
| 509 |
\ptriangle|alm|/>>`>`.>/[A`B`C;e`f`h] |
| 510 |
\dtriangle/`>` >->/[B`C`D;`g`m] |
| 511 |
\efig$$ |
| 512 |
\end{verbatim} |
| 513 |
\index{\backslash ptriangle} \index{\backslash dtriangle} |
| 514 |
|
| 515 |
There are four macros for making pairs of triangles put together: |
| 516 |
$$\bfig |
| 517 |
\Vtrianglepair[A`B`C`D;f`g`h`k`l] |
| 518 |
\efig$$ |
| 519 |
comes from |
| 520 |
\begin{verbatim} |
| 521 |
$$\bfig |
| 522 |
\Vtrianglepair[A`B`C`D;f`g`h`k`l] |
| 523 |
\efig$$ |
| 524 |
\end{verbatim} |
| 525 |
\index{\backslash Vtrianglepair} |
| 526 |
\index{\backslash Atrianglepair} |
| 527 |
\index{\backslash Ctrianglepair} |
| 528 |
\index{\backslash Dtrianglepair} |
| 529 |
|
| 530 |
The other three are called \verb.\Atrianglepair., |
| 531 |
\verb.\Ctrianglepair., and \verb.\Dtrianglepair.. |
| 532 |
|
| 533 |
You can fit two squares together, horizontally: |
| 534 |
\begin{verbatim} |
| 535 |
$$\bfig |
| 536 |
\square|almb|[A`B`C`D;f`g`h`k] |
| 537 |
\square(500,0)/>``>`>/[B`E`D`F;l``m`n] |
| 538 |
\efig$$ |
| 539 |
\end{verbatim} |
| 540 |
$$\bfig |
| 541 |
\square|almb|[A`B`C`D;f`g`h`k] |
| 542 |
\square(500,0)/>``>`>/[B`E`D`F;l``m`n] |
| 543 |
\efig$$ |
| 544 |
or vertically |
| 545 |
\begin{verbatim} |
| 546 |
$$\bfig |
| 547 |
\square(0,500)|alrm|[A`B`C`D;f`g`h`k] |
| 548 |
\square/`>`>`>/[C`D`E`F;`l`m`n] |
| 549 |
\efig$$ |
| 550 |
\end{verbatim} |
| 551 |
$$\bfig |
| 552 |
\square(0,500)|alrm|[A`B`C`D;f`g`h`k] |
| 553 |
\square/`>`>`>/[C`D`E`F;`l`m`n] |
| 554 |
\efig$$ |
| 555 |
or a square and a triangle |
| 556 |
\begin{verbatim} |
| 557 |
$$\bfig |
| 558 |
\Ctriangle/<-`>`>/<400,400>[\hbox{\rm rec}(A,B)`B`X;r_0(A,B)`f`t_0] |
| 559 |
\square(400,0)/<-``>`<-/<1000,800>[\hbox{\rm rec}(A,B)`A\times\hbox{\rm |
| 560 |
rec}(A,B)`X`A\times X;r(A,B)``\hbox{\rm id}_A\times f`t] |
| 561 |
\efig$$ |
| 562 |
\end{verbatim} |
| 563 |
gives the diagram |
| 564 |
$$\bfig |
| 565 |
\Ctriangle/<-`>`>/<400,400>[\hbox{\rm rec}(A,B)`B`X;r_0(A,B)`f`t_0] |
| 566 |
\square(400,0)/<-``>`<-/<1000,800>[\hbox{\rm rec}(A,B)`A\times\hbox{\rm |
| 567 |
rec}(A,B)`X`A\times X;r(A,B)``\hbox{\rm id}_A\times f`t] |
| 568 |
\efig$$ |
| 569 |
This diagram is on page 361 of the third edition of Category Theory for |
| 570 |
Computing Science to describe recursion. |
| 571 |
Here is an example using the procedure for sliding an arrow sideways. |
| 572 |
This one could even be used in a text, |
| 573 |
\index{sliding arrows} |
| 574 |
$\xy \morphism(0,0)|a|/@{>}@<3pt>/<400,0>[A`B;d] |
| 575 |
\morphism(0,0)|b|/@{>}@<-3pt>/<400,0>[A`B;e]\endxy$ |
| 576 |
which was made using |
| 577 |
\begin{verbatim} |
| 578 |
$\xy \morphism(0,0)|a|/@{>}@<3pt>/<400,0>[A`B;d] |
| 579 |
\morphism(0,0)|b|/@{>}@<-3pt>/<400,0>[A`B;e]\endxy$ |
| 580 |
\end{verbatim} |
| 581 |
Indidentally, if you don't put this in math mode, the diagram will come |
| 582 |
out too low, for reasons I do not understand but must be buried within |
| 583 |
the \xypic\ code. |
| 584 |
Later we will introduce a number of inline procedures. |
| 585 |
|
| 586 |
Something a bit different that illustrates the use of another shaft |
| 587 |
|
| 588 |
\index{=}\verb.=. that gives a 2-arrow, as well as curved arrows: |
| 589 |
\begin{verbatim} |
| 590 |
$$\bfig |
| 591 |
\morphism(0,0)|a|/{@{>}@/^1em/}/<500,0>[A`B;f] |
| 592 |
\morphism(0,0)|b|/{@{>}@/_1em/}/<500,0>[A`B;g] |
| 593 |
\morphism(250,50)|a|/=>/<0,-100>[``] |
| 594 |
\efig$$ |
| 595 |
\end{verbatim} |
| 596 |
$$\bfig |
| 597 |
\morphism(0,0)|a|/{@{>}@/^1em/}/<500,0>[A`B;f] |
| 598 |
\morphism(0,0)|b|/{@{>}@/_1em/}/<500,0>[A`B;g] |
| 599 |
\morphism(250,50)|a|/=>/<0,-100>[`;] |
| 600 |
\efig$$ |
| 601 |
In order to use curved arrows, you must insert |
| 602 |
\index{\backslash xyoption{curve}}\verb.\xyoption{curve}. |
| 603 |
into your file. Here are two ways of doing three arrows between two |
| 604 |
objects, depending on what you like: |
| 605 |
\begin{verbatim} |
| 606 |
$$\bfig |
| 607 |
\morphism(0,0)|a|/@{>}@<5pt>/<500,0>[A`B;f] |
| 608 |
\morphism(0,0)|m|/@{>}/<500,0>[A`B;g] |
| 609 |
\morphism(0,0)|b|/@{>}@<-5pt>/<500,0>[A`B;h] |
| 610 |
\efig$$ |
| 611 |
\end{verbatim} |
| 612 |
which gives |
| 613 |
$$\bfig |
| 614 |
\morphism(0,0)|a|/@{>}@<5pt>/<500,0>[A`B;f] |
| 615 |
\morphism(0,0)|m|/@{>}/<500,0>[A`B;g] |
| 616 |
\morphism(0,0)|b|/@{>}@<-5pt>/<500,0>[A`B;h] |
| 617 |
\efig$$ |
| 618 |
and |
| 619 |
\begin{verbatim} |
| 620 |
$$\bfig |
| 621 |
\morphism(0,0)|a|/{@{>}@/^5pt/}/<500,0>[A`B;f] |
| 622 |
\morphism(0,0)|m|/@{>}/<500,0>[A`B;g] |
| 623 |
\morphism(0,0)|b|/{@{>}@/^-5pt/}/<500,0>[A`B;h] |
| 624 |
\efig$$ |
| 625 |
\end{verbatim} |
| 626 |
which gives |
| 627 |
$$\bfig |
| 628 |
\morphism(0,0)|a|/{@{>}@/^5pt/}/<500,0>[A`B;f] |
| 629 |
\morphism(0,0)|m|/@{>}/<500,0>[A`B;g] |
| 630 |
\morphism(0,0)|b|/{@{>}@/^-5pt/}/<500,0>[A`B;h] |
| 631 |
\efig$$ |
| 632 |
Either of these could also be used inline. |
| 633 |
|
| 634 |
There is a macro |
| 635 |
\index{\backslash place}\verb.\place. |
| 636 |
that places that object anywhere. I have changed the name from |
| 637 |
\verb.\put. in order to avoid clashing with the \LaTeX\ picture mode's |
| 638 |
\index{\backslash put}\verb.\put.. The syntax is |
| 639 |
\verb.\place(x,y)[object]. that places the object at \verb.(x,y).. |
| 640 |
There is also an optional parameter that can be used to add any of |
| 641 |
\xypic's positioning parameters: L, R, D, U, CL, CR, CD, CU, C, LD, RD, |
| 642 |
LU, RU. For example |
| 643 |
\verb.\place[L](x,y)[object]. will left align the object. The default |
| 644 |
is to center align it. |
| 645 |
Here is an example that uses a construction that is undocumented here, |
| 646 |
but uses a documented \Xy\ construction: |
| 647 |
\begin{verbatim} |
| 648 |
\newbox\anglebox |
| 649 |
\setbox\anglebox=\hbox{\xy \POS(75,0)\ar@{-} (0,0) \ar@{-} (75,75)\endxy} |
| 650 |
\def\angle{\copy\anglebox} |
| 651 |
$$\bfig |
| 652 |
\square[A`B`C`D;f`g`h`k] |
| 653 |
\place(100,400)[\angle] |
| 654 |
\efig$$ |
| 655 |
\end{verbatim} |
| 656 |
\newbox\anglebox |
| 657 |
\setbox\anglebox=\hbox{\xy \POS(75,0)\ar@{-} (0,0) \ar@{-} (75,75)\endxy} |
| 658 |
\def\angle{\copy\anglebox} |
| 659 |
$$\bfig |
| 660 |
\square[A`B`C`D;f`g`h`k] |
| 661 |
\place(100,400)[\angle] |
| 662 |
\efig$$ |
| 663 |
Notice that you get a headless arrow by using |
| 664 |
\index{\backslash ar@{-}}\verb.\ar@{-}.. |
| 665 |
|
| 666 |
Here is a special code installed at the request of Jonathon Funk: |
| 667 |
\begin{verbatim} |
| 668 |
$$\bfig |
| 669 |
\pullback|brrb|<800,800>[P`X`Y`Z;t`u`v`w]% |
| 670 |
|amb|/>`-->`>/<500,500>[A;f`g`h] |
| 671 |
\efig$$ |
| 672 |
\end{verbatim} |
| 673 |
\index{\backslash pullback} |
| 674 |
$$\bfig |
| 675 |
\pullback|brrb|<800,800>[P`X`Y`Z;t`u`v`w]% |
| 676 |
|amb|/>`-->`>/<500,500>[A;f`g`h] |
| 677 |
\efig$$ |
| 678 |
The full syntax for this is |
| 679 |
\begin{verbatim} |
| 680 |
\pullback(x,y)|pppp|/{sh}`{sh}`{sh}`{sh}/<dx`dy>[N`N`N`N;L`L`L]% |
| 681 |
|ppp|/{sh}`{sh}`{sh}/<dx,dy>[N;L`L`L] |
| 682 |
\end{verbatim} |
| 683 |
Of these only the nodes placed inside brackets are obligatory. The |
| 684 |
first sets of parameters are exactly as for |
| 685 |
\index{\backslash square}\verb.\square. and the |
| 686 |
remaining parameters are for the nodes and labels of the outer arrows. |
| 687 |
There is no positioning parameters for them; rather you set the |
| 688 |
horizontal and vertical separations of the outer node from the square. |
| 689 |
|
| 690 |
Here are some more special constructions. In general, if you are doing |
| 691 |
a square, you should use |
| 692 |
\index{\backslash Square}\verb.\Square. instead of |
| 693 |
\index{\backslash square}\verb.\square. |
| 694 |
because if figures its own width. The syntax is almost the same, except |
| 695 |
that |
| 696 |
\index{dx}\verb.dx. is omitted. For example, |
| 697 |
\begin{verbatim} |
| 698 |
$$\bfig |
| 699 |
\Square/^{ (}->`>`>`^{ (}->/<350>[{\rm Hom}(A,2^B)`{\rm Sub}(A\times B)` |
| 700 |
{\rm Hom}(A',2^{B'})`{\rm Sub}(A'\times B');\alpha(A,B)```\alpha(A',B')] |
| 701 |
\efig$$ |
| 702 |
\end{verbatim} |
| 703 |
will produce the square |
| 704 |
$$\bfig |
| 705 |
\Square/^{ (}->`>`>`^{ (}->/<350>[{\rm Hom}(A,2^B)`{\rm Sub}(A\times B)` |
| 706 |
{\rm Hom}(A',2^{B'})`{\rm Sub}(A'\times B');\alpha(A,B)```\alpha(A',B')] |
| 707 |
\efig$$ |
| 708 |
There are a couple of points to note here. Note the use of the |
| 709 |
argument |
| 710 |
\index{^{ (}->}\verb.^{ (}->. to get the inclusion arrow. The |
| 711 |
complication is |
| 712 |
created by the necessity of adding a bit of extra space before the hook. |
| 713 |
You get pretty much the same effect by putting a bit of extra space |
| 714 |
after the node: |
| 715 |
\begin{verbatim} |
| 716 |
$$\bfig |
| 717 |
\Square/^(->`>`>`^(->/<350>[{\rm Hom}(A,2^B)\,`{\rm Sub}(A\times B)` |
| 718 |
{\rm Hom}(A',2^{B'})\,`{\rm Sub}(A'\times B');\alpha(A,B)```\alpha(A',B')] |
| 719 |
\efig$$ |
| 720 |
\end{verbatim} |
| 721 |
The full syntax is |
| 722 |
\begin{verbatim} |
| 723 |
\Square(x,y)|pppp|/{sh}`{sh}`{sh}`{sh}/<dy>[N`N`N`N;L`L`L`L] |
| 724 |
\end{verbatim} |
| 725 |
|
| 726 |
There are also macros for placing two |
| 727 |
\index{\backslash Square}\verb.\Square.s together |
| 728 |
horizontally or vertically. The first is |
| 729 |
\index{\backslash hSquares}\verb.\hSquares. with the |
| 730 |
syntax |
| 731 |
\begin{verbatim} |
| 732 |
\hSquares(x,y)|ppppppp|/{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}/% |
| 733 |
<dy>[N`N`N`N`N`N;L`L`L`L`L`L`L] |
| 734 |
\end{verbatim} |
| 735 |
The second is |
| 736 |
\index{\backslash vSquares}\verb.\vSquares. with a similar syntex except that there |
| 737 |
are two |
| 738 |
\index{dy}\verb.dy. parameters, one for each square: |
| 739 |
\begin{verbatim} |
| 740 |
\hSquares(x,y)|ppppppp|/{sh}`{sh}`{sh}`{sh}`{sh}`{sh}`{sh}/% |
| 741 |
<dy,dy>[N`N`N`N`N`N;L`L`L`L`L`L`L] |
| 742 |
\end{verbatim} |
| 743 |
Similarly, there are four macros for making pairs of triangles put |
| 744 |
together. For example, |
| 745 |
$$\bfig |
| 746 |
\Vtrianglepair[A`B`C`D;f`g`h`k`l] |
| 747 |
\efig$$ |
| 748 |
comes from |
| 749 |
\begin{verbatim} |
| 750 |
$$\bfig |
| 751 |
\Vtrianglepair[A`B`C`D;f`g`h`k`l] |
| 752 |
\efig$$ |
| 753 |
\end{verbatim} |
| 754 |
|
| 755 |
There is a macro for making cubes\index{\backslash cube}. The syntax is |
| 756 |
\begin{verbatim} |
| 757 |
\cube(x,y)|pppp|/{sh}`{sh}`{sh}`{sh}/<dx,dy>[N`N`N`N;L`L`L`L]% |
| 758 |
(x,y)|pppp|/{sh}`{sh}`{sh}`{sh}/<dx,dy>[N`N`N`N;L`L`L`L]% |
| 759 |
|pppp|/{sh}`{sh}`{sh}`{sh}/[L`L`L`L] |
| 760 |
\end{verbatim} |
| 761 |
The first line of parameters is for the outer square and the second for |
| 762 |
the inner square, while the remaining parameters are for the arrows |
| 763 |
between the squares. Only the parameters in square brackets are |
| 764 |
required; there are defaults for the others. Here is an example: |
| 765 |
\begin{verbatim} |
| 766 |
$$\bfig |
| 767 |
\cube(0,0)|arlb|/ >->` >->`>`>/<1500,1500>[A`B`C`D;f`g`h`k]% |
| 768 |
(300,300)|arlb|/>`>`>`>/<400,400>[A'`B'`C'`D';f'`g'`h'`k']% |
| 769 |
|mmmm|/<-`<-`<-`<-/[\alpha`\beta`\gamma`\delta] |
| 770 |
\efig$$ |
| 771 |
\end{verbatim} |
| 772 |
gives the somewhat misshapen diagram |
| 773 |
$$\bfig |
| 774 |
\cube(0,0)|arlb|/ >->` >->`>`>/<1500,1500>[A`B`C`D;f`g`h`k]% |
| 775 |
(300,300)|arlb|/>`>`>`>/<400,400>[A'`B'`C'`D';f'`g'`h'`k']% |
| 776 |
|mmmm|/<-`<-`<-`<-/[\alpha`\beta`\gamma`\delta] |
| 777 |
\efig$$ |
| 778 |
because the parameters were oddly chosen. The defaults center the |
| 779 |
squares. I discovered accidently, while debugging the cube that what I |
| 780 |
thought was an out-of-range choice of parameters would produce an offset |
| 781 |
cube: |
| 782 |
\begin{verbatim} |
| 783 |
$$\bfig |
| 784 |
\cube|arlb|/ >->` >->`>`>/<1000,1000>[A`B`C`D;f`g`h`k]% |
| 785 |
(400,400)|arlb|/>`>`>`>/<900,900>[A'`B'`C'`D';f'`g'`h'`k']% |
| 786 |
|rrrr|/<-`<-`<-`<-/[\alpha`\beta`\gamma`\delta] |
| 787 |
\efig$$ |
| 788 |
\end{verbatim} |
| 789 |
gives |
| 790 |
$$\bfig |
| 791 |
\cube|arlb|/ >->` >->`>`>/<1000,1000>[A`B`C`D;f`g`h`k]% |
| 792 |
(400,400)|arlb|/>`>`>`>/<900,900>[A'`B'`C'`D';f'`g'`h'`k']% |
| 793 |
|rrrr|/<-`<-`<-`<-/[\alpha`\beta`\gamma`\delta] |
| 794 |
\efig$$ |
| 795 |
|
| 796 |
|
| 797 |
\subsection{Nodes and arrows}\label{nodes&arrows} |
| 798 |
Following a suggestion of Gerd Zeibig, who has implemented this in a |
| 799 |
very different way, I have added a feature wherein you can specify nodes |
| 800 |
and arrows between them. The nodes can be given simple identifiers and |
| 801 |
those used to specify the source and target of the arrows. The way it |
| 802 |
works is that \verb.\node id(x,y)[N]. assigns the node \verb.N. at |
| 803 |
position \verb.(x,y). to the identifier \verb.id. which is then used |
| 804 |
to refer to that node. Then \verb.\arrow[id`id;L]. is used to place |
| 805 |
arrows at the nodes identified by the identifiers and with label |
| 806 |
\verb.L.. There are also optional arguments for label position and |
| 807 |
arrowhead shape, so the full macro looks like \verb.|p|/sh/[id`id;L].. |
| 808 |
Here is an example. The code |
| 809 |
\begin{verbatim} |
| 810 |
$$\bfig |
| 811 |
\node a(0,0)[A\otimes B] |
| 812 |
\node 3b(700,300)[A'\otimes B'] |
| 813 |
\node @(0,-500)[A''\otimes B''] |
| 814 |
\node xyzzy(500,0)[C\otimes D] |
| 815 |
\arrow/->>/[a`3b;f] |
| 816 |
\arrow|l|[a`@;g] |
| 817 |
\arrow|b|/<-/[xyzzy`@;i\otimes j] |
| 818 |
\efig$$ |
| 819 |
\end{verbatim} |
| 820 |
produces the diagram |
| 821 |
$$\bfig |
| 822 |
\node a(0,0)[A\otimes B] |
| 823 |
\node 3b(700,300)[A'\otimes B'] |
| 824 |
\node @(0,-500)[A''\otimes B''] |
| 825 |
\node xyzzy(500,0)[C\otimes D] |
| 826 |
\arrow/->>/[a`3b;f] |
| 827 |
\arrow|l|[a`@;g] |
| 828 |
\arrow|b|/<-/[xyzzy`@;i\otimes j] |
| 829 |
\efig$$ |
| 830 |
|
| 831 |
Notice, incidentally, that the nodes can be defined either inside or |
| 832 |
outside math mode. If it is done outside, the definitions will persist |
| 833 |
(unless redefined) and may be reused. This is useful when there are two |
| 834 |
very similar diagrams. Also note that the identifiers can be any |
| 835 |
string. |
| 836 |
|
| 837 |
An example of a large diagram done this way appears in~ |
| 838 |
|
| 839 |
\subsubsection{Use with beamer} |
| 840 |
The way to get a diagram gradually grow within a slide is illustrated |
| 841 |
with the following code. Unfortunately, it cannot be displayed here for |
| 842 |
the document class has to be beamer, but you can see what is going on by |
| 843 |
compiling: |
| 844 |
|
| 845 |
\begin{verbatim} |
| 846 |
\documentclass{beamer} |
| 847 |
\pdfoutput1 |
| 848 |
\input diagxy |
| 849 |
\begin{document} |
| 850 |
|
| 851 |
\begin{frame} |
| 852 |
$$\bfig |
| 853 |
\node 1(0,500)[A] |
| 854 |
\node 2(500,500)[B] |
| 855 |
\node 3(0,0)[C] |
| 856 |
\node 4(500,0)[D] |
| 857 |
\uncover<2,4>{\arrow[1`2;]}% |
| 858 |
\uncover<3->{\arrow[1`3;]}% |
| 859 |
\uncover<4>{\arrow[2`4;]}% |
| 860 |
\uncover<5>{\arrow[3`4;]}% |
| 861 |
\efig$$ |
| 862 |
|
| 863 |
\end{frame} |
| 864 |
\end{document} |
| 865 |
\end{verbatim} |
| 866 |
Note that the \% at the end of the uncover lines are needed. I do not |
| 867 |
have any explanation, but the arrows get offset without them. This is |
| 868 |
odd because, generally speaking, extra spaces and even blank lines get |
| 869 |
ignored inside math displays. |
| 870 |
|
| 871 |
|
| 872 |
\subsection{Complex diagrams}\label{complex} |
| 873 |
In homological algebra one often has a $3\times3$ diagram, with or |
| 874 |
without 0's on the margins. There is a macro to do that: |
| 875 |
\index{3 by 3}\index{\backslash iiixiii} |
| 876 |
\begin{verbatim} |
| 877 |
$$\bfig |
| 878 |
\iiixiii(0,0)|aammbblmrlmr|/>`>`>`>`>`>`>`>`>`>`>`>/<500,500>{'5436}% |
| 879 |
<400,400>[A'`B'`C'`A`B`C`A''`B''`C'';f'`g'`f`g`f''`g''`u`v`w`u'`v'`w'] |
| 880 |
\efig$$ |
| 881 |
\end{verbatim} |
| 882 |
that gives |
| 883 |
$$\bfig |
| 884 |
\iiixiii(0,0)|aammbblmrlmr|/>`>`>`>`>`>`>`>`>`>`>`>/<500,500>{'5436}% |
| 885 |
<400,400>[A'`B'`C'`A`B`C`A''`B''`C'';f'`g'`f`g`f''`g''`u`v`w`u'`v'`w'] |
| 886 |
\efig$$ |
| 887 |
Here is the explanation. The arrow parameters are not given in the |
| 888 |
usual order, but rather first all the horizontal arrows and then all the |
| 889 |
vertical ones, each in their usual order. The nodes are given in the |
| 890 |
usual order. The fifth parameter is the octal number |
| 891 |
\verb.`5436. (In |
| 892 |
\TeX, the |
| 893 |
\verb.'. introduces octal numbers and |
| 894 |
\verb.". introduces |
| 895 |
hexadecimal numbers) which corresponds to the binary number |
| 896 |
101,100,011,110 that describes the distribution of the 0's around the |
| 897 |
margins. The same results would have been obtained if the number had |
| 898 |
been the hexadecimal number |
| 899 |
\verb."B1E. or the decimal number |
| 900 |
|
| 901 |
\verb.2846.. The sixth parameter gives the horizontal and vertical |
| 902 |
offset of the 0's, which you often want smaller than the others. You |
| 903 |
must not give the sixth parameter unless you have given a value (which |
| 904 |
could be 0) to the fifth or an error condition will result. Note that |
| 905 |
the positioning parameters ignore the 0's so that it is the lower left |
| 906 |
node that appears at the position |
| 907 |
\verb.(x,y).. As usual, there are |
| 908 |
defaults. |
| 909 |
\begin{verbatim} |
| 910 |
$$\bfig |
| 911 |
\iiixiii[A'`B'`C'`A`B`C`A''`B''`C'';f'`g'`f`g`f''`g''`u`v`w`u'`v'`w'] |
| 912 |
\efig$$ |
| 913 |
$$\bfig |
| 914 |
\iiixiii% |
| 915 |
{'5436}[A'`B'`C'`A`B`C`A''`B''`C'';f'`g'`f`g`f''`g''`u`v`w`u'`v'`w'] |
| 916 |
\efig$$ |
| 917 |
$$\bfig |
| 918 |
\iiixiii{'5436}<250,450>[A'`B'`C'`A`B`C`A''`B''`C'';% |
| 919 |
f'`g'`f`g`f''`g''`u`v`w`u'`v'`w'] |
| 920 |
\efig$$ |
| 921 |
\end{verbatim} |
| 922 |
$$\bfig |
| 923 |
\iiixiii[A'`B'`C'`A`B`C`A''`B''`C'';f'`g'`f`g`f''`g''`u`v`w`u'`v'`w'] |
| 924 |
\efig$$ |
| 925 |
$$\bfig |
| 926 |
\iiixiii% |
| 927 |
{'5436}[A'`B'`C'`A`B`C`A''`B''`C'';f'`g'`f`g`f''`g''`u`v`w`u'`v'`w'] |
| 928 |
\efig$$ |
| 929 |
$$\bfig |
| 930 |
\iiixiii{'5436}<250,450>[A'`B'`C'`A`B`C`A''`B''`C'';% |
| 931 |
f'`g'`f`g`f''`g''`u`v`w`u'`v'`w'] |
| 932 |
\efig$$ |
| 933 |
|
| 934 |
A similar macro\index{3 by 2}% |
| 935 |
\index{\backslash iiixii}\verb.\iiixii. has been added for a map between exact |
| 936 |
sequences, with parameters similar to the above. An actual example is |
| 937 |
\begin{verbatim} |
| 938 |
$$\bfig |
| 939 |
\iiixii|aaaalmr|<1000,800>[H`G`F`H\oplus H_0`G\oplus H_0\oplus F_0` |
| 940 |
F\oplus F_0; f`g`\pmatrix{f&0\cr0&1\cr0&0}`\pmatrix{g&0&0\cr0&0&1}` |
| 941 |
\pmatrix{1\cr0}`\pmatrix{1\cr0\cr0}`\pmatrix{1\cr0}] |
| 942 |
\efig$$ |
| 943 |
\end{verbatim} |
| 944 |
which gives |
| 945 |
$$\bfig |
| 946 |
\iiixii|aaaalmr|<1000,800>[H`G`F`H\oplus H_0`G\oplus H_0\oplus F_0` |
| 947 |
F\oplus F_0; f`g`\pmatrix{f&0\cr0&1\cr0&0}`\pmatrix{g&0&0\cr0&0&1}` |
| 948 |
\pmatrix{1\cr0}`\pmatrix{1\cr0\cr0}`\pmatrix{1\cr0}] |
| 949 |
\efig$$ |
| 950 |
The general syntax is |
| 951 |
\begin{verbatim} |
| 952 |
\iiixii(x,y)|ppppppp|/1`2`3`4`5`6`7/<dx,dy>{n}<dx'>[...] |
| 953 |
\end{verbatim} |
| 954 |
with the usual meaning. The number n is a number between 0 and 15 |
| 955 |
(default 15) that specifies whether and where 0's appear (think binary, |
| 956 |
with the high bit at the upper left) and dx' specifies the separation of |
| 957 |
the zeroes. You get two squares side by side if both n and dx' are 0. |
| 958 |
|
| 959 |
\subsection{Empty placement and moving labels} |
| 960 |
The label placements within \verb.|p|. is valid only for |
| 961 |
\verb.x=a,b,r,l,m.. If you use any other value (or leave it empty) the |
| 962 |
label entry is ignored, but you can use any valid \xypic\ label, as |
| 963 |
described in Figure 13 of the reference manual. One place you might |
| 964 |
want to use this is for the placement of the labels along an arrow. In |
| 965 |
\xypic\ the default placement of the label is midway between the |
| 966 |
midpoints of the nodes. If the two nodes are of widely different sizes, |
| 967 |
this can result in strange placements; therefore I always place them |
| 968 |
midway along the arrow. However, as the following illustrates, this can |
| 969 |
be changed. |
| 970 |
\begin{verbatim} |
| 971 |
$$\bfig |
| 972 |
\morphism(0,900)||/@{->}^<>(0.7){f}/<800,0>[A^B\times B^C\times C`C;] |
| 973 |
\morphism(0,600)||/@{->}^<(0.7){f}/<800,0>[A^B\times B^C\times C`C;] |
| 974 |
\morphism(0,300)||/@{->}^>(0.7){f}/<800,0>[A^B\times B^C\times C`C;] |
| 975 |
\morphism(0,0)||/@{->}^(0.7){f}/<800,0>[A^B\times B^C\times C`C;] |
| 976 |
\efig$$ |
| 977 |
\end{verbatim} |
| 978 |
which produces |
| 979 |
$$\bfig |
| 980 |
\morphism(0,900)||/@{->}^<>(0.7){f}/<800,0>[A^B\times B^C\times C`C;] |
| 981 |
\morphism(0,600)||/@{->}^<(0.7){f}/<800,0>[A^B\times B^C\times C`C;] |
| 982 |
\morphism(0,300)||/@{->}^>(0.7){f}/<800,0>[A^B\times B^C\times C`C;] |
| 983 |
\morphism(0,0)||/@{->}^(0.7){f}/<800,0>[A^B\times B^C\times C`C;] |
| 984 |
\efig$$ |
| 985 |
Here is the explanation. The label placement argument is empty (it |
| 986 |
cannot be omitted) and the arrow entry is empty. However, placing |
| 987 |
\verb.^(0.7){f}. inside the arrow shape places the label $f$ 7/10 of the |
| 988 |
way between the nodes. Unmodified, this places it 7/10 of the way |
| 989 |
between the centers of the nodes. This may be modified by |
| 990 |
\index{<}\verb.<., which moves the first (here the left) reference point |
| 991 |
to the beginning of the arrow, \index{>}\verb.>. which moves the second |
| 992 |
reference point to the end of the arrow, or by both, which moves both |
| 993 |
reference points. In most cases, you will want both. Incidentally, |
| 994 |
\index{-}\verb.-. is a synonym for the sequence |
| 995 |
\index{<>(}5).\verb.<>(.5). and that is the default placement in my |
| 996 |
package. |
| 997 |
|
| 998 |
Here are some more examples that illustrates the special sequence |
| 999 |
\index{\backslash hole}\verb.\hole. used in conjunction with \index{|}\verb.|. |
| 1000 |
that implements \index{m}\verb.m. as well as the fact that these things |
| 1001 |
can be stacked. For more details, I must refer you to the \xypic\ |
| 1002 |
reference manual. |
| 1003 |
\begin{verbatim} |
| 1004 |
$$\bfig |
| 1005 |
\morphism(0,600)||/@{->}|-\hole/<800,0>[A^B\times B^C\times C`C;] |
| 1006 |
\morphism(0,300)||/@{->}|-\hole^<>(.7)f/<800,0>[A^B\times B^C\times C`C;] |
| 1007 |
\morphism(0,0)||/@{->}|-\hole^<>(.7)f_<>(.3)g/<800,0>[A^B\times |
| 1008 |
B^C\times C`C;] |
| 1009 |
\efig$$ |
| 1010 |
\end{verbatim} |
| 1011 |
produces |
| 1012 |
$$\bfig |
| 1013 |
\morphism(0,600)||/@{->}|-\hole/<800,0>[A^B\times B^C\times C`C;] |
| 1014 |
\morphism(0,300)||/@{->}|-\hole^<>(.7)f/<800,0>[A^B\times B^C\times C`C;] |
| 1015 |
\morphism(0,0)||/@{->}|-\hole^<>(.7)f_<>(.3)g/<800,0>[A^B\times |
| 1016 |
B^C\times C`C;] |
| 1017 |
\efig$$ |
| 1018 |
|
| 1019 |
Here is another version of the cube we looked at above, using these |
| 1020 |
special placements and\index{\backslash cube} |
| 1021 |
\index{\backslash hole}\verb.\hole.'s to break some lines and make it |
| 1022 |
neater. |
| 1023 |
\begin{verbatim} |
| 1024 |
$$\bfig |
| 1025 |
\cube|arlb|/@{ >->}^<>(.6){f}` >->`@{>}_<>(.4){h}`>/% |
| 1026 |
<1000,1000>[A`B`C`D;`g``k]% |
| 1027 |
(400,400)|axxb|/>`@{>}|!{(300,1000);(500,1000)}\hole^<>(.6){g'}`>`@{>}% |
| 1028 |
|!{(1000,500);(1000,300)}\hole_<>(.4){k'}/<900,900>[A'`B'`C'`D';f'``h'`]% |
| 1029 |
|rrrr|/<-`<-`<-`<-/[\alpha`\beta`\gamma`\delta] |
| 1030 |
\efig$$ |
| 1031 |
\end{verbatim} |
| 1032 |
$$\bfig |
| 1033 |
\cube|arlb|/@{ >->}^<>(.6){f}` >->`@{>}_<>(.4){h}`>/% |
| 1034 |
<1000,1000>[A`B`C`D;`g``k]% |
| 1035 |
(400,400)|axxb|/>`@{>}|!{(300,1000);(500,1000)}\hole^<>(.6){g'}`>`@{>}% |
| 1036 |
|!{(1000,500);(1000,300)}\hole_<>(.4){k'}/<900,900>[A'`B'`C'`D';f'``h'`]% |
| 1037 |
|rrrr|/<-`<-`<-`<-/[\alpha`\beta`\gamma`\delta] |
| 1038 |
\efig$$ |
| 1039 |
This one is probably worth saving as a template. Later I will explain |
| 1040 |
the meaning of the strings \verb.!{(300,1000);(500,1000)}\hole. and |
| 1041 |
\verb.!{(1000,500);(1000,300)}\hole. along with a caveat on their use. |
| 1042 |
If the nodes are unusually large, the cube may be magnified using |
| 1043 |
\index{\backslash scalefactor}\verb.\scalefactor. . |
| 1044 |
|
| 1045 |
\subsection{Inline macros} |
| 1046 |
Here we illustrate a few of the macros for inline---or |
| 1047 |
displayed---equations the package contains. In each case, the macro may |
| 1048 |
have a superscript or subscript or both (in which case the superscript |
| 1049 |
must come first) and the arrow(s) grow long enough to hold the super- or |
| 1050 |
subscript. If you type\par\noindent |
| 1051 |
\verb.$A\to B\to^f C\to_g D\to^h_{{\rm Hom}(X,Y)} E$., you get |
| 1052 |
$A\to B\to^f C\to_g D\to^h_{{\rm Hom}(X,Y)} E$. Similarly, the macro |
| 1053 |
\index{\backslash toleft}\verb.\toleft. reverses the arrows. The remaining macros |
| 1054 |
of this sort are \index{\backslash mon}\verb.\mon. which gives a monic arrow, |
| 1055 |
\index{\backslash epi}\verb.\epi. which gives an epic arrow, |
| 1056 |
\index{\backslash two}\verb.\two. that gives a pair of arrows, as well as |
| 1057 |
leftwards pointing versions, \index{\backslash monleft}\verb.\monleft., |
| 1058 |
\index{\backslash epileft}\verb.\epileft., and \index{\backslash twoleft}\verb.\twoleft. of |
| 1059 |
each of them. Here is one more example: |
| 1060 |
\begin{verbatim} |
| 1061 |
$A\twoleft B\twoleft^f C\twoleft_g D\twoleft^h_{{\rm Hom}(X,Y)} E$ |
| 1062 |
\end{verbatim} |
| 1063 |
gives $A\twoleft B\twoleft^f C\twoleft_g D\twoleft^h_{{\rm Hom}(X,Y)} E$. |
| 1064 |
There is an almost unlimited variety of such procedures possible. The |
| 1065 |
ones that are provided can be used as templates to define new ones with, |
| 1066 |
say, curved arrows or three arrows or whatever a user might have need |
| 1067 |
of. |
| 1068 |
|
| 1069 |
\subsubsection{Added:}\label{added} The macros \index{\backslash to}\verb.\to. and |
| 1070 |
\index{\backslash two}\verb.\two. can each have optional parameters of the form |
| 1071 |
\index{/{sh}/<dx>}\verb./{sh}/<dx>. and |
| 1072 |
\index{/{sh}`{sh}/<dx>}\verb./{sh}`{sh}/<dx>., resp. that allow you to |
| 1073 |
specify the shapes of the arrows and to override the automatic |
| 1074 |
computation of the lengths of the arrows. For example, |
| 1075 |
\begin{verbatim} |
| 1076 |
$$A\to/<-/ B\to^f C \to/ >->/<500>_g D\to/<-< /^f_g E$$ |
| 1077 |
$$A\two/<-`->/<100> B\two^f C \two/ >->` >->/_g D\two/<-< `<-< /^f_g E$$ |
| 1078 |
\end{verbatim} |
| 1079 |
gives |
| 1080 |
$$A\to/<-/ B\to^f C \to/ >->/<500>_g D\to/<-< /^f_g E$$ |
| 1081 |
$$A\two/<-`->/<100> B\two^f C \two/ >->` >->/_g D\two/<-< `<-< /^f_g E$$ |
| 1082 |
This renders \index{\backslash mon}\verb.\mon., \index{\backslash epi}\verb.\epi., |
| 1083 |
\index{\backslash toleft}\verb.\toleft., \index{\backslash monleft}\verb.\monleft., |
| 1084 |
\index{\backslash epileft}\verb.\epileft., and \index{\backslash twoleft}\verb.\twoleft. |
| 1085 |
obsolete, but they have been retained for back compatibility and |
| 1086 |
convenience. A three arrow macro that works similarly has been added. |
| 1087 |
For example |
| 1088 |
\begin{verbatim} |
| 1089 |
$$A\threepppp/>`<-`>/<400>^{d^0}|{s^0}_{d^1}B\three<100> |
| 1090 |
C\three/->>`<-< `->>/ D$$ |
| 1091 |
\end{verbatim} |
| 1092 |
gives |
| 1093 |
$$A\threepppp/>`<-`>/<400>^{d^0}|{s^0}_{d^1}B\three<100> |
| 1094 |
C\three/->>`<-< `->>/ D$$ |
| 1095 |
|
| 1096 |
\subsection{2-arrows} |
| 1097 |
There is a macro for making 2-arrows of a fixed size, but varying |
| 1098 |
orientation. They should be put at the appropriate position in a |
| 1099 |
diagram. The two parameters are two integers \index{dx}\verb.dx. and |
| 1100 |
\index{dy}\verb.dy. whose ratio is the slope of the arrow. They need |
| 1101 |
not be relatively prime, but arithmetic overflow could occur if they are |
| 1102 |
too large. Note that although \index{(dx,dy)}\verb.(dx,dy). and |
| 1103 |
\index{(-dx,-dy)}\verb.(-dx,-dy). describe the same slope, the arrows |
| 1104 |
point in opposite directions. Here is a sampler |
| 1105 |
\begin{verbatim} |
| 1106 |
$$\bfig |
| 1107 |
\place(0,0)[\twoar(1,0)] |
| 1108 |
\place(200,0)[\twoar(0,1)] |
| 1109 |
\place(400,0)[\twoar(1,1)] |
| 1110 |
\place(600,0)[\twoar(0,-1)] |
| 1111 |
\place(800,0)[\twoar(1,2)] |
| 1112 |
\place(1000,0)[\twoar(1,3)] |
| 1113 |
\place(1200,0)[\twoar(1,-3)] |
| 1114 |
\place(1400,0)[\twoar(-3,1)] |
| 1115 |
\place(1600,0)[\twoar(-1,-3)] |
| 1116 |
\place(1800,0)[\twoar(255,77)] |
| 1117 |
\efig$$ |
| 1118 |
\end{verbatim} |
| 1119 |
$$\bfig |
| 1120 |
\place(0,0)[\twoar(1,0)] |
| 1121 |
\place(200,0)[\twoar(0,1)] |
| 1122 |
\place(400,0)[\twoar(1,1)] |
| 1123 |
\place(600,0)[\twoar(0,-1)] |
| 1124 |
\place(800,0)[\twoar(1,2)] |
| 1125 |
\place(1000,0)[\twoar(1,3)] |
| 1126 |
\place(1200,0)[\twoar(1,-3)] |
| 1127 |
\place(1400,0)[\twoar(-3,1)] |
| 1128 |
\place(1600,0)[\twoar(-1,-3)] |
| 1129 |
\place(1800,0)[\twoar(255,77)] |
| 1130 |
\efig$$ |
| 1131 |
|
| 1132 |
Here is little amusement. |
| 1133 |
\begin{verbatim} |
| 1134 |
$$\bfig |
| 1135 |
\square/@3{->}`~)`=o`--x/[A`B`C`D;```] |
| 1136 |
\place(400,100)[\twoar(-1,-1)] |
| 1137 |
\place(100,400)[\twoar(1,1)] |
| 1138 |
\morphism(500,500)||/{*}.{*}/<-500,-500>[B`C;] |
| 1139 |
\efig$$ |
| 1140 |
\end{verbatim} |
| 1141 |
$$\bfig |
| 1142 |
\square/@3{->}`~)`=o`--x/[A`B`C`D;```] |
| 1143 |
\place(400,100)[\twoar(-1,-1)] |
| 1144 |
\place(100,400)[\twoar(1,1)] |
| 1145 |
\morphism(500,500)||/{*}.{*}/<-500,-500>[B`C;] |
| 1146 |
\efig$$ |
| 1147 |
|
| 1148 |
\subsection{Mixing \xypic\ code} |
| 1149 |
Here is a sample in which I have mixed code from \xypic\ with my own. |
| 1150 |
\let\tilde\widetilde |
| 1151 |
\let\hat\widehat |
| 1152 |
\begin{verbatim} |
| 1153 |
$$\bfig |
| 1154 |
\square(1500,500)/>`>`>`@{>}^<>(.2){r_{n-1}}/[T_{n-1}`T_{n-2}`R_{n-1} |
| 1155 |
`R_{n-2}; t_{n-1}``\sigma_{n-2}`] |
| 1156 |
\square(1500,0)/`>`>`>/[R_{n-1}`R_{n-2}`S_{n-1}`S_{n-2}; |
| 1157 |
`f_{n-1}`f_{n-2}`s_{n-1}] |
| 1158 |
\morphism|b|[\tilde S_{n+1}`S_n;\tilde s_{n+1}] |
| 1159 |
\square(1000,500)/>`>`>`>/[\tilde T_n`T_{n-1}`\tilde |
| 1160 |
R_n`{R_{n-1}};\tilde t_n`\tilde \sigma_n`\sigma_{n-1}`] |
| 1161 |
\square(1000,0)/>`>``>/[\tilde R_n`R_{n-1}`\tilde S_n`{S_{n-1}};\tilde |
| 1162 |
r_n\quad ```\tilde s_n] |
| 1163 |
\square(500,0)/>`>``>/[R_n`{R_n}`{S_n}`{S_{n}}; |
| 1164 |
\hat r_n`f_n`\tilde f_n`\hat s_n] |
| 1165 |
\POS(1500,1000)*+!!<0ex,.75ex>{T_{n-1}} |
| 1166 |
\ar@{-}|!{(1000,500);(1500,500)}\hole(1167,334)% |
| 1167 |
\POS(1167,334)\ar|!{(1000,500);(1000,0)}\hole_<>(.6){h_{n-1}} |
| 1168 |
(500,0)*+!!<0ex,.75ex>{S_n} |
| 1169 |
\morphism(2000,1000)/@{>}|\hole^<>(.8){h_{n-2}}/% |
| 1170 |
<-500,-1000>[T_{n-2}`S_{n-1};] |
| 1171 |
\efig$$ |
| 1172 |
\end{verbatim} |
| 1173 |
$$\bfig |
| 1174 |
\square(1500,500)/>`>`>`@{>}^<>(.2){r_{n-1}}/[T_{n-1}`T_{n-2}`R_{n-1} |
| 1175 |
`R_{n-2}; t_{n-1}``\sigma_{n-2}`] |
| 1176 |
\square(1500,0)/`>`>`>/[R_{n-1}`R_{n-2}`S_{n-1}`S_{n-2}; |
| 1177 |
`f_{n-1}`f_{n-2}`s_{n-1}] |
| 1178 |
\morphism|b|[\tilde S_{n+1}`S_n;\tilde s_{n+1}] |
| 1179 |
\square(1000,500)/>`>`>`>/[\tilde T_n`T_{n-1}`\tilde |
| 1180 |
R_n`{R_{n-1}};\tilde t_n`\tilde \sigma_n`\sigma_{n-1}`] |
| 1181 |
\square(1000,0)/>`>``>/[\tilde R_n`R_{n-1}`\tilde S_n`{S_{n-1}};\tilde |
| 1182 |
r_n\quad ```\tilde s_n] |
| 1183 |
\square(500,0)/>`>``>/[R_n`{R_n}`{S_n}`{S_{n}}; |
| 1184 |
\hat r_n`f_n`\tilde f_n`\hat s_n] |
| 1185 |
\POS(1500,1000)*+!!<0ex,.75ex>{T_{n-1}} |
| 1186 |
\ar@{-}|!{(1000,500);(1500,500)}\hole(1167,334)% |
| 1187 |
\POS(1167,334)\ar|!{(1000,500);(1000,0)}\hole_<>(.6){h_{n-1}} |
| 1188 |
(500,0)*+!!<0ex,.75ex>{S_n} |
| 1189 |
\morphism(2000,1000)/@{>}|\hole^<>(.8){h_{n-2}}/% |
| 1190 |
<-500,-1000>[T_{n-2}`S_{n-1};] |
| 1191 |
\efig$$ |
| 1192 |
There are three points to note here in connection with the two lines |
| 1193 |
that begin with \index{\backslash POS}\verb.\POS. First the objects that are the |
| 1194 |
source of the first and the target of the second are preceded by |
| 1195 |
\verb;!!<0ex,.75ex>;\verb;!!<0ex,.75ex>;. The effect is to reset the |
| 1196 |
baseline to the baseline of the object (rather than the vertical center) |
| 1197 |
and then to lower that by 3/4 of xheight so that the arrow goes in the |
| 1198 |
right place. This string precedes all objects. Without that, an object |
| 1199 |
like $\tilde R $ would be set lower that $R$. Second, the first arrow |
| 1200 |
has no target and the second no source. This does not give the same |
| 1201 |
result as empty source and target since in the latter cases, there would |
| 1202 |
be spaces allowed around them and then the two lines would not meet. It |
| 1203 |
would be possible to add code that tests for empty nodes, but it comes |
| 1204 |
up so seldom that I have refrained. In the meantime, the only recourse |
| 1205 |
is to revert to the underlying \xypic\ code. Thirdly the string |
| 1206 |
\verb.|!{(1000,500);(1500,500)}\hole. specifies that the line should be |
| 1207 |
broken at the place where the current arrow intersects the line between |
| 1208 |
the nodes located at (1000,500) and (1500,500). One must be careful |
| 1209 |
using this construction, however, as it does not seem to work correctly |
| 1210 |
if the line segment fails to intersect the current line, or if it does |
| 1211 |
intersect, but happens to be too long. I have not worked out how long |
| 1212 |
is too long, but you can get odd results. I assume that this bug will |
| 1213 |
be fixed eventually. (Ross Moore says that it works correctly in the |
| 1214 |
version he has, which, however, has not been released.) There is a |
| 1215 |
similar string, with similar effect, in the following line. The last |
| 1216 |
line uses simply \index{|\hole}\verb.|\hole. which positions the gap in |
| 1217 |
the middle of the arrow. |
| 1218 |
|
| 1219 |
|
| 1220 |
\subsection{loops} |
| 1221 |
Two new procedures \verb.\Loop. and \verb.\iloop. have been added, the |
| 1222 |
latter for inline loops. (Note: \verb.\loop. was changed to |
| 1223 |
\verb.\Loop. as the former conflicted with amstex.) Here are |
| 1224 |
examples: |
| 1225 |
\begin{verbatim} |
| 1226 |
$$\bfig |
| 1227 |
\morphism[A`B;f] |
| 1228 |
\Loop(0,0)A(ur,ul)_g |
| 1229 |
\Loop(500,0)B(dl,dr)_h |
| 1230 |
\efig$$ |
| 1231 |
\end{verbatim} |
| 1232 |
$$\bfig |
| 1233 |
\morphism[A`B;f] |
| 1234 |
\Loop(0,0)A(ur,ul)_g |
| 1235 |
\Loop(500,0)B(dl,dr)_h |
| 1236 |
\efig$$ |
| 1237 |
|
| 1238 |
Inline: Either \verb.$A\iloop B(ur,ul)C$. |
| 1239 |
or \verb.$\xy\Loop(0,0)A(ur,ul)\endxy$. gives the output $\xy |
| 1240 |
\Loop(0,0)A(ur,ul)\endxy$. The direction indicators show what |
| 1241 |
direction the loops start and end in. |
| 1242 |
|
| 1243 |
\subsection{Diagram from TTT}\label{tttdiag} |
| 1244 |
The last example is a complicated diagram from TTT. If you have the |
| 1245 |
documentation from the old diagram macros (or the errata from TTT), you |
| 1246 |
can see how much easier it is to describe this diagram with these |
| 1247 |
macros. Note the use of \index{\backslash scalefactor}\verb.\scalefactor. to |
| 1248 |
change the default length from 500 to 700 that made it unnecessary to |
| 1249 |
specify the scales on the squares and triangles. |
| 1250 |
\begin{verbatim} |
| 1251 |
$$\bfig |
| 1252 |
\scalefactor{1.4}% |
| 1253 |
\qtriangle(0,1000)/>`>`/[TT`T`TTT';\mu`TT\eta'`]% |
| 1254 |
\btriangle(500,1000)/`>`@<-14\ul>/[T`TTT'`TT';`T\eta`T\sigma]% |
| 1255 |
\morphism(0,1500)|l|/>/<0,-1000>[TT`TT'T;T\eta'T]% |
| 1256 |
\square(500,500)|ammx|/@<14\ul>`>`>`/[TTT'`TT'`TT'TT'`TT'T';% |
| 1257 |
\mu T'`T\eta'TT'`T\eta'T'`]% |
| 1258 |
\morphism(1000,1000)|r|/>/<500,-500>[TT'`TT';\hbox{\rm id}]% |
| 1259 |
\square/>`>``>/[TT'T`TT'TT'`T'T`T'TT';TT'T\eta'`\sigma T``T'T\eta']% |
| 1260 |
\square(500,0)|ammb|[TT'TT'`TT'T'`T'TT'`T'T';% |
| 1261 |
TT'\sigma`\sigma TT'`\sigma T'`T'\sigma T']% |
| 1262 |
\square(1000,0)/>``>`>/[TT'T'`TT'`T'T'`T';T\mu'``\sigma`\mu']% |
| 1263 |
\place(500,1250)[1]\place(215,1000)[2]\place(750,750)[3]% |
| 1264 |
\place(215,250)[4]\place(750,250)[5]\place(1140,750)[6]% |
| 1265 |
\place(1250,250)[7]% |
| 1266 |
\efig$$ |
| 1267 |
\end{verbatim} |
| 1268 |
$$\bfig\label{TTTdiag} |
| 1269 |
\scalefactor{1.4}% |
| 1270 |
\qtriangle(0,1000)/>`>`/[TT`T`TTT';\mu`TT\eta'`]% |
| 1271 |
\btriangle(500,1000)/`>`@<-14\ul>/[T`TTT'`TT';`T\eta`T\sigma]% |
| 1272 |
\morphism(0,1500)|l|/>/<0,-1000>[TT`TT'T;T\eta'T]% |
| 1273 |
\square(500,500)|ammx|/@<14\ul>`>`>`/[TTT'`TT'`TT'TT'`TT'T';\mu T'`% |
| 1274 |
T\eta'TT'`T\eta'T'`]% |
| 1275 |
\morphism(1000,1000)|r|/>/<500,-500>[TT'`TT';\hbox{\rm id}]% |
| 1276 |
\square/>`>``>/[TT'T`TT'TT'`T'T`T'TT';TT'T\eta'`\sigma T``T'T\eta']% |
| 1277 |
\square(500,0)|ammb|[TT'TT'`TT'T'`T'TT'`T'T';TT'\sigma`\sigma TT'% |
| 1278 |
`\sigma T'`T'\sigma T']% |
| 1279 |
\square(1000,0)/>``>`>/[TT'T'`TT'`T'T'`T';T\mu'``\sigma`\mu']% |
| 1280 |
\place(500,1250)[1]\place(215,1000)[2]\place(750,750)[3]% |
| 1281 |
\place(215,250)[4]\place(750,250)[5]\place(1140,750)[6]% |
| 1282 |
\place(1250,250)[7]% |
| 1283 |
\efig$$ |
| 1284 |
|
| 1285 |
Here is code that produces the same diagram using the new \verb.\arrow. |
| 1286 |
feature: |
| 1287 |
\begin{verbatim} |
| 1288 |
\node a(0,1500)[TT]% |
| 1289 |
\node b(500,1500)[T]% |
| 1290 |
\node c(500,1000)[TTT']% |
| 1291 |
\node d(1000,1000)[TT']% |
| 1292 |
\node e(0,500)[TT'T]% |
| 1293 |
\node f(500,500)[TT'TT']% |
| 1294 |
\node g(1000,500)[TT'T']% |
| 1295 |
\node h(1500,500)[TT']% |
| 1296 |
\node i(0,0)[T'T]% |
| 1297 |
\node j(500,0)[T'TT']% |
| 1298 |
\node k(1000,0)[T'T']% |
| 1299 |
\node l(1500,0)[T']% |
| 1300 |
$$\bfig |
| 1301 |
\scalefactor{1.4}% |
| 1302 |
\arrow[a`b;\mu]% |
| 1303 |
\arrow|l|[a`e;T\eta'T]% |
| 1304 |
\arrow|l|[a`c;TT\eta]% |
| 1305 |
\arrow[b`d;T\eta]% |
| 1306 |
\arrow/@<14\ul>/[c`d;\mu T']% |
| 1307 |
\arrow|b|/@<-14\ul>/[c`d;T\sigma]% |
| 1308 |
\arrow[d`h;\mbox{id}]% |
| 1309 |
\arrow|m|[c`f;T\eta'TT']% |
| 1310 |
\arrow|m|[d`g;T\eta'T']% |
| 1311 |
\arrow[e`f;TT'T\eta']% |
| 1312 |
\arrow[f`g;TT'\sigma]% |
| 1313 |
\arrow[g`h;T\mu']% |
| 1314 |
\arrow|l|[e`i;\sigma T]% |
| 1315 |
\arrow|m|[f`j;\sigma TT']% |
| 1316 |
\arrow|m|[g`k;\sigma T']% |
| 1317 |
\arrow[h`l;\sigma]% |
| 1318 |
\arrow|b|[i`j;T'T\eta']% |
| 1319 |
\arrow|b|[j`k;T'\sigma T']% |
| 1320 |
\arrow[k`l;\mu']% |
| 1321 |
\place(500,1250)[1]\place(215,1000)[2]\place(750,750)[3]%% |
| 1322 |
\place(215,250)[4]\place(750,250)[5]\place(1140,750)[6]%% |
| 1323 |
\place(1250,250)[7]% |
| 1324 |
\efig$$ |
| 1325 |
\end{verbatim} |
| 1326 |
It is in some ways easier than the other, but more verbose. In the end |
| 1327 |
it comes down to a matter of preference. |
| 1328 |
|
| 1329 |
|
| 1330 |
|
| 1331 |
\clearpage |
| 1332 |
\def\lab(#1,#2)[#3]{\place(#1,#2)[\backslash\hbox{\texttt#3}]} |
| 1333 |
\def\Lab[#1]{{\backslash\hbox{\texttt#1}}} |
| 1334 |
|
| 1335 |
|
| 1336 |
\subsection{A few samples.} |
| 1337 |
These come from a paper that is being converted from MS-Word and are |
| 1338 |
very complicated. The first shows two ways of doing the same thing. |
| 1339 |
Notable are the use of Bezier curves as well as curved arrows. I now |
| 1340 |
feel that the use of the node/arrow feature may be better, for complex |
| 1341 |
diagrams, than the use of set shapes. Here is the same diagram set in |
| 1342 |
each way. Compare the codes. (This is from a real paper, |
| 1343 |
incidentally.) |
| 1344 |
|
| 1345 |
$$\bfig |
| 1346 |
\def\f{\bar f} |
| 1347 |
\def\g{\bar g} |
| 1348 |
\def\h{\bar h} |
| 1349 |
\let\t\tau |
| 1350 |
\square(0,2400)/>`<-`<-`/<1200,400>[(\h(\g\f))\t_A`((\h\g)\f)\t_A` |
| 1351 |
\h((\g\f)\t_A)`(\h\g(\f\t_A));```] |
| 1352 |
\morphism(0,2400)<600,0>[\h((\g\f)\t_A)`\h(\g(\f\t_A));] |
| 1353 |
\square(600,2000)/>`<-`<-`>/<600,400>[\h(\g(\f\t_A))`(\h\g(\f\t_A)) |
| 1354 |
`\h(\g(\t_Bf))`(\h\g)(\t_Bf);`\h(\g\t_f)`(\h\g)\t_f`] |
| 1355 |
\morphism(1200,2000)<600,0>[(\h\g)(\t_Bf)`((\h\g)\t_B)f;] |
| 1356 |
\square(600,1600)/`>`<-`>/<1200,400>[\h(\g(\t_Bf))`((\h\g)\t_B)f` |
| 1357 |
\h((\g\t_B)f)`(\h(\g\t_B))f;```] |
| 1358 |
\square(600,1200)|xllx|/>`<-`<-`>/<1200,400>[\h((\g\t_B)f)` |
| 1359 |
(\h(\g\t_B))f`\h((\t_Cg)f)`(\h(\t_Cg))f;`\h(\t_gf)`(\h\t_g)f`] |
| 1360 |
\square(600,800)/>`<-`<-`/<1200,400>[\h((\t_Cg)f)`(\h(\t_Cg))f` |
| 1361 |
\h(\t_C(gf))`\h(\t_C(gf));```] |
| 1362 |
\morphism(600,800)<600,0>[\h(\t_C(gf))`(\h\t_C)(gf);] |
| 1363 |
\morphism(1200,800)<600,0>[(\h\t_C)(gf)`\h(\t_C(gf));] |
| 1364 |
\square(1200,400)/>`<-`<-`>/<600,400>[(\h\t_C)(gf)`\h(\t_C(gf))` |
| 1365 |
(\t_Dh)(gf)`((\t_Dh)g)f;`\t_h(gf)`(\t_hg)f`] |
| 1366 |
\morphism(1800,400)/<-/<600,0>[((\t_Dh)g)f`\t_D(hg)f;] |
| 1367 |
\square(1200,0)/`<-`<-`<-/<1200,400>[(\t_Dh)(gf)`\t_D(hg)f` |
| 1368 |
\t_D(h(gf))`\t_D((hg)f);```] |
| 1369 |
\morphism(2400,400)/{@{>}@/^-15pt/}/<-600,1600>[\t_D(hg)f` |
| 1370 |
((\h\g)\t_B)f;\t_{hg}f] |
| 1371 |
\morphism(600,800)|l|/{@{>}@/^15pt/}/<-600,1600>[\h(\t_C(gf))` |
| 1372 |
\h((\g\f)\t_A);\h(\t_{gf})] |
| 1373 |
\morphism(1200,0)/{@{>}@`{c,(-300,0),(-600,2400),p}}/<-1200,2800>[ |
| 1374 |
\t_D(h(gf))`(\h(\g\f))\t_A;\t_h(gf)] |
| 1375 |
\morphism(2400,0)|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/<-1200,2800>[ |
| 1376 |
\t_D((hg)f)`((\h\g)\f)\tau_A;\t_{(hg)f}] |
| 1377 |
\efig$$ |
| 1378 |
|
| 1379 |
$$\bfig |
| 1380 |
\def\f{\bar f} |
| 1381 |
\def\g{\bar g} |
| 1382 |
\def\h{\bar h} |
| 1383 |
\let\t\tau |
| 1384 |
\node 11(0,2800)[(\h(\g\f))\t_A] |
| 1385 |
\node 13(1200,2800)[((\h\g)\f)\t_A] |
| 1386 |
\node 21(0,2400)[\h((\g\f)\t_A)] |
| 1387 |
\node 22(600,2400)[\h(\g\f\t_A)] |
| 1388 |
\node 23(1200,2400)[(\h\g(\f\t_A))] |
| 1389 |
\node 32(600,2000)[\h(\g(\t_Bf))] |
| 1390 |
\node 33(1200,2000)[(\h\g)(\t_Bf)] |
| 1391 |
\node 34(1800,2000)[((\h\g)\t_B)f] |
| 1392 |
\node 42(600,1600)[\h((\g\t_B)f)] |
| 1393 |
\node 44(1800,1600)[(\h(\g\t_B))f] |
| 1394 |
\node 52(600,1200)[\h((\t_C)g)f] |
| 1395 |
\node 54(1800,1200)[(\h(\t_Cg))f] |
| 1396 |
\node 62(600,800)[\h(\t_C(gf))] |
| 1397 |
\node 63(1200,800)[(\h\t_C)(gf)] |
| 1398 |
\node 64(1800,800)[\h(\t_C(gf))] |
| 1399 |
\node 73(1200,400)[(\t_Dh)(gf)] |
| 1400 |
\node 74(1800,400)[((\t_D)h)g] |
| 1401 |
\node 75(2400,400)[(\t_D(hg))f] |
| 1402 |
\node 83(1200,0)[\t_D(h(gf))] |
| 1403 |
\node 85(2400,0)[\t_D((hg)f)] |
| 1404 |
\arrow[11`13;] |
| 1405 |
\arrow[21`11;] |
| 1406 |
\arrow[21`22;] |
| 1407 |
\arrow[22`23;] |
| 1408 |
\arrow[23`13;] |
| 1409 |
\arrow[32`22;\h(\g\t_f)] |
| 1410 |
\arrow[32`33;] |
| 1411 |
\arrow[33`23;(\h\g)\t_f] |
| 1412 |
\arrow[33`34;] |
| 1413 |
\arrow[42`44;] |
| 1414 |
\arrow[42`32;] |
| 1415 |
\arrow[44`34;] |
| 1416 |
\arrow[52`42;\h(\t_gf)] |
| 1417 |
\arrow[52`54;] |
| 1418 |
\arrow[54`44;(\h\t_g)f] |
| 1419 |
\arrow[62`52;] |
| 1420 |
\arrow[62`63;] |
| 1421 |
\arrow[63`64;] |
| 1422 |
\arrow[73`63;\t_h(gf)] |
| 1423 |
\arrow[73`74;] |
| 1424 |
\arrow[74`64;\t_{(hg)f}] |
| 1425 |
\arrow[74`75;] |
| 1426 |
\arrow[83`73;] |
| 1427 |
\arrow[83`85;] |
| 1428 |
\arrow[85`75;] |
| 1429 |
\arrow|r|/{@{>}@/_15pt/}/[75`34;\t_{hg}f] |
| 1430 |
\arrow|l|/{@{>}@/^15pt/}/[62`21;\h(\t_C(gf))] |
| 1431 |
\arrow|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/[85`13;\t_{hg}f] |
| 1432 |
\arrow|r|/{@{>}@`{c,(-300,0),(-600,2400),p}}/[83`11;\t_{h(fg)}] |
| 1433 |
\efig$$ |
| 1434 |
|
| 1435 |
Here are the codes: |
| 1436 |
|
| 1437 |
|
| 1438 |
\begin{verbatim} |
| 1439 |
|
| 1440 |
|
| 1441 |
$$\bfig |
| 1442 |
\def\f{\bar f} |
| 1443 |
\def\g{\bar g} |
| 1444 |
\def\h{\bar h} |
| 1445 |
\let\t\tau |
| 1446 |
\square(0,2400)/>`<-`<-`/<1200,400>[(\h(\g\f))\t_A`((\h\g)\f)\t_A` |
| 1447 |
\h((\g\f)\t_A)`(\h\g(\f\t_A));```] |
| 1448 |
\morphism(0,2400)<600,0>[\h((\g\f)\t_A)`\h(\g(\f\t_A));] |
| 1449 |
\square(600,2000)/>`<-`<-`>/<600,400>[\h(\g(\f\t_A))`(\h\g(\f\t_A)) |
| 1450 |
`\h(\g(\t_Bf))`(\h\g)(\t_Bf);`\h(\g\t_f)`(\h\g)\t_f`] |
| 1451 |
\morphism(1200,2000)<600,0>[(\h\g)(\t_Bf)`((\h\g)\t_B)f;] |
| 1452 |
\square(600,1600)/`>`<-`>/<1200,400>[\h(\g(\t_Bf))`((\h\g)\t_B)f` |
| 1453 |
\h((\g\t_B)f)`(\h(\g\t_B))f;```] |
| 1454 |
\square(600,1200)|xllx|/>`<-`<-`>/<1200,400>[\h((\g\t_B)f)` |
| 1455 |
(\h(\g\t_B))f`\h((\t_Cg)f)`(\h(\t_Cg))f;`\h(\t_gf)`(\h\t_g)f`] |
| 1456 |
\square(600,800)/>`<-`<-`/<1200,400>[\h((\t_Cg)f)`(\h(\t_Cg))f` |
| 1457 |
\h(\t_C(gf))`\h(\t_C(gf));```] |
| 1458 |
\morphism(600,800)<600,0>[\h(\t_C(gf))`(\h\t_C)(gf);] |
| 1459 |
\morphism(1200,800)<600,0>[(\h\t_C)(gf)`\h(\t_C(gf));] |
| 1460 |
\square(1200,400)/>`<-`<-`>/<600,400>[(\h\t_C)(gf)`\h(\t_C(gf))` |
| 1461 |
(\t_Dh)(gf)`((\t_Dh)g)f;`\t_h(gf)`(\t_hg)f`] |
| 1462 |
\morphism(1800,400)/<-/<600,0>[((\t_Dh)g)f`\t_D(hg)f;] |
| 1463 |
\square(1200,0)/`<-`<-`<-/<1200,400>[(\t_Dh)(gf)`\t_D(hg)f` |
| 1464 |
\t_D(h(gf))`\t_D((hg)f);```] |
| 1465 |
\morphism(2400,400)/{@{>}@/^-15pt/}/<-600,1600>[\t_D(hg)f` |
| 1466 |
((\h\g)\t_B)f;\t_{hg}f] |
| 1467 |
\morphism(600,800)|l|/{@{>}@/^15pt/}/<-600,1600>[\h(\t_C(gf))` |
| 1468 |
\h((\g\f)\t_A);\h(\t_{gf})] |
| 1469 |
\morphism(1200,0)/{@{>}@`{c,(-300,0),(-600,2400),p}}/<-1200,2800>[ |
| 1470 |
\t_D(h(gf))`(\h(\g\f))\t_A;\t_h(gf)] |
| 1471 |
\morphism(2400,0)|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/<-1200,2800>[ |
| 1472 |
\t_D((hg)f)`((\h\g)\f)\tau_A;\t_{(hg)f}] |
| 1473 |
\efig$$ |
| 1474 |
|
| 1475 |
$$\bfig |
| 1476 |
\def\f{\bar f} |
| 1477 |
\def\g{\bar g} |
| 1478 |
\def\h{\bar h} |
| 1479 |
\let\t\tau |
| 1480 |
\node 11(0,2800)[(\h(\g\f))\t_A] |
| 1481 |
\node 13(1200,2800)[((\h\g)\f)\t_A] |
| 1482 |
\node 21(0,2400)[\h((\g\f)\t_A)] |
| 1483 |
\node 22(600,2400)[\h(\g\f\t_A)] |
| 1484 |
\node 23(1200,2400)[(\h\g(\f\t_A))] |
| 1485 |
\node 32(600,2000)[\h(\g(\t_Bf))] |
| 1486 |
\node 33(1200,2000)[(\h\g)(\t_Bf)] |
| 1487 |
\node 34(1800,2000)[((\h\g)\t_B)f] |
| 1488 |
\node 42(600,1600)[\h((\g\t_B)f)] |
| 1489 |
\node 44(1800,1600)[(\h(\g\t_B))f] |
| 1490 |
\node 52(600,1200)[\h((\t_C)g)f] |
| 1491 |
\node 54(1800,1200)[(\h(\t_Cg))f] |
| 1492 |
\node 62(600,800)[\h(\t_C(gf))] |
| 1493 |
\node 63(1200,800)[(\h\t_C)(gf)] |
| 1494 |
\node 64(1800,800)[\h(\t_C(gf))] |
| 1495 |
\node 73(1200,400)[(\t_Dh)(gf)] |
| 1496 |
\node 74(1800,400)[((\t_D)h)g] |
| 1497 |
\node 75(2400,400)[(\t_D(hg))f] |
| 1498 |
\node 83(1200,0)[\t_D(h(gf))] |
| 1499 |
\node 85(2400,0)[\t_D((hg)f)] |
| 1500 |
\arrow[11`13;] |
| 1501 |
\arrow[21`11;] |
| 1502 |
\arrow[21`22;] |
| 1503 |
\arrow[22`23;] |
| 1504 |
\arrow[23`13;] |
| 1505 |
\arrow[32`22;\h(\g\t_f)] |
| 1506 |
\arrow[32`33;] |
| 1507 |
\arrow[33`23;(\h\g)\t_f] |
| 1508 |
\arrow[33`34;] |
| 1509 |
\arrow[42`44;] |
| 1510 |
\arrow[42`32;] |
| 1511 |
\arrow[44`34;] |
| 1512 |
\arrow[52`42;\h(\t_gf)] |
| 1513 |
\arrow[52`54;] |
| 1514 |
\arrow[54`44;(\h\t_g)f] |
| 1515 |
\arrow[62`52;] |
| 1516 |
\arrow[62`63;] |
| 1517 |
\arrow[63`64;] |
| 1518 |
\arrow[73`63;\t_h(gf)] |
| 1519 |
\arrow[73`74;] |
| 1520 |
\arrow[74`64;\t_{(hg)f}] |
| 1521 |
\arrow[74`75;] |
| 1522 |
\arrow[83`73;] |
| 1523 |
\arrow[83`85;] |
| 1524 |
\arrow[85`75;] |
| 1525 |
\arrow|r|/{@{>}@/_15pt/}/[75`34;\t_{hg}f] |
| 1526 |
\arrow|l|/{@{>}@/^15pt/}/[62`21;\h(\t_C(gf))] |
| 1527 |
\arrow|l|/{@{>}@`{c,(3000,0),(2700,2800),p}}/[85`13;\t_{hg}f] |
| 1528 |
\arrow|r|/{@{>}@`{c,(-300,0),(-600,2400),p}}/[83`11;\t_{h(fg)}] |
| 1529 |
\efig$$ |
| 1530 |
\end{verbatim} |
| 1531 |
|
| 1532 |
The following is a really ugly diagram that is really hard to make look |
| 1533 |
good. Possibly all four diagonal arrows should be curved, with less |
| 1534 |
curve but in opposite directions. Note the fact that double labels are |
| 1535 |
permitted (though in this case, the second is \hole) and that - is a |
| 1536 |
synonym for (.5) in the label positioning spec. This also features |
| 1537 |
sliding arrows. |
| 1538 |
$$\bfig |
| 1539 |
\node 1(1000,800)[Y] |
| 1540 |
\node 21(0,0)[X] |
| 1541 |
\node 22(2000,0)[Z] |
| 1542 |
\node aa(300,400)[] |
| 1543 |
\node ab(450,400)[] |
| 1544 |
\node ba(1550,400)[] |
| 1545 |
\node bb(1700,400)[] |
| 1546 |
\arrow|a|/{@{>}@/^20pt/}/[21`1;f] |
| 1547 |
\arrow|b|[21`1;g] |
| 1548 |
\arrow[aa`ab;\beta] |
| 1549 |
\arrow[bb`ba;\delta] |
| 1550 |
\arrow|b|[1`22;i] |
| 1551 |
\arrow|a|/{@{>}@/^20pt/}/[1`22;h] |
| 1552 |
\arrow/{@{>}@/^15pt/@<5pt>^(.4)k}/[21`22;] |
| 1553 |
\arrow/{@{>}@/^15pt/@<5pt>^(.4)k}/[21`22;] |
| 1554 |
\arrow/{@{>}@<5pt>|(.4)j|(.5)\hole}/[21`22;] |
| 1555 |
\arrow/{@{>}@<-10pt>|(.4){hf}|-\hole}/[21`22;] |
| 1556 |
\arrow/{@{>}@/_15pt/@<-10pt>_(0.4){ig}}/[21`22;] |
| 1557 |
\node c(1000,150)[] |
| 1558 |
\node f(1000,-200)[] |
| 1559 |
\arrow|l|[f`c;t] |
| 1560 |
\node d(1100,25)[] |
| 1561 |
\node e(1100,-75)[] |
| 1562 |
\arrow|r|[e`d;s] |
| 1563 |
\efig$$ |
| 1564 |
|
| 1565 |
|
| 1566 |
\section{A few comparisons with {\tt xymatrix}} |
| 1567 |
|
| 1568 |
We give here a few diagrams to contrast the predefined shapes of |
| 1569 |
\verb.diagxy. with those produced by \verb.xymatrix.. These are not |
| 1570 |
intended to be invidious, but they are chosen to show \verb.xymatrix. in |
| 1571 |
the worst light. The diagrams can be improved by using special options |
| 1572 |
of \verb.xymatrix. but the second diagrams are the default in |
| 1573 |
\verb.diagxy.. Of course, \verb.diagxy. uses \verb.xypic. but not the |
| 1574 |
\verb.xymatrix. option., so this is not meant as a putdown of |
| 1575 |
\verb.xypic., only as a comparison if you are trying to decide which to |
| 1576 |
use. In the end, though you will probably decide on the basis of which |
| 1577 |
you feel most comfortable with. Users of \verb.diagxy. like the |
| 1578 |
predefined shapes and others find the native syntax of \verb.xypic. more |
| 1579 |
comfortable. |
| 1580 |
|
| 1581 |
\xyoption{matrix} |
| 1582 |
The first one illustrates what happens when the nodes are vertically |
| 1583 |
unbalanced. Changing \verb.\xymatrix. to \verb.\xymatrix1@. improves |
| 1584 |
the appearance, but it is still not perfect. |
| 1585 |
|
| 1586 |
\begin{verbatim} |
| 1587 |
$$\xymatrix {A^{X^Y}\ar[r]&B_{Z_W}\ar[r]&C} |
| 1588 |
\qquad A^{X^Y}\to B_{Z_W}\to C$$ |
| 1589 |
\end{verbatim} |
| 1590 |
produces |
| 1591 |
$$\xymatrix {A^{X^Y}\ar[r]&B_{Z_W}\ar[r]&C} |
| 1592 |
\qquad A^{X^Y}\to B_{Z_W}\to C$$ |
| 1593 |
|
| 1594 |
The next sample shows what happens to the label when the nodes are of |
| 1595 |
quite different length. Putting a - after the \verb.^. fixes this. |
| 1596 |
\begin{verbatim} |
| 1597 |
$$\xymatrix{A\ar[r]^{(f,g,h)}&B\times C\times D}\qquad |
| 1598 |
A\to^{(f,g,h)}B\times C\times D$$ |
| 1599 |
\end{verbatim} |
| 1600 |
produces |
| 1601 |
$$\xymatrix{A\ar[r]^{(f,g,h)}&B\times C\times D}\qquad |
| 1602 |
A\to^{(f,g,h)}B\times C\times D$$ |
| 1603 |
|
| 1604 |
|
| 1605 |
However, it doesn't fix the problem of too short an arrow. Replacing |
| 1606 |
\verb.[r]. by \verb.[rr]. and the \verb.&. by \verb.&&. fixes this. |
| 1607 |
\begin{verbatim} |
| 1608 |
$$\xymatrix{A\ar[r]^-{(f_1,g_2,h_3)}&B\times C\times D}\qquad |
| 1609 |
A\to^{(f_1,g_2,h_3)}B\times C\times D$$ |
| 1610 |
\end{verbatim} |
| 1611 |
produces |
| 1612 |
$$\xymatrix{A\ar[r]^-{(f_1,g_2,h_3)}&B\times C\times D}\qquad |
| 1613 |
A\to^{(f_1,g_2,h_3)}B\times C\times D$$ |
| 1614 |
|
| 1615 |
Unbalanced nodes in a triangle result in an unbalanced triangle. I do |
| 1616 |
not know how to fix this one up, although \verb.xypic. has so many |
| 1617 |
options that there is probably some way. |
| 1618 |
\begin{verbatim} |
| 1619 |
$$\xymatrix{A\ar[rr]\ar[dr]&&B\times C\times D\ar[dl]\\&E}$$ |
| 1620 |
$$\xy\Vtriangle[A`B\times C\times D`E;``]\endxy$$ |
| 1621 |
\end{verbatim} |
| 1622 |
produces |
| 1623 |
$$\xymatrix{A\ar[rr]\ar[dr]&&B\times C\times D\ar[dl]\\&E}$$ |
| 1624 |
$$\xy\Vtriangle[A`B\times C\times D`E;``]\endxy$$ |
| 1625 |
|
| 1626 |
\clearpage |
| 1627 |
\section{Thumbnails} |
| 1628 |
|
| 1629 |
This page shows all the shapes that have been defined so far. In all |
| 1630 |
cases, consult the documentation for the syntax and a discussion of the |
| 1631 |
optional parameters. Note that \verb.\Square., along with |
| 1632 |
\verb.\hSquares. and \verb.\vSquares. grow in width to accomodate the |
| 1633 |
nodes and labels. |
| 1634 |
|
| 1635 |
\scalefactor{.4} |
| 1636 |
% \fontscale{} |
| 1637 |
\let\.\cdot |
| 1638 |
$\.\to_{\Lab[to]}\.\toleft_{\Lab[toleft]}\. |
| 1639 |
\mon_{\Lab[mon]}\.\monleft_{\Lab[monleft]}\.\epi_{\Lab[epi]}\.\epileft_{\Lab[epileft]}\. |
| 1640 |
\two_{\Lab[two]}\.\three_{\Lab[three]}\.$ |
| 1641 |
|
| 1642 |
$$\bfig |
| 1643 |
\square[\.`\.`\.`\.;```] |
| 1644 |
\lab(200,-250)[square] |
| 1645 |
\Atriangle(1000,0)[\.`\.`\.;``] |
| 1646 |
\lab(1400,-250)[Atriangle] |
| 1647 |
\Vtriangle(2500,0)[\.`\.`\.;``] |
| 1648 |
\lab(2900,-250)[Vtriangle] |
| 1649 |
\Ctriangle(4000,0)[\.`\.`\.;``] |
| 1650 |
\lab(4400,-250)[Ctriangle] |
| 1651 |
\Dtriangle(5000,0)[\.`\.`\.;``] |
| 1652 |
\lab(5400,-250)[Dtriangle] |
| 1653 |
\def\ru{\.\.\.\.\.} |
| 1654 |
\square(0,-1500)<1000,500>[\ru`\ru`\ru`\ru;```] |
| 1655 |
\lab(400,-1750)[Square] |
| 1656 |
\ptriangle(1800,-1500)[\.`\.`\.;``] |
| 1657 |
\lab(2000,-1750)[ptriangle] |
| 1658 |
\qtriangle(2900,-1500)[\.`\.`\.;``] |
| 1659 |
\lab(3100,-1750)[qtriangle] |
| 1660 |
\dtriangle(4000,-1500)[\.`\.`\.;``] |
| 1661 |
\lab(4200,-1750)[dtriangle] |
| 1662 |
\btriangle(5100,-1500)[\.`\.`\.;``] |
| 1663 |
\lab(5400,-1750)[btriangle] |
| 1664 |
\Atrianglepair(0,-3000)[\.`\.`\.`\.;````] |
| 1665 |
\lab(400,-3250)[Atrianglepair] |
| 1666 |
\Vtrianglepair(1500,-3000)[\.`\.`\.`\.;````] |
| 1667 |
\lab(1900,-3250)[Vtrianglepair] |
| 1668 |
\Ctrianglepair(3500,-3000)[\.`\.`\.`\.;````] |
| 1669 |
\lab(3400,-3250)[Ctrianglepair] |
| 1670 |
\Dtrianglepair(4500,-3000)[\.`\.`\.`\.;````] |
| 1671 |
\lab(4900,-3250)[Dtrianglepair] |
| 1672 |
\hSquares(0,-4500)[\ru`\ru`\ru`\ru`\ru`\ru;``````] |
| 1673 |
\lab(600,-4750)[hSquares] |
| 1674 |
\pullback(2700,-4500)[\.`\.`\.`\.;```][\.;``] |
| 1675 |
\lab(3000,-4750)[pullback] |
| 1676 |
\iiixii(4000,-4500){15}<400>[\.`\.`\.`\.`\.`\.;``````] |
| 1677 |
\lab(4800,-4750)[iiixii] |
| 1678 |
\cube(0,-7000)[\.`\.`\.`\.;```](500,-6500)[\.`\.`\.`\.;```][```] |
| 1679 |
\lab(700,-7250)[cube] |
| 1680 |
\iiixiii(2500,-7000)[\.`\.`\.`\.`\.`\.`\.`\.`\.;```````````] |
| 1681 |
\lab(3000,-7250)[iiixiii] |
| 1682 |
\vSquares(4500,-7000)[\ru`\ru`\ru`\ru`\ru`\ru;``````] |
| 1683 |
\lab(4800,-7250)[vSquares] |
| 1684 |
\efig$$ |
| 1685 |
|
| 1686 |
\clearpage |
| 1687 |
\section{Command summary} |
| 1688 |
|
| 1689 |
\def\v#1.{{\texttt{#1}}} |
| 1690 |
Below is a summary of the syntax of the supplied shapes. In this |
| 1691 |
summary, optional parameters are enclosed in braces (\verb/{}/) because |
| 1692 |
the more usual brackets are too much used. In only two cases below are |
| 1693 |
braces to be used and they will be made clear. In all cases it is the |
| 1694 |
set of parameters that is optional; you must accept the default for all, |
| 1695 |
or set them all. But the different sets of parameters are independent. |
| 1696 |
Note that continuation lines are marked with a \verb.%. sign. If you |
| 1697 |
break one of these macros be sure to end the line with \verb.%., unless |
| 1698 |
you are inside the \verb/[...]/, where everything is done in math mode |
| 1699 |
and space characters are ignored. |
| 1700 |
\begin{trivlist} |
| 1701 |
\item[\v(x,y).:] The coordinates of the lower left corner of the |
| 1702 |
smallest rectangle that encloses the figure, whether or not that corner |
| 1703 |
is actually in the shape. |
| 1704 |
|
| 1705 |
\item[\v p.:] |
| 1706 |
One of the letters \v a., \v b., \v l., |
| 1707 |
\v m., or \v x. and describe the placement of an arrow label as above, |
| 1708 |
below, right, left,in the middle of an arrow, or no label, resp. |
| 1709 |
|
| 1710 |
\item[\v a.:] The shape of the arrow. |
| 1711 |
|
| 1712 |
\item[\v <dx,dy>.:] The horizontal and vertical extent of the diagram. |
| 1713 |
In a couple cases only one is specified. |
| 1714 |
|
| 1715 |
\item[\v O.:] An object or node. |
| 1716 |
|
| 1717 |
\item[\v L.:] An arrow label. |
| 1718 |
|
| 1719 |
\item[\v N.:] A number in the range 0..15. If it has more than one |
| 1720 |
digit, must be placed inbraces. |
| 1721 |
|
| 1722 |
\item[\v M.:] A number in the range 0.."7777. Also in braces. |
| 1723 |
|
| 1724 |
\end{trivlist} |
| 1725 |
|
| 1726 |
|
| 1727 |
\begin{verbatim} |
| 1728 |
\to{/a/}{^A}{|A}{_A} |
| 1729 |
\xar{^A}{|A}{_A}(xar = mon, epi, toleft, monleft, epileft) |
| 1730 |
\square{(x,y)}{|pppp|}{/a`a`a`a/}{<dx,dy>}[O`O`O`O;L`L`L`L] |
| 1731 |
\Ltriangle{(x,y)}{|ppp|}{/a`a`a/}{<dx,dy>}[O`O`O;L`L`L] |
| 1732 |
\Vtriangle{(x,y)}{|ppp|}{/a`a`a/}{<dx,dy>}[O`O`O;L`L`L] |
| 1733 |
\Ctriangle{(x,y)}{|ppp|}{/a`a`a/}{<dx,dy>}[O`O`O;L`L`L] |
| 1734 |
\Dtriangle{(x,y)}{|ppp|}{/a`a`a/}{<dx,dy>}[O`O`O;L`L`L] |
| 1735 |
\Square{(x,y)}{|pppp|}{/a`a`a`a/}{<dy>}[O`O`O`O;L`L`L`L] |
| 1736 |
\ptriangle{(x,y)}{|ppp|}{/a`a`a/}{<dx,dy>}[O`O`O;L`L`L] |
| 1737 |
\qtriangle{(x,y)}{|ppp|}{/a`a`a/}{<dx,dy>}[O`O`O;L`L`L] |
| 1738 |
\dtriangle{(x,y)}{|ppp|}{/a`a`a/}{<dx,dy>}[O`O`O;L`L`L] |
| 1739 |
\btriangle{(x,y)}{|ppp|}{/a`a`a/}{<dx,dy>}[O`O`O;L`L`L] |
| 1740 |
\Ltrianglepair{(x,y)}{|ppppp|}{/a`a`a`a`a/}{<dx,dy>}% |
| 1741 |
[O`O`O`O;L`L`L`L`L] |
| 1742 |
\Vtrianglepair{(x,y)}{|ppppp|}{/a`a`a`a`a/}{<dx,dy>}% |
| 1743 |
[O`O`O`O;L`L`L`L`L] |
| 1744 |
\Ctrianglepair{(x,y)}{|ppppp|}{/a`a`a`a`a/}{<dx,dy>}% |
| 1745 |
[O`O`O`O;L`L`L`L`L] |
| 1746 |
\Dtrianglepair{(x,y)}{|ppppp|}{/a`a`a`a`a/}{<dx,dy>}% |
| 1747 |
[O`O`O`O;L`L`L`L`L] |
| 1748 |
\hSquares{(x,y)}{|ppppppp|}{/a`a`a`a`a`a`a/}{<dx,dy>}% |
| 1749 |
[O`O`O`O`O`O;L`L`L`L`L`L`L] |
| 1750 |
\pullback{(x,y)}{|pppp|}{/a`a`a`a/}{<dx,dy>}[O`O`O`O;L`L`L`L] |
| 1751 |
{|ppp|}{/a`a`a/}{<#7,#8>}[O;L`L`L] |
| 1752 |
\iiixii{(x,y)}{|ppppppp|}{/a`a`a`a`a`a`a/}{<dx,dy>}% |
| 1753 |
{N{<dx,dy>}}[O`O`O`O`O`O;L`L`L`L`L`L`L] |
| 1754 |
\cube{(x,y)}{|pppp|}{/a`a`a`a/}{<dx,dy>}[O`O`O`O;L`L`L`L]% |
| 1755 |
{(x,y)}{|pppp|}{/a`a`a`a/}{<dx,dy>}[O`O`O`O;L`L`L`L]% |
| 1756 |
{|pppp|}{/a`a`a`a/}[L`L`L`L] |
| 1757 |
\iiixiii{(x,y)}{|pppppppppppp|}{/a`a`a`a`a`a`a`a`a`a`a`a/}% |
| 1758 |
{<dx,dy>}{M{<dx>}}% |
| 1759 |
[O`O`O`O`O`O`O`O`O;L`L`L`L`L`L`L`L`L`L`L`L`L`L`L] |
| 1760 |
\vSquares{(x,y)}{|ppppppp|}{/a`a`a`a`a`a`a/}{<dx,dy>}% |
| 1761 |
[O`O`O`O`O`O;L`L`L`L`L`L`L] |
| 1762 |
\end{verbatim} |
| 1763 |
|
| 1764 |
|
| 1765 |
\edef\backslash{\ensuremath{\backslash}} |
| 1766 |
\catcode`\<=\active |
| 1767 |
\catcode`\>=\active |
| 1768 |
\catcode`\^=\active |
| 1769 |
\catcode`\_=\active |
| 1770 |
\def<{\mathhexbox13C} |
| 1771 |
\def>{\mathhexbox13E} |
| 1772 |
\def^{\mathhexbox362} |
| 1773 |
\def_{\vrule width 10pt height .4pt depth 0pt} |
| 1774 |
\addcontentsline{toc}{section}{Index} |
| 1775 |
\newpage |
| 1776 |
\input diaxydoc.ind |
| 1777 |
|
| 1778 |
|
| 1779 |
\end{document} |
| 1780 |
|
| 1781 |
Color example: |
| 1782 |
$$\xy *[blue]{A} \ar@[red]@{->}^[green]{f}(20,0) *[magenta]{B}\endxy$$ |
| 1783 |
|
| 1784 |
|
| 1785 |
|
| 1786 |
If the shape parameter begins with an \index{@}\verb.@., it is |
| 1787 |
interpreted differently. In that case, it has the form |
| 1788 |
\index{@{shape}@}\verb.@{shape}@. modifier, where the modifier is as |
| 1789 |
described in the \xypic\ reference guide. I just mention a couple of |
| 1790 |
them. The parameter \index{@{->}@<3pt>}\verb.@{->}@<3pt>., for example, |
| 1791 |
would give an ordinary arrow moved three points in the direction |
| 1792 |
perpendicular to that of the arrow. If you give |
| 1793 |
\index{{@{->>}@/^5pt/}}\verb.{@{->>}@/^5pt/}., you will get an epic |
| 1794 |
arrow that is curved in the direction perpendicular to the direction of |
| 1795 |
the arrow by five points. It is imperative that a specification such as |
| 1796 |
\index{@{>}@/5pt/}\verb.@{>}@/5pt/. be enclosed in braces because of the |
| 1797 |
\index{/}\verb./.s. |