6

I want to create two invisible arrows so I can link between them, the problem is that when I try the make these arrows curved they become no longer invisible?

Here is a sample document:

\documentclass{article}
\usepackage[all]{xy}
\begin{document}
\[
\xymatrix{A
 \ar@{}@/^{2.4pc}/[d] \\
 B
}
\]
\end{document}

It gives the following graph:

graph

What I want is to make the arrow going from $A$ to $B$ invisible, but it doesn't work!

So what's wrong with this latex code?

David Carlisle
  • 757,742
ubugnu
  • 265

1 Answers1

4

Indeed, it doesn't work out of the box with the standard empty type.

You have 2 solutions.

  1. Define explicitely a new empty directional for the shaft.
  2. Show to xy-pic that you really want an empty shaft with @{{}{ }{}} (notice the space in the shaft position).

Here is a code that shows the two possibilities :

\documentclass{article}
\usepackage[all]{xy}
\newdir{:=}{{}} %creates an empty shaft directional, the ":=" is chosen "randomly"
\begin{document}
\[
\xymatrix{A
 \ar@{{}{ }{}}@/^2pc/[d]^{}="a"
 \ar@{:=}@/_2pc/[d]^{}="b" \\
 B
 \ar@{->}"a";"b"
}
\]
\end{document}

And the result :

enter image description here

David Carlisle
  • 757,742
PHL
  • 7,555
  • Thank you Matsaya, even if I do not understant how it works, I want to try it on LyX, the problem is that LyX do not permit to insert spaces in equations areas, have you any idea on how to do it? – ubugnu Mar 20 '12 at 21:07
  • @ubugnu, without space you can use the first solution (the \newdir{:=}{{}}) if your able to add command in the preamble. One possible solution to doing that is to edit your Lyx file with a text editor. Put the line \newdir{:=}{{}} somewhere in the preamble. Then when you use LyX on your document you will be able to use the :=directional to have empty arrows. – PHL Mar 20 '12 at 21:33
  • @Matasaya,Thank you it worked, now I'm wondering if I can connect two distant arrows with an arrow (see my edit) without using invisible arrows? – ubugnu Mar 21 '12 at 13:18
  • 1
    @ubugnu, I strongly recommand you to ask a new question for your edit because this it clearly a separate question. It's better to separate different questions to fit the purpose of the site.The short answer is yes, you can (and I have the code). – PHL Mar 21 '12 at 13:42