On Thu, Dec 22, 2022 at 6:09 AM Jürgen Spitzmüller <jspi...@gmail.com>
wrote:

> Am Donnerstag, dem 22.12.2022 um 01:02 +0200 schrieb Udicoudco:
>


> Note that this is fixed in master (2.4dev). I don't think we will
> backport the fix to stable (2.3.x), since 2.3.7 is already finished and
> 2.3.8 will presumably be released together with 2.4.0.
>
>
> That's great!  you saved me the trouble of opening a ticket (i should
 have checked what happens in master).

So, I tried to export the tabular with LuaTeX instead, and the
\cline problem is resolved, as mentioned in the ticket LyX does not
invert the syntax with LuaTeX.

The problem is that LyX use polyglossia by default with non-TeX fonts and
LuaTeX,
and to my knowledge there is no utility for RTL tabular with LuaLaTeX and
polyglossia (i.e. all the text
inside the tabular is LTR).

With XeLaTeX there's the file *array*-*xetex*-*bidi*.*def, *but as the name
suggest,
It is only used with XeTeX and bidi. Note that most latex document classes
use tabular for title (or author to be exact) and similar layouts, so this
is a bit annoying ( attached a LyX file to demonstrate the problem, i
tested this in master).

With babel there is the option layout=tabular which fixes that, but then
the tabulars need to be typed
As with Xelatex and polyglossia.

Would it be reasonable to format the output latex code when exporting an
RTL LyX document
with LuaTeX s.t it will use babel instead of polyglossia?  (attached a
latex file that demonstrates the format i want to achieve, it somewhat
resembles this example file
<https://github.com/latex3/babel/blob/main/samples/lua-hebrew.tex> from
babel repository).

I tried to disable all language support from lyx (no language package etc.)
but then LyX behaves just as with pdflatex and  RTL languages,
it inserts some RTL related code by itself, e.g., \R, \L, and with babel
and luatex these commands are not defined.

I have one final question on the matter. Why does LyX enclose every
equation with \LRE when exporting a hebrew document with XeLaTeX?
I could not figured the use of that, and  it somewhat clumps the exported
code.

Best Regards,
Udi

-- 
> lyx-devel mailing list
> lyx-devel@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-devel
>

Attachment: RTL_tabular_lua.lyx
Description: application/lyx

\documentclass{article}

\usepackage[english,main=hebrew,bidi=basic,layout=tabular,provide=*]{babel}

\babelfont[hebrew]{rm}{David CLM}

\babelfont[english]{rm}{Latin Modern Roman}

\begin{document}
\title{כותרת}
\author{מחבר המאמר}

\maketitle
\begin{tabular}{|c|c|}
\hline 
שלום & להתראות\tabularnewline
\hline 
\end{tabular}

שלום להתראות 
\selectlanguage{english}
Hello world
\selectlanguage{hebrew}
שלום \foreignlanguage{english}{Thank you.}
\end{document}
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to