🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.postscript
4 messages
4 total messages Started by Dan Connolly Tue, 13 Oct 1992 19:01
text formatters written in PostScript?
#4142
Author: Dan Connolly
Date: Tue, 13 Oct 1992 19:01
23 lines
1500 bytes
Disclaimer: I have read a lot of postscript code, but written very little.
Excuse my areas of ignorance.

I am interested in a text formatting system written in PostScript.
It would read data from the input stream (similar to the way
the image operator, or any number of image decompression operators
read data from the input stream). Then it would arrange the text
on successive pages and render the text.

i.e. what I'm looking for is troff or TeX or something, but written
in PostScript. Ideally, I would use it like this:

% vi my_file
% cat text_formatter.ps my_file >out_file.ps
% lpr out_file.ps

and my_file would be printed in an attractive format on the printer.
my_file would include text and markup indicating font changes, margins,
etc.

Any ideas?

Dan
Re: text formatters written in PostScript?
#4150
Author: Dick Dunn
Date: Thu, 15 Oct 1992 00:12
35 lines
2198 bytes
connolly@convex.com (Dan Connolly) writes:
>I am interested in a text formatting system written in PostScript.
>It would read data from the input stream (similar to the way
>the image operator, or any number of image decompression operators
>read data from the input stream). Then it would arrange the text
>on successive pages and render the text.

This falls into the category people like to call "Theoretically Possible,
but..."  It is possible to format text in PostScript, but it's really not
very well suited to the task.

PostScript is interpreted, and although that's not necessarily a damning
feature, it makes the efficiency problems a lot harder.  I think the two
basic problems here are late binding and latent types.  You can fiddle with
"bind" and //, and interpreters try to avoid re-evaluating binding where
possible, but it's still an issue...and latent types do require a lot of
extra code for run-time type checking.

PostScript string handling is weak and clumsy.  It turns out that for-
matters spend a lot of their overall processing time in line breaking,
hyphenation, and justification.

Also, you probably want the formatter to run on your host machine, so that
it can find hyphenation tables/dictionaries, include files of macros and
common text, etc.  This can be done, but it's not the model you suggested.

>i.e. what I'm looking for is troff or TeX or something, but written
>in PostScript...

At this point, most of us are probably asking "why PostScript???"  That is,
why does the implementation language matter?  It seems like PostScript has
no particular strengths, and several serious weaknesses.
-- 
Dick Dunn    rcd@raven.eklektix.com   -or-   raven!rcd    Boulder, Colorado
   ...Never offend with style when you can offend with substance.
Re: text formatters written in PostScript?
#4153
Author: Jonathan Monsarrat
Date: Thu, 15 Oct 1992 14:29
25 lines
1362 bytes
connolly@convex.com (Dan Connolly) writes:
>I am interested in a text formatting system written in PostScript.

rcd@raven.eklektix.com (Dick Dunn) writes:
> At this point, most of us are probably asking "why PostScript???"

Yes: why PostScript?

I wrote a text formatting system (LameTeX) that makes all of its
formatting decisions in PostScript. This is because I wanted to
format text around pictures, and the pictures are described in
PostScript.

Although it works, it turned out to be more trouble than it was worth.

It would be much easier to have a PostScript interpreter spew out
the shape of the picture to format text around, and then:

Let a compiled language handle it.

If you're curious what one example of an brain dead implementation would look
like, it is wilma.cs.brown.edu:pub/lametex.tar.Z.

-Jon Monsarrat   --   jgm@cs.brown.edu   -- Brown University CS Dept --
Re: text formatters written in PostScript?
#4162
Author: Ken Rawlings
Date: Fri, 16 Oct 1992 10:31
51 lines
2833 bytes
>In article <1992Oct15.001223@eklektix.com>, rcd@raven.eklektix.com (Dick Dunn) writes:
>>At this point, most of us are probably asking "why PostScript???"  That is,

	It's _highly_ device independent, is not tied to any one computer, 
does linerar graphical transformations on the fly, handles fonts beautifully, 
is a _true_ computer language, is fun to program in, is stack oriented,
is reentrant, is object oriented, and is loosely typed. 

	That answer your question?   :-)

In article <1bkhvdINNdku@gap.caltech.edu> carl@SOL1.GPS.CALTECH.EDU writes:
>No, we're not.  We realize that were such a program available, one could simply
>download the program and the text to the PostScript printer and let IT do the
>formatting.  If we use more than one operating system in our work, it wouldn't
>be necessary to port the code for the formatter to each operating system.

	My sentiments exactly. 

	There is such a program avaliable and it works quite well,
although there is a catch(see below). It's called "Gonzo Justification
Power Tool" by a man that is quickly becoming the closest thing I have
to a hero: Dan Lancaster. 

	Basically, you send it to the printer as a persistant
download, then when you want to have it format some text you prolog the
text with: 

		gonzo begin
		dumpascii starttemplate

	Of course the templates are totally redifinable(using our
favorite language!) and in fact it works quite well if you want to do
anything remotely interesting with the text. 

	The catch? It's on GEnie, and the way I understand it, it cannot
be placed on a public archive or redistributed. However, the $2.50 spent
downloading it is _well_ worth the money, and Dan certainly deserves
whatever his cut is of it. (I think this is why none of the great stuff
on the PSRT is on any of the archives)

	Speaking of GEnie: If you have any interest at all in using
PostScript as more than just a way of "dirtying up an otherwise clean
sheet of paper", the PostScript Language Roundtable is definitely worth 
looking into. 

-kdr

-- 
: Ken Rawlings                   |the slave thinks he is released from bondage:
: CompSci/Indiana University     |                only to find                :
: krawling@silver.ucs.indiana.edu|         a stronger set of chains           :
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads