Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to use arrows whose heads and/or tails can be almost-triangles: roughly, something like A ———▷ B or A ▷——> B.  For the heads, there’s a good solution in xyguide:

\newdir{|>}{!/4.5pt/@{|}*:(1,-.2)@^{>}*:(1,+.2)@_{>}}

Now A \to/@{-|>}/ B works as desired.  Trying to use this as a tail suffers from a well-known problem, described further down the same page of the guide: “Often tips used as "tails" have their ink on the wrong side of the point where they are placed,” so they sit too far back and crash into the letter behind them, giving something like A▷——> B.  Fortunately, the guide has an exercise on how to fix this, giving the solution

\newdir{ >}{{}*!/-5pt/@{>}}

which, unmodified, works beautifully to give eg A >——> B. Unfortunately, the modification

\newdir{ |>}{{}*!/-5pt/@{|>}}

does not produce the expected result: A \to/@{ |>->}/ B gives something like A▷ ——>B, with the tail pulled back from the shaft and crashing even further into the letter behind it!

Changing the -5pt to a different length—to 5pt, or 0pt, or 50pt—makes no difference to this result.  Other modifiers here work as I’d expect; for instance, \newdir{ |>}{{}*:(1,1)@{|>}} rotates the triangle.  But the !/-5pt/, which as I understand should shift the reference point, and seems to do this fine in the exercise from the guide, just doesn’t seem to work as expected in this example.  I’m completely stumped.  What gives?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I'm not an xy-expert, but I think it's do to with grouping. A little experimenting makes it seem that the distance modifier is applied only to the current object in the combination and isn't recursively applied. Moreover, it's cancelled by the distance modifier in the arrow definition. I don't know if it's possible to fix this, but defining the adjusted arrow "from scratch" seems to work. For example:

\newdir{ |>}{{}*!/-1pt/@{|}*!/-6pt/:(1,-.2)@^{>}*!/-6pt/:(1,+.2)@_{>}}

Adjusting the -1pt, -6pt, and -6pt does shift the arrow tail.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.