Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

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}
share|improve this answer
    
Another common picture of an injective morphism is the arrow \ar@{>->}[r] –  Phil Hirschhorn Apr 12 '11 at 0:34

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.

share|improve this answer

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

\ar@{^{(}-}[r]\ar@<1ex>@{-}[r]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.