Forum Bugs

hyphenation errors in prince 7.0beta1

oliof
I am noticing my texts have hyphenation errors since I use prince 7.0b1.

I use the german hyphenation rules from OpenOffice:

prince-hyphenate-patterns: url("hyph_de_DE.dic") ;


and get hyphenations like bes-chrieben instead of be-schrieben and
Konf-likten instead of Kon-flikten.

I can provide the whole project on request.
oliof
Addendum: I see the same issue with the hyphenation dictionary included in the prince7 distribution.
mikeday
Just to be clear, these problems did not occur with Prince 6.0?

Also, is the text justified?
oliof
I don't have prince 6.0 on my system anymore, so I'm a bit hard pressed to test (also, I switched almost completely to OTF, but that could be undone).

Yes, the text is two-column justified. Not all hyphenations are wrong, but about half of them.
Jellby
I'm also seeng wrong hyphenations such as "her-oica" and "peq-ueña" in Spanish (one should never hyphenate between "r" and a vowel or between "q" and "u").
mikeday
Thanks, we'll investigate these hyphenation issues.
mikeday
Can you try converting this document:
<html>
<head>
<style>
body { hyphens: prince-expand-all }
</style>
</head>
<body>
<p xml:lang="de">
beschrieben Konflikten
</p>
<p xml:lang="es">
heroica pequeña
</p>
</body>
</html>

I cannot reproduce the German hyphenation problems, but I do reproduce the Spanish problems.
oliof
If I manually change <body> to <body xml:lang="de">, hyphenation is correct on all accounts. IIRC there's no way to do this in CSS, so I either need to get my html generator (docutils) to do this for me or I postprocess to add it in.

Thanks for taking the effort of looking into it, even if it was a false alarm.

Nonetheless, this seems to be a regression from prince 6.0 where this wasn't an issue (for several small-run print publications with very picky audience).
Jellby
Jellby wrote:
I'm also seeng wrong hyphenations such as "her-oica" and "peq-ueña" in Spanish (one should never hyphenate between "r" and a vowel or between "q" and "u").


I've found many more errors, all of them seem to be due to a wrong hyphenation point before two consecutive vowels:

ext-iende, seg-uirle, rec-uerdo... all of these are wrong. (Actually, breaking a consonant-vowel combination is very rarely correct).
mikeday
We have updated the hyphenation dictionaries used in Prince 8.0, which should fix these issues.
thomasdumm
Hi Michael

I am trying to use the latest hyphenation from OpenOffice, but without success. Swiss-German hyphenation is a variant of German hyphenation. For example we have no "strong letter s" in Switzerland leading to different hyphenation rules.

I use in my .css-file prince-hyphenate-patterns: url(../Hyphenate/hyph_de_CH.dic) and I have placed the downloaded hyph_de_CH.dic in a local directory called Hyphenate. I downloaded from http://extensions.openoffice.org/en/project/german-de-ch-frami-dictionaries and I copied the following file from inside the oxt-zip archive:
dict-de_ch-frami_2013-12-06\hyph_de_CH\hyph_de_CH.dic

I also have lang="de" in the html-tag of the document. I also tried with "de-CH".

But I get awful hyphenations. So I must make a mistake.

Do you have any idea what mistake? (Am I right in thinking that the path to the .dic-File must be relative to the .css-File?).

Best Regards!
Thomas

thomasdumm
I think I found the de-CH hyphenation data in the right format, although the 1901 version instead of the 1996 version. I have to find out if the 1901-1996-difference is mainly in the spelling and not so much in the hyphenation...

TEX hyphenation patterns: http://tug.org/tex-hyphen/#languages

Still: Am I right in thinking that the path to the .dic-File must be relative to the .css-File?

Edited by thomasdumm

mikeday
Still: Am I right in thinking that the path to the .dic-File must be relative to the .css-File?

Yes, URLs are resolved relative to the document in which they appear.
memrich
It seems there are still some hyphenation bugs in Prince9. We had an actual problem with the word "Dateipfad" which displays as "Dateip-fad" (wrong). Using the method described above, I get "Da·tei·p·fad". The correct hyphenation in this case should be "Datei-pfad"

Is there a way to correct single cases without using a complete external library like LibreOffice?
mikeday
We are working on improved hyphenation for German, which will be available in future releases.

For now, you can specify the hyphenation points in the word manually using soft-hyphen characters, or you can add some new patterns to the hyphenation dictionary (hyph/hyph-de-1996.pat).

I think the pattern you want is something like this:
.Da4tei5p4fad.

Here the odd numbers represent allowed hyphenation points, and the even numbers are disallowed hyphenation points.
hughmcguire
Hi Mike,

Was there any progress on improving German hyphenation in Prince 10 (we're still running 9)?

Thanks!
Hugh,
mikeday
Not in Prince 10, but in Prince for Books, currently under active development and available for testing by interested parties.