0

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}}

?

Tonechas
  • 976
  • 1
    well as the error says the command name already exist. So use another one or redefine the existing command (if you are sure that you don't need it). – Ulrike Fischer Jun 01 '21 at 12:17
  • Thank you! I feel so dumb. If you convert your comment into an answer I will be pleased to accept it. – Tonechas Jun 01 '21 at 12:21

1 Answers1

1

As the error says the command name already exist.

So use another one or redefine the existing command (if you are sure that you don't need it)

Ulrike Fischer
  • 327,261