[tex-hyphen] hyphenation with LuaLaTeX

Mojca Miklavec mojca.miklavec.lists at gmail.com
Mon Jul 4 00:00:30 CEST 2011


2011/7/3 Pablo Rodríguez wrote:
> Hi there,
>
> I use TL 2010 updated with the new LuaTeX betas from
> http://tlcontrib.metatex.org.

If you would like to install the latest version, you can also try TeX Live 2011:
    http://www.tug.org/texlive/pretest.html
(Not that anything substantial has changed though.)

> After months of using it, I have just realized that the LuaTeX binaries
> from TLContrib only have only English enabled.

LuaTeX doesn't preload any languge, but it loads patterns on the fly.
Still, you need to install the packages with desired patterns (but if
patterns works in XeTeX & pdfTeX, they should work in LuaTeX as well).
Check the contents of the file
    kpsewhich language.dat.lua
If your language is listed there, then it should work.

> How can I enable the other languages? (Sorry, I don't know how to do it.)

First you need to install package hyphen-<your-desired-language>, for
example with
    tlmgr install hyphen-ancientgreek
but if language.dat.lua lists your language, you have already done
that. You don't need to do anything special to enable the language,
you just need to use it.

In plain LuaTeX you can load patterns with
    \uselanguage{yourlanguagename}
but that doesn't work with LaTeX or LuaLaTeX.

See page 3 of
    http://mirrors.ctan.org/language/hyph-utf8/doc/generic/hyph-utf8/hyphenation.pdf

You need to load babel or polyglossia or use low-level commands.
Polyglossia doesn't work with LuaLaTeX yet and Babel is not well
suited for many languages. It depends on what language you want to
use. (With Greek you might be in troubles.)

Maybe
    \language=\l@<langname>
works (you need \makeatletter before trying this command). I have read
somewhere that \hyphenrules{langname} is supposed to work, but I have
no idea how. Or you can create your own ldf file for babel.

If babel works for you, that is great. If it doesn't, you will have to
use low level TeX or push development of LuaLaTeX. We cannot really
help you here with lack of language support in LuaLaTeX. The best
option might be to figure out what would motivate the author of
Polyglossia to finally port his package to LuaTeX.

Mojca



More information about the tex-hyphen mailing list