I'm working in LyX in Hebrew, by using the "use non-TeX fonts (via XeTeX/LuaTeX)" option. The document is in Hebrew, and when I insert a math equation LyX automatically wraps it with \LRE{}
to ensure left-to-right formatting. Most of the time there is no problem, however if I end a list item with a displayed equation, I will get a very big space (see picture and MWE). Is there a way to solve this (other than manually adding negative horizontal space each time)?
\documentclass[english,hebrew]{article}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{David CLM}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\begin{document}
\begin{enumerate}
\item בלה בלה כל מיני טקסט לא חשוב רק רוצה שיגיע לאמצע השורה\LRE{
\[
a=b
\]
}בלה בלה עוד טקסט לא מעניין רק רוצה שיגיע לאמצע השורה\LRE{
\[
c=d
\]
}
\item ורק עוד קצת טקסט לשם הבהרה רק רוצה שיגיע לאמצע השורה
\end{enumerate}
\end{document}