[luatex] Hyphenation in plain TeX

Khaled Hosny khaledhosny at eglug.org
Fri Oct 8 10:21:17 CEST 2010


On Fri, Oct 08, 2010 at 05:03:55PM +0900, Vladimir Lomov wrote:
> Hi Mojca!
> 
> ** Mojca Miklavec [2010-10-08 09:33:52 +0200]:
> 
> > On Fri, Oct 8, 2010 at 09:10, Vladimir Lomov wrote:
> >> Hi.
> >>
> >> Could someone tell how to make hyphenation work in plain LuaTeX?
> >>
> >> I tried something like that
> >>
> >> <code>
> >> \input luaotfload.sty
> >>
> >> \font\test={file:cmunrm.otf}
> >> \input loadhyph-de-1996.tex
> > 
> > In theory the following is supposed to select a language in plain TeX:
> >     \uselanguage{ngerman}
> > but I don't even know how to change the default font in plain LuaTeX,
> > so I'm not sure how to test it.
> Your knowledge about the theory is correct :)
> Yes now I able to make luatex hyphenate the German and French text
> (though my test text on German is hyphenated not perfectly but this is a
> test). Below my complete example now:
> <code>
> \input luaotfload.sty
> \font\test={file:cmunrm.otf}
> \uselanguage{ngerman}
> \test
> \input sample_de.txt
> \bye
> </code>
> >> \input <text on German>
> >>
> >> \bye
> >> </code>
> > 
> >> P.S. I tried with French as well I got the same error message but for
> >> Russian I didn't. Well no hyphenation in either case.
> > 
> > To hyphenate Russian, one would need to fix something in
> > luatex/lualatex formats first.
> Hm, could you explain a little what the problem is? With font encodings?
> After all, these languages are work fine in context (actually mkiv).

The \uccode/\lccode is not set for anything but ASCII (or whatever TeX
engine internally have), XeTeX sets it for the entire Unicode charset
in the format, but we don't yet for LuaTeX, so any hyphenation requiring
characters outside ASCII will not work out of box (or at least this is
my understanding).

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the luatex mailing list