Create \congrightarrow with STIX

arrowsstixsymbols

I'm using STIX and I'd like to create this arrow:

\congrightarrow

editing the the \equalrightarrow, i. e., substituing the =-symbol with the $\cong$-one. Is it possible? Thank you so much

My First Edit: I thought this (for the solution):

\xrightarrow[]{\!\!\cong\textcolor{white}{W}}

But my main problem is this: How can I lower the symbol of $\cong$ above-left of the \xrightarrow[]{}? Moreover I use \textcolor{white}{W} only to create space. Does exist a better solution? If so, I pray you to show it. Thank you again in advanced.

Best Answer

Superimpose \sim to the symbol, with a slight push to the right.

\documentclass{article}
\usepackage{stix2}

\newcommand{\congrightarrow}{%
  \mathrel{%
    \vbox{%
      \offinterlineskip
      \ialign{%
        $##$\cr
        \scriptscriptstyle\mkern4mu\sim\cr
        \equalrightarrow\cr
      }%
    }%
  }%
}

\begin{document}

$\equalrightarrow$ $\congrightarrow$

\end{document}

enter image description here

This won't scale in subscripts or superscripts, but I don't think it's needed.

The “long” versions with stix:

\documentclass{article}
\usepackage{amsmath}
\usepackage{stix}

\newcommand{\congrightarrow}{%
  \mathrel{%
    \vbox{%
      \offinterlineskip
      \ialign{%
        $##$\cr
        \scriptscriptstyle\mkern4mu\sim\cr
        \equalrightarrow\cr
      }%
    }%
  }%
}
\newcommand{\equallongrightarrow}{\genericlongrightarrow{=}{0}}
\newcommand{\conglongrightarrow}{\genericlongrightarrow{\cong}{0.25}}
\newcommand{\genericlongrightarrow}[2]{%
  \overset{#1\;}{\mathrel{\rule{0pt}{#2ex}\smash[t]{\longrightarrow}}}%
}

\begin{document}

$A\equalrightarrow B \congrightarrow C$

$A\equallongrightarrow B \conglongrightarrow C$

\end{document}

enter image description here

Related Question