1

I would like to strike out arrows in \xymatrix. Here is what I've done so far:

\documentclass{article}
\usepackage[all,cmtip]{xy}
\usepackage{amsmath}
\begin{document}
\xymatrix{ ABCDE\ar@{<->} |*@{x} [r]^<<<<<<<<{\text{label}}_<<<<<<<<{\text{label}} \ar[d]& F \ar[r] \ar[d]& G\ar[rr]\ar[d] && H\ar[d]\\
 ABCDEFGH\ar@{<->} |*@{x} [r] \ar[d]& II \ar[r] \ar[d]& JJ\ar[rr]^{\text{very long label}} \ar[d] && KK\ar[d]\\
 ABCD\ar [r] & EEE \ar[r] & FFF\ar[rr] && GGG
}
\end{document}

enter image description here

However, the cross in the arrows connecting ABCDE with F and ABCDEFGH with II is not in the middle of the arrow which doesn't look very good. How can this be fixed?

Thanks a lot in advance!

1

I know you asked for an xy solution, but maybe it's worth switching over to tikz-cd.

enter image description here

Here is the code:

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

\begin{document}

\[\begin{tikzcd}[column sep=1cm]
  ABCDE\arrow[r, leftrightarrow, "\times"{anchor=center},"\text{label}","\text{label}"{below}]\arrow[d] & F\arrow[r]\arrow[d] & G\arrow[rr]\arrow[d] && H\arrow[d]\\
  ABCDEFGH\arrow[r, leftrightarrow, "\times"{anchor=center}]\arrow[d] & II\arrow[r]\arrow[d] & JJ\arrow[rr,"\text{very long label}"]\arrow[d] && KK\arrow[d]\\
  ABCD\arrow[r] & EEE\arrow[r] & FFF\arrow[rr] && GGG
\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.