[comp.text] ditroff that produces PostScript

tut%cairo@Sun.COM (Bill "Bill" Tuthill) (05/19/88)

FLAME ON

I'm getting really sick of all these people writing to explain that
ditroff shouldn't produce PostScript because "di" stands for device
independent, and PostScript isn't device independent, bla bla bla.

There are three big advantages of PostScript over "dit" files:

1.  They are truly device- and resolution-independent.  A PostScript
document can be printed on any PostScript printer.  By contrast, dit
files are device- and resolution-specific.  Let's say you have a 240
dpi Imagen printer: when you acquire a 300 dpi Imagen printer, you'll
have to reformat all your dit files.

2.  PostScript files are nearly legible.  Although jerks such as Bill
Tuthill have claimed that PostScript is a write-only language, ditroff
is even worse.  At least the words in PostScript come out as words,
whereas in dit files each letter is separated by two digits.

3.  PostScript is a standard.  Many quick-and-dirty print shops will
actually typeset PostScript for you.  I can't think of even one print
shop in the entire world that will typeset dit files for you.  Although
the format is ASCII, let's face it, ostriches, it hasn't caught on.

The reason why nobody sells a PostScript-generating ditroff is probably
that nobody thinks ditroff is worth the trouble.

FLAME OFF

tim@ora.UUCP (Tim O'Reilly) (05/19/88)

In article <53716@sun.uucp>, tut%cairo@Sun.COM (Bill "Bill" Tuthill) writes:
> I can't think of even one print
> shop in the entire world that will typeset dit files for you.  

Well, actually we will...but we do it by translating them to
PostScript, which proves your point, I imagine.

rcd@ico.ISC.COM (Dick Dunn) (05/21/88)

> I'm getting really sick of all these people writing to explain that
> ditroff shouldn't produce PostScript because "di" stands for device
> independent, and PostScript isn't device independent, bla bla bla.
What a quibble!  Ditroff can drive any device for which there's a ditroff
postprocessor.  PostScript can be used to drive any device which has a
PostScript interpreter.  The point of ditroff was to construct a program
which is <adaptable> to various devices, using a simple mechanism, and
without modifying the program itself.  Sure, you could bash the back end of
ditroff to generate PostScript instead.  (Just glue it to psdit and tape
over the seams.)  If you do that, you've got something which isn't much
good for non-PostScript devices, because writing a PostScript-to-printer
converter is likely to be a lot more work than writing a ditroff back end.
BUT if you want troff direct to PostScript, that's your business.

as to the advantages of PostScript files...
> 1.  They are truly device- and resolution-independent.  A PostScript
> document can be printed on any PostScript printer.

The truth of the second sentence contradicts the first, since not all
printers are PostScript printers.  Hey, I like PostScript a bunch, and in
fact I'd like it a lot if all printers *were* PostScript printers.  It
would make life a lot simpler for me.  But they ain't.

PostScript files are device-independent if you make them so.  It's easy to
do, but one "0 setlinewidth" will undo it.

>...By contrast, dit files are device- and resolution-specific...

...which makes psdit a truly remarkable program, since it can turn a
device-specific (dit) file into a device-independent (PS) file!

The phrase "device-independent" is kind of a red herring, since it means
something rather different for ditroff and PostScript.

> 2.  PostScript files are nearly legible...
True, and nice if you're writing PostScript, which people do.  People don't
write dit files any more than they write object files.  Readability of dit
files is hardly relevant; they aren't meant for human consumption.

> 3.  PostScript is a standard.  Many quick-and-dirty print shops will
> actually typeset PostScript for you.  I can't think of even one print
> shop in the entire world that will typeset dit files for you.
...because, once again, that's not an intended purpose of dit files!
PostScript is a language designed to be used for a printer interface.
Ditroff output is not.  What's this business of criticizing a file format
for failing to be something it's not intended to be?

>...Although
> the format is ASCII, let's face it, ostriches, it hasn't caught on.
Yeah, right, an ostrich is anyone who doesn't agree with you, and you can
make things true by saying them.  Ditroff has done pretty well, thank you.
In fact, one of the reasons it's done well is that it's a better match to
PostScript than old troff ever could be.

> The reason why nobody sells a PostScript-generating ditroff is probably
> that nobody thinks ditroff is worth the trouble.

I'm beginning to think he doesn't even know that people use ditroff to
drive PostScript printers!  (Actually, I think it's more likely that he's
got an axe to grind over ditroff.:-)  The only real issue in the original
posting (as far as I could see) was that there wasn't a direct translator;
it had to be pasted up from ditroff | psdit.  The fact that it currently
takes two steps to get from troff input to PostScript output is a simple
consequence of the way people build up software systems in UNIX by
connecting programs together.  You don't write a separate program to do
something if you can make it from pieces, UNTIL you can justify the work
(e.g., by saving enough execution time, etc.)  There isn't a single
ditroff-to-PostScript translator yet because it hasn't yet been worth
anybody's time to make one.  The original inquiry suggests that at least
one person has a reason to want one, so maybe it's time.
-- 
Dick Dunn      UUCP: {ncar,cbosgd,nbires}!ico!rcd       (303)449-2870
   ...Never attribute to malice what can be adequately explained by stupidity.

fmr@cwi.nl (Frank Rahmani) (05/21/88)

> 
> as to the advantages of PostScript files...
>> 1.  They are truly device- and resolution-independent.  A PostScript
>> document can be printed on any PostScript printer.
This is simply not true!
> 
> The truth of the second sentence contradicts the first, since not all
> printers are PostScript printers.
And not all PostScript printers are the same. It depends on the
interpreter and amount of memory in your PostScript printer if
it will print a certain (conforming) PostScript file. I have lots
of files around that will print on one of our PostScript printers
and generate errors only on the other. This is also mentioned in
the Red Book, too lazy to look it up now. Says something like:
if you can really use this PostScript command, etc. depends on
the interpreter in your printer.
By the way, piping tools/commands is THE underlying phylosophy of 
UNIX(tm), so the whole discussion about a PostScript generating
ditroff is rather worthless.
fmr@cwi.nl
-- 
It is better never to have been born. But who among us has such luck?
--------------------------------------------------------------------------
These opinions are solely mine and in no way reflect those of my employer.