Hypertext Links in Bibliographic References (Citations)

Subsections
If a report or a book that is cited (using the \cite command) is available (or there is information about it) on the World-Wide Web, then it is possible to add the appropriate hypertext links in your bibliographic database (the .bib) file.



Here is an example of a bibliographic entry for the original LATEX [1] blue book:

@string{tugURL="\htmladdnormallink
{http://www.tug.org/}{http://www.tug.org}"}

@string{danteURL="\htmladdnormallink
{http://www.dante.de/}{http://www.dante.de}"}

@book{lamp:latex,
title = "LaTeX User's Guide \& Reference Manual, 2nd edition",
year = 1994 ,
author = "Leslie Lamport",
Publisher = "Addison--Wesley Publishing Company, Inc.",
note = "Online information on {\TeX} and {\LaTeX} is available at "
 # tugURL # " and " # danteURL }
See the bibliography for how this will appear.
No other modifications are required; LATEX and BibTEX should work as normal. Note that it would be sensible to put the @string commands into a separate file, urls.bib say, loaded with the main file via
\bibliography{urls,...}.


For those who use the Harvard style for references there exists a special conversion add-on package.

The natbib package, written for LATEX by Patrick Daly, provides even more flexibility in the way a reference may be cited. All the features of this package are implemented for LATEX2HTML via the natbib.perl file. (Indeed there is even a mode whereby natbib handles the Harvard style of citation. This requires loading also the nharvard package.)


Thanks... to Martin Wilck for the bulk of the work in producing this extension, and to Ross Moore for necessary adjustments to allow it to work correctly with the document segmentation strategy.


\hypercite

Analogous to \hyperref is the \hypercite command, which allows a free-form textual hyperlink to the bibliography, whereas the LATEX typeset version contains the usual citation code. The allowed syntax is as follows.
\hypercite[int]{ <HTML-text>}{ <LaTeX-text>}{ <opt-LaTeX>}{ <label>}
\hypercite[cite]{ <HTML-text>}{ <LaTeX-text>}{ <opt-LaTeX>}{ <label>}
\hypercite{ <HTML-text>}{ <LaTeX-text>}{ <opt-LaTeX>}{ <label>}


\hypercite[nocite]{ <HTML-text>}{ <LaTeX-text>}{ <label>}
\hypercite[no]{ <HTML-text>}{ <LaTeX-text>}{ <label>}
\hypercite[ext]{ <HTML-text>}{ <LaTeX-text>}{ <label>}
The first three forms are equivalent; LATEX uses \cite[ <opt-LaTeX>] <label>, after placing the <LaTeX-text>. Note that { <opt-LaTeX>} must be specified, even if empty `{}'.

Similarly the latter three forms are equivalent, with LATEX using \nocite{ <label>}, to force the particular reference to appear on the bibliography page, even though no explicit marker is placed at this point. (Thus there is no need for an optional <opt-LaTeX> argument.)
Within the HTML version a hyperlink is produced when the <HTML-text> is not empty. External label files are also searched, in order to match the symbolic <label>, see also \externalcite.


Earlier in this manual the following source code was used:
commands described in the \LaTeX{} \htmlcite{blue book}{lamp:latex}, 
...
as well as many other \LaTeX{} constructions, such as are described in 
the \LaTeX{} \hypercite{\emph{Companion}}{\emph{Companion}}{}{goossens:latex} 
and \LaTeX{} \hypercite{\emph{Graphics Companion} (e.g. \Xy-pic)}%
{\emph{Graphics Companion}}{\Xy-pic}{goossens:latexGraphics};
which produces:
commands described in the LATEX blue book,
  ...
as well as many other LATEX constructions, such as are described in the LATEX Companion and LATEX Graphics Companion (e.g. XY -pic);
whereas in the LATEX typeset version one sees:
commands described in the LATEX blue book,
  ...
as well as many other LATEX constructions, such as are described in the LATEX Companion[2] and LATEX Graphics Companion[3, XY -pic];


\htmlcite

Analogous to \htmlref is the \htmlcite command, which creates a textual hyperlink to a place on the document's bibliography page, but without displaying any reference marker in the LATEX typeset version. (See above for an example.)

The \externalcite command provides a similar facility when the bibliography page is ``external''; that is, not part of the current document.


Ross Moore
1999-03-26