mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix nesting problem with numbers in RTL text
\textcolor must precede any \beginL
Fixes: #6283
(cherry picked from commit 114ebf00c4
)
This commit is contained in:
parent
cc845ed2cf
commit
485f070887
29
src/Font.cpp
29
src/Font.cpp
@ -347,21 +347,6 @@ 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
|
||||
// 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"
|
||||
|| language()->lang() == "arabic_arabi")) {
|
||||
os << "{\\beginL ";
|
||||
count += 9;
|
||||
}
|
||||
|
||||
FontInfo f = bits_;
|
||||
f.reduce(base.bits_);
|
||||
FontInfo p = bits_;
|
||||
@ -411,6 +396,20 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
|
||||
env = true; //We have opened a new environment
|
||||
}
|
||||
*/
|
||||
// If the current language is Hebrew, Arabic, or Farsi
|
||||
// the numbers are written Left-to-Right. ArabTeX package
|
||||
// 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"
|
||||
|| language()->lang() == "arabic_arabi")) {
|
||||
os << "{\\beginL ";
|
||||
count += 9;
|
||||
}
|
||||
if (f.emph() == FONT_ON) {
|
||||
os << "\\emph{";
|
||||
count += 6;
|
||||
|
@ -274,6 +274,8 @@ What's new
|
||||
- Fix insertion of quotation marks and brackets in RTL languages
|
||||
(bugs 11188 and 11187).
|
||||
|
||||
- Fix nesting problem with numbers in RTL text (bug 6283).
|
||||
|
||||
|
||||
* INTERNALS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user