10

Is it possible to make an arrow in xymatrix that is a subset symbol?

3 Answers 3

9

I personally use :

\documentclass{article}
\usepackage[all]{xy}

\begin{document}

\[
\xymatrix@1{A\, \ar@{}[r]|-*[@]{\subset} & B}
\]

\end{document}

It's very simple and I guess it can look weird if the space between entries is too big, but I feel it the best way, enlarged subset symbols are just awful.

Maybe with a little more skill in xy-pic constructions, you can arrange to slightly rescale the symbol depending on the space between entries. By hand, it's possible for sure, but I guess it would be possible to do that automatically too.

2
  • It seems that the direction of the label \subset fits the direction of the arrow. The symbol * seems to modify the feature of the label as the meaning of [@]. Could you give some more details about what [@] means? I cannot find what it means from xy-pic_guide.pdf while xyrefer.pdf seems difficult to read...
    – jiaopjie
    Jan 7, 2017 at 11:05
  • Wow, I'm sorry, but I haven't used xypic in the past 4 years: not many commutative diagrams to draw, and I learnt to use tikz in the meantime, so I didn't need to remember the arcane xy syntax.
    – T. Verron
    Jan 7, 2017 at 21:43
6

It's common to represent monomorphisms using an arrow having a subset symbol at the beginning, (as in amsmth's \hookrightarrow). The xy package offers the @{^{(}->} construct for such an arrow:

\documentclass{article}
\usepackage{amsmath}
\usepackage[all]{xy}

\begin{document}

\[A\hookrightarrow b\]

\[
\xymatrix@1{A\, \ar@{^{(}->}[r] & B}
\]

\end{document}
2
  • Another common picture of an injective morphism is the arrow \ar@{>->}[r] Apr 12, 2011 at 0:34
  • 1
    @Gonzalo Medina, do you know if is possible to make the arrow shorter so the inclusion tail and arrow tip are not so close to the diagram entry?
    – Sigur
    Apr 14, 2015 at 18:46
1

If you want an extensible subset symbol, you could use the couple of arrows

\ar@{^{(}-}[r]\ar@<1ex>@{-}[r]

You must log in to answer this question.

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