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}}
                                                  
? 
2
  • 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). Jun 1 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 1 at 12:21
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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.