1

Possible Duplicate:
\tableofcontents encoding issue with lualatex

I tried adding babel package to my file - to get proper hyphenation for my language. But I get strange error, related specifically to \tableofcontents (everything else is working, and hyphenation behaves as expected).

The test case:

\documentclass[a4paper,titlepage]{article}
\usepackage{xltxtra}
\usepackage[russian]{babel}
\begin{document}
\tableofcontents
\end{document}

The output:

$ xelatex file.tex
Package babel Warning: No input encoding specified for Russian language on inpu
t line 136.

)) (./TZ_Parrot_6.aux)
! Undefined control sequence.
\contentsname ->{\cyr \CYRS 
                            \cyro \cyrd \cyre \cyrr \cyrzh \cyra \cyrn \cyri...
l.5 \tableofcontents

How can I fix it? I'm using TeX Live 2009 distribution.

Rogach
  • 3,088
  • This seems very similar to http://tex.stackexchange.com/questions/9175/tableofcontents-encoding-issue-with-lualatex (that's lualatex oriented, but the problem is the same). If it solves your problem, with the caveat that EU1 is the default encoding for XeLaTeX/fontspec rather than EU2, then let us know and this will be closed as a duplicate. On the other hand, probably polyglossia is better suited to XeLaTeX than babel. – egreg Nov 22 '12 at 07:32
  • @egreg - Yes, replacing babel with polyglossia fixed the issue, thanks! Should I delete the question? – Rogach Nov 22 '12 at 07:59
  • I'll flag it as duplicate – egreg Nov 22 '12 at 08:01

0 Answers0