From: grodan@cyklop.nada.kth.se (Mats G L|fdahl)
Newsgroups: comp.text.tex
Subject: The possibility of almost WYSIWYG TeX
Date: 7 Apr 92 11:20:44 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden
Originator: grodan@cyklop.nada.kth.se


Jeremy Gibbons writes:

   Most people also mean by `WYSIWYG' that `WYSIAYG' (`what you see is *all*
   you get')---ie, that you don't have an ASCII text window displaying
   embedded commands as well, you *only* have the `previewing' window
   (corresponding closely to the DVI file, rather than the TeX file). Then
   editing must be done in terms of the displayed result, and if you want to
   produce an updated TeX file the editor must somehow figure out what
   structural markup changes must be made to the TeX code in order to produce
   the desired change in the DVI file. In short, a very difficult (dare I say,
   impossible?) task.

   Basically, there is a lot more information in the TeX code than in the DVI
   file; you can't produce TeX code by editing the DVI.

Most of us probably work in an environment like this:
1) One Emacs (or other editor) window, where you edit the TeX file.
2) One previewer window, where you view the dvi file.
The previewer window is not updated until you save the TeX file
and compile it. 

Could this environment be enhanced in the wysiwyg direction, with
resonabel speed, without actually causing a need to edit dvi files?
Perhaps, by introducing different levels or modes of compilation.
Let's say you could turn on or off the following options:
  i) Allow new macro definitions.
 ii) Make correct line breaks.
iii) Make correct page breaks.
 iv) ...

Add the possibilities to edit the *text* in the previewer window.
Adding text would change the TeX file buffer which would be common to
both windows. The text you enter would show on the screen depending on
the current font/size etc where you put the cursor, just like in your
favourite wysiwyg program. It would perform the very briefest mode of
compilation on-line.  Only when the save-and-compile command is given,
a more thorough compilation is done, and only then would you see TeX'
correct line breaks.

"Local" changes could result in "local" recompilation, ie. if you just
add text or fomulas in one paragraph, you would only have to recompile
that very paragraph. This would be possibel with option iii turned
off. Normally, you don't care about page breaks until your text is
(almost) finished anyway.

There would be more problems, I'm sure, but I don't know enough about
compilers in general and TeX compilers in particular to see them all.
There would be more things you would want to be able to do in the
previewer window, like inserting groups, changing font/size, inserting
macro calls, etc. Your imagination is probably as good as mine, and I
only want to outline the approach and get some feedback. Would
something like this be possible? GNU Emacs might be a good environment
to start from?

	/Mats.

--
 Mats Lofdahl, Stockholm Observatory, S-133 36 Saltsjobaden | +46 - 8 16 44 75 
 -----------------------------------------------------------------------------
 Internet: lofdahl@astro.su.se | Bitnet: grodan@sekth | Sunet: royacs::lofdahl
-- 
 Mats Lofdahl, Stockholm Observatory, S-133 36 Saltsjobaden | +46 - 8 16 44 75 
 -----------------------------------------------------------------------------
 Internet: lofdahl@astro.su.se | Bitnet: grodan@sekth | Sunet: royacs::lofdahl
Newsgroups: comp.text.tex