Hi!

I've been following this issue and playing around with it for a while now, and I think the problem may not be as bad as we think --- I don't think any major rewriting is necessary.

Here's how I'm able to get bidi (Hebrew) at least basically working (I just tried it now on r16375):

(Note that at stage 3 you have to re-compile, so you should really start there...)

1) Make sure that "Right-to-left language support" in Tools -> Preferences... -> Language (not Language settings!) is enabled (I just discovered that somehow mine wasn't, even though I thought it was, which of course made things not work ;) )
 2) In order to type in Hebrew, you need to do *two* things:
a) change the language (F12, if you're using Dekel's bindings for Hebrew) b) change the keyboard input to Hebrew. On Linux, I do it using the command: <code>setxkbmap -compat "group_led" -symbols "us(pc104)+il+group(menu_toggle)"</code>, and then the Windows Menu key toggles between Hebrew and English.
    Again, it's important to do *both* of these!
3) The document encoding has to be set correctly. The only way I was able to get this to work is as follows: a) You have to add the "cp1255" encoding to a hard-coded list of possible encodings. Georg has explained multiple times how to do this, I'm attaching a patch which does it. b) after applying the patch, in Document -> Settings... -> Language, uncheck "Use language's default encoding", and choose "cp1255" in Encoding.

This should work, it looks okay in the GUI, the generated output is correct.

So:

1) Can you please confirm that this does in fact work for you too?
2) We should fix it so that F12 (change language) also changes the keyboard. Actually, I think it's better if it doesn't really change the keyboard (that then affects all keyboard input, not only in lyx), but rather that it would translate the input accordingly. I don;t really know how all of this works, any input on these issues would be appreciated. 3) There's probably a better way than having to manually change the encoding to cp1255. There's probably some way to automatically associate the language with the encoding (I thought that's what "use language's default encoding" is supposed to do, but obviously something's a little off). Georg, can you help with this?

Hope this helps, and that we can finally get Bidi working in 1.5!

Dov


Guy Rutenberg wrote:
Hi,

I'm testing Lyx 1.5 svn, and specifically interested in the bidi support.
Lyx 1.5 has a regression in the bidi support compared to lyx 1.4. I would
like to help fix this problem, but I can't understand how Lyx determines
when a paragraph should be RTL and when it should be LTR. If someone would
point me to where I can find documentation on this issue (and preferably
other things regarding how bidi is handled in the code) I would appreciate
it very much.

Regards,
Guy


Index: src/frontends/qt4/QDocumentDialog.C
===================================================================
--- src/frontends/qt4/QDocumentDialog.C (revision 16375)
+++ src/frontends/qt4/QDocumentDialog.C (working copy)
@@ -62,7 +62,7 @@
 // the available encodings in src/encodings.C
 char const * encodings[] = { "LaTeX default", "latin1", "latin2",
        "latin3", "latin4", "latin5", "latin9",
-       "koi8-r", "koi8-u", "cp866", "cp1251",
+       "koi8-r", "koi8-u", "cp866", "cp1251", "cp1255",
        "iso88595", "pt154", "utf8", 0
 };
 

Reply via email to