I'm using xelatex (on Debian stable).
My TeX file looks like this:
\documentclass{book}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{hebrew}
\setmainfont{Latin Modern Roman}
\newfontfamily\hebrewfont[Script=Hebrew]{Miriam CLM}
\begin{document}
Lorem ipsum dolor sit amet, \begin{hebrew} לורם איפסום דולור סיט אמט \end{hebrew}
\end{document}
My output looks like:
Lorem ipsum dolor sit amet, אמט סיט דולור אפסום לורם
So it's BiDi in that the letters are in the correct order, but for some reason the words are read left to right.
What should I do to fix this?