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

4
  • Not a direct answer, but you can draw also XY-diagrams with tikz (eg: felixl.de/commu.pdf, or Better arrowheads in commutative diagrams
    – JLDiaz
    Commented Dec 17, 2012 at 10:39
  • 1
    Just an addition to JLDiaz comment: based on TikZ there's also the tikz-cd package. Commented Dec 17, 2012 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
    Commented Dec 17, 2012 at 13:42
  • Perhaps this answer would give you ideas: tex.stackexchange.com/questions/113437/stealth-arrow-in-math/…. 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. Commented May 21, 2013 at 11:45

1 Answer 1

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .