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

Does anyone know how to draw a line which looks like \mapsto by using \draw[...]... in TikZ?

share|improve this question
1  
-1: Doesn't show any effort. I don't know any TikZ, but I don't think this should be too hard. (If something about it were hard, the specific problem could've been articulated.) We don't want "please do this for me" questions. – doncherry Sep 3 '11 at 20:55
    
well............ – SoftTimur Sep 3 '11 at 22:47
up vote 2 down vote accepted

This uses the solution from How to make an arrow bigger and change its color in TikZ? to adjust the size of the arrow.

\begin{document}
\[a \mapsto b\]

\begin{tikzpicture}
\draw [red, |->, decoration={markings,mark=at position 1 with {\arrow[scale=1.7,red]{>}}},
    postaction={decorate},
    shorten >=0.4pt
] (0,0) node [black,left] {$a$} -- (0.4,0) node [black,right] {$b$};
\end{tikzpicture}
\end{document}

enter image description here

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.