Public version (09-Apr-1998): libGhostview-1.50, libXtex-1.60, ndvi-1.60
Development version: identical to public version
nDVI is no longer being developed. The binaries below are unlikely to work with Netscape 4.x and higher, but you may be able to compile the sources yourself. Contact me by email if you want to know about future plans.
Table of contents
- Acknowledgement,
- Introduction and overview,
- Licensing and copyright information,
- Comparison to other products,
- Bugs and current limitations,
- Future plans and preliminary releases
- Getting and installing a binary,
- Compiling it yourself,
- Using nDVI with gzipped files,
- Netscape memory bug workaround,
- Printing
- Frequently asked questions,
- Information about HyperTeX,
- Mailing lists,
- Demonstration pages.
The development of this version of nDVI is financially supported by JHEP, the Journal of High Energy Physics, a new scientific journal written, run and distributed by electronic means. See the JHEP web pages for more information.
nDVI is a Netscape plugin (Unix only) for viewing DVI files, with support for hyperTeX. A snapshot is shown below.
Version 1.0 (and up) was written with support from JHEP. Compared to older versions, it has much improved font searching (no more environment variables to set), support for embedded postscript, a controlpanel from which you can also print the DVI file (see below) and several other improvements. ![]()
There are two modes of operation of nDVI. The first one is fullscreen, which is activated when you try to access a URL which is a DVI file. The second on is embedded mode. In this mode, an external DVI file is embedded in a HTML file using a statement of the form ![]()
< embed type="application/x-dvi" file="http://some.host/mydvifile.dvi" width="500" height="300" shrink="3" > < /embed >When displaying such a HTML file, the nDVI plugin will be activated, fetch `mydvifile.dvi' and display it in the 500x300 box reserved for the plugin.
Licensing and copyright information
nDVI is distributable under the GPL, a copy of which can be found at the GNU site. Many people have contributed to XHDVI, the code which was the base of nDVI. From the sourcecode:
Not all of the XHDVI code is present in nDVI, but most of it is planned to be re-inserted in a later version.
1/1986 modified for X.10 Bob Scheifler MIT LCS 1987 handle specials Dirk Grunwald Univ. of Illinois 7/1988 modified for X.11 Mark Eichin MIT 12/1988 added 'R' option, toolkit, magnifying glass Paul Vojta UC Berkeley 2/1989 added tpic support Jeffrey Lee U of Toronto 4/1989 modified for System V Donald Richardson Clarkson Univ 3/1990 added VMS support (no longer in nDVI) Scott Allendorf U of Iowa 7/1990 added reflection mode Michael Pak Hebrew U of Jerusalem 1/1992 added greyscale code Till Brychcy Techn. Univ. Muenchen and Lee Hetherington MIT 4/1994 added DPS support, bounding box Ricardo Telichevesky and Luis Miguel Silveira MIT RLE 5/1994 added hypertex code Arthur Smith U. of Washington 9/1996 modified to work as Netscape plugin Kasper Peeters NIKHEF
Motivation, background and comparison to other products
There are a couple of other programs that allow displaying of TeX material on the web (please drop me a note if there's something I forgot to mention). More information on math on the web can be found at MathNews.Furthermore, the original XHDVI is able to fetch documents from the web by using the libraries provided by W3C. XHDVI as a browser cannot hold a candle to Netscape of course.
- IDVI. This is a JAVA based DVI viewer. IMHO, it is usable if you have a fast machine and a really fast network connection, but it crawls when used over a 28k8 line. No flame intended.
- Techexplorer by IBM. This is a plugin for Windows 95/NT. It contains a full implementation of TeX (whereas nDVI relies on an existing TeX installation). I'm planning to support Techexplorer embedded documents with nDVI in the near future.
- Latex2HTML. This set of programs relies on a conversion of all TeX equations to GIF images. If you want full platform independency this is currently the only way to go. I'm not happy about the look of html text mixed with TeX formulae though, but that's an esthetic point.
- WebEQ. A Java applet that renders equations based on the <MATH> proposal for HTML3.0.
- MINSE. A server based solution that produces gif images of equations on the fly.
- TTH by Ian Hutchinson is a converter from TeX to HTML 3.2 using symbol fonts (gif images are avoided). Has the advantage that the resulting file is readable by any browser without any additions. Since it produces HTML, you can search it or make links to sections within the document easily. A disadvantage is that it doesn't look as good as many of the other solutions. There is a commercial version as well, with more features, called TeX2HTML.
- TeX4ht by Eitan M. Gurari is a similar solution, converting (La)TeX to HTML using the native fonts.
Suggestions and ideas for improvement of nDVI can be sent to k.peeters@damtp.cam.ac.uk.
Known but not yet solved problems in version 1.60:If you find a reproducible bug, please do `setenv XTEX_DEBUG' or the 'sh' equivalent, and run it again. Extensive logging goes to a file `libxtex.log' in the directory from which you started Netscape.
- Postscript figures are always drawn on top of the text, instead of the other way around. This prevents the use of postscript figures with text added by TeX.
- Epsf arguments with spaces ('file= name') are not treated correctly (example: gr-qc/9707045).
- Postscript figures for which no bounding box can be determined lead to problems (example: hep-ph/9707263).
- Some PSfig specials not supported yet, esp. raw postscript sequences (example: hep-th/9707053).
- Postscript fonts will not display (gsftopk is not being called).
- Visited links are not colored differently.
- Overstrike characters do not work.
- The `forward' button on the controlpanel does not work yet.
- No key shortcuts yet.
- Some more cursor changes while loading/setting up would be informative.
Future plans and preliminary releases
I'm currently writing a workaround for a Netscape bug that results in crashes when selecting items from the 'options' menu while viewing a DVI file. When that is finished, I'll start working on the following features:If you want other features to be added to this list, please let me know.
- Color support. Most code is already present; there's only a part of the dvi file scanner still to be written.
- Techexplorer support. See motivation for info about Techexplorer. Basically, there will be support for tags of the form
<EMBED TYPE="application/x-techexplorer" TEXDATA="$${{\sum ^{n}_{i=1}(x_{i}-\pi )^{2}}\over{n}}$$" HEIGHT="85" WIDTH="125" >This part is also almost finished.
In order to use a precompiled binary, you need to have a kpathsea based TeX system installed. Most modern TeX installations should work without problems.The Journal for High Energy Physics provides binaries for various platforms. See their nDVI page and download a binary from there.
Read the comment on gzipped files if you want to use nDVI to browse the archives at xxx.lanl.gov. If you want to be notified of the release of new versions, please subscribe to one of the mailing lists.
Linux binaries generated by myself are also available:
- Linux, statically linked with Motif 2.0, dynamically linked with libXaw3d and X11R6, version 1.60, (if you don't know what Motif is, pick this version)
- Linux, dynamically linked with Motif 2.0, dynamically linked with libXaw3d and X11R6, version 1.60, (if you don't know what Motif is, pick the other, statically linked version)
Unpack the .gz files. The first three go into a directory in your PATH (you can also store them in a subdirectory .ndvi (mind the dot!) in your homedirectory). The last one (the actual plugin) goes in .netscape/plugins in your homedir, or in the system-wide plugin directory. Make all files executable and readable.
Alternatively, get the Netscape plugin developer kit (at any Netscape ftp mirror in /pub/sdk/plugin/unix). There's a bug in there that you have to patch first: replace the file `common/npunix.c' with this version.Then get the sources:
Unpack each of them. Go to the `libGhostview/src' directory, check that the paths in `Makefile.in' are correct and type `./configure' followed by `make'. Then go to the `libXtex/src' directory and do the same thing. Finally, go to the `ndvi/src' directory and do `./configure' and `make static' or `make motifstatic', depending on whether you want the Motif libs to be statically linked to the controlpanel.
- libGhostview-1.50.tar.gz
- libXtex-1.60.tar.gz
- ndvi-1.60.tar.gz
- ndvi_pr (this is a script)
- ndvi_ps (this is a script as well)
If it doesn't compile out-of-the-box, please let me know.
Put the resulting binaries in the proper places, as described above.
If you want to be notified of the release of new versions, please subscribe to one of the mailing lists. If you're a plugin programmer yourself and need technical information, you might want to have a look at my page on plugin programming on Unix.
Making nDVI work with gzipped files
There is a bug in almost all versions of Netscape (the HPUX version seems to be the only version that does it right) that results in gzipped files not being transferred to plugins. This prevents one from using nDVI on gzipped dvi files, such as those produced by the physics preprint archives at http://xxx.lanl.gov. To remedy this, you can turn off Netscape's automatic detection of gzipped files. There is some code in nDVI that will detect gzipped files for you, and it will unzip it by itself. Of course, you will loose the automatic unzipping of other filetypes, but I do not know of a better workaround for this bug.To disable Netscape's automatic unzipping, put the following in a file and do xrdb < [filename] to set the appropriate resources.
*encodingFilters: \ x-compress : : .Z : uncompress -c \n\ compress : : .Z : uncompress -c \nOn most modern machines running Xwindows, it's enough to put these lines in a file '.Xresources' in your homedirectory; the system will then automatically read these settings when you log in.
Netscape memory bug workaround
There is a workaround if you are on a Linux machine (or any other platform
with a GNU dynamic loader): do the following to start Netscape:
sh or bash users:
Bogdan Bucicovschi is entitled to a free beer for sending me this tip.
If you're not lucky enough to be working on a Linux machine, you can
still minimize the risk of being bitten by this bug:
You can modify this script to handle printing in the appropriate way on your
system. The default script calls 'dvips' to convert the DVI file to postscript,
and then calls 'psnup' to put multiple pages on one physical sheet (if requested).
It then dumps the file to the printer using 'lpr'. Information on the parameters
that are passed to the 'ndvi_pr' script can be found at the top of that script.
It is possible that you are using a very old version of libc. Please upgrade
to at least 5.3.12 or (if you want the 5.4 series) 5.4.33. If you used an old
version of libc to circumvent bugs (mostly with Java) in Netscape: a better
way to solve these problems this exists; look at Netscape and Java in the Java-Linux HOWTO.
If you're running netscape with the '-install' option, or if you have
an entry 'Netscape*installColormap: yes' in your Xresources,
it is possible that Netscape has already allocated all colors for
itself so nDVI won't be able to get the required shades of grey. Try
to run without '-install'.
You might be better off using Techexplorer. See the motivation section.
There is a serious bug in Netscape, which has been acknowledged by
Netscape Inc. but will probably not be fixed in the near future, which
results in random crashes of nDVI. See my page on plugin programming for details.
csh/tcsh users:
export LD_PRELOAD=/usr/local/lib/netscape/plugins/ndvi.so
netscape
This way, nDVI will never be removed from memory as long as Netscape
is running.
setenv LD_PRELOAD /usr/local/lib/netscape/plugins/ndvi.so
netscape
When clicking 'print...' in the controlpanel, a requester pops up asking for the
printer name and the number of pages you want to fit on one physical sheet. After
pressing 'print', nDVI will put the DVI file (and the embedded postscript files,
if applicable) in a temporary directory, and call the script '~/.ndvi/ndvi_pr'.
./configure --x-includes=DIR --x-libraries=DIR
with 'DIR' replaced by the appropriate paths.
HyperTeX is the defacto standard for inclusion of hyperlinks in
TeX documents. More information can be found on the HyperTeX pages.
Two mailinglists are available.