TEX device-independent (DVI) files,
which are popular for documents with heavy mathematical content.
Demos
Screen dump
Sample documents:
LATEX 2e for authors
(and opening to page 4),
User's Guide to AMS-TEX Version 2.0,
ambjorn.dvi (math and embedded hyperlinks),
FAQ (change paper size, in View menu, to A4),
Literate Programming by Knuth (A4),
Lisp: Good News by Richard P. Gabriel,
XY-pic User's Guide
(requires TEXMF tree for fonts).
Description
TEX device-independent (DVI) files.
Note that DVI is a separate download;
from the download page
simply download DVI.jar into the same directory as Multivalent.jar.
Some differences from most other DVI viewers:
- Annotation and other features you get for free in a Multivalent
media adaptor
- Text copy and paste supported
- Fonts used for screen display are TrueType or Adobe Type 1, which are
scaled from one size, rather than taken from large set of bitmapped fonts
for each magnification size.
Furthermore, these fonts carry their font metrics with them,
so we don't need separate font metric files.
- Disassembly of DVI byte code (like dvitype).
- An open-ended set of TEX \specials, such as
hyperlinks and EPS image display, can be added without modification of
the main parser/renderer. Instead, \specials are implemented with
their own behaviors, which is to say with the exact same extension
mechanism as used in the rest of the system.
\specials currently supported (by built-in code):
- Embedded hyperlinks following the
HyperTeX specification.
- papersize: letter, landscape, legal, A4, ...
- Colored text by color push and color pop
The initial page to show can be given in the URL,
as in file:/usr/doc/usrguide.dvi#page=10
.
The fonts used in the DVI file and its comment, if any,
can be displayed by turning on verbose mode in the View menu.
As in all paginated documents, HOME goes to the first page and
END to the last, space/PageDown at the bottom of the page goes
to the next page, PageUp at the top of a page goes to the previous page.
TEXMF fonts
The DVI media adaptor can use fonts already installed in a TEXMF tree.
Reading the TEXMF environment variable requires Java 5.
For Java 1.4 and earlier, the TEXMF must be in a standard place,
namely /usr/tex/texmf:/usr/local/tex/texmf:~/tex/texmf:~/texmf
.
Otherwise, a set of the most popular TeX fonts are bundled with DVI.jar
.
Technical Notes
DVI files are simple:
- document and page divisions
- characters
- current point (h,v), with movements
- spacing factors w and x for h, y and z for v
- a stack for h,v,w,x,y,z
- filled rectangles
- font settings
- string \specials (which can be interpreted by the viewer as hypertext, EPS, ...)
Easy to implement some \specials by leveraging existing functionality:
hyperlinks, image parsing/display.
Unlike other media adaptors, where much time is spent fighting the errors
found in documents of that type, TEX was a pleasure because
documents actually reliably adhere to the specification.
TEX kerns relentlessly for more appealing shapes,
and math frequently makes use of subscripts and superscripts.
The parser heuristically analyses the content to determine full words,
welding kerned parts and sub-/superscripts; for example,
"LATEX2e" is one word.
This provides a solid basis for search, full-text search, general cursor
movement, select and paste, word counting, and general structural operations.
Unfortunate things about TEX:
- The Computer Modern fonts are ugly, especially slanted (oblique) ones.
- You can't separate font name from bold/italic reliably.
- Historically, METAFONT has been used to generate
bitmapped fonts for general use,
and Type 1/TrueType versions aren't as generally available.
- The DVI definition has been frozen, but that leaves
important features like the page size and hyperlinks
outside the definition and thus not as reliable.
Status
Should support more \specials:
See Also
Last update: $Date: 2003/10/27 10:18:44 $