Next: , Up: Import

12.1 DVI import

DeVice Independent (DVI) is the TeX output file format. Its format is in detail documented in the book Donald E. Knuth: TeX: The Program. VRR has its own DVI file parser (located in import/dvi.c) which is used mainly for TeX text handling (see Kernel how). However, the parser is designed to be general enough to be used alone, without Kernel. The parser uses the the LibKPathSea library (see External programs) for font file lookups during DVI parsing.

The DVI parser itself is not only a parser, it is also an interpreter of the DVI simple “machine code”. Consult the DVI reference or parser source for details. The output of the DVI parser consists of a list of TeX glyphs. See import/import.h for the definition of struct tex_glyph data structure.

A TeX glyph can be either a rule (which is a black-filled rectangle), in which case the placement and dimensions are given, or a character code, in which case the code, font ID and placement are given. After object scanning, the parser recomputes units into millimeters and changes the TeX placement coordinates into the Cartesian coordinates.