Device independent file format

Device-independent (DVI)
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 typeapplication/x-dvi (unofficial)
Developed byDavid R. Fuchs
Type of formatdocument

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.

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, instead merely referencing external font names. (Both PostScript and PDF formats can embed their fonts inside the documents.) For a DVI file to be printed or even properly previewed, the fonts it references must be already installed. Like PDF, DVI uses a limited sort of machine language with termination guarantees that is not a full, Turing-complete programming language like PostScript.

As of 2004 there is a compilation of the specifications a DVI driver must implement by the "TUG DVI Driver Standards Committee".[2] It seems to be based on a TUGboat article of the same name from 1992, but which is much shorter.[3] These documents do not specify the endianness, which is however big endian, as can be seen looking into a DVI file itself.

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 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 bytes 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.

Graphics as specials

The DVI format does not have support for graphics except for the most basic black-and-white boxes. Instead DVI has a general escape/extension mechanism, known as specials (expressed by the \special command in TeX), which defers graphics (and color) to post-processing filters. There are numerous DVI specials, the most notable of which are PostScript specials, but other programs like tpic have their own.[4]: 6, 17 

DVI versions

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

  • DVI viewers: YAP (included in MiKTeX), xdvi, windvi, Evince, KDVI, Okular, dviout, dviwin, DView (included in the commercial BaKoMa TeX distribution), javaDVI, MDVI, and DVIWindo (of the now defunct commercial Y&Y TeX, which has been open-sourced).[5]
  • DVI to human-readable format: dvitype (disassembler of sorts)
  • DVI-to-PDF converters: dvipdf, dvipdfm, dvipdfmx
  • DVI-to-PS converters: dvips is the de facto standard. CTAN includes some older ones like dvitops (and DVIPSONE[6]) with a note that they lost their market share a long time ago.[7]
  • DVI-to-bitmap converters: dvipng (generates GIF or PNG), or use dvips and Ghostscript
  • DVI-to-SVG converters: dvisvg,[4]: 13  dvisvgm,[4]: 13  dvi2svg;[4]: 13 [8] As of 2014 the only one included in CTAN and actively maintained is dvisvgm.[9]

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

DVI-to-PDF converters

dvipdf is a tool to translate DVI files (generated by TeX) to PDF files. In current Linux distributions like Ubuntu, it is a thin wrapper around dvips and Ghostscript, and copyrighted to Artifex Software (the makers of Ghostscript).[12] A possibly different program with the same name—described as a modified version of dvips—was announced in the late 1990s by Sergey Lesenko,[13][14][15] however it was apparently never released.[16][17]

dvipdfm is a DVI-to-PDF translator developed by Mark A. Wicks. The early documentation of dvipdfm specifically mentions the limited availability of Lesenko's dvipdf as a reason for creating dvipdfm.[18] dvipdfm supports most of the newer special functions of the PDF format, including bookmarks, annotations, thumbnails, and dvips specials—a feature making possible the inclusion of Encapsulated PostScript (.eps) files like METAPOST output—as well inclusion of JPEG and PNG images; other features of dvipdfm include partial font embedding (reducing file size) and balancing the internal PDF document trees to speed up rendering of large documents.[4]: 798  Many of these features (except for the direct support for .eps files[19]) are also present in pdfTeX, which typesets TeX directly to PDF. The 2004, 4th edition of the Guide to LaTeX compares them in the following way:[20]

The dvipdfm program is in the original spirit of TEX, that uses DVI as a universal intermediate format for all outputs. Purists might tend to respect this ideal. After all, no one ever considered rewriting TEX to produce PostScript output directly. That said, one must consider that TEX was invented in the days when no one printer specification dominated the field. Today, PDF is much more than a printer format; it is the means of representing documents electronically. That alone would not justify preferring pdfTEX over a DVI-to-PDF converter, nor would the fact that it saves a processing step; the deciding argument is that pdfTEX has established itself as reliable, robust, and flexible. In the end, it is likely a question of which program one is more comfortable with, and which one has given the better results for the particular user.

dvipdfmx is an extended version of the dvipdfm DVI-to-PDF translator, included in current TeX distributions like TeX Live 2014[21] and MiKTeX 2.9.[22] The primary goal of the dvipdfmx project is to support multi-byte character encodings and CJK character sets for East Asian languages.[23] dvipdfmx is also included (in a somewhat modified form) in XeTeX.[4]: 798 

The 2nd, 2008 edition of the LaTeX Graphics Companion makes the following workflow suggestion:[4]: 803 

The route that you should follow depends mostly on the graphics material that you want to include. If most of it is in EPS format, the easiest way is to use latex, followed by dvips and finally ps2pdf. If all of your graphics files are already in PDF format, with some JPEG and PNG images, the more direct route is to run pdflatex. You can also combine both approaches by running latex and the dvipdfmx program. If you make a lot of use of PSTricks, you should look at [...] the pst-pdf package.

References and notes

  1. ^ a b Donald E. Knuth (December 1995). "DVItype" (WEB source code; extract full documentation using WEAVE). Version 3.6. Retrieved 2008-05-07. The first DVItype program was designed by David Fuchs in 1979
  2. ^ TUG DVI Driver Standards Committee. "The DVI Driver Standard, Level 0" (PDF). ctan.org.
  3. ^ TUG DVI Driver Standards Committee (1992). "The DVI Driver Standard, Level 0" (PDF). TUGboat. 13: 54.
  4. ^ a b c d e f g Michel Goossens, Frank Mittelbach, Sebastian Rahtz, Denis Roegel, Herbert Voß (2008). The LaTeX Graphics Companion (2nd ed.). Addison-Wesley. ISBN 978-0-321-50892-8.{{cite book}}: CS1 maint: multiple names: authors list (link)
  5. ^ "Y&Y Inc. -- DVIWindo". www.tug.org.
  6. ^ "Y&Y Inc. -- DVIPSONE". www.tug.org.
  7. ^ "CTAN: /tex-archive/dviware/dvitops". ctan.org.
  8. ^ https://www.tug.org/TUGboat/tb27-2/tb87frischauf.pdf [bare URL PDF]
  9. ^ "CTAN: /tex-archive/dviware". ctan.org.
  10. ^ 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.
  11. ^ Rokicki, Tomas (April 1988). "The Commodore Amiga: A Magic TeX Machine" (PDF). TUGboat. 9 (1): 40–41. Retrieved 2010-11-19.
  12. ^ "Ubuntu Manpage: Dvipdf - Convert TeX DVI file to PDF using ghostscript and dvips". Archived from the original on 2015-09-09. Retrieved 2014-08-03.
  13. ^ https://www.tug.org/TUGboat/tb17-3/tb52lese.pdf [bare URL PDF]
  14. ^ https://www.tug.org/TUGboat/tb18-3/tb56lese.pdf [bare URL PDF]
  15. ^ "(La)TeX Navigator".
  16. ^ Helmut Kopka; Patrick W. Daly (February 2008) [2004]. Guide to LaTeX (4th; 9th printing ed.). Pearson Education. § 13.2.2 the dvipdfm driver. ISBN 978-0-321-17385-0.
  17. ^ "Where art dvipdf? - comp.text.tex". compgroups.net. Archived from the original on August 11, 2014.
  18. ^ Mark A. Wicks, Dvipdfm User’s Manual Archived 2015-07-06 at the Wayback Machine, Version 0.12.4 September 19, 1999, page 2
  19. ^ "texfaq2html redirect emulating cgi-bin lookup on the original site". www.texfaq.org.
  20. ^ Helmut Kopka; Patrick W. Daly (February 2008) [2004]. Guide to LaTeX (4th; 9th printing ed.). Pearson Education. § 13.2.3 The pdfTEX program. ISBN 978-0-321-17385-0.
  21. ^ "Debian -- Details of package texlive-base in sid". packages.debian.org.
  22. ^ "MiKTeX Packages A-Z". miktex.org.
  23. ^ "The DVIPDFMx Project". project.ktug.org.

Read other articles:

Старосадский переулок Старосадский переулок, 10 Общая информация Страна Россия Город Москва Округ ЦАО Район Басманный Протяжённость 340 м Метро  Китай-город Прежние названия Космодамианский переулок Почтовый индекс 101000  Медиафайлы на Викискладе Староса́дский пере�...

 

Le buisson ardent est un symbole largement utilisé par les Églises presbytériennes comme par les Églises réformées, ici par l'Église presbytérienne en Irlande. L'inscription latine ardens sed virens signifie « brûlant mais florissant ». Une version plus ancienne de cette devise utilisée par les réformés français était Flagror non consumor (« il brûle mais ne se consume pas »)[1]. Le presbytérianisme est une forme du protestantisme calviniste qui s'est d...

 

