Lyx has an option of underlining the foreign text. What I meant was that I 
always turn that off, so I can't tell which direction the spaces belong to.

I don't mind that each space should have a definitive direction, I think the 
best way would be that the border spaces will always have the direction of 
the "mother" document, i.e. not of the foreign part. I wasn't thinking of 
the problems of the underlying latex code, but strictly about the visual 
editing, sorry.

Miki

"Georg Baum" <[EMAIL PROTECTED]> 
wrote in message news:[EMAIL PROTECTED]
> Miki Dovrat wrote:
>
>> The users (at least me) don't know whether the space is RTL or LTR 
>> because
>> they don't "mark RTL code" since it is annoying to look at when writing a
>> document in RTL.
>
> I don't understand what you mean here. When you write a mixed 
> hebrew/english
> document you have to explicitly set the language of the foreign part
> anyway. The spaces would simply be part of this mechansim, no extra
> "marking" required.
> Whether this explicit language setting should be replaced by some 
> automatic
> algorithm is a different issue that has been discussed. But even if such 
> an
> algorithm is implemented the result is still that each character has an
> associated language that defines the direction.
>
>> I don't know how difficult it is to code this, but I think the space
>> should be "neutral", and that the direction should be decided according 
>> to
>> whether the curser is currently to the right or to the left of this 
>> border
>> space.
>
> And how would you output such a neutral space to LaTeX? If you have 
> visually
> on screen
>
> RTL LTR
>
> where RTL is in RTL direction and LTR in LTR direction you need to decide
> whether to output
>
> \R{ LTR}LTR
>
> or
>
> \R{LTR} LTR}
>
> to LaTeX. How would you decide which variant to use without an explicit 
> LTR
> property of the space? At first glance it might look as if both are
> equivalent, but this is not the case if other font changes (e.g. size) 
> come
> into the play, and even if not your LTR font might have a different size 
> of
> the space as your RTL font. This is exactly the reason why spaces are not
> handled specially anymore for font changes, and are output exactly as
> entered.
>
>> Lets say we have LTR RTL and the space between them.  If the cursor is to
>> the left - continue English (you will be able to type another space there
>> and continue writing), and if you are to the right of the border space,
>> continue writing Hebrew (again, you will be able to enter another RTL
>> space there as well). Extra spaces should then be removed, like lyx does
>> today.
>>
>> The same for RTL LTR.
>
> The non-magic approach could be made to work exactly like that: If the
> cursor is at such a boundary with a space, set the current font that will
> be used for newly typed stuff either to the font at the left or the font 
> at
> the right, according to the rules you gave. Strictly speaking this is a 
> bit
> of magic, but I believe that in contrast to the neutral space this magic
> could be implemented in a reasonable manner, because it would only affect
> editing. A neutral space would require extra code in may different places.
>
> The result would still be that each space has an associated direction, so
> you could still create the other two cases of the four Stefan mentioned by
> inserting and removing some temporary characters.
>
>
> Georg
>
> 



Reply via email to