<s>
The	O
device	B-Application
independent	I-Application
file	I-Application
format	I-Application
(	O
DVI	B-Application
)	O
is	O
the	O
output	O
file	O
format	O
of	O
the	O
TeX	B-Application
typesetting	O
program	O
,	O
designed	O
by	O
David	O
R	O
.	O
Fuchs	O
and	O
implemented	O
by	O
Donald	O
E	O
.	O
Knuth	O
in	O
1982	O
.	O
</s>
<s>
Unlike	O
the	O
TeX	B-Application
markup	I-Application
files	O
used	O
to	O
generate	O
them	O
,	O
DVI	B-Application
files	O
are	O
not	O
intended	O
to	O
be	O
human-readable	B-General_Concept
;	O
they	O
consist	O
of	O
binary	O
data	O
describing	O
the	O
visual	O
layout	O
of	O
a	O
document	O
in	O
a	O
manner	O
not	O
reliant	O
on	O
any	O
specific	O
image	O
format	O
,	O
display	B-Device
hardware	I-Device
or	O
printer	O
.	O
</s>
<s>
DVI	B-Application
files	O
are	O
typically	O
used	O
as	O
input	O
to	O
a	O
second	O
program	O
(	O
called	O
a	O
DVI	B-Application
driver	O
)	O
which	O
translates	O
DVI	B-Application
files	O
to	O
graphical	O
data	O
.	O
</s>
<s>
For	O
example	O
,	O
most	O
TeX	B-Application
software	O
packages	O
include	O
a	O
program	O
for	O
previewing	O
DVI	B-Application
files	O
on	O
a	O
user	O
's	O
computer	B-Device
display	I-Device
;	O
this	O
program	O
is	O
a	O
driver	O
.	O
</s>
<s>
Drivers	O
are	O
also	O
used	O
to	O
convert	O
from	O
DVI	B-Application
to	O
popular	O
page	O
description	O
languages	O
(	O
e.g.	O
</s>
<s>
PostScript	B-Language
,	O
PDF	B-Application
)	O
and	O
for	O
printing	O
.	O
</s>
<s>
TeX	B-Application
markup	I-Application
may	O
be	O
at	O
least	O
partially	O
reverse-engineered	O
from	O
DVI	B-Application
files	O
,	O
although	O
this	O
process	O
is	O
unlikely	O
to	O
produce	O
high-level	O
constructs	O
identical	O
to	O
those	O
present	O
in	O
the	O
original	O
markup	O
,	O
especially	O
if	O
the	O
original	O
markup	O
used	O
high-level	O
TeX	B-Application
extensions	O
(	O
e.g.	O
</s>
<s>
LaTeX	B-Application
)	O
.	O
</s>
<s>
DVI	B-Application
differs	O
from	O
PostScript	B-Language
and	O
PDF	B-Application
in	O
that	O
it	O
does	O
not	O
support	O
any	O
form	O
of	O
font	O
embedding	O
,	O
but	O
merely	O
references	O
external	O
font	O
name	O
.	O
</s>
<s>
(	O
Both	O
PostScript	B-Language
and	O
PDF	B-Application
formats	I-Application
can	O
either	O
embed	O
their	O
fonts	O
inside	O
the	O
documents	O
.	O
)	O
</s>
<s>
For	O
a	O
DVI	B-Application
file	O
to	O
be	O
printed	O
or	O
even	O
properly	O
previewed	O
,	O
the	O
fonts	O
it	O
references	O
must	O
be	O
already	O
installed	O
.	O
</s>
<s>
Like	O
PDF	B-Application
,	O
DVI	B-Application
uses	O
a	O
limited	O
sort	O
of	O
machine	B-Language
language	I-Language
with	O
termination	O
guarantees	O
that	O
is	O
not	O
a	O
full	O
,	O
Turing-complete	B-Algorithm
programming	O
language	O
like	O
PostScript	B-Language
.	O
</s>
<s>
As	O
of	O
2004	O
there	O
is	O
a	O
compilation	O
of	O
the	O
specifications	O
a	O
DVI	B-Application
driver	O
must	O
implement	O
by	O
the	O
"	O
TUG	O
DVI	B-Application
Driver	O
Standards	O
Committee	O
"	O
.	O
</s>
<s>
These	O
documents	O
do	O
not	O
specify	O
the	O
endianness	O
,	O
which	O
is	O
however	O
big	O
endian	O
,	O
as	O
can	O
be	O
seen	O
looking	O
into	O
a	O
DVI	B-Application
file	O
itself	O
.	O
</s>
<s>
The	O
DVI	B-Application
format	O
was	O
designed	O
to	O
be	O
compact	O
and	O
easily	O
machine-readable	O
.	O
</s>
<s>
Toward	O
this	O
end	O
,	O
a	O
DVI	B-Application
file	O
is	O
a	O
sequence	O
of	O
commands	O
which	O
form	O
"	O
a	O
machine-like	B-Language
language	I-Language
"	O
,	O
in	O
Knuth	O
's	O
words	O
.	O
</s>
<s>
Each	O
command	O
begins	O
with	O
an	O
eight-bit	O
opcode	B-Language
,	O
followed	O
by	O
zero	O
or	O
more	O
bytes	O
of	O
parameters	O
.	O
</s>
<s>
For	O
example	O
,	O
an	O
opcode	B-Language
from	O
the	O
group	O
0x00	O
through	O
0x7F	O
(	O
decimal	O
127	O
)	O
,	O
set_char_i	O
,	O
typesets	O
a	O
single	O
character	O
and	O
moves	O
the	O
implicit	O
cursor	O
right	O
by	O
that	O
character	O
's	O
width	O
.	O
</s>
<s>
In	O
contrast	O
,	O
opcode	B-Language
0xF7	O
(	O
decimal	O
247	O
)	O
,	O
pre	O
(	O
the	O
preamble	O
,	O
which	O
must	O
be	O
the	O
first	O
opcode	B-Language
in	O
the	O
DVI	B-Application
file	O
)	O
,	O
takes	O
at	O
least	O
fourteen	O
bytes	O
of	O
parameters	O
,	O
plus	O
an	O
optional	O
comment	O
of	O
up	O
to	O
255	O
bytes	O
.	O
</s>
<s>
In	O
a	O
broader	O
sense	O
,	O
a	O
DVI	B-Application
file	O
consists	O
of	O
a	O
preamble	O
,	O
one	O
or	O
more	O
pages	O
,	O
and	O
a	O
postamble	O
.	O
</s>
<s>
These	O
variables	O
can	O
be	O
pushed	O
to	O
or	O
popped	O
from	O
the	O
stack	B-Application
.	O
</s>
<s>
In	O
addition	O
,	O
the	O
current	O
font	O
f	O
is	O
held	O
as	O
an	O
integer	O
value	O
,	O
but	O
is	O
not	O
pushed	O
and	O
popped	O
with	O
the	O
rest	O
of	O
the	O
state	O
variables	O
when	O
the	O
opcodes	B-Language
push	O
or	O
pop	O
are	O
encountered	O
.	O
</s>
<s>
The	O
fonts	O
themselves	O
are	O
not	O
embedded	O
in	O
the	O
DVI	B-Application
file	O
,	O
only	O
referenced	O
by	O
an	O
integer	O
value	O
defined	O
in	O
the	O
relevant	O
fnt_defi	O
op	O
.	O
</s>
<s>
f	O
contains	O
an	O
integer	O
value	O
of	O
up	O
to	O
four	O
bytes	O
in	O
length	O
,	O
though	O
in	O
practice	O
,	O
TeX	B-Application
only	O
ever	O
outputs	O
font	O
numbers	O
in	O
the	O
range	O
0	O
through	O
255	O
.	O
</s>
<s>
Similarly	O
,	O
the	O
DVI	B-Application
format	O
supports	O
character	B-General_Concept
codes	I-General_Concept
up	O
to	O
four	O
bytes	O
in	O
length	O
,	O
even	O
though	O
only	O
the	O
0	O
–	O
255	O
range	O
is	O
commonly	O
seen	O
,	O
as	O
the	O
TFM	O
format	O
is	O
limited	O
to	O
that	O
range	O
.	O
</s>
<s>
Character	B-General_Concept
codes	I-General_Concept
in	O
DVI	B-Application
files	O
refer	O
to	O
the	O
character	B-General_Concept
encoding	I-General_Concept
of	O
the	O
current	O
font	O
rather	O
than	O
that	O
of	O
the	O
system	O
processing	O
it	O
.	O
</s>
<s>
This	O
means	O
,	O
for	O
instance	O
,	O
that	O
an	O
EBCDIC-based	O
system	O
can	O
process	O
a	O
DVI	B-Application
file	O
that	O
was	O
generated	O
by	O
an	O
ASCII-based	O
system	O
,	O
so	O
long	O
as	O
it	O
has	O
the	O
same	O
fonts	O
installed	O
.	O
</s>
<s>
The	O
DVI	B-Application
format	O
does	O
not	O
have	O
support	O
for	O
graphics	O
except	O
for	O
the	O
most	O
basic	O
black-and-white	O
boxes	O
.	O
</s>
<s>
Instead	O
DVI	B-Application
has	O
a	O
general	O
escape/extension	O
mechanism	O
,	O
known	O
as	O
specials	O
(	O
expressed	O
by	O
the	O
\special	O
command	O
in	O
TeX	B-Application
)	O
,	O
which	O
defers	O
graphics	O
(	O
and	O
color	O
)	O
to	O
post-processing	O
filters	O
.	O
</s>
<s>
There	O
are	O
numerous	O
DVI	B-Application
specials	I-Application
,	O
the	O
most	O
notable	O
of	O
which	O
are	O
PostScript	B-Language
specials	O
,	O
but	O
other	O
programs	O
like	O
tpic	B-Language
have	O
their	O
own	O
.	O
</s>
<s>
DVI	B-Application
files	O
are	O
often	O
converted	O
into	O
PDF	B-Application
,	O
PostScript	B-Language
,	O
or	O
PCL	B-Language
format	O
for	O
reading	O
and	O
printing	O
.	O
</s>
<s>
They	O
can	O
be	O
also	O
viewed	O
directly	O
by	O
using	O
DVI	B-Application
viewers	O
.	O
</s>
<s>
DVI	B-Application
viewers	O
:	O
YAP	B-General_Concept
(	O
included	O
in	O
MiKTeX	B-General_Concept
)	O
,	O
xdvi	B-General_Concept
,	O
,	O
Evince	B-Language
,	O
,	O
Okular	B-Language
,	O
,	O
,	O
DView	O
(	O
included	O
in	O
the	O
commercial	O
BaKoMa	O
TeX	B-Application
distribution	O
)	O
,	O
,	O
,	O
and	O
DVIWindo	O
(	O
of	O
the	O
now	O
defunct	O
commercial	O
Y&Y	O
TeX	B-Application
,	O
which	O
has	O
been	O
open-sourced	O
)	O
.	O
</s>
<s>
DVI-to-PS	O
converters	O
:	O
dvips	B-Language
is	O
the	O
de	O
facto	O
standard	O
.	O
</s>
<s>
CTAN	B-General_Concept
includes	O
some	O
older	O
ones	O
like	O
dvitops	O
(	O
and	O
DVIPSONE	O
)	O
with	O
a	O
note	O
that	O
they	O
lost	O
their	O
market	O
share	O
a	O
long	O
time	O
ago	O
.	O
</s>
<s>
DVI-to-SVG	O
converters	O
:	O
,	O
,	O
dvi2svg	O
;	O
the	O
only	O
one	O
included	O
in	O
CTAN	B-General_Concept
and	O
actively	O
maintained	O
is	O
dvisvgm	B-Application
.	O
</s>
<s>
The	O
first	O
DVI	B-Application
previewers	O
capable	O
of	O
on-screen	O
previewing	O
and	O
modification	O
of	O
LaTeX	B-Application
documents	O
ran	O
on	O
Amigas	B-Device
.	O
</s>
<s>
dvipdf	B-Application
is	O
a	O
tool	O
to	O
translate	O
DVI	B-Application
files	O
(	O
generated	O
by	O
TeX	B-Application
)	O
to	O
PDF	B-Application
files	I-Application
.	O
</s>
<s>
In	O
current	O
Linux	O
distributions	O
like	O
Ubuntu	B-Operating_System
,	O
it	O
is	O
a	O
thin	O
wrapper	O
around	O
dvips	B-Language
and	O
Ghostscript	B-Language
,	O
and	O
copyrighted	O
to	O
Artifex	B-Language
Software	I-Language
(	O
the	O
makers	O
of	O
Ghostscript	B-Language
)	O
.	O
</s>
<s>
A	O
possibly	O
different	O
program	O
with	O
the	O
same	O
name	O
—	O
described	O
as	O
a	O
modified	O
version	O
of	O
dvips	B-Language
—	O
was	O
announced	O
in	O
the	O
late	O
1990s	O
by	O
Sergey	O
Lesenko	O
,	O
however	O
it	O
was	O
apparently	O
never	B-Application
released	I-Application
.	O
</s>
<s>
dvipdfm	O
is	O
a	O
DVI-to-PDF	O
translator	O
developed	O
by	O
Mark	O
A	O
.	O
Wicks	O
.	O
</s>
<s>
The	O
early	O
documentation	O
of	O
dvipdfm	O
specifically	O
mentions	O
the	O
limited	O
availability	O
of	O
Lesenko	O
's	O
dvipdf	B-Application
as	O
a	O
reason	O
for	O
creating	O
dvipdfm	O
.	O
</s>
<s>
dvipdfm	O
supports	O
most	O
of	O
the	O
newer	O
special	O
functions	O
of	O
the	O
PDF	B-Application
format	I-Application
,	O
including	O
bookmarks	O
,	O
annotations	O
,	O
thumbnails	O
,	O
and	O
dvips	B-Language
specials	O
—	O
a	O
feature	O
making	O
possible	O
the	O
inclusion	O
of	O
Encapsulated	B-Language
PostScript	I-Language
(	O
.eps	B-Language
)	O
files	O
like	O
METAPOST	B-Language
output	O
—	O
as	O
well	O
inclusion	O
of	O
JPEG	O
and	O
PNG	O
images	O
;	O
other	O
features	O
of	O
dvipdfm	O
include	O
partial	O
font	O
embedding	O
(	O
reducing	O
file	O
size	O
)	O
and	O
balancing	O
the	O
internal	O
PDF	B-Application
document	O
trees	O
to	O
speed	O
up	O
rendering	O
of	O
large	O
documents	O
.	O
</s>
<s>
Many	O
of	O
these	O
features	O
(	O
except	O
for	O
the	O
direct	O
support	O
for	O
.eps	B-Language
files	O
)	O
are	O
also	O
present	O
in	O
pdfTeX	B-Language
,	O
which	O
typesets	O
TeX	B-Application
directly	O
to	O
PDF	B-Application
.	O
</s>
<s>
The	O
2004	O
,	O
4th	O
edition	O
of	O
the	O
Guide	O
to	O
LaTeX	B-Application
compares	O
them	O
in	O
the	O
following	O
way	O
:	O
</s>
<s>
dvipdfmx	B-Application
is	O
an	O
extended	O
version	O
of	O
the	O
dvipdfm	O
DVI-to-PDF	O
translator	O
,	O
included	O
in	O
current	O
TeX	B-Application
distributions	O
like	O
TeX	B-General_Concept
Live	I-General_Concept
2014	O
and	O
MiKTeX	B-General_Concept
2.9	O
.	O
</s>
<s>
The	O
primary	O
goal	O
of	O
the	O
dvipdfmx	B-Application
project	O
is	O
to	O
support	O
multi-byte	O
character	B-General_Concept
encodings	I-General_Concept
and	O
CJK	O
character	B-General_Concept
sets	I-General_Concept
for	O
East	O
Asian	O
languages	O
.	O
</s>
<s>
dvipdfmx	B-Application
is	O
also	O
included	O
(	O
in	O
a	O
somewhat	O
modified	O
form	O
)	O
in	O
XeTeX	B-Application
.	O
</s>
<s>
The	O
2nd	O
,	O
2008	O
edition	O
of	O
the	O
LaTeX	B-Application
Graphics	O
Companion	O
makes	O
the	O
following	O
workflow	O
suggestion	O
:	O
</s>
