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.

4 Answers 4


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

  • 1
    Great! I didn't know that package before, thank you too.
    – s.t.
    Mar 7, 2012 at 16:20
  • 2
    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, 2013 at 0:51

Here's a possible way


Note that the definition of oz.sty is equivalent to


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

A complete and better implementation using also the shift in oz.sty; this one works also in subscripts and superscripts.


\newcommand{\pto}{}% just for safety
\newcommand{\pgets}{}% just for safety




$A\pto B\pgets C$

$\scriptstyle A\pto B\pgets C$


enter image description here

  • Note for latex newbies, you need to copy this definition somewhere, and then you can use it in maths expressions like $\pfun$
    – rleelr
    Jul 3, 2017 at 21:27
  • @rleelr Back then the style was different. I took the occasion for improving the answer. Thanks for noting.
    – egreg
    Jul 3, 2017 at 21:38

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):

\setmathfont{XITS Math}


You can use Unicode: \char"21F8

enter image description here

Another solution (which I use now)

% Partial function character from Z-notation \newcommand\pfun{\mathrel{\ooalign{\hfil$\mapstochar$\hfil\cr$\to$\cr}}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .