# Fix message about outdated xelatex

I'm a new to (La)Tex. The problem I'm having it that every output document (pdf) starts with

I'm using LuaTeX (I need unicode) and TeXlipse on Arch Linux.

Here is the output from the command: http://pastie.org/5351646 (out of the Eclipse console) and here is the output from lualatex small2e: http://pastie.org/5351655

Here is the preamble:

\documentclass{article}

\usepackage[Ligatures=TeX]{fontspec}
\setmainfont[Ligatures=TeX]{DejaVu Serif}
\setsansfont[Ligatures=TeX]{DejaVu Sans}
\setmonofont[Ligatures=TeX]{DejaVu Sans Mono}

\usepackage{polyglossia}
\setmainlanguage{bulgarian}

\usepackage{minted}

\begin{document}
% ... rest of document with Cyrillic in it


I will update the question with more details as soon as I know what they should be

-
How old is your tex installation? is it from the Arch repositories? For lack of better details you could look at the resulting .log of this command line call: lualatex small2e (or xelatex small2e). –  jon Nov 9 '12 at 15:39
@jon: I've added the log output to a pastie. –  Emil Ivanov Nov 9 '12 at 15:59
@EmilIvanov Without seeing a minimal example it's hard to be sure, but are you loading some XeTeX-specific packages? –  Joseph Wright Nov 9 '12 at 16:17
polyglossia currently supports XeTeX only: LuaTeX is not supported. The error message is not that helpful, I'd agree! –  Joseph Wright Nov 9 '12 at 16:20
Actually the error message is "Undefined control sequence", relative to \xpg@error and by chance the "outdated" string appears. I agree with Joseph that a check for XeLaTeX should be made before this can happen. –  egreg Nov 9 '12 at 16:46

The error message you get is

! Undefined control sequence.
<argument> \xpg@error
{Your xelatex format appears to be outdated!


so it's only by chance that you see the "outdated" message. The error is that \xpg@error is not defined and it's due to the fact that you can't use Polyglossia with LuaLaTeX, but only with XeLaTeX.

You have two possibilities:

1. Compile with LuaLaTeX but load babel

\documentclass{article}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{DejaVu Serif}
\setsansfont[Ligatures=TeX]{DejaVu Sans}
\setmonofont[Ligatures=TeX]{DejaVu Sans Mono}

\usepackage[bulgarian]{babel}

\usepackage{minted}

\begin{document}
Тя е основен административен, индустриален, транспортен, културен и
университетски център на страната, като в нея е съсредоточено 1/6 от
промишленото производство на България.
\end{document}

2. Compile with XeLaTeX

\documentclass{article}

\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{DejaVu Serif}
\setsansfont[Ligatures=TeX]{DejaVu Sans}
\setmonofont[Ligatures=TeX]{DejaVu Sans Mono}

\usepackage{polyglossia}
\setmainlanguage{bulgarian}

\usepackage{minted}

\begin{document}
Тя е основен административен, индустриален, транспортен, културен и
университетски център на страната, като в нея е съсредоточено 1/6 от
промишленото производство на България.
\end{document}


In both cases the paragraph is typeset as in the following image.

-
I suspect the fact that \xpg@error is not defined is deliberate, and that this is used to indicate an error in an expansion context. –  Joseph Wright Nov 9 '12 at 16:54
@JosephWright It's wrong anyway. I've opened an issue at the GitHub repository. –  egreg Nov 9 '12 at 16:56
Yes, it's certainly not that helpful :-) I saw the GitHub report. –  Joseph Wright Nov 9 '12 at 17:04