Device independent file format

Device independent file format
Device-independent (DVI)
Evince previewing a DVI file.png
Evince previewing a DVI file. Note that referenced images are not displayed, because they are not part of the DVI file. Images will be added in by a print driver, such as dvips.
Filename extension .dvi
Internet media type application/x-dvi (unofficial)
Developed by David R. Fuchs
Type of format document

The Device independent file format (DVI) is the output file format of the TeX typesetting program, designed by David R. Fuchs in 1979.[1] Unlike the TeX markup files used to generate them, DVI files are not intended to be human-readable; they consist of binary data describing the visual layout of a document in a manner not reliant on any specific image format, display hardware or printer. DVI files are typically used as input to a second program (called a DVI driver) which translates DVI files to graphical data. For example, most TeX software packages include a program for previewing DVI files on a user's computer display; this program is a driver. Drivers are also used to convert from DVI to popular page description languages (e.g. PostScript, PDF) and for printing.

DVI is not a document encryption format, and TeX markup may be at least partially reverse-engineered from DVI files, although this process is unlikely to produce high-level constructs identical to those present in the original markup, especially if the original markup used high-level TeX extensions (e.g. LaTeX).

DVI differs from PostScript and PDF in that it does not support any form of font embedding. (Both PostScript and PDF formats can either embed their fonts inside the documents, or reference external ones.) For a DVI file to be printed or even properly previewed, the fonts it references must be already installed. Also, unlike PostScript (but like PDF), DVI is not a full, Turing-complete programming language, though it does use a limited sort of machine language.

Contents

Specification

The DVI format was designed to be compact and easily machine-readable. Toward this end, a DVI file is a sequence of commands which form "a machine-like language", in Knuth's words.[1] Each command begins with an eight-bit opcode, followed by zero or more bytes of parameters. For example, an opcode from the group 0x00 through 0x7F (decimal 127), set_char_i, typesets a single character and moves the implicit cursor right by that character's width. In contrast, opcode 0xF7 (decimal 247), pre (the preamble, which must be the first opcode in the DVI file), takes at least fourteen bytes of parameters, plus an optional comment of up to 255 bytes.

In a broader sense, a DVI file consists of a preamble, one or more pages, and a postamble. Six state variables are maintained 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 moves down the page), w and x hold horizontal space values, y and z, vertical.

These variables can be pushed to or popped from the stack. In addition, the current font f is held as an integer value, but is not pushed and popped with the rest of the state variables when the opcodes push or pop are encountered. Font spacing information is loaded from TFM files. The fonts themselves are not embedded in the DVI file, only referenced by an integer value defined in the relevant fnt_defi op. (This is done exactly twice for each loaded font: once before it is referenced, and once in the postamble.) f contains an integer value of up to four bytes in length, though in practice, TeX only ever outputs font numbers in the range 0 through 255.

Similarly, the DVI format supports character codes up to four byte in length, even though only the 0–255 range is commonly seen, as the TFM format is limited to that range. Character codes in DVI files refer to the character encoding of the current font rather than that of the system processing it. This means, for instance, that an EBCDIC-based system can process a DVI file that was generated by an ASCII-based system, so long as it has the same fonts installed.

DVI related software

DVI files are often converted into PDF or PostScript files for reading and printing. They can be also viewed directly by using DVI viewers.

The first DVI previewers capable of on-screen previewing and modification of LaTeX documents ran on Amigas.[2][3]

DVI-to-PDF converters

dvipdf is a tool to translate DVI files (generated by TeX) to PDF files. Although it is still included in most LaTeX distributions, it is out-dated and users are advised to use instead the newer tool dvipdfm.[citation needed]

(PDF e-prints that cause fonts to render poorly on the screen, but fine in print, are often caused by not providing dvipdf with a good font mapping table such as the one bundled with dvipdfm.)

dvipdfm is a DVI to PDF translator, included in current LaTeX distributions such as teTeX. It produces PDF files of a quality superior to that of its now outdated predecessor dvipdf and also supports most of the newer special functions of the PDF format. It incorporates the *.eps graphics file format without problems. You can use it to convert arquive.dvi with the command dvipdfm arquive.dvi.

dvipdfmx is an extended version of the dvipdfm DVI to PDF translator. The primary goal of the dvipdfmx project is to support multi-byte character encodings and CJK character sets for East Asian languages.[4]

References

  1. ^ a b Donald E. Knuth (December 1995) (WEB source code; extract full documentation using WEAVE). DVItype. Version 3.6. http://tug.ctan.org/get/systems/knuth/dist/texware/dvitype.web. Retrieved 2008-05-07. 
  2. ^ In 1986 Tomas Rokicki printed his first page with dvisw, an early DVI printer driver for the Amiga, on a QMS SmartWriter using AmigaTeX by Radical Eye Software. A link to a relic info about milestones of LaTeX history is available at this external site.
  3. ^ Rokicki, Tomas (April 1988). "The Commodore Amiga: A Magic TeX Machine" (PDF). TUGboat 9 (1): 40–41. http://www.tug.org/TUGboat/Articles/tb09-1/tb20site.pdf. Retrieved 2010-11-19. 
  4. ^ The Dvipdfmx Project

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Device independent file format — Das Device independent file format (DVI) ist eine von David Fuchs 1979 entworfene Seitenbeschreibungssprache[1]. Inhaltsverzeichnis 1 Eigenschaften von DVI Dateien 2 Werkzeuge für DVI Dateien 2.1 Betrachter …   Deutsch Wikipedia

  • Device independent — also is the full name of the DVI file format. A program or file is device independent when its function is universal on different types of device. For the World Wide Web, this means writing simple common denominator Hypertext Markup Language… …   Wikipedia

  • BMP file format — Windows Bitmap Filename extension .bmp or .dib Internet media type image/x ms bmp (unofficial) or image/x bmp (unofficial) Type code BMP BMPf BMPp Uniform Type Identifier com.microsoft.bmp …   Wikipedia

  • ICO (file format) — ICO Filename extension .ico Internet media type image/vnd.microsoft.icon Uniform Type Identifier com.microsoft.ico Developed by Microsoft Type of format …   Wikipedia

  • Free file format — A free file format is a file format whose full specification is freely available and for which there are no restrictions (e.g. legal or technical) on its use. [cite web url=http://www.linfo.org/free file format.html title=Free File Format… …   Wikipedia

  • File Transfer Protocol — (FTP) is a network protocol used to transfer data from one computer to another through a network such as the Internet.FTP is a file transfer protocol for exchanging and manipulating files over a TCP computer network. A FTP client may connect to a …   Wikipedia

  • Portable Document Format — PDF redirects here. For other uses, see PDF (disambiguation). Portable Document Format Adobe Reader icon Filename extension .pdf Internet media type application/pdf application/x pdf application/x bzpdf application/x gzpdf …   Wikipedia

  • PICtor PIC image format — PICtor is an image file format developed by John Bridges, the principal author of PCPaint, the first Paintbrush program for the PC. It was also the native file format for Pictor Paint and GRASP (multimedia authoring software) (also by Bridges)… …   Wikipedia

  • List of file formats — This is an incomplete list, which may never be able to satisfy particular standards for completeness. You can help by expanding it with reliably sourced entries. See also: List of file formats (alphabetical) This is a list of file formats… …   Wikipedia

  • Design Web Format — Filename extension .dwf, .dwfx Developed by Autodesk Type of format CAD Design Web Format (DWF) is a secure file format developed by Autodesk for the efficient distribution and communication of rich design data to anyone who needs to view, review …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”