koreader / crengine

This is the KOReader CREngine fork. It cross-pollinates with the official CoolReader repository at https://github.com/buggins/coolreader, in case you were looking for that one.
70 stars 45 forks source link

Allow hyphens after Russian "не" prefix #561

Closed dmalinovsky closed 5 months ago

dmalinovsky commented 5 months ago

I'm not sure why it was prohibited before. Looking at the modern Russian hyphenation rules, it's perfectly allowed, even recommended to add hyphens after prefixes.

I've tested on my device, and it looks better with this change. You can see how the word spacing has improved:

Before After
Bonus image!

This change is Reviewable

poire-z commented 5 months ago

Pinging our hyph.patterns wizard @cramoisi to confirm it is fine to go from не8 to не1 (and not to не7 or не9) to allow such hyphenation (while, I guess, still avoiding any other more precise pattern like не4не if we don't want to hyphenate нененене). (I guess we both can't read Russian and would pronounce that héhéhéhé :) )

dmalinovsky commented 5 months ago

Well, "не-не" is also an acceptable hyphenation. :) I made it with lowest priority so it could be overridden by more specific rules.

dmalinovsky commented 5 months ago

It reads "ne" :)

cramoisi commented 5 months ago

Hi :-) @poire-z Odd numbers are there to allow hyphenation. Even numbers to forbid it. So going form 8 (higher non hyphen priority) to 1 ( lowest hyphen priority) is perfect for it won't conflict with other rules.

Abradoks commented 2 months ago

This is a common sense typographical rule. "Не" is a negative prefix or particle, so separating it makes the text easy to be misread:

Недопустимы неблагозвучные переносы, а также переносы, ведущие к двусмысленному прочтению текста, способные запутать читателя, привести к недоразумениям, нарушить нормальный процесс чтения. Например, нельзя отделять отрицание «не» от следующего слова или переносить конечный слог «не» какого-либо слова в другую строку, если далее следует глагол https://print-standart.ru/printing-reference/174-technical-rules-of-typing https://www.nrap.ru/pub10_90_1_1054.html

I suggest reverting this change.

dmalinovsky commented 2 months ago

@Abradoks, thanks for the reference, it looks I didn't research this thorough enough. I'll revert this change.

And anyway, there's also algorithmic hyphenation as an alternative, it works pretty well for Russian.