\ttfamily, verbatim. Therefore, without special treatment,
they often produce wildly overfull \hboxes, and their typeset
representation is awful.
There are three packages that help solve this problem:
\path command.
The command defines each potential break character as a
\discretionary, and offers the user the opportunity of
specifying a personal list of potential break characters. Its chief
disadvantage is fragility in LaTeX moving arguments. The
Eplain macros — define a similar \path command.
Path, though it works in simple situations, makes no
attempt to work with LaTeX (it is irremediably fragile). Despite
its long and honourable history, it is no longer recommended for
LaTeX use.
\url command
(among others, including its own \path command). The command
gives each potential break character a maths-mode ‘personality’, and
then sets the URL itself (in the user’s choice of font) in
maths mode. It can produce (LaTeX-style) ‘robust’ commands
(see use of \protect) for use
within moving arguments.
The package ordinarily ignores spaces in the URL, but
unfortunately URLs that contain spaces do exist; to typeset
them, call the package with the obeyspaces option. Two
other useful options allow line breaks in the URL in places
where they are ordinarily suppressed to avoid confusion:
spaces to allow breaks at spaces (note, this requires
obeyspaces as well, and hyphens to allow
breaks after hyphens. (Note that the package never does
“ordinary” hyphenation of names inside an URL.)
It is possible to use the url package in Plain TeX,
with the assistance of the miniltx package (which was
originally developed for using the LaTeX graphics package in
Plain TeX). A small patch is also necessary: the required
sequence is therefore:
\input miniltx
\expandafter\def\expandafter\+\expandafter{\+}
\input url.sty
\path (from package path) nor \url (from
package url) is robust (in the LaTeX sense). If you need
a URL to go in a moving argument, you need the command
\urldef from the url package. So one might write:
\urldef\faqhome\url{http://www.tex.ac.uk/faq}
after which, \faqhome is robust.
Documentation of both package path and package url
is in the package files.
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=setURL