0

Why is the following code for a curved, dotted arrow in XYpic not working?

\ar@{.>}/_1pc/[ddrr]_(.4){\widehat{p_0}}

I've already tried all possible orders of {.>}, /_1pc/ and [ddrr]_(.4){\widehat{p_0}}.

2

You're forgetting an @:

\documentclass{article}
\usepackage{amsmath}
\usepackage[all,cmtip]{xy}

\begin{document}

\xymatrix{
  A \ar@{.>}@/_1pc/[ddrr]_(.4){\widehat{p_0}} && B \\ \\
  C && D
}

\end{document}

enter image description here

  • Thanks! I didn't know I had to repeat the ampersand. – Werner Jul 1 at 13:15
  • It is not an ampersand but "commercial at sign" / "at sign" / "at symbol". – albert Jul 1 at 13:37
  • @Werner @ reads “at”; & reads as “ampersand”. – egreg Jul 1 at 13:44
  • @Werner the repetition of the & as well as the 4 backslashes were done in order to increase the separation between the cells. As your question contained a ddrr egreg was seeing that you connect to something which is "down down right right" and guessed the above example. Thus the doubled separators. If you provide us with full examples, the answers will contain less guessing and therfor more help for you. :-) – LaRiFaRi Jul 1 at 14:06
  • 1
    @LaRiFaRi I added the necessary rows and columns just to keep the OP's syntax. Of course it's much better not to double rows and columns in order to just expand the diagram: acting on the row and column separation is preferable. – egreg Jul 1 at 14:09
2

Maybe tikz-cd is easier to read for you?

% arara: pdflatex

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

\begin{document}
\[
\begin{tikzcd}[sep=large]
A\arrow[bend right=20, dotted, swap]{dr}{\widehat{p_0}} & B \\
C & D
\end{tikzcd}
\]
\end{document}

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.