]> git.lyx.org Git - features.git/commitdiff
Amend a754912
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 9 Oct 2018 16:04:51 +0000 (18:04 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 10 Oct 2018 06:35:59 +0000 (08:35 +0200)
Switch logic, since isStyle() does not cover inline math

Fixes: #11338
(cherry picked from commit 9d8fbc7fd15bd097771aa3e34631ea6315a7d54e)

src/Paragraph.cpp

index 53121a2e8a91a96bfb80af2eb9d85c05ee7cd8b9..adbf2908804fb9040dc12c316c721bf997746ca0 100644 (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 << '}';