Subject: Re: Let's write a wordprocessor. From: hjstein@sunrise.huji.ac.il (Harvey J. Stein) Date: 21 May 1993 14:26:33
In article <mjr.737924559@ursa> mjr@ursa.calvin.edu (Matt Ranney)
writes:
OK, why is LaTeX a good output file format?
Because LaTeX/TeX are popular and some people write that code
directly. I'm assuming that in addition to feeding these files to
TeX, these people are also going to want to modify them and do other
crazy macro definitions and stuff like that. How can we read this in
again? Should we have a complete TeX parser built in to this new
program? No, we shouldn't. We should have a SAVE file format that is
not nice to edit, but is a 7-bit ASCII file that can be read in again
by this program. Then we should have several OUTPUT file formats that
will give you LaTeX, PostScript, WP5.1, whatever you want.
DEC has a product called DECWrite (really creative name, huh?) which
basically operates like this. It passes file segments to a TeX
processor to compute the screen output. The file is stored in some
sort of DECWrite format, but I don't think there is a "Save as LaTeX
file" option.
I think that the simplest way of approaching this would be some sort
of semi-wysiwyg setup where the editor would pass strings to a TeX
server for processing. Then the dvi output could be displayed in a
window which the user could type into. When the user types, the
program could do one of two things:
-It could keep passing the current paragraph back to the TeX
server, and modifying the display as appropriate. This would only
work if the TeX server is fast.
-It could just insert things in the current font using the current
character widths, and wait until the end of a paragraph or of a
line before sending the paragraph (or more) back to TeX for
reprocessing.
In any case, one would probably need a TeX server which could remember
the current state (easily done by piping output to TeX), and that
could back up (much harder, but probably possible). Perhaps it could
keep paragraph or page pointers and miscellaneous state information so
that the editor could tell it to go back to a particular paragraph or
page, and continue on from there. If the LaTeX or TeX code that the
editor produces is particularly simple, then this wouldn't be too
hard.
To summarize, I'm talking about putting TeX and a dvi viewer in
between the buffer and the screen.