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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.