From 5ca510e4c565e9b1d92270a3964553d533f30b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Fri, 14 Sep 2001 11:03:41 +0000 Subject: [PATCH] Jean-Marc's patch, BUGS update git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2759 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/BUGS | 19 ++++++++++--------- src/mathed/ChangeLog | 5 +++++ src/mathed/formula.C | 2 +- src/mathed/support.C | 4 +--- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/mathed/BUGS b/src/mathed/BUGS index 1eb42d0ba2..88454a7295 100644 --- a/src/mathed/BUGS +++ b/src/mathed/BUGS @@ -79,10 +79,10 @@ Misc: // - If I change '\alpha' to bold, the result is \mathbf{a} -- Just moving the cursor in a math inset causes changing the buffer status - to (changed). +// - Just moving the cursor in a math inset causes changing the buffer status +// to (changed). -- disable the insert->label menu item when in inline formula. +// - disable the insert->label menu item when in inline formula. Eran Tromer: @@ -211,12 +211,13 @@ From: won't repeat that. Only that the flattening option would be then easier to implement on top of that. -- There's something I keep wondering about.. how do new math symbols get into - LyX. Do they get ever?. I don't know if it can be done, but if you tell me - where to "draw" those symbols or how, I would very glad start doing it. LyX - deserves to have support (visual support) for all the AMSTeX constructs. But - there must be something structural going on there, because otherwise more - math symbols would be ready by now.. just a thought. +// - There's something I keep wondering about.. how do new math symbols get +// into LyX. Do they get ever?. I don't know if it can be done, but if you +// tell me where to "draw" those symbols or how, I would very glad start +// doing it. LyX deserves to have support (visual support) for all the +// AMSTeX constructs. But there must be something structural going on +// there, because otherwise more math symbols would be ready by now.. +// just a thought. - Some math symbols aren't very well supported (to my knowledge). I'm thinking of underbraces with extra data in them,or [] options. diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 6e8f8a3688..636d319880 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2001-09-14 Jean-Marc Lasgouttes + + * formula.C (insetAllowed): disallow label insertion in inline + formula + 2001-09-12 Jean-Marc Lasgouttes * formulabase.C (mathDispatchCreation): pass second argument diff --git a/src/mathed/formula.C b/src/mathed/formula.C index b2ef1189ca..d6c7bb40c6 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -356,7 +356,7 @@ void InsetFormula::validate(LaTeXFeatures & features) const bool InsetFormula::insetAllowed(Inset::Code code) const { - return code == Inset::LABEL_CODE; + return code == Inset::LABEL_CODE && display(); } diff --git a/src/mathed/support.C b/src/mathed/support.C index d1fba3094a..bc1264ea82 100644 --- a/src/mathed/support.C +++ b/src/mathed/support.C @@ -550,10 +550,8 @@ int mathed_char_descent(MathTextCodes type, MathStyles size, unsigned char c) int mathed_char_width(MathTextCodes type, MathStyles size, unsigned char c) { LyXFont const font = whichFont(type, size); - LyXFont const f1 = whichFont(LM_TC_TEXTRM, size); -#warning why f1 is used ? if (isBinaryOp(c, type)) - return lyxfont::width(c, font) + 2 * lyxfont::width(' ', f1); + return lyxfont::width(c, font) + 2 * lyxfont::width(' ', font); else return lyxfont::width(c, font); }