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

image as appears in test.dvi

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}
share|improve this question
    
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
2  
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

1 Answer 1

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).

share|improve this answer
    
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 Lampret 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
1  
@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

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.