Math & Sciencecoloring an arrow in xymatrix and compile with pdflatex ??

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
trucmuche2005
Posts: 5
Joined: Sat Mar 13, 2010 1:34 pm

coloring an arrow in xymatrix and compile with pdflatex ??

Post by trucmuche2005 »

Hello everybody !

I'm trying to have some red arrows in my xymatrix. I tried to use "\ar@*{[red]}" and that works perfectly when I compile with latex > dvips and view the Postscript file.

For some reasons, I would like to use pdflatex instead of latex > dvips > ps2pdf (which doesn't produce a red arrow in the pdf file, by the way).
But the above technique doesn't work anymore : the desired red arrow disappears in the pdf file...

What should I modify in the minimal example here to get a red arrow when compiling with pdflatex ?

Code: Select all

\documentclass{book}
\usepackage{color}
\usepackage[all,color,dvips]{xy}
\begin{document}
\[
\xymatrix{ A \ar@*{[red]}[r]  & B }
\]
\end{document}
Thank you very very much for your help !

Best regards,

Trucmuche

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

coloring an arrow in xymatrix and compile with pdflatex ??

Post by localghost »

You may evade this problem by using the pgf/tikZ package and its capabilities regarding matrices. See Section 16.6 (Examples, p. 179ff) of its manual.


Best regards and welcome to the board
Thorsten
trucmuche2005
Posts: 5
Joined: Sat Mar 13, 2010 1:34 pm

Re: coloring an arrow in xymatrix and compile with pdflatex

Post by trucmuche2005 »

Ouh yeah, it works :-) Fantastic :-)
Thank you very, very much !!
Post Reply