# How to draw an isomorphism arrow in tikz-cd

I want to show an arrow for an isomorphism in a commutative diagram. Currently I'm using

\ar[rr, dotted, "\textasciitilde", "\funcname{f}''"']


but there is two much vertical space between the Tilde and the arrow. What is the proper way to do this in tikz-cd?

I didn't quite understand at first what you wanted to achieve. So here's the final version (thanks to @egreg for the help).

## Code

\documentclass[margin=10pt]{standalone}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
A \ar[r, dotted, "\sim", "f''"'] & B
\end{tikzcd}

\end{document}


This was done without tikz-cd.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

$\xrightarrow{\sim}$

\end{document}


which gives

For a dashed arrow, like you wanted,

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{MnSymbol}

\begin{document}

$\overset{\sim}{\dashrightarrow}$

\end{document}


which gives

I found another question that had other similar shapes, but I lost it, so I'm still looking for it again. Alenanno's answer has a great tikz-cd version. I simply thought it would be useful to point out what a non-tikz-cd solution would be. I'm working on making the dotted arrow a little longer, as it's kind of short.

Hope this helps.

• /sim has the same spacing error; I was hoping to get the Tilde cloer to the line of the arrow. – shmuel Aug 17 '16 at 17:11