Extinction of species or loss of species in a given habitat This article is about the current and recent biodiversity loss caused by human activities. For biodiversity loss in geologic timeframes, see extinction event. Summary of major environmental-change categories that cause biodiversity loss. The data is expressed as a percentage of human-driven change (in red) relative to baseline (blue). Red indicates the percentage of the category that is damaged, lost, or otherwise affected, whereas b...

Valeria VázquezLahirValeria Vázquez Latorre1994 (umur 29–30)Puerto RikoTinggi1,78 m (5 ft 10 in)Pemenang kontes kecantikanGelarMiss Supranational 2018Warna rambutCokelatWarna mataHitamKompetisiutama Miss Supranational Puerto Rico 2018(Pemenang) Miss Supranational 2018(Pemenang) Valeria Vázquez Latorre (lahir 1994) adalah seorang model dan pemegang gelar kontes kecantikan Puerto Riko yang dinobatkan sebagai Miss Supranational 2018. Dia menjadi wanita Puerto Riko p...

 

I nuovi mostriPoster film ItaliaSutradaraDino RisiEttore ScolaMario MonicelliProduserPio AngelettiAdriano De MicheliDitulis olehAgenore IncrocciRuggero MaccariGiuseppe MocciaEttore ScolaBernardino ZapponiPemeranVittorio GassmanOrnella MutiUgo TognazziAlberto SordiPenata musikArmando TrovajoliSinematograferTonino Delli ColliPenyuntingAlberto GallittiDistributorTitanusTanggal rilis 15 Desember 1977 (1977-12-15) Durasi115 menit106 menit (pemotongan alternatif)102 menit (pemotongan Pra...

 

Evolutionary process by which populations evolve to become distinct species For the electrochemical phenomenon, see Ion speciation. Part of a series onEvolutionary biologyDarwin's finches by John Gould Index Introduction Main Outline Glossary Evidence History Processes and outcomes Population genetics Variation Diversity Mutation Natural selection Adaptation Polymorphism Genetic drift Gene flow Speciation Adaptive radiation Co-operation Coevolution Coextinction Divergence Convergence Parallel...

Синелобый амазон Научная классификация Домен:ЭукариотыЦарство:ЖивотныеПодцарство:ЭуметазоиБез ранга:Двусторонне-симметричныеБез ранга:ВторичноротыеТип:ХордовыеПодтип:ПозвоночныеИнфратип:ЧелюстноротыеНадкласс:ЧетвероногиеКлада:АмниотыКлада:ЗавропсидыКласс:Пт�...

 

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Federal Service for Surveillance in Healthcare – news · newspapers · books · scholar · JSTOR (June 2020) (Learn how and when to remove this template message) Federal Service for Surveillance in HealthcareФедеральная служба по надзору �...

 

Class overview OperatorsSoviet Navy In commission1967–1995 Completed4 Retired4 General characteristics TypeSubmarine Displacement 2,400 long tons (2,439 t) surfaced 2,900 long tons (2,947 t) submerged Length73 m (239 ft 6 in) Beam9.8 m (32 ft 2 in) Draft7.3 m (23 ft 11 in) PropulsionDiesel-electric Speed14 knots (26 km/h) Complement65 Armament1 × 533 mm (21 in), 1 × 400 mm (16 in) torpedo tubes The Projec...

B

  此條目介紹的是拉丁字母中的第2个字母。关于其他用法,请见「B (消歧义)」。   提示:此条目页的主题不是希腊字母Β、西里尔字母В、Б、Ъ、Ь或德语字母ẞ、ß。 BB b(见下)用法書寫系統拉丁字母英文字母ISO基本拉丁字母(英语:ISO basic Latin alphabet)类型全音素文字相关所属語言拉丁语读音方法 [b][p][ɓ](适应变体)Unicode编码U+0042, U+0062字母顺位2数值 2歷史發...

 

Pour les articles homonymes, voir Guy Delcourt. Guy DelcourtGuy Delcourt, photographié par Nicolas GuérinBiographieNaissance 27 mars 1958 (66 ans)VersaillesNationalité françaiseFormation École supérieure des sciences économiques et commercialesActivité ÉditeurAutres informationsDistinction Officier de l'ordre national du Mérite (2016)modifier - modifier le code - modifier Wikidata Guy Delcourt, né le 27 mars 1958 à Versailles[1], est le fondateur des éditions Delcourt spéc...

 

MollyA statue of folk song heroine Molly Malone in Dublin, Ireland.Pronunciation/ˈmɒli/GenderFemaleLanguage(s)Irish and EnglishOther namesAlternative spellingMollieMoliNickname(s)MolsMolDerivedMaryMargaret Molly Pitcher is a heroine of the American Revolutionary War. Titanic survivor Margaret Brown, who was later called The Unsinkable Molly Brown. Molly Malone was the stage name of American silent film actress Violet Isabel Malone. Molly (also spelled Molli or Mollie) is a diminutive of the...

After Hours til Dawn TourThe Weeknd al Foro Sol di Città del Messico nel 2023Tour di The WeekndAlbumAfter Hours e Dawn FM Inizio Filadelfia 14 luglio 2022 Fine Guadalajara 25 ottobre 2023 Tappe3 Spettacoli21 in Nord America30 in Europa13 in America Latina64 totali Cronologia dei tour di The Weeknd The Weeknd Asia Tour(2018) L'After Hours til Dawn Tour, noto precedentemente come The After Hours Tour, è il sesto tour musicale del cantante canadese The Weeknd, a supporto dei suoi quarto e ...

 

安倍晋太郎安倍晋太郎(攝於1987年4月21日) 日本第112、113任外務大臣任期1982年11月27日—1986年7月22日总理中曾根康弘前任櫻内義雄继任倉成正 日本第42任通商產業大臣任期1981年11月30日—1982年11月27日总理鈴木善幸前任田中六助(日语:田中六助)继任山中貞則 日本第41任内閣官房長官任期1977年11月28日—1978年12月7日总理福田赳夫前任園田直继任田中六助(日语�...

 

Questa voce o sezione sull'argomento centri abitati dell'Emilia-Romagna non cita le fonti necessarie o quelle presenti sono insufficienti. Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Riolo Termecomune Riolo Terme – VedutaVista di Riolo Terme LocalizzazioneStato Italia Regione Emilia-Romagna Provincia Ravenna AmministrazioneSindacoFederica Malavolti (Partito Democratico) dal 13-6-2022 Terri...

Employment website This article is about the website. For the company, see Monster Worldwide. Monster Worldwide, Inc.Type of businessSubsidiaryType of siteJob search engineAvailable inMultilingualFoundedJanuary 1999; 25 years ago (1999-01)HeadquartersWeston, Massachusetts, U.S.Founder(s)Jeff TaylorKey peopleScott Gutz (CEO)IndustryInternetServicesOnline employmentRevenueUS$880 million (2014)[1]Employees1,375 (2021)ParentRandstad Holding(2016–present)...

 

Filipino chicken soup or stew TalunanAlternative names Talunan na manok Chicken talunan Talunang manok TypeSoup or stewCourseMain coursePlace of originPhilippinesRegion or stateTagalogServing temperatureHotMain ingredientsMeat, fish sauce, onions, vinegar, tomatoes Talunan or talonan is a Filipino chicken soup or stew characterized by its sour flavor. It is prepared like a combination of Philippine adobo and paksiw, with vinegar, garlic, ginger, black peppercorns, patis (fish sauce), bay leav...

 

Tentara Mogolia DalamBendera Pemerintah Militer Mongol(1936–37)Aktif1936–1945Negara MengjiangAliansi Empire of JapanTipe unitAngkatan daratJumlah personel10.000 (1936)20.000 (1937)PertempuranPerang Sino-Jepang Kedua Kampanye Suiyuan Pertempuran Taiyuan Perang Dunia II Manchurian Strategic Offensive Operation TokohWakil komandanPangeran DemchugdongrubTokoh berjasaLi ShouxinJodbajab Tentara Mongolia Dalam, juga kadang-kadang disebut Tentara Nasional Mengjiang, merujuk ke unit mili...

فرار وطرد الألمانمعلومات عامةالبداية 1944 النهاية 1950 المنطقة أوروبا التأثيراتأحد جوانب Federation of Expellees (en) فرع من مقالة عن أحداث في سنة أو فترة زمنية محددة تفرع عنها  القائمة ... طرد الألمان من تشيكوسلوفاكياOperation Black Tulip (en) deportation of Germans from Romania after World War II (en) هروب وطرد الألمان من �...

 

Rigid covering growing atop a fish's skin For other uses, see Fish scale (disambiguation). Cycloid scales cover these teleost fish (rohu) A fish scale is a small rigid plate that grows out of the skin of a fish. The skin of most jawed fishes is covered with these protective scales, which can also provide effective camouflage through the use of reflection and colouration, as well as possible hydrodynamic advantages. The term scale derives from the Old French escale, meaning a shell pod or husk...