W3C home > Mailing lists > Public > www-html@w3.org > April 2004

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

From: Jewett, Jim J <jim.jewett@eds.com>
Date: Mon, 12 Apr 2004 11:02:51 -0400
Message-ID: <B8CDFB11BB44D411B8E600508BDF076C1E96D459@USAHM010.amer.corp.eds.com>
To: "'olafBuddenhagen@web.de'" <olafBuddenhagen@web.de>, www-html@w3.org

> Automatic rebreaking of *any* kind of code doesn't
> look like a good idea to me -- even with languages

Even with plain text, automatic rebreaking is bad --
for instance, it can mess up the ">" quote indicators.
(And if you special case that, what about "Olaf >"?)

	(defun foo (x, y)
	   (+ x y))

is much better than 

	(defun foo (x, y) (+ x y))

if the latter scrolls off the (very small) screen.

> Narrow screens are obviously an issue, but could be
> handled by CSS. 

It never is, though.

> Or better even, this behaviour shouldn't be dictated
> by the author at all. It should be a user preference.

This isn't always so easy.  But even in the perfect
world -- what is your intended difference between
"code" and "pre"?

> 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.

Not easily, in the most-used editors and viewers.

> 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.), 

smart wrapping works better for code that for natural
language, in my experience.  With natural langauge, it
isn't clear which breaks are "real", so you don't know
how disjointed
your text will appear on someone else's screen.

On the other hand, an editor which does not do some form 
of smart wrapping no longer qualifies as a "code editor"
in many languages; it is just an "editor."  This is because
the rules for line-breaking in computer languages are 
typically much simpler, and include indentation guidelines.

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

> ?

A type of poetry defined largely by the metre; changing the 
line breaks would change the per-line syllable counts -- and 
cause it to no longer be Haiku.

-jJ
Received on Monday, 12 April 2004 11:04:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:00 GMT