5

Arrows in xy-pic have narrow heads, but I need heavy tips for my graphs. I tried the following arrow definition, but the tip of the arrow enters into the circle of graph node.

\documentclass{report}
\usepackage[all]{xy}

\newdir{|>}{%
!/4.5pt/@{|}*:(1,-.2)@^{>}*:(1,+.2)@_{>}}

\begin{document}
\[
\xygraph{
!{<0cm,0cm>;<2cm,0cm>:<0cm,2cm>::}
!{(0,0)}*+=[o]+[F]{1}="1"
!{(1,0)}*+=[o]+[F]{2}="2"
"1":@{|>}"2"
} 
\]
\end{document}

Would you please help me to avoid this problem?

How can I fill insdie the arrow tip? Or preferably get something like: Arrow tips

masu
  • 6,571
Aydin
  • 1,983
  • Not a direct answer, but you can draw also XY-diagrams with tikz (eg: http://www.felixl.de/commu.pdf, or Better arrowheads in commutative diagrams – JLDiaz Dec 17 '12 at 10:39
  • 1
    Just an addition to JLDiaz comment: based on TikZ there's also the tikz-cd package. – Claudio Fiandrino Dec 17 '12 at 10:48
  • Thanks for links. Both stealth- and latex-style arrows in TikZ are great for my purpose. However, it is not convinient to reporoduce \xygraph{} drawings in TikZ that I am not familiar with. – Aydin Dec 17 '12 at 13:42
  • Perhaps this answer would give you ideas: http://tex.stackexchange.com/questions/113437/stealth-arrow-in-math/113472#113472. There, a "stealth arrow" was added to the pre-existing font. Perhaps the stealth arrows would be an improvement, or if still not adequate, the answer might give direction on how to do this for another font set. – Steven B. Segletes May 21 '13 at 11:45

1 Answers1

1

Just in order to show the solution of your problem with tikz-cd:

% arara: pdflatex 

\documentclass{report}
\usepackage{tikz-cd}
\usetikzlibrary{arrows} 

\begin{document}
\[
\begin{tikzcd}
\tikz{\node[draw, circle]{1}} \arrow[-latex]{r} & \tikz{\node[draw, circle]{2}}
\end{tikzcd}
\]
\tikzcdset{
arrow style=tikz,
diagrams={>=stealth}
}
\[
\begin{tikzcd}
\tikz{\node[draw, circle]{1}} \arrow{r} & \tikz{\node[draw, circle]{2}}
\end{tikzcd}
\]
\end{document}

enter image description here

LaRiFaRi
  • 43,807
  • 1
    Thanks. It ssems that there is no direct answer using the xy-pic package. I accept your answer to close this question. – Aydin Jul 15 '14 at 12:10