# Diagram draw with xy package looks wrong

I'm trying out the xy package and have compiled one of the examples on this website: http://en.wikibooks.org/wiki/LaTeX/Creating_Graphics#Xy-pic

\begin{displaymath}
\xymatrix{
A \ar[d] \ar[dr] \ar[r] & B \\
D                       & C }
\end{displaymath}

But when I compile the latex code with latex test.tex and look at the resulting test.dvi, I get this:

The arrow pointing to the bottom right looks wrong. How do I fix this?

EDIT: Here's the full latex code:

\documentclass[12pt]{article}
\usepackage[all]{xy}
\begin{document}
\begin{displaymath}
\xymatrix{
A \ar[d] \ar[dr] \ar[r] & B \\
D                       & C }
\end{displaymath}
\end{document}
-
Could you post your entire test document? I get the right rendering when I include the snippet in a minimal document. –  Loop Space Aug 25 '11 at 13:17
Turn the .dvi file into a .ps file using dvips test in a terminal, or compile with pdflatex directly. –  Gonzalo Medina Aug 25 '11 at 13:23
I converted the dvi into pdf using dvipdf. It still looks a little bit wobbly when I view it with evince pdf viewer, but when I print it out it looks fine. –  Eddy Aug 25 '11 at 13:32
evince 2.32.0 on Ubuntu 11.04 certainly has problems with this. On my system it shows the nodes correctly but only the vertical and horizontal lines are shown. Even at high magnification there are no arrowheads or diagonal line. okular, spawg, spawx11, xgdvi and xdvi show the same .dvi correctly. –  mas Aug 25 '11 at 15:16

By compiling with pdflatex you can use the package xypdf

\documentclass[12pt]{article}
\usepackage[all]{xy}
\usepackage{xypdf}
\begin{document}
\begin{displaymath}
\xymatrix{
A \ar[d] \ar[dr] \ar[r] & B \\
D                       & C }
\end{displaymath}
\end{document}

One important comment by Matsaya:

after test, I want to say that xypdf is now an integrated to xy. Indeed, when you try to compile the examples of the xypdf manual with pdfLaTeX and the new xy package, it works just fine (the same as with the old fashion way xy + xypdf).

-
compiling your code returns LaTeX Error: File 'xy.sty' not found. I tried finding the file 'xy.sty' on the net but was unsuccessful. –  Leon Sep 23 '11 at 14:55
@LeonLampret: xy isn't the problem. xypdf was removed from the package repository. I don't know why. –  Marco Daniel Sep 23 '11 at 18:06
@MarcoDaniel: after test, I want to say that xypdf is now an integrated to xy. Indeed, when you try to compile the examples of the xypdf manual with pdfLaTeX and the new xy package, it works just fine (the same as with the old fashion way xy + xypdf). –  Matsaya Oct 18 '11 at 6:34