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.

It is really strange, but LaTeX doesn't seem to include any tag for an arrow with vertical stroke (unicode character 21F8), used in mathematics to represent a partial function between sets (as reported in this article from Wiki.en). Do you know any workaround to this? I tried something like

\newcommand{\pto}{\to\hspace{-xyz cm}\shortmid \hspace{xyz cm}}

(for different values of xyz) but the outcome is not very satisfactory. Thank you in advance for any help.

P.S.: the symbol should fit in mathematical equations.

share|improve this question
add comment

3 Answers 3

up vote 4 down vote accepted

You may want to use \pfun in package oz as listed in the overview here.

share|improve this answer
    
Great! I didn't know that package before, thank you too. –  s.t. Mar 7 '12 at 16:20
    
Small warning to any users who use this approach. When I imported the oz package to use \pfun, for some reason it replaced some of my other math symbols. For example where I had an integral using \int it was rendered as the set intersection symbol instead! I used the other solution by egreg and redefined the \pfun command myself. –  jbx Nov 29 '13 at 0:51
add comment

Here's a possible way

\newcommand\pto{\mathrel{\ooalign{\hfil$\mapstochar$\hfil\cr$\to$\cr}}}

Note that the definition of oz.sty is equivalent to

\newcommand\pfun{\mathrel{\ooalign{\hfil$\mapstochar\mkern5mu$\hfil\cr$\to$\cr}}}

so it differs from the former only by a slight shift to the left of the bar.

share|improve this answer
    
Thank you much! –  s.t. Mar 7 '12 at 16:18
add comment

With unicode-math package (requires XeTeX or LuaTeX) and a proper Unicode math font, you can access that Unicode arrow (and a gazillion of other Unicode math symbols):

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{XITS Math}

\begin{document}
$\nvrightarrow$
\end{document}
share|improve this answer
add comment

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.