Re: Spacing (was IMG in PRE?)

You, Walter Ian Kaye wrote:
++ 
++ >Scott E. Preece <preece@predator.urbana.mcd.mot.com> wrote:
++ >
++ >    ...Another mode that would be extremely useful is
++ >            1. proportional type
++ >            2. no autofilling
++ >            3. preserve whitespace as provided (either by keeping
++ >            as individual space characters or by tabbing to the
++ >            indicated depth)
++ >    In addition to the obvious use for poetry, this would be good for
++ >    code, for those of us who believe code should be pretty-printed,
++ >    rather than monospaced....
++ >
++ >This is not good enough.  For one thing, "preserve whitespace" is not
++ >well defined unless you calculate it assuming that all letters are of
++ >maximal width (1 em).
++ 
++ One thing we definitely need, at least for representing computer source
++ code, is the ability to prevent collapsing multiple spaces. If I need to
++ display a literal of "qd  " (4 characters, spaces significant), it must
++ NOT get munged by the browser. What I have to do currently is place a
++ comment next to it, stating that there are two spaces there. I tried
++ using <pre> and <tt> and <code> -- none were satisfactory (<tt> and
++ <code> did not prevent collapsing, and <pre> added line breaks and was
++ therefore unusable inline).

In other messages, it was already stated that in a proportional font,
interword spaces can vary. Now, if one would allow "qd  " to appear
inside otherwise proportional text, how should one distinguish two
"normal" spaces from a normal interword space which might have the same
width?

As for you example, a person might be able to distinguish between
one and two spaces (if it's known they use a fixed width), but
the difference between two and three or three and four will be
difficult, and one might need the comment after all.

Alternatively, one can put the whole source code inside <pre>, which
makes it much easier to (vertically) align parts as well.


Abigail


-- 
<URL: http://www.edbo.com/abigail/>

Received on Tuesday, 14 May 1996 20:14:19 UTC