[pdftex] Tilde character in url.

Reinhard Kotucha reinhard.kotucha at web.de
Fri Apr 9 20:08:02 CEST 2010


On 9 April 2010 John Culleton wrote:

 > In plain pdftex I am typing the following url:
 > \url{http://www.tux.org/~milgram/bookland}
 > {http://www.tux.org/~milgram/bookland}
 > 
 > The problem is the tilde character.  TeX persists in treating it
 > either as an unbreakable space or as an accent over the following
 > character.  The tag \tilde only works in math mode and again it
 > wants to be on top of the next character.

The tilde is an active character.

\bgroup\catcode`\~=12
  \url{http://www.tux.org/~milgram/bookland}
  {http://www.tux.org/~milgram/bookland}
\egroup

You can also try \~{}.  The empty group prevents TeX from putting it
over the following character.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the pdftex mailing list