I am trying to use Polyglossia package through Lyx. When compiling with XeLaTeX, I get undefined control sequence error and the file won't compile.
Working with Windows 7, Lyx 2.03 and MiKTeX 2.9. BTW: I have set the fonts to Arial because I know it's a fixed width font. It doesn't work with any kind of font.
MWE (Lyx source):
\documentclass{article}
\usepackage{theorem}
\usepackage{xunicode}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\setmainfont[Mapping=tex-text]{Arial}
\setsansfont[Mapping=tex-text]{Arial}
\setmonofont{Arial}
\theorembodyfont{\upshape}
\newtheorem{theorem}{משפט}[section]
\begin{document}
\begin{english}%
hello
\end{english}%
שלום
\end{document}
And this is XeLaTeX's error message (I've cut the first few lines):
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'
(Font) OT1/cmr/bx/it --> EU1/Arial(0)/bx/it on input line 24.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> EU1/Arial(0)/bx/n on input line 24.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> EU1/Arial(1)/bx/n on input line 24.
! Undefined control sequence.
\@begindocumenthook ...aybe_setup_maths: \make@lr
\thetheorem \xpg@initial@s...
l.24 \begin{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spel
`
, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). Usually you should only post the error message itself, i.e. the part staring from the line with the!
at the beginning, not the whole log file which is quite long. I didn't shorted it yet in case the incl. version numbers are important here