mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix text direction problem with polyglossia
If an RTL language is set via environment in polyglossia, only a nested
\\text<lang> command will reset the direction for LTR languages
Fixes rest of # 10111.
(cherry picked from commit 2d4ac90fd2
)
This commit is contained in:
parent
1b55d4017b
commit
87f58708f3
@ -831,9 +831,13 @@ void TeXOnePar(Buffer const & buf,
|
||||
os << '{';
|
||||
}
|
||||
|
||||
// In some insets (such as Arguments), we cannot use \selectlanguage
|
||||
// In some insets (such as Arguments), we cannot use \selectlanguage.
|
||||
// Also, if an RTL language is set via environment in polyglossia,
|
||||
// only a nested \\text<lang> command will reset the direction for LTR
|
||||
// languages (see # 10111).
|
||||
bool const localswitch = text.inset().forceLocalFontSwitch()
|
||||
|| (using_begin_end && text.inset().forcePlainLayout());
|
||||
|| (using_begin_end && text.inset().forcePlainLayout())
|
||||
|| (use_polyglossia && outer_language->rightToLeft() && !par_language->rightToLeft());
|
||||
if (localswitch) {
|
||||
lang_begin_command = use_polyglossia ?
|
||||
"\\text$$lang$$opts{" : lyxrc.language_command_local;
|
||||
|
Loading…
Reference in New Issue
Block a user