Thanks for your code snippet. Some ruminations....
I noticed that Mozilla flows monospaced text perfectly in its message
composition window.
I've been using GNU Emacs and then XEmacs since the late '80s and I am
also a heavy user of LaTeX. The problem is that the world is moving away
from monospaced text editors and toward multi-font, proportionally
spaced text with embedded graphics, etc.
I find it painful to read and answer an HTML-formatted email message
with XEmacs+MH-E.
XEmacs and TeX are similar in that part of their internal models are
obsolete. Why should we read monospaced text? Isn't that just a holdover
from ASR-33 teletype machines, just like 80x24 is? We don't use
monospaced type when we set books, and the typography of Don Knuth's
code (not the literate programming stuff, just the code) in his book
MMIXware is pleasantly readable. Why should my choice of width and
margins be your choice of width and margins?
(TeX has a different problem: it's a batch system.)
--- Vladimir
P.S. It's Notepad, not Memopad. The reason I mentioned Notepad is that
it is the most brain-dead text editor (excluding vi, of course ;-) I
know of, and yet it flows monospaced text nicely. Microsoft Write is a
simple WYSIWYG editor that handles multi-font, proportionally spaced
text well. I don't use either of them, unless I have to.
------------------------------------------------------------------------
Vladimir G. Ivanovic
http://leonora.org/~vladimir
2770 Cowper St. vladimir(a)acm.org
Palo Alto, CA 94306-2447 +1 650 678 8014
The lyfe so short, the craft so long to learne. -- Chaucer
>>>> "SJT" == Stephen J Turnbull
<stephen(a)xemacs.org> writes:
>>>> "Vladimir" == Vladimir G Ivanovic
<vladimir(a)acm.org> writes:
Vladimir> The other is not being able to handle multiple,
Vladimir> proportionally spaced fonts on a single line along with
Vladimir> different styles (bold, italic, etc.)
>> What do you mean by "not handle"?
Vladimir> How do I create and display text that has "Times Roman"
Vladimir> in Times Roman and "Helvetica" in Helvetica?
There are a number of alternatives, depending on your application.
XEmacs is not a wordprocessor, and it is unlikely to become one any
time soon. I don't think any of the developers have much interest in
doing that, and creating a redisplay that could handle accurate
positioning, pagination, and all the rest would have to be done from
scratch.
It would not be hard to produce something that allows you produce
Memopad-quality printed output most of the time, and not too much
harder to do as well as Memopad all the time. But I don't think there
are very many Emacs users who care. Most people who use Emacs prefer
to use a real text justifier like TeX or troff for camera-ready copy,
HTML for web pages, and so on. If you really want WYSIWYG, use Word
or Framemaker or one of the *nix compatibles. If you want a
semi-realistic display in XEmacs of what LaTeX will do very nicely,
you can use preview-latex or AUC-TeX and customize the faces they use.
PSGML will do the same for *ML documents. And if you just want to do
it in XEmacs
(progn
(make-face 'tr "Times-Roman")
(set-face-font 'tr
"-adobe-times-medium-r-normal--*-120-*-*-*-*-iso8859-15")
(make-face 'hv "Helvetica")
(set-face-font 'hv
"-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-iso8859-15")
(let ((here (point))
tre hve)
(insert "Times-Roman")
(setq tre (make-extent here (point)))
(set-extent-face tre (find-face 'tr))
(insert " ")
(setq here (point))
(insert "Helvetica")
(setq hve (make-extent here (point)))
(set-extent-face hve (find-face 'hv))))
does the trick. (The Windows version of the font name would be more
compact, but otherwise the code is the same.)
Granted, it wouldn't be hard (merely tedious) to cook up a
library to
allow you to do that operation the same way that Memopad allows you to
do it. Why do we make it so "hard"? Because that's not what XEmacs
is for. Typically the more complex text processing tasks already
involve setting extents to delimit logical units of text, so you don't
need to make an extent, just grab the appropriate one. And logical
units (such as emphasis or comment or docstring) can be shared among
applications, so such common semantics typically already have faces
associated with them.
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.