Article View: comp.text
Article #4700Re: want a version of ditroff which generates PostScript directly
From: Devon E Bowen
Date: Sat, 14 May 1988 05:47
Date: Sat, 14 May 1988 05:47
45 lines
2679 bytes
2679 bytes
In article <52973@sun.uucp> spage%polar@Sun.COM (S Page Sun Mtn View windows writer/engineer 691-2410) writes:
>Even going through the translation into ditroff intermediate format,
>the PostScript file produced by `psdit` is much smaller than the
>intermediate file generated by `ditroff` (169K vs 224K for a 38-page
>manual). I assume that by going directly to PostScript from within
>`ditroff`, you could generate much more efficient PostScript, e.g.
>replacing
> 288 5253(This)N
> 467(publication)X
> 887(is)X
> 968(protected)X
> 1318(by)X
> 1428(Federal)X
> 1714(Copyright)X
> 2094(Law,)X
>with
> 288 5253(This publication is protected by Federal Copyright Law,)show
The problem here is that you're ignoring a major part of the formatting
that ditroff is doing for you. Ditroff output formats each letter individualy
so that all the white space that would normally be at the end of the line
is evenly distributed between all the letters. Devps (and, I assume, psdit
as well) formats as in your example above by soaking up the space between
entire words and leaving the between char spacing as the default. In extreme
cases, this can look very bad. What your suggesting totally eliminates all of
the spacing that ditroff is doing and assumes the default for everything.
Since the spacing between characters is set in the dictionaries, this would
result in the large block of white space at the end of the line (which is
the whole reason you used ditroff in the first place!).
We've written (ok, we're putting the finishing touches on) a driver that
doesn't eliminate this spacing data anywhere. It formats documents the
way ditroff intended them to be formatted. There is no way to make the Post-
Script output smaller than the intermediate filter (unless you cheat like
devps does) - believe me I've tried! But our filter generates code only
about 20% larger.
Devon Bowen (KA2NRC)
University at Buffalo
*********************************************************
uucp: ..!{ames,boulder,decvax,rutgers}!sunybcs!bowen
Internet: bowen@cs.Buffalo.EDU
BITNET: bowen@sunybcs.BITNET
*********************************************************
Technical Details
Message-ID:
<11228@sunybcs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!uwvax!oddjob!ncar!boulder!sunybcs!bowenReferences:
<52973@sun.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!uwvax!oddjob!ncar!boulder!sunybcs!bowen From: bowen@sunybcs.UUCP (Devon E Bowen) Newsgroups: comp.text,comp.lang.postscript Subject: Re: want a version of ditroff which generates PostScript directly Keywords: page description preview Message-ID: <11228@sunybcs.UUCP> Date: 14 May 88 05:47:29 GMT References: <52973@sun.uucp> Reply-To: bowen@sunybcs.UUCP (Devon E Bowen) Organization: SUNY/Buffalo Computer Science Lines: 45