For reasons that are increasingly unclear to me, I've been using the TeX package XY-Pic for the commutative diagrams (of which there are many) in my thesis and papers. If there is one and only one Right Way to do something, you can pretty much guarantee that XY-Pic will:
One of its more annoying characteristics is the way it handles tails of arrows, which (by default) start after the end of the arrow, so the tail invariably collides with whatever it was the arrow is pointing away from. Like this:
There is a fix, which is to declare a new type of arrowhead (or "dir" in XY-Pic parlance), which consists of the old arrowhead plus a small shift to get it in the right place. Fortunately, the default direction for arrowheads to be shifted is (IIRC) in the direction of the arrow, so you can get away with doing this once for each type of arrowhead rather than once for each arrowhead and every direction you want to use it in. The incantation for doing this is as follows:
If you want your arrowheads (arrowtails?) to lie atop the arrows, as with the usual notation for inclusion maps, it gets a bit more complicated, but still doable. The code
1 Thinking about it, XY-Pic is actually kinda agglutinative, much like the Black Speech...
- do something else by default, producing horribly ugly output;
- only do the Right Thing if you utter some cryptic and fragile incantation in a language that looks like the bastard offspring of APL and the Black Speech of Mordor1;
- hide the details of said incantation away somewhere in the depths of the voluminous, poorly-indexed, verbose and maddeningly unclear manual.
One of its more annoying characteristics is the way it handles tails of arrows, which (by default) start after the end of the arrow, so the tail invariably collides with whatever it was the arrow is pointing away from. Like this:
That was produced by the code
\xymatrix{ A \ar@{>->}[r] & B }
, which, while not terribly clear, is the obvious thing to try, and the only thing you'll know how to do unless you've wasted days reading the manual.There is a fix, which is to declare a new type of arrowhead (or "dir" in XY-Pic parlance), which consists of the old arrowhead plus a small shift to get it in the right place. Fortunately, the default direction for arrowheads to be shifted is (IIRC) in the direction of the arrow, so you can get away with doing this once for each type of arrowhead rather than once for each arrowhead and every direction you want to use it in. The incantation for doing this is as follows:
\newdir{(>}{{}*!/-5pt/\dir{>}}
\xymatrix{ A \ar@{(>->}[r] & B }
Which produces:The
\newdir
can go in your document prelude, and thereafter you just need the second line - better, you can declare a macro to hide the details for you, using the code \newcommand{\monicar}{\ar@{(>->}}
. Note that I've called my new arrowhead "(>" rather than " >" as would be more logical: this is because TeX's lexer eats spaces before XY-Pic gets a chance to look at them.If you want your arrowheads (arrowtails?) to lie atop the arrows, as with the usual notation for inclusion maps, it gets a bit more complicated, but still doable. The code
\newdir^{((}{{}*!/-5pt/\dir^{(}}
\xymatrix{
A \ar@{^{((}->}[r] & B
}
producesas required.
1 Thinking about it, XY-Pic is actually kinda agglutinative, much like the Black Speech...
Tags: