I am writing a Hebrew document that also contains in-line English text. For that, I am using polyglossia
to facilitate multilingual typesetting.
A MWE is:
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\setmainfont{Times New Roman}
\newfontfamily\hebrewfont{David CLM}
% \usepackage{bidi} % really needed?
\begin{document}
פונקציה מקבוצה
\LRE{\textenglish{X}}
לקבוצה
\LRE{\textenglish{Y}}
מסומנת $f:X\to Y$.
\end{document}
I want to be able to produce this scheme of LaTeX file with LyX's Export to LaTeX (XeTeX) tool.
I prefer achieving this goal with the LyX GUI, and not by writing the necessary commands in the Latex preamble found in the Documents settings.
At the moment the settings in LyX->Preferences->Language read the following:
It looks like one has control over what command should be used to start an English environment. In this case it is \selectlanguage{$$lang}
. But these settings rather produce the following environment when English is inserted in a separate line
\begin{english}%
⟨the English text⟩
\end{english}%
and the following when English is inserted as in-line:
\textenglish[variant=american]{the English text}
So, I have three questions:
- Why is the
variant=american
option there for the inline English? I can't see anywhere in the settings where it is called. - Where the
\selectlanguage{$$lang}
has its effect? - I am looking at the exported pdf file, and the left-to-right and right-to-left issue is dealt fine, without surrounding
\textenglish{}
with\LRE{⟨...⟩}
. Is there a real need for thebidi
package here? If the answer is yes, then how do I instruct LyX to work with thebidi
package?