4

In the diagram with bending arrow given by the LaTeX file below, the arrow has a misdirected head.

How can I correct it?

\documentclass[a4paper,11pt]{amsart}
\usepackage[all]{xy}
\begin{document}
\[    \xymatrix@1@R=7pt@C=10pt{
& 0 \ar@{-}[rd] &&&&  1\ar@{-}[ld] \\
&& a\ar@{-}[r] & \cdots  \ar@{-}[r] & b \\
&2\ar@{-}[ru] &&&& 
3\ar@{-}[lu] \ar@{-->} `d[dl] `[lllll] `[uu] \\ 
&&&&
 }   \]
\end{document}
  • 2
    I heartily wish that bending arrows were more clearly explained in the manual of Xy-pic. – egreg Jun 5 '15 at 20:11
4

One possible solution is in the following code. Essentially I just added one more relative positioning parameter to get the arrowhead to turn the correct direction. Also, I changed the variant of the arrow head \ar@{--2>} to make the arrow more distinct.

\documentclass[a4paper,11pt]{amsart}
\usepackage[all]{xy}
\begin{document}
    \[    \xymatrix@1@R=7pt@C=10pt{
        & 0 \ar@{-}[rd] &&&&  1\ar@{-}[ld] \\
        && a\ar@{-}[r] & \cdots  \ar@{-}[r] & b \\
        &2\ar@{-}[ru] &&&& 
        3\ar@{-}[lu] \ar@{--2>} `d[dl] `[lllll] `[uu] [uullll] \\  
        &&&&
    }   \]
\end{document}

Example Image

  • How can one put a picture in one's question or answer? – Mikhail Borovoi Jun 6 '15 at 6:28
  • @MikhailBorovoi: You're welcome! To add a picture to the answer box you can press the little box that looks like a landscape (at the top of the editor) and then either upload an image from your computer, or through a url, or you can do Ctrl-G on Windows. – cptnjtk Jun 6 '15 at 6:34
  • @cptnjtk, not only on Windows. I use Linux and ctrl+g works. – Sigur Jun 6 '15 at 12:20
3

If you want to get the whole arrow dashed, you will have to switch to :

% arara: pdflatex

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
\[
\begin{tikzcd}[every arrow/.append style={dash}]
0 \arrow{dr} & &[.8cm] & 1 \\
& a \arrow{r}[description]{\ldots} & b \arrow{ur}\arrow{dr} & \\
2 \arrow{ur} & & & 3 \arrow[->, dashed, rounded corners, to path={ -- ([yshift=-2ex]\tikztostart.south) -| ([xshift=-2ex]\tikztotarget.west) -- (\tikztotarget)}]{uulll}
\end{tikzcd}
\]
\end{document}

enter image description here

  • Excellent! I will certainly switch to {tikz-cd}! Unfortunately, I cannot accept two answers.... – Mikhail Borovoi Jun 9 '15 at 14:19
  • @MikhailBorovoi Glad to hear that. You do not have to accept both. The other one answers your question. I am just giving another approach. It is absolutely worth to have a look into the tikz-cd manual. – LaRiFaRi Jun 9 '15 at 14:21

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.