Overview

This page discusses how to make TeX and LaTeX documents available over the web here in the physics department.

Why this now

The utility of integrating our scientific and educational material with the web browsers is obvious. The means to do this has actually been available for quite some time (see xxx.lanl.gov/hypertex ) but until now I have believed that the problems of implementing it have outweighed its utility.

Two things changes have occured that makes this program more attractive. The first is that the "hyperref" [ distribution , manual.pdf ] package is distributed as part of teTeX so presumably it will be reasonably stable. The second is that viewers are now generally available for most common computers and operating systems which make the results of the effort available to essentially everyone who uses the web.

The basic idea

Those who want to make TeX and LaTeX documents available on the web and who also want future portability should maintain their TeX files as original source. Make as few changes as possible in these documents, and the changes that you do make should be consistent with the " hyperref " macros. Minimally, a single command

	\RequirePackage{hyperref}
is necessary to construct links within the document. (See the Quick Guide for more extensive instructions.)

Once you have fixed up your LaTeX file to include the hyperlinks, you run latex as usual. This creates a .dvi file which contains link information. Using xhdvi instead of xdvi, you can view this document and follow the links.

Since many people cannot run xhdvi and xdvi from their computers, it is for the time being necessary to generate a format which is more universal than .dvi before making the document available on the web. The .pdf format seems to fill that role and there is a free reader, acroread available from Adobe which runs on virtually all computers and operating systems.

At fy.chalmers.se on the Unix workstations you can create the pdf file by running dvips -z (or dvips -z -P type1 ) to create a Post-Script document, which is then converted to Adobe's .pdf format by using distill. The pdf file is placed in the web directory and made publicly available.

In the long run, I am convinced that a dvi viewer will become functional (see idvi ); as long as you keep the original document as standard LaTeX format, you should have no problem taking advantage of that in the future. Many of the problems listed below will disappear when it makes sense to make the dvi files publicly available rather than the pdf files.

A good idea is to let hyperref automatically fix links internal to the document to the fullest extent possible so that you can minimize changes to your own document when updates to hypperref occurs. Link external documents sparingly and if necessary, with stable links and stable files. It is much more of a nuisance than in HTML to fix up an indidual link which has gone out of date since you may have to rerun a bunch of slow commands just to accomplish this change in the viewed document.

Problems

Other solutions

A number of programs are available that claim to do some or all of the functions discussed above that we do make an effort to support.

How is HyperTeX implemented?

(This paragraph is copied from the xxx.lanl.gov/hypertex by Bhattatacharya et.al. ) We have at fy.chalmers.se only incorporated hyperref not other macro packages listed in the lanl document.
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 currently it is implemented as bringing up automatically an external viewer of the appropriate type. The "hrefstring" values are arbitrary relative URL's, except for the "base" command. The latter gives the full URL of the current document, which is necessary because WWW browsers do not communicate this information to external viewers (such as a hyper-dvi browser).



ostlund@fy.chalmers.se

Last modified 1998-02-03