Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: "Soft" hyphens

Reply
Thread Tools

Re: "Soft" hyphens

 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      06-24-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Is there a way to have "soft" hyphens or "soft" spaces in lines of
> text, lines which may have to break, depending on the width
> available? (By "soft" I mean a space or hyphen which disappears
> when not needed.)


This is a long story... the most comprehensive (ehem) discussion is
probably at http://www.cs.tut.fi/~jkorpela/html/nobr.html

> Example:
> Line of text:
> "informative/encouraging/discouraging/travelling/whatever"
>
> when what would be better is:
> "informative/encouraging/discouraging/travelling/
> whatever"


You can put the nonstandard <wbr> tag after each slash. Should cause no
harm, and mostly works (in the way you expect, it's normally invisible
but indicates a potential line break point).

But I would suggest the use of suitable _words_ instead of the hightly
ambiguous slash character. (The slash can mean 'and', or
'or alternatively', or 'alias', or 'with subtype', or 'per', or
something else.)

> The same with hyphens:
> "informative/encouraging/encouraging undoubtedly existentialistic
> antidisenstablishmentarianism"
>
> when what would be better would
> "informing/encouraging/encouraging undoubtedly existentialistic
> anti- disenstablishmentarianism"


There's no way that would do it without causing serious problems when
it does not work. The soft hyphen ­ is supposed, by current HTML
specifications, to act that way, and is supported by a considerable
number of browsers, but do you really want your words be shown with
normal hyphens "-" instead of the soft hyphen in a great many browsing
situations? (In special cases it is, e.g. if a word can be spelled with
or without a hyphen, by the rules of the language.)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Spaces to Hyphens in a URL Using Code-Behind cmd_17 ASP .Net 0 10-15-2007 08:27 PM
how to transform a list form of hyphens to an html unordered list ibiza ASP .Net 5 02-09-2006 04:10 PM
New coding standards: use underscores, hyphens or mixed case in command (and identifier) names James Harris C Programming 46 07-23-2004 03:25 PM
Re: "Soft" hyphens Augustus HTML 4 06-25-2003 10:58 PM
Re: "Soft" hyphens spaghetti HTML 0 06-24-2003 07:36 AM



Advertisments