[LyX/master] Do not wrap forceTLR in \L with babel and unicode engines
Juergen Spitzmueller
spitz at lyx.org
Sat Dec 24 07:24:05 UTC 2022
commit 1e28965589bcf5ad85ed6d75ae2e59611989f78e
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Sat Dec 24 09:20:02 2022 +0100
Do not wrap forceTLR in \L with babel and unicode engines
It does not seem to be needed, the \L macro is undefined, and there
does not seem to be an alternative.
---
src/Paragraph.cpp | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 063bf32..8f5f6f3 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -1094,16 +1094,21 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
odocstream::pos_type const len = os.os().tellp();
if (inset->forceLTR(runparams)
+ // babel with Xe/LuaTeX does not need a switch
+ // and \L is not defined there.
+ && (!runparams.isFullUnicode() || !runparams.use_babel)
&& running_font.isRightToLeft()
// ERT is an exception, it should be output with no
// decorations at all
&& inset->lyxCode() != ERT_CODE) {
- if (runparams.use_polyglossia) {
+ if (runparams.use_polyglossia)
+ // (lua)bidi
os << "\\LRE{";
- } else if (running_font.language()->lang() == "farsi"
- || running_font.language()->lang() == "arabic_arabi")
+ else if (running_font.language()->lang() == "farsi"
+ || running_font.language()->lang() == "arabic_arabi")
os << "\\textLR{" << termcmd;
else
+ // babel classic
os << "\\L{";
close = true;
}
More information about the lyx-cvs
mailing list