Re: <NOBR> - Returning to the question....

Hi,

On Sun, Apr 04, 2004 at 06:52:35PM -0400, Jewett, Jim J wrote:

> > I'm still in search of any example for either: - A situation where
> > something inside <code> (even in my broad defnition) is definitely
> > desirable to have normal line breaking rules appiled, or
> 
> The only time it is ever desirable -- even for normal text -- is when
> treating the input as preformatted causes awkward line lengths.  For
> some types of code, awkward lengths are an acceptable tradeoff.  
> 
> In other computer languages (such as Lisp), the line break isn't very
> meaningful, and I would like it rebroken if I'm reading on a narrow
> screen.

Automatic rebreaking of *any* kind of code doesn't look like a good idea
to me -- even with languages where this doesn't strictly change the
meaning. Note that even when blank space is ignored in many languages,
it's still (or actually even more so) used to make the code more
readable. Also, the normal line breaking rules would just make no sense
in Lisp or anything that is not natural language.

Narrow screens are obviously an issue, but could be handled by CSS. Or
better even, this behaviour shouldn't be dictated by the author at all.
It should be a user preference.

Note that in most plain text editors and viewers, the user can choose
between a mode with autmatically wrapped lines, and one with side
scrolling. Also, the wrapping mode usually doesn't even try to apply any
"smart" line breaking rules (which don't make any sense for anything but
natural language anyways, s.a.), but simply wrap the lines at the screen
end, visually indicating this "forced" break. That's considerably less
confusing.

This behavious is not only the simplest, but really the only reasonable
one for handling code.

> > - A situation where something outside <code> (i.e. natural language)
> > definitely shouldn't have normal line breaking rules applied
> 
> Haiku. 

?

> <line> (or <l>) would be better for poetry, but it clearly isn't code.

That's another issue. I wonder (already for a while) whether <l> should
have "nobr" by default. Probably yes. After all, if something is marked
up as a "line", the user should also see it as a contiguous line...

Optimally, a user agent should still wrap long lines (according to
normal line wrapping rules, as it is not <code>), but indicate this to
the user. (e.g. by indenting the continuation line.)

-antrik-

Received on Friday, 9 April 2004 09:35:41 UTC