On Fri, Sep 20, 2002 at 01:20:39PM +0300, Dekel Tsur wrote: > On Thu, Sep 19, 2002 at 09:04:48AM +0200, Andre Poenitz wrote: > > > Also, ctrl+b in math-mode should give \mathbf. > > > > Unless we have context sensitive keybindings this wont happen. I am not > > going to hard-code this kind of distinction in the LFUN_BOLD(?) handler. > > This is very bad. > 99.99% of the times a user presses ctrl+b in math mode, he needs \mathbf. > So a little bit of special code is small price to pay.
Until we have context sensitive bindings, consider this patch: Index: math.bind =================================================================== RCS file: /cvs/lyx/lyx-devel/lib/bind/math.bind,v retrieving revision 1.17 diff -u -p -r1.17 math.bind --- math.bind 2002/08/22 07:06:02 1.17 +++ math.bind 2002/09/20 10:50:33 @@ -113,6 +113,14 @@ # Note: it's easy to insert binary relations like \pm, \mp, \neq, \geq, # and \leq just by typing them. However it's easier to remember these: +# Fonts + +\bind "M-m M-r" "math-insert \mathrm" +\bind "M-m M-t" "math-insert \textrm" +\bind "M-m M-b" "math-insert \mathbf" +\bind "M-m M-c" "math-insert \mathcal" +\bind "M-m M-f" "math-insert \mathfrak" + \bind "M-m ~S-plus" "math-insert \pm" \bind "M-m ~S-equal" "math-insert \neq" It is REALLY REALLY WRONG to "overload" things like ctrl-e to produce emph in text and cal in math. With bold (ctrl-b for textbf/mathbf) you may argue that the user 'expects' it, but still... that's only what people have gotten used to. I say, no overloading without an official mechanism. This way is much cleaner. (Yes, for super/subscripts \textbf and \mathbf behave differently for font size; so I say they *are* different -- just like in the emph/cal case!) Martin
msg45045/pgp00000.pgp
Description: PGP signature