Bug 44314 - HYPHENATION: Non-standard hyphenation patterns don't work with manual hyphenation
Summary: HYPHENATION: Non-standard hyphenation patterns don't work with manual hyphena...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-30 03:58 UTC by jmontane
Modified: 2015-01-22 15:33 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Text with Catalan and Hungarian words showing differences at hyphenation methods. (11.39 KB, application/vnd.oasis.opendocument.text)
2011-12-30 03:58 UTC, jmontane
Details
Test document (36.71 KB, application/vnd.oasis.opendocument.text)
2014-01-30 14:43 UTC, László Németh
Details
fixed and new non-standard hyphenation (screenshot) (124.35 KB, image/png)
2014-01-30 15:11 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jmontane 2011-12-30 03:58:33 UTC
Created attachment 54971 [details]
Text with Catalan and Hungarian words showing differences at hyphenation methods.

Problem description: Non-standard hyphenation patterns (those that involve changes in characters, like Hungarian 'pressze', hyphenated 'presz-sze', or catalan 'paral·leles',hyphenated 'paral-leles') work well when hyphenation is activated automatically, i.e., from the 'Text flow' tab in the paragraph format options. But when hyphenation is activated manually, i.e., with the 'Tools/Language/Hyphenation' menu entry, non-standard patterns don't work, and words are wrongly hyphenated.

It has been tested with Hungarian and Catalan patterns from Ubuntu dictionaries and OOo extensions site. With Linux and Windows 3.4.4

Steps to reproduce:
1. Open LibOffice Writer 3.4.4
1. Create two paragraphs with the same text, forcing hyphenation at non-standard rule.
2. Hyphenate the 1st paragraph automatically.
3. Hyphenate the 2nd paragraph manually.

Current behavior: 1st paragraph is well hyphenated, but 2nd paragraphs doesn't break words at points where non-standard rules aply.

Expected behavior: Both methods must provide the same output.
Comment 1 jmontane 2012-11-27 17:06:04 UTC
Hi,

any improve in this issue? Can any developer take care of it?

Authomatic hyphenation works fine, so there is some difference with manual hyphenation.

Best regards,

Joan Montané
Comment 2 László Németh 2012-11-28 00:09:33 UTC
“Manual” hyphenation uses soft hyphen characters (“optional hyphen” in LibreOffice), but this is not compatible with the non-standard hyphenation. I can imagine a reverse method: switch on automatic hyphenation for the given paragraph or document and check/modify all automatic hyphenation points (including non-standard ones) manually. In my opinion, the result would be better.
Comment 3 jmontane 2012-11-28 08:31:42 UTC
Yes, this could be a good approach.

Maybe "hidding" manual hyphenation and "promoting" automathic one in LibO menu is a good starting point.
Comment 4 László Németh 2012-11-28 14:54:03 UTC
(In reply to comment #3)
> Yes, this could be a good approach.
> 
> Maybe "hidding" manual hyphenation and "promoting" automathic one in LibO
> menu is a good starting point.

An extra menu item (automatic hyphenation) would help. Also the Writing aids option “hyphenation without inquery” would have to use automatic hyphenation, not (sporadic) insertion of optional hyphens resulting hyphenation errors (not only for missing non-standard, but standard hyphenation points, after text modification).
Comment 5 Commit Notification 2014-01-30 13:58:21 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e63923b0334ae381e0fcc576a6b6e08a62e657cf

fdo#44314 non-standard hyphenation at soft hyphens + with pers. dic.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2014-01-30 14:23:31 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bcfa89158e1ce8cecf9c078ef852225180472a55

fdo#44314 non-standard hyphenation (fix previous commit)



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 László Németh 2014-01-30 14:43:15 UTC
Created attachment 93059 [details]
Test document
Comment 8 László Németh 2014-01-30 14:56:29 UTC
Now LibreOffice uses (1) non-standard hyphenation at soft hyphens, and (2) user-defined dictionary items with the new non-standard soft hyphen annotation (with soft hyphens and automatically, enabled by Format->Paragraph->Text flow->Hyphenation->Automatically).

The attached test document works with the following dictionary items, added to the Standard user-defined dictionary (Tools->Options->Language settings->Writing Aids->User-defined dictionaries->Standard [All]->Edit):

as[z]szon[y]nyal
cafee[2é]tje
ko=nya=kos=meg[y]gye=zik
paral·[1]lel

Short description of the new non-standard hyphenation pattern of the user-defined dictionary (TODO: extend the help with a description):

'[' + optional split number ('0'-'9') + optional extra characters + ']'
Comment 9 László Németh 2014-01-30 15:11:51 UTC
Created attachment 93061 [details]
fixed and new non-standard hyphenation (screenshot)
Comment 10 Commit Notification 2014-02-04 21:05:49 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=604a0b7282e85c8404d0fcf6db6be0cb08463fb1

fdo#44314 Unicode hyphenation at soft hyphens with two extra char.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 jmontane 2014-02-09 19:31:46 UTC
@Laszlo,

Is it needed to update hyphenation dictionary for languages (say Catalan)?
Comment 12 László Németh 2014-02-09 23:12:05 UTC
(In reply to comment #11)
> @Laszlo,
> 
> Is it needed to update hyphenation dictionary for languages (say Catalan)?

@Joan, it isn't. But it's possible to use the new possibilities to fix a libhyphen based hyphenation: for example, I have suggested for Dutch to add a default user-defined (shared) Dutch dictionary to simplify the update of the Dutch hyphenation patterns for the new Dutch orthography.