2

I have a link to a URL looking like this

http://www.abc.de/~doo/bar/foobar.htm

As you can see, it contains a ~. I tried changing the link to

http://www.abc.de/\~doo/bar/foobar.htm

However, the ~ goes over the d, something like ñ. How can I display the tilde properly?

That is the file entry

@webpage{rajapakse2008,
    Author = {Rajapakse, Damith C.},
    Date-Added = {2018-01-25 14:31:33 +0000},
    Date-Modified = {2018-05-03 21:05:13 +0000},
    Lastchecked = {25.01.2018},
    Month = {04},
    Title = {Fragmentation of Mobile Applications},
    Url = {http://www.comp.nus.edu.sg/\~damithch/df/device-fragmentation.htm},
    Year = {2008},
    Bdsk-Url-1 = {http://www.comp.nus.edu.sg/~damithch/df/device-fragmentation.htm}}
11
  • 1
    This post might be useful. Although, for URLs you shouldn't need escaping, as BibLaTeX buts them in a verbatim context automatically. May 3, 2018 at 21:15
  • Can you show us the resulting .bib entry? If you indeed use biblatex, you should use the url field, that field is a special verbatim field where special characters need not (and should not!) be escaped. If you use BibTeX and must resort to note or howpublished you should look into wrapping your URLs in \url{...}.
    – moewe
    May 3, 2018 at 21:15
  • 1
    OK, then we need to know what bibliography package (cite, natbib, biblatex, ...) and which style you use. The handling of URLs differs between biblatex (where things are largely handled uniformly) and BibTeX styles (with vastly varying degrees of support for URLs). Please consider adding a full MWE/MWEB that shows this.
    – moewe
    May 3, 2018 at 21:21
  • 1
    That's why we ask for MWEs on this site, that would have been an important bit of information. Try \renewcommand{\harvardurl}[1]{[Online] URL: \url{#1}} then (if that produces an error you may have to load the hyperref or url package - depending on whether you like links in general or not).
    – moewe
    May 3, 2018 at 21:36
  • 1
    Why do you not want to use \url? That command really is the simplest way to tell LaTeX that you are typesetting a URL. URLs require special treatment, so LaTeX normally botches them badly unless specifically told to handle it otherwise. If you don't like the fact that url/hyperref print URLs in typewriter font by default you can use \urlstyle to change that.
    – moewe
    May 3, 2018 at 21:49

0

You must log in to answer this question.

Browse other questions tagged .