I need to insert a vertically centered tilde into a URL in text mode (not inside the \url or \href commands). I've tried the solution proposed here but I can't get it to work. Any ideas?
Here is my code
\documentclass[]{beamer}
\usepackage{textcomp}
\newcommand{\textapprox}{\raisebox{0.5ex}{\texttildelow}}
\begin{document}
\begin{frame}
\frametitle{MWE}
https://foo.com/\textapprox{}user/
\end{frame}
\end{document}
This is the error I'm getting
! LaTeX Error: Command \textapprox already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 ...extapprox}{\raisebox{0.5ex}{\texttildelow}}
?