]> git.lyx.org Git - features.git/commitdiff
No manual intervention needed for polyglossia (bidi) and RTL numbers.
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 26 Feb 2018 16:06:31 +0000 (17:06 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 27 Feb 2018 07:59:02 +0000 (08:59 +0100)
See https://tex.stackexchange.com/a/256837/19291

(cherry picked from commit 00d4144352ffecfb229fcaaf104a2103002235bc)

src/Font.cpp
status.23x

index 5ac0328ea5bc7cdd590a6086954a23a7b03a0d74..e81e12449ba2c7b9e0325667670aec7e97d985ad 100644 (file)
@@ -349,9 +349,11 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
 
        // If the current language is Hebrew, Arabic, or Farsi
        // 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 (!runparams.pass_thru && bits_.number() == FONT_ON
+       // and bidi (polyglossia) reorder the number automatically
+       // but the packages used for Hebrew and Farsi (Arabi) do not.
+       if (!runparams.use_polyglossia
+           && !runparams.pass_thru
+           && bits_.number() == FONT_ON
            && prev.fontInfo().number() != FONT_ON
            && (language()->lang() == "hebrew"
                || language()->lang() == "farsi"
@@ -552,9 +554,11 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
 
        // If the current language is Hebrew, Arabic, or Farsi
        // 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 (!runparams.pass_thru && bits_.number() == FONT_ON
+       // and bidi (polyglossia) reorder the number automatically
+       // but the packages used for Hebrew and Farsi (Arabi) do not.
+       if (!runparams.use_polyglossia
+           && !runparams.pass_thru
+           && bits_.number() == FONT_ON
            && next.fontInfo().number() != FONT_ON
            && (language()->lang() == "hebrew"
                || language()->lang() == "farsi"
index 1a7312f84a858e80f7c004313cd4ae30144f468e..e7e9ce5e9f4ad12ef899678637e18680e6eead0c 100644 (file)
@@ -57,6 +57,9 @@ What's new
 
 - Respect 'literal' setting when calculating longest bibitem (bug 10817).
 
+- Do not embrace numbers in \beginL ... \endL with polyglossia in Right-
+  to-Left languages, since bidi handles the numbers automatically.
+
 
 * LYX2LYX