On Tue, Feb 05, 2002 at 11:58:53PM +0100, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > | Wrong answer ;-) > > > | Being the academic you are, you should > | (a) wonder how something this simple can work this well, and > | (b) get angry why nobody steps in here to explain WHY all these > | "accent-X Y" key bindings ended up in the latinkeys.bind file, when > | they apparently do no good for text and cause havoc for math -- > | instead of simple self-insert's. > > I did not thing that self-inserts would work... > besides "accent-umlaut u" shoudl work even for a font where ü does not > exist.
What do you mean "exist"? Exist as a renderable glyph? If it does not, no way of keyboard input will lead to it being rendered. I suppose what you mean is "accent-umlaut u should work even for keyboards lacking a ü key". That is true. But that works independently from what is written in the latinkeys.bind file: pressing the dead-diaeresis key will generate an accent-umlaut/LFUN_UMLAUT LyX action anyway. What latinkeys.bind does, is: make LyX behave, when you press ü, AS IF YOU HAD PRESSED dead-diaeresis u. It doesn't ALLOW you to press that key sequence, it allows you to PRETEND YOU DID -- when in fact you didn't. > | NOTE that the "LyX handles dead-keys" option from Preferences has no > | effect (I haven't been able to find a noticable effect, though the > | code suggests otherwise) on the way keyboard input is handled. > > then we should just remove it. Hmmm... but this is a fairly fresh addition (André?) and perhaps there are plans for it. If so, I would like to hear about them. One effect the option does have, is allowing to enter weird accent/base letter combinations, which may be useful to some. And it is unconnected to the present issue anyway. > | What the bind file latinkeys does currently, is to make typing a letter > | like ö being internally translated to first typing a dead-diaeresis, > | followed by typing the letter o. Somehow in text mode, the processing > | chain produces the same end result (which is why I wonder why this > | translation is done in the first place!). But in math mode, it leads to > | the dead-diaeresis being intercepted and interpreted as a \ddot, and > | painted as such over the o. > > If you can see through the mist and see a nice way to implement this, > please do! (but nor for 1.2) I believe I understand this issue. The proper fix is, I think, to edit latinkeys.bind to use self-insert for the accented characters. No more, no less. But I must admit that I cannot see all the ramifications. It just seems to work and be The Right Thing. > | What latinkeys effectively does, is to make it impossible to distinguish > | between typing dead-diaeresis o and typing ö. Switching this off > | (which my > > Why should lyx be able to distinguish between them? Because it allows you to do different things depending on what you type. Currently the distinction is exploited only in math, where you can use separate dead-keys to get at the "special" math decorations/accents. > We do not want to have one handler for math and another for regular > text. No... but that is the current situation. Or rather, we have a full-blown handler for text and a more primitive (basically raw insertion) mechanism for math (but augmented for math deco handling). As raw insertion is the lowest common denominator for both text and math, it seems like a good idea to require that that at least works as expected for the national keyboard connected to the machine. I.e. as a minimum, äöüåÄÖÜÅ go straight through without being forcibly converted to something else first, what the current latinkeys.bind is doing. So that both in text and in math you can write "natural language" (German/Swedish/Finnish in the example case) without contracting the Emacs Syndrome (BTW in Norwegian/Danish æÆøØ already are straight insertions :-). > | So, again my question: why is this logic in place that does no good > | (AFAICS) and some bad? Enquiring minds want to know. If there is no good > | reason, bin it! > > Find a solution that works for all and change it to use that. > (no... not for 1.2) For 1.2 I suggest including (\bind_file) the latinkeys-math.bind file after latinkeys.bind (i.e. overriding it). Otherwise you are guaranteed to get complaints like Herbert's, that he cannot type German strings into formulas like he used to. If there are problems with this (I don't see any), it's easy to back out. You can put a short note with my email at the top of the file to protect the guilty ;-) > -- > Lgb > BTW I still have a patch hanging for inserting ^ and _ characters into math, which is slightly related to this. Currently you can insert these using sequences defined in math.bind, but unfortunately they are not persistent, i.e., they don't survive saving and re-loading. A real bug that will bite someone someday. My fix for this requires the definition of a \mathcircumflex macro. As this is a somewhat subtle issue, I suspect that nobody has properly tested this patch or even fully understood what it was about. It also defines M-m ^ and M-m _ as keyboard shortcuts (unfortunately not \^ and \_), but that's not the main issue. http://www.mail-archive.com/lyx-devel%40lists.lyx.org/msg31965.html Martin
msg32542/pgp00000.pgp
Description: PGP signature