[net.text] DVI question

berry@zinfandel.UUCP (Berry Kercheval) (12/04/84)

Can someone tell me if the .DVI files produced by DiTroff and the .DVI
files produced by TeX are the same or different formats??


-- 
Berry Kercheval		Zehntel Inc.	(ihnp4!zehntel!zinfandel!berry)
(415)932-6900

kens@orca.UUCP (Ken Serack) (12/05/84)

DiTroff does NOT produce .DVI files. (So they can not be the same)

Ken Serack
Tektronix Inc.

berry@zinfandel.UUCP (Berry Kercheval) (12/06/84)

In article <1211@orca.UUCP> kens@orca.UUCP (Ken Serack) writes:
>DiTroff does NOT produce .DVI files. (So they can not be the same)
>
>Ken Serack
>Tektronix Inc.

Interesting.  A vendor is attempting to sell us a port of Documenters
Workbench to 4bsd, and claim that their DiTroff DOES produce "dvi" files.
Hmmm -- time to ask some pithy questions....

Thanks for the feedback.

  --berry

-- 
Berry Kercheval		Zehntel Inc.	(ihnp4!zehntel!zinfandel!berry)
(415)932-6900

chris@umcp-cs.UUCP (Chris Torek) (12/07/84)

> Can someone tell me if the .DVI files produced by DiTroff and
> the .DVI files produced by TeX are the same or different formats??

They are most emphatically *not* the same.  DiTroff's ``device
independent'' output is different for each device; I think it's
misnamed; it should be called ``device specific'' output.  (Don't
get me wrong: I think ditroff is quite an improvement over troff.)

TeX's output is precisely the same for every device; in fact, TeX
itself doesn't care *what* device will eventually be used.  The
basic approach to device independence is different.  Instead of
using the ultimate output resolution as internal units, TeX uses
``scaled points'' (sp), where 2**16 sp == 1 point == 1/72.27 in.
This comes out to 4,765,777.92 points per inch, which is enough
resolution that roundoff errors disappear.  (In fact, you'd have
to use a powerful microscope to detect a difference of a few sp.)
-- 
(This line accidently left nonblank.)

In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (301) 454-7690
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland

percus@acf4.UUCP (12/08/84)

This seems to be what other people essentially are saying, but
I'll give it a try in my own way:

All DVI files should be the same -- unfortunately, DiTroff
does not output "real" DVI files with "real" DVI codes.
Hence, by a rather simple logic theorem, they are NOT the same.

Follow?
                                            A. G. Percus
                                            ...!ihnp4!cmcl2!acf4!percus

furuta@uw-june (Richard Furuta) (12/08/84)

ditroff produces a generic output file which is intended to be converted by
a postprocessor into a form suitable for printing on a particular device.
In that, it occupies the same role as does TeX's DVI format.  However, the
ditroff format is different---for one thing the operation codes are
different.  For another, the resolution of the intended device seems to be
included in the format while TeX's DVI uses the "RST".  Ditroff's format has
graphics primitives built into it while TeX's DVI has not included those
primitives in the defined language (there's an escape allowing arbitrary
things to be defined that is being used for this purpose at some sites).  I
suspect that your vendor either is confused or is converting Ditroff's
format to TeX's DVI for printing.

					--Rick

henry@utzoo.UUCP (Henry Spencer) (12/09/84)

> They are most emphatically *not* the same.  DiTroff's ``device
> independent'' output is different for each device; I think it's
> misnamed; it should be called ``device specific'' output. ...
> 
> TeX's output is precisely the same for every device; in fact, TeX
> itself doesn't care *what* device will eventually be used.  ...

I hate to tell you this, but even TeX has to care about the output
device.  Things like character widths affect line breaks, and widths
are seldom the same from one device to another.  The use of device-
independent units of measurement is a red herring; the quality of the
output is still going to be poor if the formatter has the wrong idea
about what device the stuff is headed for.

