5

The words 'izoliran' and 'kostur' in the MWE

\documentclass{article}
\usepackage[croatian]{babel}

\begin{document}
    mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm izoliran

    mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm kostur
\end{document}

are not hyphenated correctly: they appear as iz-oliran and kos-tur on my end. Hyphenation for other languages seems to work fine, and mostly agrees with what the Croatian one should be (i-zo-li-ran and ko-stur). For what it's worth, I'm using a recently updated TexLive installation, and what seems to be the latest version of Babel (the documentation is version 3.9l). Is this a real problem with the hyphenation patterns for this particular language, or is something else going on?

As for the solution, almost anything would be better than the English patterns that seem to be used now. Is there a way to use [croatian]{babel} with the hyphenation patterns of another language? Serbian, for example, would be close to perfect.

Edit: what I said about English patterns being used is definitively wrong, so these syllabifications are what they are 'by design'.

1
  • \hyphenation{i-zo-li-ran ko-stur} but that's just for exceptions, this seems to be a larger problem.
    – Manuel
    Commented Feb 8, 2015 at 19:48

1 Answer 1

5

If the hyphenation is really wrong (I take your word for it), the first thing to do is to make aware of this the people who are responsible for the hyphenation patterns at the mailing list about hyphenation in TeX. I find nothing about the problem in that list, though.

In the meantime, you can enable the patterns for Serbian with the help of hyphsubst:

\RequirePackage[croatian=serbian]{hyphsubst}
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[croatian]{babel}

\usepackage{testhyphens}

\begin{document}

\begin{checkhyphens}
izoliran kostur
\end{checkhyphens}

\end{document}

The main part is the initial \RequirePackage, while testhyphens is used just for showing all the hyphenation places in the given words.

enter image description here

Looking in the hyphenation pattern files, the kos-tur break seems a deliberate choice for Croatian, for the pattern is s1t, while in the file for Serbian there is s2t. According to the Liang algorithm, odd numbers mark feasible hyphenation places, while even numbers mark unfeasible points.

However, there's something strange happening, because the pattern z<digit>o never appears in hyph-hr.tex; instead I find a1zo, e1zo, i1zo, o1zo and u1zo that would imply no break can be inserted between z and o.

But at the end of the file there is .iz1, which explains the bad hyphenation.

The author of the patterns is Igor Marinović, whose email address is listed in hyph-hr.tex.

7
  • Perhaps note that i-zo-li-ran also requires a change to the minimum hyphenation numbers?
    – Joseph Wright
    Commented Feb 8, 2015 at 21:00
  • @JosephWright Neither Croatian nor Serbian babel sets the hyphen minima, so they're the default 2 and 3. Setting \lefthyphenmin=1 doesn't seem a good idea anyway.
    – egreg
    Commented Feb 8, 2015 at 21:04
  • I am aware of lefthyphenmin restriction, it is not a problem, I was thinking of the syllabification when I wrote i-zo-li-ran. As for the correctness, there is as many orthography manuals for Croatian as there are people who deem themselves competent enough to write one, so I can't speak for all of them, but iz-o-li-ran and kos-tur make no sense either phonologically or morphologically. And I noticed the same thing you did when I looked at the hyph-hr.tex, but I assumed I'm either misunderstanding it or that there's something wrong on my end. I'll try contacting the author when I get the time
    – user54748
    Commented Feb 8, 2015 at 21:25
  • @user54748 The Croatian patterns were last updated in 1996: I'd be tempted to raise on the hyphenation list!
    – Joseph Wright
    Commented Feb 8, 2015 at 21:29
  • (meanwhile this solution works perfectly - thanks!)
    – user54748
    Commented Feb 8, 2015 at 21:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .