From 00d4144352ffecfb229fcaaf104a2103002235bc Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 26 Feb 2018 17:06:31 +0100 Subject: [PATCH] No manual intervention needed for polyglossia (bidi) and RTL numbers. See https://tex.stackexchange.com/a/256837/19291 --- src/Font.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index 5ac0328ea5..e81e12449b 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -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" -- 2.39.2