]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Amend 207eaeee9071cb
[lyx.git] / src / Font.cpp
index aa8c235f11a407590d5cb59400dfcd64a173f3c2..a4ae35727f344321e2d0bd4636f12c91c7503059 100644 (file)
@@ -21,7 +21,6 @@
 #include "Encoding.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
-#include "Lexer.h"
 #include "LyXRC.h"
 #include "output_latex.h"
 #include "OutputParams.h"
@@ -31,6 +30,7 @@
 #include "support/convert.h"
 #include "support/debug.h"
 #include "support/gettext.h"
+#include "support/Lexer.h"
 #include "support/lstrings.h"
 
 #include <cstring>
@@ -426,7 +426,7 @@ int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams,
        // the numbers are written Left-to-Right. ArabTeX package
        // and bidi (polyglossia with XeTeX) reorder the number automatically
        // but the packages used for Hebrew and Farsi (Arabi) do not.
-       if (!runparams.useBidiPackage()
+       if (!bparams.useBidiPackage(runparams)
            && !runparams.pass_thru
            && bits_.number() == FONT_ON
            && prev.fontInfo().number() != FONT_ON
@@ -505,8 +505,8 @@ int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams,
                if (runparams.inulemcmd) {
                        // needed with nested uwave in xout
                        // see https://tex.stackexchange.com/a/263042
-                       os << "\\ULdepth=1000pt";
-                       count += 15;
+                       os << "\\ULdepth=\\maxdimen";
+                       count += 18;
                }
                if (needs_cprotection) {
                        os << "\\cprotect";
@@ -604,7 +604,7 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
        // the numbers are written Left-to-Right. ArabTeX package
        // and bidi (polyglossia with XeTeX) reorder the number automatically
        // but the packages used for Hebrew and Farsi (Arabi) do not.
-       if (!runparams.useBidiPackage()
+       if (!bparams.useBidiPackage(runparams)
            && !runparams.pass_thru
            && bits_.number() == FONT_ON
            && next.fontInfo().number() != FONT_ON