# Is there a vertical \mapsto symbol?

What is the TeX code for a vertical \mapsto symbol? I've looked but can't find it.

I'm drawing a commutative diagram, and I want to draw what a specific symbol is being mapped to as well, so I am doing this on the label of the vertical arrow, by adjusting the position of the elements of the label. The rest has worked fine, all I need is a vertical \mapsto symbol. The best I can do at the moment is to use \downarrow and put a hyphen slightly above, but that doesn't look great.

\usepackage[all]{xy}

\xymatrix{
0 \ar[r] &
A_{n+1} \ar[r] \ar[d] &
B_{n+1} \ar[r] \ar[d] &
C_{n+1} \ar[r] \ar[d] &
0 \ar[d]
\\
&
A_n \ar[r] \ar[d] &
B_n \ar[r] \ar[d]^(0.25){b}^(0.6){d_{n}} &
C_n \ar[r]^{g_n} \ar[d]_(0.3){c}_(0.44){ \; \; - }_{ \downarrow}_(0.7){0} &
0 \ar[d]
\\
&
A_{n-1} \ar[r]^(0.2){a} &
B_{n-1} \ar[r]^{f_{n-1}} &
C_{n-1} \ar[r] & 0
}

-
Welcome to TeX.SX! In what context do you need the symbol? –  egreg May 6 '12 at 14:13
thanks! I'm drawing a commutative diagram, and I want to draw what a specific symbol is being mapped to as well, so I am doing this on the label of the vertical arrow, by adjusting the position of the elements of the label. The rest has worked fine, all I need is a vertical \mapsto symbol. The best I can do at the moment is to use \downarrow and put a hyphen - slightly above, but that doesn't look great. –  64gf May 6 '12 at 14:16
How are you drawing the diagram? Please, edit your question to show some code. –  egreg May 6 '12 at 14:22
\usepackage[all]{xy} \xymatrix{0 \ar[r] & A_{n+1} \ar[r] \ar[d] & B_{n+1} \ar[r] \ar[d] & C_{n+1} \ar[r] \ar[d] & 0 \ar[d] \\ & A_n \ar[r] \ar[d] & B_n \ar[r] \ar[d]^(0.25){b}^(0.6){d_{n}} & C_n \ar[r]^{g_n} \ar[d]_(0.3){c}_(0.44){ \; \; - }_{ \downarrow}_(0.7){0} & 0 \ar[d] \& A_{n-1} \ar[r]^(0.2){a} & B_{n-1} \ar[r]^{f_{n-1}} & C_{n-1} \ar[r] & 0 } –  64gf May 6 '12 at 14:41

The MnSymbol package offers \upmapsto and \downmapsto:

\documentclass{article}
\usepackage{MnSymbol}

\begin{document}

$\upmapsto\quad\downmapsto$

\end{document}


However, using this package will change some other symbols, and this might be no desirable. In this particular case, since the arrow is needed for a commutative diagram I suggest using the tikz-cd package and its mapsto option for arrows:

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
A \arrow{r}{\psi} \arrow[mapsto,color=red]{d}
& B  \\
C \arrow[mapsto,color=red]{r}[color=blue]{\eta}
& D \arrow[mapsto,color=red]{u}
\end{tikzcd}

\end{document}


Now that an edit has been made to the original question including the desired commutative diagram, here it is using tikz-cd:

\documentclass{article}
\usepackage{tikz-cd}

\newcommand\tikzmark[5][0]{%
\tikz[overlay,remember picture,baseline] \node [rotate=#1,anchor=base,xshift=#4,yshift=#5] (#2) {$\scriptstyle#3$};}

\begin{document}

\begin{tikzcd}
0 \arrow{r} &
A_{n+1} \arrow{r} \arrow{d} &
B_{n+1} \arrow{r} \arrow{d} &
C_{n+1} \arrow{r} \arrow{d} &
0 \arrow{d}
\\
&
A_n \arrow{r} \arrow{d} &
\tikzmark{s}{b}{14pt}{-9pt}B_n \arrow{r} \arrow{d}{d_n} &
\tikzmark{s}{c}{-2pt}{-8pt}\tikzmark{e}{0}{-2pt}{-24pt}\tikzmark[270]{a}{\mapsto}{14pt}{-4pt}
C_n \arrow{r}{g_n} \arrow{d} &
0 \arrow{d}
\\
&
A_{n-1} \arrow{r}{a} &
B_{n-1} \arrow{r}{f_{n-1}} &
C_{n-1} \arrow{r} & 0
\end{tikzcd}

\end{document}


A variation of \tikzmark was used to position some special characters; in particular, the vertical "downmapsto" arrow was obtained with the rotate=270 option applied to a standard \mapsto

-

You can rotate the symbol:

\usepackage{graphicx} % for \rotatebox
\usepackage{amsmath}  % for \substack
\newcommand{\downmapsto}{\rotatebox[origin=c]{-90}{$\scriptstyle\mapsto$}\mkern2mu}


and input the relevant arrow as

C_n \ar[r]^{g_n} \ar[d]_{\substack{c\\\downmapsto\\0}} &


The added padding space has been computed by trial and error, so as to ensure good alignment.

-

The dcpic package http://www.ctan.org/tex-archive/macros/generic/diagrams/dcpic has mapto arrows specified with \aplicationarrow (sic).

-

Staying with the xy package write

\ar@{|->}[r]


@ always indicate some modification to the arrow. Then, inside the bracket {modification of the tail, the shaft, the head}

But if in the bracket, there is only one symbol, ex

 \ar@{|}[r]