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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use \dir to draw custom frames in an XYpic drawing, but have been unable to figure out how to change the color of the line drawn by each command. For instance, to draw a triangle frame, I'm using the code \POS ="i","i"+UL;"i"+DL **\dir{-};"i"+R **\dir{-};"i"+UL **\dir{-},"i" inside a \begin{xy} environment. How do I change the lines drawn the ** commands to be some color other than black?

share|improve this question
up vote 2 down vote accepted

I get colored \dir by adding the color between ** and \dir. See xyrefer.pdf for more details.

A \POS[];[d]**[VioletRed]\dir{~},
      [];[dr]**[Periwinkle]\dir{-} \\
B & C \POS[];[l]**[PineGreen]\dir{.} }

enter image description here

share|improve this answer
Thank you! That worked exactly as I wanted. I did look at xyrefer.pdf, but found it pretty inscrutable, so I wasn't able to figure that out. – Chris Granade Feb 10 '12 at 0:28

Your Answer


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.