Switch logic, since isStyle() does not cover inline math

Fixes: #11338
(cherry picked from commit 9d8fbc7fd1)
This commit is contained in:
Juergen Spitzmueller 2018-10-09 18:04:51 +02:00
parent 7697bf7888
commit 3d2cc5edeb

View File

@ -1095,9 +1095,9 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
// 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;
@ -1157,7 +1157,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
}
if (close) {
if (runparams.use_polyglossia && !style.isCommand())
if (runparams.use_polyglossia && style.isEnvironment())
os << "\\end{LTR}";
else
os << '}';