On Tue, 06 Nov 2007 11:33:23 +0100 Abdelrazak Younes <[EMAIL PROTECTED]> wrote:
> Martin Vermeer wrote: > > On Tue, 06 Nov 2007 08:47:44 +0100 > > Abdelrazak Younes <[EMAIL PROTECTED]> wrote: > > > >> Martin Vermeer wrote: > >>> On Tue, Nov 06, 2007 at 01:39:40AM +0200, Dov Feldstern wrote: > >>>> Martin Vermeer wrote: > >>>>> On Mon, Nov 05, 2007 at 11:13:34PM +0200, Dov Feldstern wrote: > > > > ... > > > >>> Actually I think you should never have any reason to _want_ to do this. > >>> It's elegant, yes, and I agree philosophically with Abdel. But _in > >>> practice_ the user can already output whatever he wants, by alternating > >>> pieces of ERT with non-ERT. Precisely because ERT is "naked", and you > >>> can set the language attribute for the ERT inset location in the > >>> containing text too. > >>> > >>> I believe ERT (as opposed to, e.g., Listings) should indeed be "naked" > >>> and never used for anything but outputting TeX-executable stuff. > >> Well, I agree _pragmatically_ with you ;-) but how does that work in > >> practice? I agree we should not allow two different encodings nor two > >> different language within a same ERT. But imagine you want to input an > >> hebrew word in ERT; > > > > Why? Split the ERT in two and input the Hebrew word as ordinary lyxtext > > inbetween. (I'm sure you have used the construct > > > > ERT[\command{]lyxtext text text ... text ERT[}] > > > > more than once.) > > Ah right, forgot about that :-) > > > > >> then you want to see it display correctly within LyX > >> and that is RTL. I proposed sometimes ago that the text direction (at > >> least within a word) should be decided upon the unicode code point only, > >> not upon the language; I still believe this is the right thing to do. > >> But right now how can we make the hebrew word display in RTL? I see two > >> solution: > >> 1) The ERT inherit the language of the surrounding text: this seems like > >> counter to the idea that ERT should be naked. > >> 2) We provide a dialog (or context menu) for ERT to enforce (optionally) > >> the text direction within the ERT. I actually think this last solution > >> should be generalized to all text insets. > >> > >> What do you think? > >> > >> Abdel. > > > > Don't make it so difficult ;-) > > Right... > > Still, I maintain that detecting the text direction automatically based > on the Unicode code point would simplify things. Yes, why not actually. - Martin