I'm having trouble using newcommand with the \href
I would like a newcommand like this:
\newcommand\link[2]{\href{#1}{\underline{#2}}}
This command works fine quite all, for exemple:
\link{htt://www.impa.br}{IMPA}
But it does not work when the URL name has code like #1. For example, it does not work in this exemple:
\link{http://matematica.obmep.org.br/index.php/modulo/index#1}{modules}
It does not work because the #1 in the URL name is used with the #1 in the newcommand.
How could I solve this problem?
[http://matematica.obmep.org.br/index.php/modulo/index#1]
And there are websites with simpler URL, for example:
[http://www.impa.br]
In all of my cases, I wish that the URL is send to the newcommand as a string.
– Francisco Dutenhefner Oct 24 '14 at 16:19