]> git.lyx.org Git - features.git/commitdiff
LuaTeX (luabidi) does not correct directions
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 10 Jul 2019 17:10:16 +0000 (19:10 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 11 Jul 2019 06:37:52 +0000 (08:37 +0200)
This amends [9d20bc4e98/lyxgit].

(cherry picked from commit a95339c6e1d9f15390a2734b7cc94b57282e740b)

src/Paragraph.cpp
status.23x

index 9d1b9e6f1fcb63f72f33316d31fe1df0b3cf1791..7d484078c631ba07d7cdeae2fdcb82fa7013bb94 100644 (file)
@@ -2293,9 +2293,10 @@ int Paragraph::Private::startTeXParParams(BufferParams const & bparams,
        string const begin_tag = "\\begin";
        InsetCode code = ownerCode();
        bool const lastpar = runparams.isLastPar;
-       // RTL without the Bidi package switches the left/right logic
+       // RTL in classic (PDF)LaTeX (without the Bidi package)
+       // Luabibdi (used by LuaTeX) behaves like classic
        bool const rtl_classic = owner_->getParLanguage(bparams)->rightToLeft()
-               && !runparams.use_polyglossia;
+               && (!runparams.use_polyglossia || runparams.flavor != OutputParams::XETEX);
 
        switch (curAlign) {
        case LYX_ALIGN_NONE:
@@ -2354,9 +2355,10 @@ bool Paragraph::Private::endTeXParParams(BufferParams const & bparams,
        string const end_tag = "\\par\\end";
        InsetCode code = ownerCode();
        bool const lastpar = runparams.isLastPar;
-       // RTL without the Bidi package switches the left/right logic
+       // RTL in classic (PDF)LaTeX (without the Bidi package)
+       // Luabibdi (used by LuaTeX) behaves like classic
        bool const rtl_classic = owner_->getParLanguage(bparams)->rightToLeft()
-               && !runparams.use_polyglossia;
+               && (!runparams.use_polyglossia || runparams.flavor != OutputParams::XETEX);
 
        switch (curAlign) {
        case LYX_ALIGN_NONE:
index f18ebf3e250b4866d60d25e25a26c0429d381023..53d3f96d8fdf2f43f13ffff6a6bb566550b80a84 100644 (file)
@@ -70,7 +70,9 @@ What's new
 - Find local bib files when they exist in the same directory as the LyX
   file (bug 11588).
 
-- Fix column order with RTL documents and LuaTeX (part of bug 9686).
+- Fix table column order with RTL documents and LuaTeX (part of bug 9686).
+
+- Fix paragraph alignment with RTL documents and LuaTeX (part of bug 11399).
 
 
 * USER INTERFACE