This does not alter the answer to the original question:  while both
formatters use an intermediate code whose *format* is device-independent
(although its contents aren't), the two formats are related only in
intent.  They're not the same.  Anyone who claims they are has probably
gotten confused over the similar terminology.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry

jaap@haring.UUCP (12/11/84)

	>All DVI files should be the same -- 
        >                                   A. G. Percus

Yeah, thay ``should'' be the same. Unfortunately not all TeX DVI files
are the same. The TeX uses now DVI2 format which differs from the first one.

Also some implementations of TeX uses different rsu's then standard
due to machine dependencies.

	Jaap Akkerhuis, CWI Amsterdam, mcvax!jaap

furuta@uw-june (Richard Furuta) (12/11/84)

>I hate to tell you this, but even TeX has to care about the output
>device.  Things like character widths affect line breaks, and widths
>are seldom the same from one device to another.  The use of device-
>independent units of measurement is a red herring; the quality of the
>output is still going to be poor if the formatter has the wrong idea
>about what device the stuff is headed for.

Well, to take this definition to another level of pickiness, I assert that
this is not "device dependence" but instead "environment dependence."  With
TeX, you get the Metafonted fonts and the point of all of that is to give
you an approximation of a consistent environment for the different devices
you want to print to.  Poor quality output from certain devices reflects
differences between what they provide and the "ideal device" that TeX
expects to find.

The fact that you find different width fonts on different devices is a
reflection of real world factors (like different designers, copyrights, and
trade secrets).  None of this changes the fact that TeX will produce the
same output file for two radically different devices as long as they share
the same environment (i.e., fonts).  The DVI file can be (and often is)
transferred between computers and sites for printing on devices of differing
resolutions and abilities.  Ditroff, on the other hand, imbeds information
about the specific characteristics of the device into its output format.

					--Rick

bruce@godot.UUCP (Bruce Nemnich) (12/11/84)

In article <4755@utzoo.UUCP> henry@utzoo.UUCP (Henry Spencer) writes:
>I hate to tell you this, but even TeX has to care about the output
>device.  Things like character widths affect line breaks, and widths
>are seldom the same from one device to another.  The use of device-
>independent units of measurement is a red herring; the quality of the
>output is still going to be poor if the formatter has the wrong idea
>about what device the stuff is headed for.

TeX output is completely device-independent; it knows nothing about the
output device.  What it does know about are fonts, which are identical
to TeX across devices.  If the relative widths, heights, or shapes of
glyphs in a font are different on two devices, the two fonts are
certainly not the same.

Regardless of what one thinks of the Computer Modern family of fonts,
one must applaud Knuth's METAFONT (which is in the process of being
completely rewritten as TeX was a couple of years ago) for providing a
way to design and scale raster fonts for a variety of resolutions,
making them available on many, many printers.  Hopefully many more
designers will use the new version, which will be as portable as TeX
itself.

I can make a DVI file and view it on a LispMachine screen, print it on
our QMS 1200 or Versatec, take it to MIT and print it on their Dover or
Xerox 9700, give it to any one of a number of typesetting firms, etc.
They will all appear the same, within the pixel-rounding margin of error
for each device.

-- 
--Bruce Nemnich, Thinking Machines Corporation, Cambridge, MA
  ihnp4!godot!bruce, bjn@mit-mc.arpa ... soon to be bruce@godot.arpa

chris@umcp-cs.UUCP (Chris Torek) (12/11/84)

> > TeX's output is precisely the same for every device; in fact, TeX
> > itself doesn't care *what* device will eventually be used.  ...

> I hate to tell you this, but even TeX has to care about the output
> device.  Things like character widths affect line breaks, and widths
> are seldom the same from one device to another.  The use of device-
> independent units of measurement is a red herring; the quality of the
> output is still going to be poor if the formatter has the wrong idea
> about what device the stuff is headed for.

Well, yes and no:  TeX ``likes'' a standard set of fonts (the
AM---``Almost Modern''---and hopefully soon, the CM, or Computer
Modern, fonts), which have certain properties built into them (widths,
ligatures, kerning, and so forth) and for which there are standard sets
of rasters at 200, 240, 300, and 5000 (I think) DPI.  There are rules
for positioning characters so that they will be as close as is
reasonable to the ``correct'' position (based not only on the exact
TeX-units size of the characters but also on the actual plotted
width).  With 300 DPI or better resolution, the final output is not
bad, although I'd hate to see a book printed from a base resolution
that low.

