# Is there a more systematic way to fix hyphenation?

I found out that the Czech word „množina“ meaning “a set” is hyphenated „množi-na“ by TeX rather than „mno-ži-na“. What is worse the word „podmnožina“ meaning “a subset” is hyphenated „podm-noži-na“ rather than „pod-mno-ži-na“ which is unacceptable.

Is there any better and more systematic way to fix this hyphenation than using exception list provided by \hyphenation command? I mean it is easy to fix the word „množina“, but there are many forms of it in the Czech language: „množina“, „množiny“, „množině“, „množinu“, „množino“, „množinou“, „množin“, „množinám“, „množinách“, „množinami“ for all of which the point is to allow hyphenation „mno-ži“. And to all these forms I should add the corresponding prefixed forms „pod-mno-ži-…“ where the rule is just to hyphenate between the prefix and the root or hyphenate in the root as if the was the sole word. My point is that the list of exceptions multiplicatively grows when fixing just one issue.

As suggested, I'm adding a MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[IL2]{fontenc}
\usepackage[czech]{babel}

\begin{document}
\lefthyphenmin=0
\righthyphenmin=0
\begin{minipage}{0pt}
first
podmnožina
\end{minipage}
\end{document}


I noted that if I change IL2 font encoding to T1, the hyphenation works as expected. What does font encoding have to do with hyphenation?

• there may be more than one set of Czech patterns available (there are for English) so you probably need to provide an example document showing how you specified Czech. \hyphenation only accepts a full list of words and has no concept of stem or compound words. the \patterns command does take a list of patterns, although the TeX algorithm historically has problems with languages making use of compound words as it can only specify potential hyphenation points in a word it can not prioritise breaks at compound word boundaries over breaks within the parts. – David Carlisle Jul 9 '14 at 11:29
• @DavidCarlisle I'm using \usepackage[czech]{babel}, with new version of babel package and new, clear insallation of MikTeX 2.9 distribution under Windows. Is it possible to locate and inspect the used set of patterns? – user87690 Jul 9 '14 at 11:39
• The hyphenation patterns used when \usepackage[czech]{babel} is found are tailored for a T1-encoded font. As far as I know, IL2 is used with a different setup for Czech than babel. Don't worry: T1 has full support for Czech letters. – egreg Jul 9 '14 at 12:12
• @user87690 It's better to add \usepackage{lmodern} and use T1 encoding. – egreg Jul 9 '14 at 13:03
• @user87690 pixelation is a feature of using bitmap fonts, not of the encoding, you should be able to get the fonts you need in scalable type1 format. – David Carlisle Jul 9 '14 at 13:04

The CSLaTeX is obsolete, but I try to explain how it works. It reads the Czech and Slovak hyphenation patterns twice: in IL2 encoding and T1 encoding. The appropriate hyphenation pattern is used when one write \usepackage[IL2]{fontenc} or \usepackage[T1]{fontenc}.
When you don't use CSLaTeX, you cannot use IL2 encoded fonts for Czech and Slovak because standard LaTeX supports only one hyphenation pattern per language and it uses T1 encoded pattern for Czech and Slovak. (Note: csplain is another case, it supports more hyphenation patterns per language but it is probably not subject of your interest).
There are well know bugs in T1 encoded font metrics typically generated by fontenc which get fonts unusable in Czech and Slovak (for example ptmr8t metric for Times Roman). The bug is in the letters ď and ť. But more than 20 years nobody reported this bug so it seems to be not actulaly used.