Typography: non-breaking space
I was thinking about web typography. There are many websites that talking about this problem. But one of the most important for me is a non-breaking space issue. Here you can find example that showing how to use it.
I'm a TeX user. TeX can't automatically insert non-breaking spaces. User must do it. But this is very good in my opinion. For example, when I try to type initial and surname: L. Torvalds, it will be good to type this like: L.~Torvalds, where titde (~) mean non-breaking space. You can see how it can looks if don't:
About 2% of the current Linux kernel is written by L. <--- Initial at the end of line
Torvalds himself.Of course there is no (and can't be) automatic mechanism that will recognize, that "L." is a initlial and "Torvalds" is a surname, so can't automatically insert non-breaking space.
I need to publish many texts and expect that will looks good. In my opinion, the best way is to let user type tildes and turn it into non-breaking spaces when displaying text. Non-breaking spaces must stay and looks noteceably in source text, so we can edit this text with this non-breaking and normal spaces. Now, there is two way to insert non-breaking space: HTML tag or Unicode U+00A0 char (don't work for me). But both are bad becouse this must be some visible and discreet char. If we type: L. Torvalds, this looks very illegible.
So what you think, is this feature needed in Drupal and how to implement this?

How about
How about using "^" instead of "~"? "~" is used in home directory names and might result in urls not working.
You could create a new filter of hack one that you use already to make this translation for you.
Have you seen this?
http://drupal.org/project/reptag
"^", "~", or maybe "_"? It's
"^", "~", or maybe "_"? It's hard to say, all of this chars can be enter in URLs. We need some inteligent way to ignore our special char in URLs. Filters are really good point to start, you have right.
But I'm still curious about how many people are intersted in this feature. I'm curious becouse very important for me is that many other people use some feature. Then I know that my efforts are reasonable and no in isolation. Why so many people accept that websites looks much worse than books? Is there a chance to change it, to provide this feature into Drupal core?
typogrify
There's an input filter called Typogrify that performs some aspect of these niceties for Drupal. However, it does not do anything special for initials.
To be semantically correct in HTML4 and XHTML, you can use the ABBR tag, but that doesn't tell you what to do with the text that follows the abbreviation. You'd have to use a CSS selector like:
<abbr title="Linux">L.</abbr> Torvalds
abbr:after { content: " " }
That CSS is not tested, by the way. It's off the cuff. And it doesn't work in IE.
You could simply wrap your names with initials in a with a class where white-space is set to nowrap. That is probably the most reliable way to accomplish this.
The point is that I really
The point is that I really don't believe in automatic method. Already exists some programs that trying to insert non-breaking space automatically, for example PHP SmartyPants Typographer.
But to insert non-breaking space corectly sometimes we need to understand meaning of words or even all sentence. Computer can't do that, even if we use some semantic tag, computer can't think out how two words are connected. As far as I know there is no good method to resolve this issuse in DTP programs, except non-breaking space inserted by hand or automatically only in typical situations.
I think that simpler and more clean way is just non-breking space between words that should stay together.
I think that
I think that http://drupal.org/project/reptag is your best bet. You can assign any code that you want to be the one that make the Non Breaking Space get inserted. Something like ".!" or ".~" would be a good marker.
See screenshots here
http://www.profix898.de/index.php?q=gallery&g2_itemId=40560
Unicode character
Thank you vsr and bangpound for suggestions. After my reflections and corespondence with Michel Fortin (PHP SmartyPants developer) I want to describe what I learned. This is my last e-mail to Michel: