I'm using the following code snippet to put a link in the document:


But the latex changed my link to:


It seems that it can't show '~' correctly.


1 Answer 1


You could load the url (or the hyperref) package and issue the commands

{\footnotesize \url{http://vlm1.uta.edu/˜zhangzhong/fall_detection/}}

The \url command (a) renders its argument in a monospaced (aka typewriter) font -- as you are evidently trying to do by using a verbatim environment -- and, very importantly, (b) takes care to deal correctly with characters, such as ~, that are "special" to TeX but are perfectly valid in URL strings.

Incidentally, there is no real footnotesize environment, just a \footnotesize switch. To limit the scope of this switch, use curly braces (as is done in the example above).

  • yeah, this kind of work. But you can't just click the link to show the webpage if using this way.
    – FihopZz
    Commented Mar 15, 2014 at 21:50
  • 1
    You can, if the hyperref package is loaded.
    – Mico
    Commented Mar 15, 2014 at 22:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .