Next: , Previous: General hyperlinks, Up: Implicit hyperlinks


5.3.2 URL hyperlinks: url

The `url' linkgroup covers the \url command from the LaTeX package url (see Packages known to work), as well as any new \url-like commands you define. The type for this linkgroup is set to `url' by the drivers which support this link type. `url' links use the parameter to the \url command as the URL to point to.

You may be using the \url command to typeset something other than a URL, e.g., a path, for which you do not want a link to be created; in that case, you can disable the `url' linkgroup with the command \hloff[url] (see Turning hyperlinks on/off for a group).

By default, URL (and other types of) links are boxed, so that they are visually marked even if you do not load the LaTeX `color' package (see Loading LaTeX packages) and therefore link text is not colored. You can see the effect by compiling the following code snippet (be sure to get a modern url.sty, older versions do not work in plain TeX; see Packages known to work):

     \input eplain
     \beginpackages
       \usepackage{url}
     \endpackages
     
     \enablehyperlinks
     
     \url{http://foo/bar}
     \bye

If the hyperlink driver you use supports the link option bwidth (see Hyperlink drivers), you can produce colored links with no border around them. Try this:

     \input eplain
     \beginpackages
       \usepackage{url}
       \usepackage{color}
     \endpackages
     
     \enablehyperlinks
     \hlopts{bwidth=0}
     
     \url{http://foo/bar}
     \bye

The command \hlopts{bwidth=0} sets border width to zero as the default for all links, and loading the color package automatically colors links using the default color (see Options supported by all drivers). If you want the border width setting to apply to URL links only, say \hlopts[url]{bwidth=0} (see Setting hyperlink types and options).