]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Further amendment to 72a488d7
[lyx.git] / src / Font.cpp
index f6eb6b954f949571f050c075373ffb1f39d139d3..9124f0ab05c94f3e848c898966379939594bd87a 100644 (file)
@@ -287,7 +287,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
                        tmp += "{";
                        os << from_ascii(tmp);
                        count += tmp.length();
-                       runparams.pushPolyglossiaLang(language()->polyglossia());
+                       pushPolyglossiaLang(language()->polyglossia(), true);
                } else if (language()->encoding()->package() != Encoding::CJK) {
                        os << '{';
                        count += 1;
@@ -343,10 +343,11 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
        // the numbers are written Left-to-Right. ArabTeX package
        // reorders the number automatically but the packages used
        // for Hebrew and Farsi (Arabi) do not.
-       if (bits_.number() == FONT_ON && prev.fontInfo().number() != FONT_ON
-               && (language()->lang() == "hebrew"
-                       || language()->lang() == "farsi" 
-                       || language()->lang() == "arabic_arabi")) {
+       if (!runparams.pass_thru && bits_.number() == FONT_ON
+           && prev.fontInfo().number() != FONT_ON
+           && (language()->lang() == "hebrew"
+               || language()->lang() == "farsi" 
+               || language()->lang() == "arabic_arabi")) {
                os << "{\\beginL ";
                count += 9;
        }
@@ -521,10 +522,11 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
        // the numbers are written Left-to-Right. ArabTeX package
        // reorders the number automatically but the packages used
        // for Hebrew and Farsi (Arabi) do not.
-       if (bits_.number() == FONT_ON && next.fontInfo().number() != FONT_ON
-               && (language()->lang() == "hebrew"
-                       || language()->lang() == "farsi"
-                       || language()->lang() == "arabic_arabi")) {
+       if (!runparams.pass_thru && bits_.number() == FONT_ON
+           && next.fontInfo().number() != FONT_ON
+           && (language()->lang() == "hebrew"
+               || language()->lang() == "farsi"
+               || language()->lang() == "arabic_arabi")) {
                os << "\\endL}";
                count += 6;
        }
@@ -547,7 +549,7 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
                os << '}';
                ++count;
                if (runparams.use_polyglossia)
-                       runparams.popPolyglossiaLang();
+                       popPolyglossiaLang();
        }
 
        return count;