Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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:

\documentclass{article}

\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\usepackage[russian]{babel}

\setmainfont{Charis SIL}

\title{Заголовок}
\author{Автор}
\date{}

\begin{document}

\maketitle

\begin{abstract}
Цель работы: проверить \LuaTeX.
\end{abstract}

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

\end{document}

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

share|improve this question
    
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) –  Taco Hoekwater 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. –  Will Robertson 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. –  Igor Kotelnikov Oct 21 '11 at 11:46
add comment

3 Answers

up vote 6 down vote accepted

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.

share|improve this answer
    
Thank you, it really helped me to solve hyphenation problem. –  Grey Teardrop Nov 22 '10 at 9:41
add comment

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.
 \scrollmode
 \let\dump\relax
 \input latex.ltx
 \input lualatexquotejobname.tex
 \pdfprimitive\dump
share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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