From 9d8fbc7fd15bd097771aa3e34631ea6315a7d54e Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 9 Oct 2018 18:04:51 +0200 Subject: [PATCH] Amend a754912 Switch logic, since isStyle() does not cover inline math Fixes: #11338 --- src/Paragraph.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index fa3418229b..42abf41b67 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1148,9 +1148,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; @@ -1210,7 +1210,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 << '}'; -- 2.39.2