Admittedly if you are going to use an existing set of fonts that are
incompatible with the AM fonts, then the DVI file will change.
However, if (and I grant that this is a big ``if'') you have a low
resolution representation of these same fonts for use in making proof
copies, the DVI file will be precisely the same.
-- 
(This line accidently left nonblank.)

In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (301) 454-7690
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland

henry@utzoo.UUCP (Henry Spencer) (12/12/84)

> ...  With
> TeX, you get the Metafonted fonts and the point of all of that is to give
> you an approximation of a consistent environment for the different devices
> you want to print to...

A consistent environment, so long as want you want is Computer Modern
Roman.  Ugh.  Real typesetting machines generally have their own private
ideas about fonts, which brings us back to square one.  To rephrase my
previous comment:  at present, any similarity in fonts across devices
is the exception rather than the rule.  So font-dependency equals device-
dependency.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry

jjhnsn@ut-ngp.UUCP (J. Lee Johnson) (12/15/84)

> From: furuta@uw-june (Richard Furuta)
> 
> With TeX,
> you get the Metafonted fonts and the point of all of that is to give
> you an approximation of a consistent environment for the different devices
> you want to print to.  Poor quality output from certain devices reflects
> differences between what they provide and the "ideal device" that TeX
> expects to find.
> 
> The fact that you find different width fonts on different devices is a
> reflection of real world factors (like different designers, copyrights, and
> trade secrets).

>> From: bruce@godot.UUCP (Bruce Nemnich)
>> 
>> TeX output is completely device-independent; it knows nothing about the
>> output device.  What it does know about are fonts, which are identical
>> to TeX across devices.  If the relative widths, heights, or shapes of
>> glyphs in a font are different on two devices, the two fonts are
>> certainly not the same.

If I understand this correctly, TeX DVI files are completely device
independent for all ideal TeX devices in a perfect and harmonious
world.

( Can I come for a visit? )
James Lee Johnson, U.T. Computation Center, Austin, Texas 78712
ARPA:  jjhnsn@ut-ngp
UUCP:  {allegra,ihnp4,gatech,ut-sally}!ut-ngp!jjhnsn

bruce@godot.UUCP (Bruce Nemnich) (12/17/84)

It's true that common fonts rarely exist across devices, with the
notable exception of the Computer Modern family.  I hope this situation
will change, and I think it will, now that medium-resolution
laserprinters are commonplace.  I hope some good designers spend time
using the new METAFONT when it is released.  There should be a market
for high-quality font families available for all the common printers.  I
have heard good things about Lucida, but I haven't seen it.  Is it to be
available only for Imagen printers?

I digress.  Formatters should be device independent if they are to be
portable, else many people will hack the program for their own
particular environment, each different from the other.  TeX is device
independent; no line of code in TeX need ever change because of a
particular device, present or future.  Really, that is no big deal: it
only amounts to specifying distances in absolute units and keeping
sufficient precision to prevent roundoff errors in all values.
-- 
--Bruce Nemnich, Thinking Machines Corporation, Cambridge, MA
  ihnp4!godot!bruce, bjn@mit-mc.arpa ... soon to be bruce@godot.arpa

furuta@uw-june (Richard Furuta) (12/19/84)

>I digress.  Formatters should be device independent if they are to be
>portable, else many people will hack the program for their own
>particular environment, each different from the other.  TeX is device
>independent; no line of code in TeX need ever change because of a
>particular device, present or future.  Really, that is no big deal: it
>only amounts to specifying distances in absolute units and keeping
>sufficient precision to prevent roundoff errors in all values.
>-- 
>--Bruce Nemnich, Thinking Machines Corporation, Cambridge, MA
>  ihnp4!godot!bruce, bjn@mit-mc.arpa ... soon to be bruce@godot.arpa

The Scribe model in which the document is specified abstractly and the
appearance of the output is adjusted to suit the particular device being
used is an attractive alternative to the device independence of TeX.  And
they take care of the problem of multiple incompatible versions of the
system by not distributing the sources [groan].  But seriously, what they do
provide is a "database" and mechanisms for defining how new devices are to
be treated (which works, assuming that the new device is "relatively" close
to one they already support).

Scribe <<input>> is marvelously portable---the same input can be used in a
large number of different documents or on a large number of differing
devices.

					--Rick