DVI (from the English. D e V ice I ndependent - hardware independent) - the output file format of the publishing system Τ Ε Χ . To generate files in the DVI format, text files in the DV Ε Χ language are used, but unlike them, DVI files are not adapted for human reading; they contain binary data describing the visual presentation of the document in a way that is not oriented to any image format, monitor or printer (hence the name of the format). DVI files are usually fed to another program (called a DVI driver ) that converts them to graphic data. For example, many Τ Ε Χ distributions include a program for previewing DVI files on a monitor; this program is a driver. Drivers are also used to convert DVI files to other formats (such as PostScript , PDF ) and for printing. Wikipedia uses a PNG driver to obtain images of mathematical formulas .
| Device-independent (DVI) | |
|---|---|
Preview DVI file in Evince . | |
| Expansion | . |
| MIME type | application/x-dvi (unofficial) |
| Developer | David R. Fuchs |
| Format type | Document |
The source text in the Τ Χ (language can be (at least partially) restored from DVI files, although the resulting constructs may not coincide with the original high-level language constructs, especially if extensions of the usual Τ Ε Χ were used in the source text (for example, L A Τ Ε Χ ).
The DVI format differs from PostScript and PDF in that it does not support embedded fonts. PostScript and PDF documents can contain either directly embedded fonts or links to external fonts. When printing or viewing a DVI file, you do not need to have all the fonts that it refers to; only the characters of the available fonts will be shown.
Description
The DVI format was designed to be compact and easy to machine. For this reason, a DVI file is a sequence of commands in a "machine-like language." Each command begins with an 8-bit command code, followed by optional parameter bytes. For example, commands with codes in the group from 0x00 to 0x7F (0–127 in decimal), set_char_ i , print one character and move the imaginary cursor to the right by the width of the corresponding image. At the same time, the command with the code 0xF7 (247), pre (preamble; this command should be the first in the DVI file), has at least 14 bytes of parameters and an optional comment up to 255 bytes in length.
In general terms, a DVI file consists of a preamble, one or more pages, and a concluding section. There are 6 state variables stored as a tuple of signed 32-bit integers: ( h , v , w , x , y , z ) . h and v are the current horizontal and vertical offsets from the upper left corner (increasing v shifts the position on the page down), w and x contain the values of horizontal gaps, y and z - vertical. These variables can be processed on the stack.
Fonts are loaded from TFM files and as such are not directly contained in the DVI file. Instead, only links to them are stored. For each font loaded once, you can refer to it using the internal index. This is done to reduce file sizes.
The DVI format is also focused on the encoding of characters in fonts, and not on the encoding of the system used. This means that, for example, an EBCDIC -based system can freely process a DVI file created in an ASCII- based system.
Programs for viewing DVI files
- xdvi , runs on the X Window System on most UNIX- compatible platforms;
- xdvik , an improved version of xdvi;
- Evince , part of GNOME ; in addition to DVI, it supports PDF, PostScript, DjVu and TIFF formats .
- Okular , the universal document viewer included with KDE .
- yap (as part of MiKTeX , a TeX implementation for the Windows platform)
Links
- DVIType.web (unavailable link from 10-08-2013 [2245 days] - history , copy ) , a parser of DVI format files written on WEB and containing the full specification of the DVI format
- DVI Format Description