I am trying to use LuaTeX (LuaLaTeX) in MiKTeX 2.9 and I'm stuck with getting it to load cyrillic hyphenation patterns. I'm quite new to LuaTeX, so maybe there's something special about hyphenation and language support in it?

Here's my sample document:



\setmainfont{Charis SIL}




Цель работы: проверить \LuaTeX.

Проверка. Очень длинная строка для проверки переносов: дезоксирибонуклеиновый тест.


I get no hyphenation and overfull hbox in this example. Same text hyphenates nicely in XeTeX and pdfTeX.

  • For me (latest texlive + tlcontrib) it does indeed hyphenate, even though lualatex complains about lots of undefined \cyr... commands in the \abstractname so compilation is not perfect even there (I guess this is a babel thing) Nov 21 '10 at 8:46
  • Yeah, babel doesn't support XeLaTeX or LuaLaTeX. (Although there's a good argument that fontspec via xunicode should at least handle the \cyr... letter macros.) To change languages in XeLaTeX one should use polyglossia, but it hasn't been ported over to LuaLaTeX yet so I don't know what the ‘canonical’ solution is at the moment. Nov 21 '10 at 13:00
  • @WillRobertson, I uploaded to CTAN new russian LDF file for babel which eliminate \cyr.. commands if Xe/Lua TeX is running. Oct 21 '11 at 11:46

I just realized that it could be that the non-hyphenation is because of character codes. The latest luatex's from texlive have a file luatex-unicode-letters.tex that sets the lowercase codes for non-latin letters, and chances are that that is not in miktex (yet). I put a copy of that file up under the link above, you could try to \input that file, perhaps it fixes things.

  • Thank you, it really helped me to solve hyphenation problem. Nov 22 '10 at 9:41

Additional comment to Tacos answer. To add luatex-unicode-letters.tex to your lualatex format: Save luatex-unicode-letters.tex in "a local root"/tex/generic/luatexconfig. Put the following code in a file lualatex.ini and save it "a local root"/tex/latex/latexconfig. Renew the FNDB and then regenerate the lualatex format.

Edit: And here the code for lualatex.ini I mentioned:

 % $Id$
 % Karl Berry, originally written 2008. public domain.

 % must be done first (activation of primitives)
 \input lualatexiniconfig.tex

 \input luatex-unicode-letters.tex
 \input pdftexconfig.tex
 % pdf output by default.
 \input latex.ltx
 \input lualatexquotejobname.tex

MiKTeX has a special procedure to re-build format file. In case of lualatex.fmt you need:

  1. to run initexmf --admin --edit-config-file lualatex (if MiKTeX is installed for all users at your machine, otherwise drop the --admin option) to edit local lualatex.ini as indicated in @Ulrike's answer. This normally creates lualatex.ini at the folders C:\ProgramData\MiKTeX\2.9\miktex\config and C:\Users\All Users\MiKTeX\2.9\miktex\config\ (which are aliases of each other and are also hidden). There can exist also aliases at C:\Documents and Settings\All Users\MiKTeX\2.9\miktex\config e.t.c.
  2. Put luatex-unicode-letters.tex in C:\Users\All Users\MiKTeX\2.9\tex\generic\config\ where pdftexconfig.tex (also used for lualatex.fmt generation) resides.
  3. Re-build lualatex format. This creates lualatex.fmt in C:\Users\All Users\MiKTeX\2.9\miktex\data\le\luatex\.
  4. Unfortunately, that's not all folks. MiKTeX 2.9 seems to ignore local lualatex.ini created at the above described steps [bug or a feature?]. So you actually need to edit main lualatex.ini, which is located at C:\Program Files\MiKTeX 2.9\tex\latex\latexconfig.

Having done all these steps 1 to 4 I have managed to activate russian hyphenation by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.