[Tex/LaTex] Ugly diagonal arrows using xymatrix

arrowsdiagramsxymatrix

I have tried to create some diagrams using xymatrix. However, the problem I have encountered is that diagonal arrows do not look very well – they are not smooth and resemble raster graphics rather than vector graphics. I have the same problem using pdfLaTeX as well as LaTeX + dvips.

Here is my code:

\documentclass{article}
\usepackage[utf8]{inputenc}                                    
\usepackage[T1]{fontenc}
\usepackage[all,cmtip]{xy}
\begin{document}
\begin{displaymath}
\xymatrixcolsep{5pc}\xymatrix{& & A & \\ B \ar[r] \ar[urr] & C \ar[r] & D \ar[r] \ar[u] & E 
}
\end{displaymath}
\end{document}

The urr-arrow is the one that does not look well. I wonder if this problem can be solved, since, e.g., in this document demonstrating the use of xymatrix, there is no sign of a similar problem. Thank you in advance.

Best Answer

With a recent TeX distribution there's no need to do anything for getting driver support for drawing oblique arrows. So I suspect you have an older version of xy.

You can also try tikz-cd. I show both outputs.

\documentclass{article}
\usepackage[utf8]{inputenc}                                    
\usepackage[T1]{fontenc}
\usepackage[all,cmtip]{xy}
\usepackage{tikz-cd}
\begin{document}
\begin{displaymath}
\xymatrixcolsep{5pc}
\xymatrix{
  & & A & \\ 
  B \ar[r] \ar[urr] & C \ar[r] & D \ar[r] \ar[u] & E 
}
\end{displaymath}

\[
\begin{tikzcd}[column sep=5pc]
  {} & {} & A \\
  B \arrow{rru}{} \arrow{r}{} &
  C \arrow{r}{} &
  D \arrow{r}{} \arrow{u}{} & E
\end{tikzcd}
\]
\end{document}

enter image description here

Related Question