Consider the following MWE (borrowed from this question):
\documentclass{beamer}
\begin{document}
\begin{frame}
\href{http://tex.stackexchange.com/q/20800/5701}{Link}
\end{frame}
\end{document}
Such a MWE compiles without errors, yielding the expected output. Consider now this MWE, in which I have only changed the link for a Google Scholar link:
\documentclass{beamer}
\begin{document}
\begin{frame}
\href{https://scholar.google.com/scholar?q=equilibrium+points+in+n-person+games&hl=en&as_sdt=0,5#}{Link}
\end{frame}
\end{document}
Now, the MWE compiles with a few errors. Why does changing the link break href? How to stop this from happening?
EDIT! I see two options proposed in the answers: one is to escape the character # and the other one is to add [fragile] to my frame. Can any TeX expert tip the balance in favour of either option? What is the most Tex-y to do?
#in the url. So, to me, this question isn't strictlybeamerdependant. – anis Dec 21 '22 at 10:28\begin{document} \href{https://scholar.google.com/scholar?q=equilibrium+points+in+n-person+games&hl=en&as_sdt=0,5#}{Link} \end{document} `
– samcarter_is_at_topanswers.xyz Dec 21 '22 at 10:31#fine as long as you don't use such links in the argument of another command (as is done here in \frame). – Ulrike Fischer Dec 21 '22 at 10:46#. Using fragile will also allow you to use%in the link, and to use verbatim and listings in the frame. – Ulrike Fischer Dec 21 '22 at 10:49#at the end of my link as it works just fine without it; but I did not know this when I copied-pasted the Google Scholar link from the address bar. – EoDmnFOr3q Dec 21 '22 at 11:05