Jack Yan
Global  |  Leadership  |  Experience  |  Media  |  Videos
Blog  |  Gallery  |  Contact
 
  Follow me on Mastodon Follow me on Twitter Check out my Instagram account Follow me on Drivetribe Follow me on Linkedin Follow me on Weibo Subscribe to my blog’s RSS feed  

 

Share this page




Quick links


Surf to the online edition of Lucire
Autocade, the car cyclopćdia

 




Add feed


 

The Persuader

My personal blog, started in 2006. No paid or guest posts, no link sales.



« | »

05.08.2022

Laying out French articles in HTML takes a long time


Above: Some French text in Lucire.
 
Regular Lucire readers will have seen a number of articles run in English and French (and one in Japanese) on our main website. Typographically, the French ones are tricky, since we have to distinguish between non-breaking spaces and non-breaking thin spaces, and as far as I know, there is no code for the latter in HTML. Indeed, even with a non-breaking space, a browser can treat it as it would a regular space.

So what’s our solution? Manually, and laboriously, putting in <NOBR> tags around the words that cannot be broken. It’s not efficient but typographically, it makes the text look right and, unless we’ve missed one, we don’t have the problem of guillemets being left on a line by themselves without a word to attach to.

The language is set to fr in the meta tags.

Among our French colleagues, I have seen some go Anglo with their quotation marks and ignoring the traditional French guillemets. Others omit any thin spaces and, consequently, adopt the English spacing rules with punctuation. For some reason, I just can’t bring ourselves to do it, and maybe there is an easier way that we haven’t heard of. I hope nos lecteurs français appreciate the extra effort.

Related posts

Filed under: business, design, interests, internet, media, publishing, technology, USA, Wellington—Jack Yan @ 10.38

Leave a reply