Bug 82087 - FORMATTING: (Hyphenation) "Paragraph Styles > Text Flow > Characters at line end" lower limit is wrong for Greek language
Summary: FORMATTING: (Hyphenation) "Paragraph Styles > Text Flow > Characters at line ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.6.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:7.5.0 target:7.4.1
Keywords:
Depends on:
Blocks: Writer-Styles-Paragraph
  Show dependency treegraph
 
Reported: 2014-08-03 11:34 UTC by Spiros Georgaras
Modified: 2022-08-17 08:07 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
This is an example of the way the word ό-νει-ρο is incorrectly auto-hyphened and the way it should be (accomplished manually) (53.07 KB, image/png)
2014-08-03 11:34 UTC, Spiros Georgaras
Details
test document (27.98 KB, application/vnd.oasis.opendocument.text)
2014-10-27 01:06 UTC, Spiros Georgaras
Details
Screenshot of LO 4.3.2.2, auto hyphenation with libregreek.oxt (53.67 KB, image/jpeg)
2014-10-27 10:36 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Spiros Georgaras 2014-08-03 11:34:48 UTC
Created attachment 103902 [details]
This is an example of the way the word ό-νει-ρο is incorrectly auto-hyphened and the way it should be (accomplished manually)

Problem description: The lower limit of  "Paragraph Styles > Text Flow > Characters at line begin" is currently set to 2 characters. This may be correct for Latin languages but is incorrect for others (for example Greek and Ancient Greek).

Documents written in Greek are incorrectly hyphened when a word should be "separated" at the first letter. Cannot explain it better, please see attached image


Steps to reproduce:
1. Create a writer document
2. Enter Greek text
3. Turn auto-hypenation on
4. Observe the hyphenation of words like ό-νει-ρο, έ-λε-γα, υ-πό-θε-ση

Current behavior: Lower limit of "Characters at line begin" is set to 2

Expected behavior: Lower limit of "Characters at line begin" should be set to 1 - default value can still be 2

              
Operating System: All
Version: 4.2.6.2 rc
Comment 1 Spiros Georgaras 2014-08-03 11:57:53 UTC
Please substitute the word "begin" with "end" in the above Description. Sorry for the error...

So
  "Paragraph Styles > Text Flow > Characters at line begin"
should be
  "Paragraph Styles > Text Flow > Characters at line end"
