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.

Alex
  • 2,685
  • 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. – Peter Grill Mar 13 '12 at 16:48

1 Answers1

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.

David Carlisle
  • 757,742
PHL
  • 7,555
  • 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 '12 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 '12 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 '12 at 20:26
  • The solution I gave here http://tex.stackexchange.com/questions/279231/vertical-cong-or-sym-in-xymatrix/348673#348673 successfully rotates any symbol using only the language of xy-pic. – MetalMathician Jan 19 '17 at 08:09