Thread: Regex examples
View Single Post
Old 03-28-2012, 09:04 PM   #26
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,310
Karma: 2385865
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

I have one wish that could be of interest for French users. We currently use   before the following punctuation signs : ; ! ? and inside the French quotes and before an endnotes call. Seven possible occurences (at least for punctuation purposes, because there are other uses of this entity).

However, our typographic rules suggest to use - preferably - a narrow no-break space that we call "espace fine insécable".

When? Before the three following double punctuation signs ; ! ? and inside the French quotes and before an endnotes call. Six possible occurences.

However, this entity is mishandled by ADE and other -old generation- ebook-readers, even if we use appropriate fonts. So, for the time being, it's a little useless.

That's why, meanwhile some people try to emulate this narrow no-break space from the no-break space. I found two CSS solutions for this. Admittedly they are not optimal because they will leave a lot of spans. At least, it's a choice.

L'émulation 1
texte<span class=«fine»>&nbsp;</span>texte
Code CSS:
.fine {font-size: 30%;}
L'émulation 2
</span class=«fine»>&nbsp;</span>
Code CSS:
.fine {display:inline-block;width:0.125em}

I would like to have an advice which of the two seems better?
I also would like to use one Regex to search and replace &nbsp; using one of the two span classes above.

If I make a plain search and replace, it would have to be played six times. I hope there is a Regex to wrap everything and play it only once.

Phew, it was a long post but I tried to be clear. Thank you for your help.

Last edited by roger64; 03-29-2012 at 12:40 AM.
roger64 is offline   Reply With Quote