GNU TeXmacs - Bugs: bug #60284, Hyphenation doesn’t work with...
You are not allowed to post comments on this tracker with your current authentication level.
bug #60284: Hyphenation doesn’t work with Russian language (only)
Submitter: | Vladimir <vcheese> | ||
Submitted: | Wed 24 Mar 2021 12:17:45 PM UTC | ||
Category: | Editor | Priority: | 5 - Normal |
Item Group: | Error | Status: | In Progress |
Privacy: | Public | Assigned to: | vdhoeven |
Originator Name: | Open/Closed: | Open | |
Release: | None | Release: | 1.99.19 |
Fixed Release: | None | Fixed Release: | |
Keywords: |
Jump to the original submission
Thu 20 May 2021 09:55:30 PM UTC, comment #7: |
Jeroen Wouters <jeronim> |
Mon 26 Apr 2021 02:53:37 PM UTC, comment #6: Thanks, that seems to fix it! |
Jeroen Wouters <jeronim> |
Mon 26 Apr 2021 11:18:49 AM UTC, comment #5: I reviewed the Unicode hyphenation code (which I did not write) and noted that it indeed uses a different encoding, not only internally (which is reasonable), but also in the external interface (which is very annoying).
|
Joris van der Hoeven <vdhoeven> |
Thu 08 Apr 2021 09:49:56 PM UTC, comment #4: It seems that the problem lies in the "shorter_box_rep" class in "src/Typeset/Boxes/Modifier/modifier_boxes.cpp", which is the type of box used for the first part of a hyphenated word.
|
Jeroen Wouters <jeronim> |
Thu 08 Apr 2021 01:09:00 PM UTC, comment #3: Thanks for including the patch. After some further testing it seems that unfortunately there is an additional problem.
|
Jeroen Wouters <jeronim> |
Wed 24 Mar 2021 11:10:28 PM UTC, comment #2: I believe the attached patch fixes the problem. Lowercasing is also enabled for the exception case as the exception lists. I can't find a reference for the casing in the exception list, though. It would be good to verify what the convention for German is as words are written with a starting uppercase letter. |
Jeroen Wouters <jeronim> |
Wed 24 Mar 2021 10:15:51 PM UTC, comment #1: This bug seems to be due to the use of the "locase_all" function in "src/System/Language/hyphenate.cpp"
to
results in hyphenation of lowercase words. It seems "locase_all" can't handle Cyrillic characters. |
Jeroen Wouters <jeronim> |
Wed 24 Mar 2021 12:17:45 PM UTC, original submission:
I done everything which in Help → Notes for users of Cyrillic languages:
|
Vladimir <vcheese> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2021-05-20 | jeronim | Attached File | - | Added hyphen-russian-ctd.diff, #51456 | |
2021-04-26 | vdhoeven | Status | None | In Progress | |
2021-04-08 | mgubi | Assigned to | None | vdhoeven | |
Carbon-Copy | - | Added jo | |||
2021-03-24 | jeronim | Attached File | - | Added hyphen-russian.diff, #51134 | |
2021-03-24 | vcheese | Attached File | - | Added test.tm, #51126 | |
Attached File | - | Added Screenshot_20210324_183615.png, #51127 | |||
Carbon-Copy | - | Added -email is unavailable- |
Powered by Savane 3.13-758e.
Corresponding source code
It was pointed out on the forum that hyphenation in Russian is not following the proper rules for the language [1]. Upon inspection there a few more issues with the calculation of hyphenation penalties.
The attached patch `hyphen-russian-ctd.diff` fixes the problem, but seems to make the editor sluggish in long paragraphs in Russian. Perhaps it can be optimized further.
[1] http://forum.texmacs.cn/t/hyphenation-doesnt-work-with-russian-language-only/384/28
(file #51456)