Re: Text processor




On 19 Jun 1999, Alan Shutko wrote:
> Havoc Pennington <rhp@zirx.pair.com> writes:
> 
> > However, the appearance of the document should use font size, bold,
> > italics, etc. instead of markup tags to display the structure. 
> 
> Do you want to enter tags, or use menus to format things?  What DTD do
> you want to be able to display visually, or do you want things to
> display via DSSSL or XSL?  (Naturally, that would be harder.)
>

No DTD, no DSSSL, no XSL. Something much simpler. A "proprietary" format;
perhaps saved as a standalone XML document, but that's an implementation
detail. Trying to implement those complicated specs is what always stalls
these projects; even the command-line SGML tools are fairly lame compared
to proprietary offerings. Granted, XML and XSL are supposed to be simpler.
 
I don't want to see any tags. The structure should be there, but it should
be implicit; it should be visually represented via bold, font size, and
layout. Should also be possible to move structural blocks as a unit via
drag-and-drop.

> > LaTeX's escape sequence requirements are even worse than tags (try
> > entering C code with lots of underscores...)
> 
> That's why you shouldn't do it.  Use lgrind!
> 

lgrind is a major pain in the ass. :-) The idea here is to make something
easy-to-use that allows you to visualize your document as you write and
not get bogged down in technical details.

I think LaTeX mode and PSGML mode are both pretty good already. I can use
those fine. Heck, I could write the program we are talking about. But when
I'm writing a document, it is very difficult to focus on the text when
there's all this markup and crap in the way, and the key sequences are
arcane, and there's no outline view. So I'm not saying the existing tools
don't work; I'm saying a much nicer tool could be written.

I've tried using a word processor to write large documents; LaTeX is
easier than that to me. Word processors have lots of stuff that's
irrelevant to "real" documents. I don't want to think about formatting,
and I want the editor to be smart about structure, cross-references,
bibliography, etc. as LaTeX is.

> > Structural markup application should be smart. For example, if you hit
> > return after a section title, a paragraph section should immediately
> > begin. The font should change accordingly.
> 
> Is this information anywhere in (say) a DTD?  Or would you have to
> have some other way to inform Emacs what you want to follow what. 
>

I think eventually you'd want "templates" in essence. Users would have a
dialog to edit a "style" - including how it happens to appear, where it
can appear, how to convert it to HTML. But as a first cut, hard-coded
elements comparable to the LaTeX element set would be fine.
 
> > Markup should also have *nice* shortcuts; Control-I maybe would italicize
> > until the next time you hit space, Control-Shift-I until the next time you
> > hit period.
> 
> I don't agree with those keystrokes, since they don't work on text
> terminals and conflict with other Emacs bindings.  Would C-c C-i, for
> instance, be acceptable?
> 

If it's going to be annoying for the benefit of Emacs and text terminals,
then I might as well use PSGML mode. However, Emacs will let me replace
your default bindings so whatever you want to do is fine. :-)

> That's the job of the language you're editing, unless you're
> suggesting that Emacs have its own structured format.  I'd prefer to
> develop a set of tools which can (at least) be used with different
> SGML or XML dtds, because they already take care of things like tocs,
> references, image inclusion, conversion, etc.  I think that developing
> something in emacs to take the place of things like DocBook would be a
> waste of time, esp since I'd have to end up writing translations into
> all that stuff.
> 

I think it will be a lot faster to develop a custom format, frankly. Those
specs are huge. I don't know about in Emacs; I would personally write this
as a standalone application. It is trivial to convert a tree structure to
HTML; you just walk the tree and spew an HTML equivalent for everything.
You don't need to do any parsing because it's in your own format. It's not
that much harder to do LaTeX output, though you have to worry more about
escaping special characters.

SGML and XML are *too general*. This problem is not very hard. It is
actually a very simple problem. LaTeX is a better model.

> OTOH, if all someone wants is a basic WP with formatting, I wouldn't
> have a problem extending enriched-text mode to do it.
> 

IMO we want something fundamentally structural; formatting is simply a way
to visualize the structure. This is why word processors are not good. They
are too flexible, because people want to be able to precisely position
things, have WYSIWYG, etc. But because of the flexibility they can't be
smart. They can't give you a nice structural view, they can't
automatically switch to the next style or structural block when you hit
space/period/enter, etc.

> > There should be nice word count, search, and other commonly-used features.
> 
> It's really surprising that Emacs doesn't have word count (XEmacs
> does) but it's easy to do.  Is there anything wrong with the various
> searches that Emacs already offers?
> 

Emacs searches are fine, I guess I was describing the app in general here.
If it happens to be implemented in Emacs some things will be preexisting.

> Would something like AUC-TeX for DocBook satisfy this need?  In other
> words, a set of tools which know lots about DocBook and can provide
> specific help for lots of different tasks?
> 

AUC-TeX is nice. Doing it for DocBook would certainly be a nice tool -
PSGML mode is already a cut at the problem - but I'm not sure it's what I
have in mind here.

For the book I just wrote, I invented a standalone XML format and wrote
the book with those tags. I just made up the tags I happened to need. 
Then I wrote a program to slurp the XML and spit HTML. I would like to be
able to do something similar, but without the hassle. :-)

I think the key to getting something useful would be to remain very
focused, have a clear vision, and keep it simple enough to finish in a few
months. If "DSSSL" enters your mind, you will never be done.

If I seem to have lots of opinions it's because I spent the whole
book-writing period fuming about how I'm going to write this before I ever
write any large document ever again. :-) So I have thought about it some.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]