# How can I typeset \simeq-like arrow?

I need something like this:

The closest I've managed to do looks like this, but it's definitely not very pretty:

How can I create this symbol? I can't seem to find it anywhere!

• Do you want to improve the position of a tilda over an arrow or you want a kind of \simeq but with an arrow tip? – Sigur Jan 30 '16 at 16:37

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,italian]{babel}
\usepackage{amsmath,amssymb,amsthm}
\newcommand{\DistTo}{\xrightarrow{
\,\smash{\raisebox{-0.65ex}{\ensuremath{\scriptstyle\sim}}}\,}}
\begin{document}
$\DistTo$
\end{document}


Edit: Now I remember taking, back then, this solution here on the website. My bad. Here's the link: How to typeset an isomorphism symbol ($\simeq$) with a long bar

• It would be better to leave only the packages strictly necessary for the example, or dependencies might be unclear to the non expert. Also \smash doesn't fully convince me. – egreg Jan 30 '16 at 14:56

You may try the solution provided by Heiko Oberdiek to this question The symbol for a map which is an isomorphism?

(which has been enhanced by crf, egreg and david carlisle, only few days ago). How do I resolve the assertion failed popups?

Made slight modifications to my copy of the original for my own purposes: replaced the two \relbar macros with space and \rightarrow in the \@isomorphism command. Also gave the front-end command, \isomorphism, an optional parameter in order to raise or lower the \sim symbol over the arrow to suit my needs.

Here is my copy of the Oberdiek's solution (with the minor modifications):

%%===================================================
\documentclass{article}
\usepackage[math-style = TeX,nabla = upright]{unicode-math}
%%
\setmathfont{xits-math.otf}
\setmathfont{FdSymbol Bold}[range={\ast}]       % bold asterisk symbol
%%===================================================
\makeatletter
\newcommand{\isomap}[1][3]{\mathrel{\raise 0.2ex\hbox{$\mathpalette\@isomap{#1}$}}}
%--------------------------------------------------------------------------
% Calculate the distance of moving \sim up as in \simeq
%--------------------------------------------------------------------------
\newcommand*{\@isomap}[2]{%
\sbox0{$#1\simeq$}%
\sbox2{$#1\sim$}%
\dimen@=\ht0%
%--------------------------------------------------------------------------
% Compose the two symbols (\sim & \rightarrow)
%--------------------------------------------------------------------------
\sbox0{\lower#2\dimen@\hbox{$\m@th#1\ \isomap@joinrel\rightarrow$}}%
\rlap{\hbox to \wd0{\hfill\raise\dimen@\hbox{$\m@th#1\sim$}\hfill}}%
\box0%
}
%%
\newcommand*{\isomap@joinrel}{%
\mathrel{\mkern-3.4mu\mkern-1mu\nonscript\mkern1mu\mkern0mu}%
}%
\makeatother
%%===================================================
\begin{document}
Test 1:\quad $$f\colon X \isomap Y$$
\bigskip%

Test 2:\quad $$\mu\colon H_q(X,Y)\isomap H_q(X/Y,\ast)\cong \widetilde{H}_q(X/Y)$$
\end{document}
%%===================================================


Also employed opentype fonts and raised the whole isomorphism map symbol a bit.