The LaTeX2HTML Translator |
|
Drakos/Moore |
|
Hyper-links in LATEX
Subsections
Arbitrary hypertext references are created using
the \htmladdnormallink and \htmladdimg commands.
These have syntax:
\htmladdnormallink{
<text>}{
<URL>}
\htmladdnormallink[
<name>]{
<text>}{
<URL>}
\htmladdimg{
<URL>}
\htmladdimg[
<align>]
<URL>}
\htmladdnormallinkfoot{
<text>}{
<URL>}
\htmladdnormallinkfoot[
<name>]{
<text>}{
<URL>}
\htmladdnormallink
The \htmladdnormallink command expects some text as the first argument
and a URL as the second argument.
When processed by LATEX (i.e. in the .dvi or .ps output files),
the URL will have no effect. But when processed by the translator,
the URL will be used to provide an active hypertext link
(to another file, picture, sound-file, movie, etc.) e.g.
\htmladdnormallink{
<URL>}
{http://www.ncsa.uiuc.edu/demoweb/url-primer.html}
The optional argument to \htmladdnormallink allows a name to be
specified for the place in the document where the hyperlink occurs.
This is done via the NAME="<name>" attribute
for the <A ...> anchor tag in HTML.
Such a name can be used as the target for a hyperlink using the \htmlref command,
described later.
\htmladdimg
In a similar way, the argument of the \htmladdimg command
should be a URL pointing to an image.
This URL is ignored in the LATEX hard copy output.
The optional argument to \htmladdimg allows an alignment
for the image to be given: center, right or left.
In the latter cases, the image is bound to the specified side
of the browser's window. Subsequent text paragraphs `flow around' the
other side of the image.
In fact any valid set of ``attributes'' for the <IMG> tag in HTML
can be specified as the optional <align> parameter. In particular
the WIDTH, HEIGHT and BORDER attributes can be set,
perhaps overriding the natural size of the image.
\htmladdnormallinkfoot
The \htmladdnormallinkfoot command takes the same arguments,
and when generating HTML has the same effect,
as \htmladdnormallink.
However when processed by LATEX it places the URL as a footnote.
Warning:
The tilde (~) character is commonly used within hyperlink URLs.
It is a quirk of TEX and LATEX that it must be generated via \~{}
,
else the ~ will be interpreted as an accent on the following character.