On 2012-07-12, Ronen Abravanel wrote:

> as the Hebrew support of LaTeX is not developed for the last several
> years, I decided to try and export Hebrew document to PDF using XeTeX,

Are there problems that did not get solved for years, or is there no
development because it "just works"?

> where the grate Bidi packge by Vafa Khalighi is under active
> development, and merged in polyglossia.

> LyX 2.0 support XeTeX support, but there are some slight problem:

> 1. when exporting to regular latex, one should wrap "english" text  (like
> numbers, math, etc..)  inside Hebrew parts by \L{.,, }. 

Do you do this with raw LaTeX (ERT) or is there an inset for the task
(should be easy to write one if its not already there).

> not true in XeTeX. Attached an ugly patch that removes such \L, but:
> a. it's pretty ugly. I'm sure there is better way to do it. I will be happy
> for suggestions about ways to improve it.

For documents that shall work in both, pdflatex and xelatex, it might be
best to have a dummy definition like

  \ifxetex
     \providecommand*{\L}[1]{#1}
  \fi
  
either in the documents LaTeX preamble or in the module defining the text
inset).

...

> 2. LyX making some problems with the braces { } ( ) etc in Right-to-left
> parts:
> When one writes Right-to-left text that should look like
> (1) text ( inside braces ) more text
> it outputs as
> (2) text ) inside braces ( more text
> or, to be more accurate,
> עברית ( עוד טקסט this part is INSIDE  עוד טקסט ) בחוץ this part is outside
> .  בחוץ
> Will be output as
> עברית ) עוד טקסט this part is INSIDE  עוד טקסט ( בחוץ this part is outside
> . בחוץ
> It all looks OK when rendering using pdflatex, but using XeTeX, it appears
> wrong.
> I couldn't find the part in LyX that handle that part. I will be happy for
> directions regarding where to look.

I don't know a solution for this part. It looks like the two engines do
not agree on whether ( and ) are "opening" vs. "closing" or "right" vs.
"left" parantheses. 

You may try to create a minimal *.tex exampe file that works with XeTeX
and import this to LyX or try to recreate the correct syntax in LyX
(comparing the View>Source output with the correct XeTeX source).

Günter

Reply via email to