1

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?

1 Answer 1

2

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

1
  • 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. Feb 10, 2012 at 0:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .