2

I have the following Xy-pic commands in Lyx:

\documentclass{article}
\usepackage{xypic}
\begin{document}
\xymatrix{ & A\\
 & B\ar@2`l/10pt[ld]`[d][ldr]\\
 & C\ar@2[u]\\
 & D\ar@2`l/10pt[lu]`[u][lur]
}
\end{document}

The above input produces:

No double arrows around bend

I have not found a way to produce the same double arrow style where the bending occurs. Any ideas how to fix, or what to add to the above commands in Xy-pic? Any other approach in Xy-pic producing the wanted results is welcome.

2
  • 1
    Welcome to TeX.SX! I'm not sure Xy-pic supports this. It can be done with TikZ, though.
    – egreg
    Oct 16, 2016 at 14:09
  • Have a look at the xypic manual. Exercise 13 is about drawing a bent double arrow; its solution is on page 14. But honestly, I wouldn't invest any time into this approach from 15 years ago unless you have to extend legacy code. Tikz (in particular its manual) might seem overwhelming in the beginning, but offers many more possibilities ...
    – gernot
    Oct 16, 2016 at 15:32

1 Answer 1

2

Using TikZ-CD (cd library) and combining the paths of ext.paths.ortho with the nfold library that was made for TikZ-CD this can be achieved easily.

Code

\documentclass[tikz]{standalone}
\usetikzlibrary{cd, ext.paths.ortho, nfold}
\tikzcdset{
  /utils/temp/.style={% https://tex.stackexchange.com/a/688891
    !#1/.style={/tikz/ortho/#1 distance={##1},
                /tikz/to path={r-#1(\tikztotarget)\tikztonodes}}},
  /utils/temp=lr}% /utils/temp/.list={lr, rl, du, ud} for all
\begin{document}
\begin{tikzcd}[/tikz/ortho/udlr distance=10mm]
A \\
B \dar[Rightarrow, nfold, !lr, rounded corners=10pt] \\
C \uar[Rightarrow] \\
D \uar[Rightarrow, nfold, !lr, rounded corners=10pt]
\end{tikzcd}
\end{document}

Output

enter image description here

You must log in to answer this question.

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