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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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
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 '15 at 18:46

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.