Stefan Schimanski wrote:

> There are several possibilities now to interpret the underlined  
> spaces (short RTL spaces):
> 
> * The LyX 1.3 magic way: the RTL spaces behave in fact like LTR  
> spaces, i.e. they are put where non-underlined spaces would be. See  
> this example:

This magic has been removed on purpose for the case of font changes in
general (family, size etc), because the code to support it was complicated
and despite that not even correct.

>    - In "english WERBEH_english" the _ is in fact behind the W
>      So in Latex you would write "english\R{HEBREW } english"

Rather "english\R{HEBREW }english".

> The consequence is that the cursor strangely (IMO) jumps from behind  
> the W to the right in the moment you enter the space. If you have  
> used LyX 1.3 you might be familiar with this behavior:
> 
>    "english |WERBEHenglish" ==> "english WERBEH_|english"
> 
> If you continue now typing a character the cursor (and the space)  
> jumps back:
> 
>    "english WERBEH_|" ==> "english |H_WERBEHenglish" ==>
>    "english H_WERBEH_|english"
> 
> * The non-magic way: the spaces are no special characters. They stay  
> at the position you type them. See this example:

This is the solution that has been implemented for general font changes
since format 259.

>    "english |WERBEHenglish" ==> "english |_WERBEHenglish" ==>
>    "english |H_WERBEHenglish"
> 
> If you change back to English and continue typing the cursor will go  
> to the right, i.e.:
> 
>    ==> "english H_WERBEH|english" ==> "english H_WERBEH |english"
> 
> In Latex you would type the same:
> 
>    "english \R{HEBREW H} english"
> 
> Of course two spaces, one inside the RTL, one outside, are merged  
> silently by Latex,
> i.e. "english \R{HEBREW }" will look the same as "english \R{HEBREW}".
> 
> If you have an opinion, please tell us.

Definitely the non-magic solution: If you enter a space it gets the
direction (RTL or LTR) of the current font, and is drawn on screen
according to that direction (place and underlining), and cursor navigation
follows that direction.
It should not be possible to enter two consecutive spaces (one in RTL and
the other in LTR) at a direction boundary.

This is IMO the best approach: Users see on screen exactly whether a space
is RTL or LTR. Therefore they know how the cursor will behave when
navigating. Removing the direction property from spaces might look more
user friendly at first glance, but the problem then is that you have to
perform some magic in the code that quickly gets so complicated that no
developer understands it anymore and/or it produces strange results in some
corner cases.


DISCLAIMER: I am not an RTL user, the idea behind this opinion is to make
the overall editing experience for all font attributes (size, family,
series, RTL/LTR etc) consistent.


Georg

Reply via email to