The HyperTeX project Arthur Smith (edited by Sebastian Rahtz) INTRODUCTION The past year has seen a revolution in the processes of Internet-based information navigation and retrieval with the advent of easy-to-use graphical browsers (in particular Mosaic) based on the World-Wide-Web (WWW). The revolution is a result of two components. First, the browsers allow a near-uniform (point-and-click or other method) access to documents in almost any format and from almost any Internet-based source; along with this the Universal Resource Locator (URL) mechanism provides a surprisingly easy and uniform way to specify the location of any document on the net. Second, for certain classes of documents (html files, or gopher text files) embedded URL's or other addresses are understood to refer to other, external, documents which can be followed according to the interests of the person viewing the document, producing an interconnected web of documents. The goal of the HyperTeX collaboration is to extend this second privileged class of documents to include documents based on TeX, the word-processing language of choice for mathematical and scientific writing, thus fully incorporating TeX documents into the burgeoning textbf{web} of information on the internet. The HyperTeX introductory document is at http://xxx.lanl.gov/hypertex/. HOW DOES IT WORK? The underlying element of our implementation of HyperTeX is the use of a TeX macro that bypasses the TeX interpretation process and sends a message directly to the dvi interpreter that processes TeX output, via the special command. The original HyperTeX specification (due to Paul Ginsparg, Tanmoy Bhattacharya, and me) uses the initial characters html: to denote HyperTeX elements in an HTML-like style. After the initial html: string, the specification is identical to a restricted form of HTML. The five arguments we have added to the command are: href: html: name: html: end: html: image: html: base_name: html: The href, name and end commands are used to do the basic hypertext operations of establishing links between sections of documents. The image command is intended (as with current html viewers) to eventually place an image of arbitrary graphical format on the page in the current location. Currently for XHDVI, image brings up an external viewer with the image, if such a viewer is available. The base_name command should be used to communicate to the dvi viewer the full (URL) location of the current document so that files specified by relative URL's may be retrieved correctly. The href and name commands must be paired with an end command later in the TeX file --- the TeX commands between the two ends of a pair form an anchor in the document. In the case of an href command, the anchor is to be highlighted in the dvi viewer, and when clicked on will cause the scene to shift to the destination specified by href_string. The anchor associated with a name command represents a possible location to which other hypertext links may refer, either as local references (of the form texttt{href="#name_string"} with the name_string identical to the one in the name command) or as part of a URL (of the form URL#name_string). Here href_string is a valid URL or local identifier, while name_string could be any string at all: the only caveat is that `"' characters should be escaped with a backslash (), and if it looks like a URL name it may cause problems. Because this html-based naming scheme is somewhat unwieldy, although very general, Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov) has written several collections of TeX macros to simplify things. The packages are in http://nqcd.lanl.gov/people/tanmoy/hypertex/. An alternative LaTeXe package is hyperref, by Sebastian Rahtz and Yannis Haralambous, which is available on CTAN as pathmacros/latex/contrib/supported/hyperref. This has additional functionality for conversion to PDF. HOW DO I USE IT? There are currently three dvi interpreters that understand the HyperTeX specials: XHDVI{} for X windows, HyperTeXView.app for NextStep, and dvihps, a version of dvips that understands HyperTeX and puts pdfmark commands in the output for Adobe's Distiller to process. For a TeX document that has already been processed to a dvi file with HyperTeX elements, viewing the internal hypertext is almost trivial --- you just fire up the dvi previewer and navigate by button clicks. The software available is: 1. A HyperTeX viewer based on xdvi-18, modified by Arthur Smith. ftp://snorri.chem.washington.edu/hypertex/xhdvi_0.6.tar.Z 2. HyperTeXview.app, courtesy of Dmitri Linde (also the author of InstantTeX.app) for NextStep, precompiled for Motorola and Intel-based NeXT machines. See http://xxx.lanl.gov/hypertex/index.html#dvi for availability. 3. dvihps, from Mark Doyle, converts the HyperTeX commands to a form which can be processed by Acrobat Distiller. See the HyperTeX WEB home page for location. Other PostScript interpreters are free to pick up the pdfm operators as well. For instance, Tanmoy has hacked Ghostview to pick up the links and make them active. This can be found at http://nqcd.lanl.gov/people/tanmoy/hypertex/ghostview-1.5-hacked.tar.gz. Here is where the power of TeX's macro capabilities appears. A working internal hypertext document can be made from a LaTeX document with a one-line addition to the file, using one of the hypertex macro packages. These convert the standard LaTeX markup into hypertext links between the different sections of the document, so that references to equations, tables, footnotes, and section headings are in place, and bibliographic references and figures refer to the bibliography entry or figure caption. The macros developed thus far use standard naming conventions for the underlying structures in LaTeX and other standard macro packages, so that appending #equation.2.3, #page.7, #figure.4, #table.2, etc. to the URL for any TeX file processed with these packages will go to the right place, allowing easy hypertext reference to the internal structure of other documents. HOW DO I STAY IN CONTACT? The Hypertex discussion group is a mailing list based at FTPsnorri.chem.washington.edu which I maintain. Send me e-mail (asmith@mammoth.chem.washington.edu) if you want to join the list, or send queries directly to the mailing list: hypertex@snorri.chem.washington.edu.