]> 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>
Tue, 9 Oct 2018 16:04:51 +0000 (18:04 +0200)
Switch logic, since isStyle() does not cover inline math

Fixes: #11338
src/Paragraph.cpp

index fa3418229be66f6406fc92d1491de2c8b0bc5d5e..42abf41b67676ad688284a2678a2fbfa52e80485 100644 (file)
@@ -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 << '}';