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'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

1 Answer 1

up vote 2 down vote accepted

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

\documentclass{article}
\usepackage[all,color]{xy}
\UseCrayolaColors
\begin{document}
\begin{xy}
\xymatrix{
A \POS[];[d]**[VioletRed]\dir{~},
      [];[dr]**[Periwinkle]\dir{-} \\
B & C \POS[];[l]**[PineGreen]\dir{.} }
\end{xy}
\end{document}

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

 
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.