#StackBounty: #xetex #lyx #hebrew #bidi Bidi LRE command causes too much vertical space if put at end of an item in a list

Bounty: 100

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)?

Example

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}


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.