Inserting non-breakable space between articles & words
-
Hi, thank you for this plugin, I truly appreciate it (gave you a review too). Was thinking of how great would it be to detect articles and insert non-breakable spaces between them and their own words 🙂 (Insert non-breaking space after “an” in “an orange”) I think this might be language-specific though. (Happy to give you any help for Czech).
-
Thanks for the suggestion. Is that an actual typographic rule in Czech or just a personal preference? While I can see the benefits of such a feature for ragged margins, I think it would clash hyphenation (functionally, not technically).
Also, for final lines in a paragraph, we already have something similar in the widow protection feature.
It’s a good typography attitude when setting Czech text, to not leave the articles hanging at the end of the line, detached from the word (if they’re short, like “v” “na” “s”) and so on.
Ah yes, if a language has a lot of one-letter articles, this makes sense. I wouldn’t do it in German, though (where all non-elided articles have at least three letters).
Could you please open a feature request with some details for Czech on GitHub? Implementation will need some thought (the setting probably needs to be language specific, like hyphenation).
Sure, very happy to write feature request. I’ve found a good resource with all the rules in Czech, so happy to translate it if that helps.
Yes, please!
@petrchutny: Have you found to the time to do the write-up?
@pputzer thanks for reminder 🙂
Here are the rules:
Czech rules for preventing line-breaks to prevent disruption in reading flow
You shouldn’t break the line in inter-word space, when they’re used to/in:
• connect consonant articles k, s, v, z with following word. E.g “k mostu”, “s bratrem”, “v Plzni”…
• connect wovel articles o, u, & a, i with following word. E.g “u babičky”, “o páté”
• chunk numbers. (This can apply to all languages IMO) – 2 500, +44 634 4534 435
• space the number and unit – e.g. “50 %”, “# 26”
• between number and month and year – “16. ledna 1972”
• connecting abbreviations – ISO 9001
• in between abbreviations like tzn. (tzn. = czech version of “that means”). e.g. “tzn. klikání”
• In between title of a person and the name – p. Čečetková (= Mrs. Čečetková)Hope it’s kind of understandable 🙂 It’s a lot of rules and if you are willing to implement all of them then I’ll have a lot of respect! (and many Czech people will surely appreciate this). Will share your plugin to the world a bit 🙂
It’s not really possible to do all of them in an automated way, in some cases you will always have to manually insert
to get the desired result:- connect consonant articles k, s, v, z with following word. E.g “k mostu”, “s bratrem”, “v Plzni”…
I can add a language-specific setting for this. - connect wovel articles o, u, & a, i with following word. E.g “u babičky”, “o páté”
I can add a language-specific setting for this. - chunk numbers. (This can apply to all languages IMO) – 2 500, +44 634 4534 435
I’ll think about it. There already is a GitHub issue to add automatic thousand separators to numbers, but it’s hard to do in a nice (i.e. semantic HTML) way. - space the number and unit – e.g. “50 %”, “# 26”
That’s already implemented for units if you write them like50%. - between number and month and year – “16. ledna 1972”
Not really possible in a generic way, you would also have to know inflected forms of all month names. - connecting abbreviations – ISO 9001
I might support a limited number of special cases, but again, hard to do generically. - in between abbreviations like tzn. (tzn. = czech version of “that means”). e.g. “tzn. klikání”
No way to do that generically. - In between title of a person and the name – p. Čečetková (= Mrs. Čečetková)
No way to do that generically.
-
This reply was modified 9 years ago by
pepe.
I see, ok 🙂 I already carry this awareness in myself, so it’s no problem. And your epic plugin can take care of the rest, like good hyphenation and so on 🙂 Thanks again for making it!
Just a clarification: Am I correct to assume that the consonant and vowel articles can both be capitalized at the beginning of a sentence? For example, could a sentence start like
U babičky ...?@petrchutny: I’ve opened two GitHub issues 111 & 112. Let’s continue the discussion there.
@petrchutny: Regarding Czech articles, have you tried enabling
Single character wordsin theSpace Controltab? It applies to all single letter words, but that should be sufficient for most cases, no?@pputzer: Yep, they can be capitalized. Thanks for looking further into this. The “Single Character Words” will help a lot and solve most problems, thank you! Very happy with your plugin 🙂
- connect consonant articles k, s, v, z with following word. E.g “k mostu”, “s bratrem”, “v Plzni”…
The topic ‘Inserting non-breakable space between articles & words’ is closed to new replies.