etc.
Comment 2 Buovjaga 2014-10-26 12:31:34 UTC
Is this what I should be using to get the hyphenation support: http://extensions.libreoffice.org/extension-center/ancientgreek
I can't find modern Greek.
I could not get it to hyphenate at all when writing όνειρο over and over again.
Please provide an example document for testing.
Comment 3 Spiros Georgaras 2014-10-27 01:04:59 UTC
(In reply to Beluga from comment #2)
> Is this what I should be using to get the hyphenation support:
> http://extensions.libreoffice.org/extension-center/ancientgreek
> I can't find modern Greek.
> I could not get it to hyphenate at all when writing όνειρο over and over
> again.

You can use any of the following for Modern Greek
	- http://www.eikonical.com/libregreek.oxt
	- http://extensions.openoffice.org/de/node/1411/releases


> Please provide an example document for testing.

Attached...
Comment 4 Spiros Georgaras 2014-10-27 01:06:11 UTC
Created attachment 108484 [details]
test document
Comment 5 Buovjaga 2014-10-27 06:44:26 UTC
(In reply to Spiros Georgaras from comment #3)
> You can use any of the following for Modern Greek
> 	- http://www.eikonical.com/libregreek.oxt

Link doesn't work.

> 	- http://extensions.openoffice.org/de/node/1411/releases

This works.

Yet, I can't get it to hyphenate anything at all. Hyphenation is set to automatic for the paragraph, but no words get hyphenated.

Please, can someone else test?
Comment 6 Spiros Georgaras 2014-10-27 10:13:36 UTC
(In reply to Beluga from comment #5)
> (In reply to Spiros Georgaras from comment #3)
> > You can use any of the following for Modern Greek
> > 	- http://www.eikonical.com/libregreek.oxt
> 
> Link doesn't work.
> 

I just uploaded it on my hellug account. You can get it from here:
	- http://members.hellug.gr/sng/libregreek.oxt
Comment 7 Buovjaga 2014-10-27 10:36:09 UTC
Created attachment 108501 [details]
Screenshot of LO 4.3.2.2, auto hyphenation with libregreek.oxt

Thanks! That libregreek.oxt did the trick and I got hyphenation working.
I confirm the behavior you described.
Comment 8 QA Administrators 2015-12-20 16:08:55 UTC Comment hidden (obsolete)
Comment 9 Spiros Georgaras 2015-12-20 18:25:59 UTC
Hi,

I do confirm that the bug is still there

OS: Windows 8.1
Version: 5.0.4.2
Build ID: 2b9802c1994aa0b7dc6079e128979269cf95bc78
Locale: en-US (en_US)
Comment 10 QA Administrators 2017-01-03 19:46:59 UTC Comment hidden (obsolete)
Comment 11 Spiros Georgaras 2017-01-03 21:11:49 UTC
Hi,

I do confirm that the bug is still there

OS: Manjaro Linux
Version: 5.2.4
Comment 12 QA Administrators 2018-01-04 03:35:40 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2020-04-01 03:34:57 UTC Comment hidden (obsolete)
Comment 14 Spiros Georgaras 2020-04-01 10:22:50 UTC
I do confirm this is still valid.
Comment 15 QA Administrators 2022-04-02 04:49:52 UTC Comment hidden (obsolete)
Comment 16 Spiros Georgaras 2022-04-02 06:12:08 UTC
Still valid!

OS: Manjaro Linux
LO: 7.2.6.2
Comment 17 Julien Nabet 2022-07-29 08:02:01 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/137583
Comment 18 Julien Nabet 2022-07-29 08:05:23 UTC
László/Xisco/Heiko: I submitted a patch (see my previous comment) where I just change the minimum value, I let the by default value to 2.

I know just a little about hyphenation and so just followed the request of the bugtracker so don't hesitate to comment.
Comment 19 László Németh 2022-07-29 15:47:51 UTC
(In reply to Julien Nabet from comment #18)
> László/Xisco/Heiko: I submitted a patch (see my previous comment) where I
> just change the minimum value, I let the by default value to 2.
> 
> I know just a little about hyphenation and so just followed the request of
> the bugtracker so don't hesitate to comment.

Thanks, Julien, I'm going to check it next week. When I last modified this value, there was something illogical in it. I.e. it's possible to set the real default values in the hyphenation dictionary. It would be fine to show those values first time in the dialog window. But this could be an interoperability problem, too.
But if 1 is not a default value for Greek, maybe this is the quick and right solution. (For other languages, it would be fine to skip this later, because we don't want bad hyphenation - at least Hungarian hyphenation patterns allow and support value 1 (e.g. for syllabication), but not for hyphenation. So it would be fine to localize this somehow.
Comment 20 Heiko Tietze 2022-08-01 07:52:54 UTC
Some related discussion at bug 149248 and IIUC bug 149324 introduced the possibility.

CSS has the feature "hyphenate-limit-chars" to limit word length and number of characters before and after with the suggested default of 5,2,2 [1].

German disallows to split a single character [2] but English allows to have the prefix separated. And "a-political" is apparently correct [3]. It's likely not recommended [4] but I don't know a trustworthy source.

And to summarize, it makes sense to allow a single character but it should not be the default. +1 to the patch.

[1] https://medium.com/clear-left-thinking/all-you-need-to-know-about-hyphenation-in-css-2baee2d89179
[2] https://www.duden.de/sprachwissen/rechtschreibregeln/worttrennung
[3] https://www.grammarbook.com/punctuation/hyphens.asp
[4] http://www.butte.edu/departments/cas/tipsheets/punctuation/hyphen.html
Comment 21 Commit Notification 2022-08-07 14:56:43 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/569fb42dab88cc9e1a392271a34879afa9d7cc5b

tdf#82087: hyphenation: allow 1 character at line end for Greek

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 László Németh 2022-08-07 14:59:32 UTC
@Spiros, Buovjaga, Julien, Heiko: thanks for the bug report, QA and review!

@Julien: thanks for the fix!

It seems: ancient Greek and its TeX hyphenation patterns allow to hyphenate before the last letter, too:

https://hal.archives-ouvertes.fr/hal-02100339/document
Comment 23 Tex2002ans 2022-08-07 17:06:30 UTC
> It seems: ancient Greek and its TeX hyphenation patterns allow to hyphenate before the last letter, too

Hyphenation.org is the source for typographically-correct left/right hyphens for each language:

- http://www.hyphenation.org/tex#languages

(These are the left/right numbers that have been used in TeX for decades.)

Many languages use the default of 2/2, but there are exceptions... For example:

- English = 2/3
- Armenian = 1/2
- Ancient Greek = 1/1

For example, in US English:

- mem-o-ry

valid hyphenation points are based on syllables, but:

- mem-ory

would be the "typographically correct" hyphenation, because of right = 3.

- - - - -

Side Note: Over the years, I've also extensively described hyphenation in the case of ebooks / HTML+CSS:

- https://www.mobileread.com/forums/showthread.php?p=4177381#post4177381
- https://www.mobileread.com/forums/showthread.php?p=4133513#post4133513

Things have been getting better on that front, and I'm so excited to see these new hyphenation options finally being added into LibreOffice 7.5. :)
Comment 24 Julien Nabet 2022-08-07 20:21:03 UTC
(In reply to László Németh from comment #22)
> ...
> It seems: ancient Greek and its TeX hyphenation patterns allow to hyphenate
> before the last letter, too:
> 
> https://hal.archives-ouvertes.fr/hal-02100339/document

I submitted a patch for this on master sources:
https://gerrit.libreoffice.org/c/core/+/137937
Comment 25 Commit Notification 2022-08-09 16:08:56 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/6808b76deb2adccc2a10dc2d02a2813a08027be5

tdf#82087: hyphenation: allow 1 character at line end for Greek

It will be available in 7.4.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 26 Commit Notification 2022-08-16 12:33:55 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/13971f0619192deb3f1f1cf5ff30f9671ed25a38

Related tdf#82087: hyphenation: allow 1 character at line begin

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 Commit Notification 2022-08-17 08:07:35 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/7dbdcf31cd6af9bc9f2f3db57a6e020ddd767bfb

Related tdf#82087: hyphenation: allow 1 character at line begin

It will be available in 7.4.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.