Switch logic, since isStyle() does not cover inline math
Fixes: #11338
// decorations at all
&& inset->lyxCode() != ERT_CODE) {
if (runparams.use_polyglossia) {
- if (style.isCommand())
- os << "\\LR{";
- os << "\\begin{LTR}";
+ if (style.isEnvironment())
+ os << "\\begin{LTR}";
+ os << "\\LRE{";
} else if (running_font.language()->lang() == "farsi"
|| running_font.language()->lang() == "arabic_arabi")
os << "\\textLR{" << termcmd;
}
if (close) {
- if (runparams.use_polyglossia && !style.isCommand())
+ if (runparams.use_polyglossia && style.isEnvironment())
os << "\\end{LTR}";
else
os << '}';