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?

3
  • Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem.
    – egreg
    Mar 20, 2012 at 17:01
  • 1
    I edited your question to have a real Minimal example (and not a complicated code of your whole diagram). I hope you don't mind.
    – PHL
    Mar 20, 2012 at 20:25
  • 1
    Maybe you should open a new question for your edit, because it's not the same problem. If you do so, I would be happy to give you an answer.
    – PHL
    Mar 21, 2012 at 13:25

1 Answer 1

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

4
  • 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, 2012 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, 2012 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, 2012 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, 2012 at 13:42

You must log in to answer this question.

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