2

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?

2

For inline Hebrew, you should use \texthebrew. The hebrew environment is for paragraph text.

%!TEX program = xelatex
\documentclass{book}
\usepackage{polyglossia}
\usepackage{bidi}
\setmainlanguage{english}
\setotherlanguage{hebrew}
\setmainfont{Latin Modern Roman}
\newfontfamily\hebrewfont[Script=Hebrew]{Noto Sans Hebrew}
\begin{document}
Lorem ipsum dolor sit amet, \texthebrew{לורם איפסום דולור סיט אמט}

\begin{hebrew}
  לורם איפסום דולור סיט אמט
\end{hebrew}
\end{document}

MWE output

| improve this answer | |
1

Use bidi's \RLE to correct the text direction:

%!TEX program = xelatex
\documentclass{book}
\usepackage{polyglossia}
\usepackage{bidi}
\setmainlanguage{english}
\setotherlanguage{hebrew}
\setmainfont{Latin Modern Roman}
\newfontfamily\hebrewfont[Script=Hebrew]{Noto Sans Hebrew}
\begin{document}
Lorem ipsum dolor sit amet, \begin{hebrew}\RLE{לורם איפסום דולור סיט אמט}\end{hebrew} 
\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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