@url
ExamplesFirst, here is an example of the simplest form of @url
, with
just one argument. The given url is both the target and the visible
text of the link:
The official GNU ftp site is @url{http://ftp.gnu.org/gnu}.
produces:
The official GNU ftp site is http://ftp.gnu.org/gnu.
@url
Here is an example of the two-argument form:
The official @url{http://ftp.gnu.org/gnu, GNU ftp site} holds programs and texts.
which produces:
The official GNU ftp site holds programs and texts.
that is, the Info (and TeX, etc.) output is this:
The official GNU ftp site (http://ftp.gnu.org/gnu) holds programs and texts.
while the HTML output is this:
The official <a href="http://ftp.gnu.org/gnu">GNU ftp site</a> holds programs and texts.
@url
Finally, an example of the three-argument form:
The @url{/man.cgi/1/ls,,ls} program …
which, except for HTML, produces:
The ls program …
but with HTML:
The <a href="/man.cgi/1/ls">ls</a> program …
By the way, some people prefer to display urls in the unambiguous format:
<URL:http://host/path>
You can use this form in the input file if you wish. We feel it’s not necessary to include the ‘<URL:’ and ‘>’ in the output, since to be useful any software that tries to detect urls in text already has to detect them without the ‘<URL:’.