6

Is there a way to put a relation symbol (appropriately oriented) as the arrow in an xymatrix diagram? For example, a lattice of sets with the subset relation symbol pointing from the subset to the superset.

1
  • It is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. Mar 13, 2012 at 16:48

1 Answer 1

3

Here is my solution — I can't do anything better without a MWE.

\documentclass{article}
\usepackage[all]{xy}
\newdir{d}{{\subset}}
\begin{document}
\[
\xymatrix{
  A \ar@{}[r]|{\subset} & B\\
  A \ar@{-*{\subset}}[r] & B\\
  A \ar@{-d}[r] & B\\
  A \ar@{-d}[r]-<10pt,0pt> & B
  }
\]
\end{document}

The \newdir command allows to define shorthand.

And the result : enter image description here

Note that you can find some help in the xyguide pages 5 and 6.

4
  • Very helpful, thankyou! Is there a way to get the orientation of the \subset to match the direction of the arrow? e.g. if the arrow is pointing up rather than right, as in your examples.
    – Alex
    Mar 14, 2012 at 11:49
  • 1
    @Alex I had a look to xy.tex to see how the original tips are defined, but the code is not really readable. Maybe you can ask your question on the xy mailing list.
    – PHL
    Mar 14, 2012 at 12:55
  • 1
    @Alex A solution is to rotate manually the symbol, put it's not a good solution. I tried to create a new tips from the existing ones as this solution has the orientation done automatically. Unfortunately, I didn't succeed to create a tips that looks like the subset symbol.
    – PHL
    Mar 14, 2012 at 20:26
  • The solution I gave here tex.stackexchange.com/questions/279231/… successfully rotates any symbol using only the language of xy-pic. Jan 19, 2017 at 8:09

You must log in to answer this question.

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