# ! Missing insert. <inserted text> $… with \href{…}{…} I have this in a document: \href{https://en.wikipedia.org/wiki/Something_(something)}{https://en.wikipedia.org/wiki/Something_\(something)}  I get multiple errors like this: ! Missing$ inserted." ....

I supposed that I should escape the parentheses but I didn't find the right way to do it yet. Also I'm not sure about this.

• show a complete example, that makes it much easier to test your issue. – Ulrike Fischer May 23 at 18:59
• You escaped the wrong bit: You want to escape _ to \_ not the (: You want \href{https://en.wikipedia.org/wiki/Something_(something)}{https://en.wikipedia.org/wiki/Something\_(something)}. But in this specific example \url{https://en.wikipedia.org/wiki/Something_(something} would be much easier. \href only makes sense if link target and text differ. – moewe May 23 at 18:59
• @moewe : Thank you. I you post this as answer I could select it as solution. – TTT May 23 at 19:01

You escaped the wrong bit: You want to escape _ to \_. There is no need to escape the (

\href{https://en.wikipedia.org/wiki/Something_(something)}{https://en.wikipedia.org/wiki/Something\_(something)}


In this specific example it seems that

\url{https://en.wikipedia.org/wiki/Something_(something)}


would be much easier. Possibly with \urlstyle{same} if you don't want URLs in monospace font.

\href only makes sense if link target and text differ. Even then \nolinkurl might be a good choice

\href{https://en.wikipedia.org/wiki/Something_(something)}{\nolinkurl{https://en.wikipedia.org/wiki/Something_(something)}}


MWE

\documentclass{article}
\usepackage{hyperref}
%\urlstyle{same}

\begin{document}
\href{https://en.wikipedia.org/wiki/Something_(something)}{https://en.wikipedia.org/wiki/Something\_(something)}

\url{https://en.wikipedia.org/wiki/Something_(something)}


• @TTT You may be able to get the same result for \href and \url with \urlstyle{same}. The advantage of \url and \nolinkurl is that they allow for URL-specific line breaking. Something to keep in mind for your next project. – moewe May 23 at 19:17