On Mon, Nov 22, 2010 at 22:20, Stephan Hennig wrote:
> Am 22.11.2010 13:22, schrieb Taco Hoekwater:
>
>> The problematic case seems to be: a combination of a non-letter in one
>> font, followed by a letter in another font. LuaTeX does not consider
>> that a valid word start. I will add an item to the tracker database.
>
> And another one posted today on de.comp.text.tex (without replies so far).
> This time, there's no font switching, but non-letters are involved.
>
> In the attached example, the word 'Deutschland' is hyphenated before the
> last letter when wrapped-up in guillemots. For German patterns
> \righthyphenmin is 2, but that shouldn't include guillemots. Hyphenation is
> correct when there are German quotes or no quotes at all. The error happens
> with or without fontspec.
>
> Best regards,
> Stephan Hennig
>
>
> \documentclass{article}
> %\usepackage[T1]{fontenc}
> \usepackage[german]{babel}
> \usepackage{fontspec}
> \begin{document}
> \showhyphens{Deutschland}
> \showhyphens{«Deutschland»}
> \showhyphens{„Deutschland“}
> \end{document}
You should not complain about wrong hyphenation if you are loading a
black box of macros (also known as babel). I have no idea how to
switch to an OpenType font in plain LuaTeX (please add that command)
and try to test the following in plain LuaTeX:
\uselanguage{ngerman}
\newdimen\savehsize
\savehsize\hsize
\def\test#1{\endgraf\hsize=3pt\noindent #1\endgraf\hsize=\savehsize}
\test{x «Deutschland»}
\test{x „Deutschland“}
\bye
There also exists a "plain command" to switch to particular language
in LaTeX without babel or polyglossia, but I need some time to find
out how exactly to do it (help welcome). You need to test that before
a bug in LuaTeX is confirmed.
Polyglossia needs to be ported to LuaTeX at some point ... using Babel
is only calling for troubles.
Mojca