[luatex] wrong hyphenation in four-letter word

Ulrike Fischer luatex at nililand.de
Wed May 11 11:17:44 CEST 2011


Am Tue, 10 May 2011 15:55:10 +0200 schrieb Stephan Hennig:

> [sending to luatex and lualatex list]
> 
> Hi,
> 
> I'm observing a wrong hyphenation of a four-letter word with lualatex
> and German hyphenation patterns.  For the German language,
> \lefthyphenmin and \righthyphenmin are both set to 2, so that
> four-letter words can indeed be hyphenated, such as ei-ne.  But the word
> "sich" shouldn't be hyphenated at all, whereas it is
> hyphenated as si-ch:
> 
> \listfiles
> \documentclass{minimal}
> \usepackage{fontspec}
> \usepackage[ngerman]{babel}
> \begin{document}
> \showhyphens{sich eine}
> \end{document}
> 
>> Underfull \hbox (badness 10000) in paragraph at lines 9--9
>> [][] \EU2/lmr/m/n/10 si-ch ei-ne

When I tested your example I had an old aux-file which gave an error
- and the hyphenation was correct. In the next run with an empty
aux-file it was wrong. 

So I made some tests. The problem is to some extend due to the
minimal class: It doesn't issue like e.g. article a \normalsize
command and its definition of \normalsize is also different to the
one in the standard classes. One can get a correct \showhyphens
output if one set after fontspec or (\usepackage[EU2]{fontenc} )
\baselineskip + \normalbaselinekskip, or if one redefine \normalsize
so that it also set (that's curious) \belowdisplayshortskip.

But the really curious thing I found during my test is the following
example:


\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{luaotfload}
\usepackage[EU2]{fontenc}
\textwidth0.3cm
\begin{document}
%a

\hspace{0pt}%
«sich» «eine» «sich» sichß eineä «sich» eine sich sich sich eine
eine eine
 abc

\end{document}

Non-ASCII-chars at the end of the words can change hyhenation. But
more curiosly the \hspace{0pt} changes it to: with it the last
"sich" are hyphenated too but this effect disappear if you uncomment
the "a". One the whole this look as if there is a initialization
problem but it is difficult to see if the engine or the font loader
or the babel commands or the local configuration (the settings in
the language.dat) is responsable. (If one load the patterns with
\makeatletter\bbl at patterns{ngerman}\makeatother the side effect of
the \hspace disappaer but «sich» is still hyphenated).

This is LuaTeX, Version beta-0.70.0-2011050815 (rev 4247) 

-- 
Ulrike Fischer 



More information about the luatex mailing list