- From: <olafBuddenhagen@web.de>
- Date: Mon, 19 Apr 2004 22:56:39 +0200
- To: www-html@w3.org
Hi, On Mon, Apr 12, 2004 at 11:02:51AM -0400, Jewett, Jim J wrote: > Even with plain text, automatic rebreaking is bad -- for instance, it > can mess up the ">" quote indicators. Is '>' officially used as a quote in any natural language? If so, than probably it's handled in Unicode correctly. (Or it is a bug in Unicode...) > (And if you special case that, what about "Olaf >"?) What about that? > (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. Personally, I'd prefer the latter. But that's not really the point. The point is: Assuming the wrapped version is better -- how would you handle it? The only feasible way would be the author manually inserting possible break positions -- by default it would have to be treated as nonbreakable still. > > Narrow screens are obviously an issue, but could be handled by CSS. > > It never is, though. Probably because it's not worth the effort. > > 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"? Actually, there is none. <pre> is presentational, and needs to go in favor of <blockcode>. (Or just <code> if the block/inline distinction is abdanoned.) > > 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. I correct myself: In most *good* plain text editors and viewers :-P > > 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." Smart indenting is quite common in good code editors, but I've never used one that automatically wraps the code... (This would also be the first thing I'd turn off if I were confronted with such a "feature".) > This is because the rules for line-breaking in computer languages are > typically much simpler, and include indentation guidelines. But it requires knowing the specific rules for every possible language. This is neither desirable nor feasible in a browser. > >>> - 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. Yes, I already admitted that poetry is a special case. However, <l> is for this. Any example where neither <code> nor <l> is applicable? -antrik-
Received on Monday, 19 April 2004 20:05:00 UTC