HyperTeX FAQ

maintained by Kasper Peeters, Japanese translation by Kazuhito Ohya,
with contributions from Tanmoy Bhattacharya, David Carlisle, Mark Doyle, Paul Ginsparg, Alan Jeffrey, Hiroshi Kubo, Sebastian Rahtz and Arthur Smith.

Last updated March 10th, 2004 (removed/corrected links)


Abstract

HyperTeX is a defacto standard for inclusion of hyperlink information in TeX (and LaTeX) documents. Customized previewers for DVI and Postscript files exist which enable the user to browse through hyperlinked TeX files just like one can browse normal HTML files on WWW.


Table of Contents

  1. Introduction

    For users of HyperTeX

  2. Previewers with HyperTeX support
  3. Postscript (and PDF) converters and previewers
  4. Macro packages for creation of HyperTeX documents
  5. Example DVI files

    For programmers of HyperTeX software

  6. How is HyperTeX implemented?
  7. What is the standard way to label 'x'?

    Other information

  8. Mailinglists related to HyperTeX


Introduction

TeX plays a very important role in scientific and technical publishing. Thus far it has however been almost exclusively confined to the production of a paper end-product.

HyperTeX was inspired by the success of the World Wide Web, and is an extension of TeX structure to embed within a document links to other parts of the document and to other documents. The information about these links is stored in the DVI file (or in the postscript or PDF files that are generated from them), and when viewed with a previewer that understands this extra information, these links become active and allow the reader to move with greater ease within and between documents. External links can be to any document on the internet, in a manner compatible with the naming scheme used in the WWW.

For LaTeX documents, there is often a very well defined internal structure (more sophisticated than the structured markup of HTML which is the basic language of the WWW), and the HyperTeX definitions allow a single-line modification of the source LaTeX file (inclusion of a specific macro package) to turn those internal structures into links and the document into an active hypertext. There are also several varieties of plain TeX for which similar modified macro packages are available.

Note that HyperTeX is not intended as a replacement to HTML (just like PDF, with its capability of storing hyperlink information, is not intended to replace HTML). Both have their own strengths. The advantage of HyperTeX is that there is no need for a conversion step (which means that any TeX paper can be extended to include hyperlink information).

If you're looking for an easy way to get started, the teTeX TeX distribution might be useful. This distribution contains a HyperTeX-capable version of xdvi and some macro packages to help you create your own hyperlinked TeX documents, as well as a version of dvips that supports creation of pdf files with hyperlinks. See below for other previewers and other macro packages.


DVI previewers with HyperTeX support

Below is a list of DVI previewers for various platforms. Instead of viewing the DVI file, it is also possible to first convert it to 'hyperhacked' postscript or PDF and then view it with a modified postscript viewer or a PDF viewer. See the section on postscript previewers for details on that.

JAVA based viewers (for any browser with JAVA support):

Unix systems (see below for NeXT systems):

NeXT systems:

Windows 95/NT:

Apple Macintosh:


Postscript (and PDF) converters and previewers with support for HyperTeX

Adobe has implemented a modification of Postscript called Acrobat (with file extension .pdf = Portable Document Format). It is essentially a version of uuencoded compressed postscript with a full hyperlink overlay. In addition, PDF files are searchable and indexable.

Using a DVI to postscript converter with HyperTeX support, a postscript file is generated that includes so called PDF marks. There are postscript viewers which understand these marks. Alternatively, you can convert the postscript file to PDF and use a PDF viewer (which naturally have support for hyperlinks).

DVI to postscript/PDF converters with HyperTeX support:

Modifed postscript viewers with HyperTeX support:

Postscript-with-hyperlinks to PDF converters:

PDF viewers:

Han The Thanh (thanh@fi.muni.cz) has written a modified version of TeX, called pdftex, which outputs PDF directly (instead of DVI). The LaTeX hyperref package supports pdftex. The most recent version of pdftex can be found at ftp.cstug.cz/pub/tex/local/cstug/thanh/pdftex or at your local CTAN mirror in 'systems/pdftex'.


What macro packages support creation of HyperTeX documents?

If you want to create TeX files yourself that make use of the hyperlink facilities of the HyperTeX standard, there are various macro packages that can help you. Not all of these are supported any longer. If you're new to hyperTeX, the `hyperref' package is the recommended choice:

If you use BibTeX, there are various styles that have support for entries referring to electronic preprints. See BibTeX and Eprints for a list.


Demonstration DVI files

Probably the most extensive source of documents created with HyperTeX aware macro packages is the electronic preprint archive (for physics and mathematics) at xxx.lanl.gov. Some older examples are available below.

The Journal for High Energy Physics also has all papers online in HyperTeX format.


How is HyperTeX implemented?

TeX and LaTeX output is in the form of a ".dvi" file, the letters being short for "device-independent". ".dvi" files are not completely self-contained because they depend on external font files, but aside from that they describe the formatting of a document in a fashion independent of the display or printing device. The ".dvi" format is also arbitrarily extendible, due to the "\special" command of TeX, which allows new display commands to be embedded in the ".dvi" file. The "\special" command has previously been used to extend TeX by allowing inclusion of line drawings, PostScript figures, and colored text.

HyperTeX adds five new "\special" commands to the menagerie. These are:

\special{html:<a href="hrefstring">}
\special{html:<a name="namestring">}
\special{html:</a>}
\special{html:<img src="hrefstring">}
\special{html:<base href="hrefstring">}
These are identified as HyperTeX specials by the first 4 characters, "html". The first three commands establish links between sections of documents in a manner exactly analogous to the HTML of the WWW. The "img" command is intended to place an image of arbitrary graphical format on the page, although this is not very widely supported by current viewers. The "hrefstring" values are arbitrary URLs. If you want to use a fragment indicator in the URL (the `#' hash mark), make sure to change its catcode to `letter' first:
{\catcode`\#=11
\special{html:<a href="http://www.foo.org/bar#foobar"}}
See chapter 7 of the TeXbook for more information about catcodes.

Rather than just applying these "\special" commands directly, use of one of the macro packages (at least as a first step to "hyper-izing" a document) is highly recommended.


What is the standard way to label 'x'?

The various subsections of a document can be referenced as part of a URL description through the "#" extension to the URL name. We have been using the following standard names for ease of linking into HyperTeX documents based on the macro packages currently available:
Page 5 is at        doc.dvi#page.5
Section 2 is at     doc.dvi#section.2
Equation 3 is at    doc.dvi#equation.3
Reference 11 is at  doc.dvi#reference.11
(but see the note about `#' catcodes in the previous section). Similar definitions thus far exist for subsection, figure and table entities. New macro packages or style files should try to conform to this naming scheme (see the currently available packages for details on how this is done).


Mailing lists related to HyperTeX

There is currently one low-traffic mailinglist for announcements of new software and macro packages that support HyperTeX. To subscribe, send e-mail to
majordomo@aps.org
with
subscribe hypertex-announce
in the body of the message.

There is also a list for developers of HyperTeX applications and macro packages. To subscribe, send e-mail to

majordomo@aps.org
with
subscribe hypertex-dev
in the body of the message.


Kasper Peeters (k.peeters@damtp.cam.ac.uk).