Reply to Re: Hyphens and IE, an observation

Your name:

Reply:


Posted by Jukka K. Korpela on 10/25/07 23:07

Scripsit Dylan Parry:

> Safalra (Stephen Morley) wrote:
>
>> it's also difficult for an algorithm to tell that there should be an
>> en-dash in the phrase "the letters B-Z occur after A" but a hyphen in
>> the phrase "the B-Z reaction demonstrates non-equilibrium
>> thermodynamics".
>
> Hmm, if the "B-Z" in the second example of some sort of compound noun,
> then it would be correctly written with an en-dash as the hyphen
> should only be used in compounds where the meaning of the words
> involved are changed by one another.

This depends on the human language and its rules, as well as the meaning of
the expression.

> For example, "Bose-Einstein" should use an en-dash, as opposed to
> "American-football player" which should use a hyphen.

In some forms of English, yes. There's not much to be said about this in
terms of HTML authoring. You just find out or decide which rules to follow,
and then use the appropriate characters.

Oh well, there's one point worth mentioning I guess. Browsers such as IE
treat any hyphen as allowing a line break after it, so "B-Z" might be broken
into "B-" at the end of a line and "Z" at the start of the next line. But
the same may happen for an expression using the en dash, and you generally
need to use markup or CSS to avoid these problems, such as
<nobr>B-Z</nobr> (nonstandard but simple)
or
<span class="nobr">B-Z</nobr>
with
..nobr { white-space: nowrap; }

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация