# [pdftex] hyperbaseurl and ~ or tilde

Jose Carlos Gonzalez gonzalez at gae.ucm.es
Fri Sep 14 12:31:37 CEST 2001

```Reed, Martin J dixit:

>Hi,
>
>I guess this is more of a hyperef problem than pdflatex but it is most likely
>to relate to this newsgroup:
>
>I am trying to use \hyperbaseurl as
>\hyperbaseurl{http://server/~mjreed/somedir}
>
>However it seems that the ~ (or tilde ) character is not escaped as it is in
>\href (which works fine with a link such as
>\href{http://server/~mjreed/someotherdir/afile.html}
>)

Try

\href{http://server/\string~mjreed/someotherdir/afile.html}

--