On Thu, Sep 19, 2002 at 09:10:54AM +0200, Andre Poenitz wrote:
 
> On Wed, Sep 18, 2002 at 11:30:59PM +0300, Martin Vermeer wrote:
> > > On Wed, Sep 18, 2002 at 04:51:39PM +0200, Andre Poenitz wrote:
> > > 
> > > > > I don't even use any font lfun from qt math panel.
> > 
> > But perhaps you should. Otherwise you won't be able to select a range of
> > characters and change them to some font. That's why the xforms side uses
> > dispatch. As I understand it.
> 
> I can select and type 'M-x math-insert \mathbf' or bind that if I need that
> regularily.
> 
> >  
> > > >         dispatch(FuncRequest(LFUN_INSERT_MATH, "\\mathbf"))
> > 
> > E.g. like this.
> > 
> > André: does this do font change on selection?
> 
> Yes.
> 
> > I think the GUI should both support text?? and math?? for ?? = bf, sf,
> > tt, ...
> 
> Yes.
> 
> > The layout->character dialog should work inside math and do the same
> > things as for text... currently not quite so, it does a little trickery
> > in formulabase to produce mathcal and mathbb etc., and sans isn't 
> > even provided. Not clean. But that's your GUI for text?? also inside math,
> > after clean-up. The styles/fonts sub-panel of the math panel should then 
> > handle the math??. That would apparently require separate LFUNs for text 
> > and math; sigh.
> > 
> > Does that make sense?
> 
> LFUN_FONT with arguments  textbf and mathbf would suffice.
> 
> > Great!!! Finally we're discussing essentials.
> 
> I came to the conclusion that we are discussing a non-issue (apart from the
> missing textsf lin in lib/symbols). So unless people come up with code that
> does as they want
> 
> Andr'e

Okay, here is a clean solution. With this, the math panel produces the
\math?? font commands, while the familiar font commands for text mode
(found on the layout menu and toolbar too) produce the \text?? commands. 
Should make everybody happy.

Only negative I see is the addition of half a dozen LFUNs. Sure your
solution of LFUN_FONT "..." would be better... but perhaps after
the freeze.

I will not speculate if this is straightforward enough to be compatible 
with the feature freeze :-)

Martin

Index: lib/symbols
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/symbols,v
retrieving revision 1.27
diff -u -p -r1.27 symbols
--- lib/symbols 2002/08/30 08:42:59     1.27
+++ lib/symbols 2002/09/19 08:32:09
@@ -55,6 +55,7 @@ mathsf            font        mathmode
 mathtt            font        mathmode
 text              font        textmode
 textbf            font        textmode
+textsf            font        textmode
 textipa           font        textmode
 textit            font        textmode
 textmd            font        textmode
@@ -62,6 +63,7 @@ textrm            font        textmode
 textsl            font        textmode
 texttt            font        textmode
 textup            font        textmode
+textsc            font        textmode
 
 # old-style font commands
 bf                oldfont     none
Index: src/mathed/formulabase.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/mathed/formulabase.C,v
retrieving revision 1.211
diff -u -p -r1.211 formulabase.C
--- src/mathed/formulabase.C    2002/09/11 14:48:19     1.211
+++ src/mathed/formulabase.C    2002/09/19 08:32:09
@@ -583,6 +583,7 @@ Inset::RESULT InsetFormulaBase::localDis
 
        //  Math fonts
        case LFUN_GREEK_TOGGLE: handleFont(bv, cmd.argument, "lyxgreek"); break;
+#if 0
        case LFUN_BOLD:         handleFont(bv, cmd.argument, "textbf"); break;
        case LFUN_SANS:         handleFont(bv, cmd.argument, "textsf"); break;
        case LFUN_EMPH:         handleFont(bv, cmd.argument, "mathcal"); break;
@@ -593,6 +594,24 @@ Inset::RESULT InsetFormulaBase::localDis
        case LFUN_NOUN:         handleFont(bv, cmd.argument, "mathbb"); break;
        case LFUN_DEFAULT:      handleFont(bv, cmd.argument, "textnormal"); break;
        case LFUN_FREE:         handleFont(bv, cmd.argument, "textrm"); break;
+#endif
+       case LFUN_BOLD:         handleFont(bv, cmd.argument, "textbf"); break;
+       case LFUN_SANS:         handleFont(bv, cmd.argument, "textsf"); break;
+       case LFUN_CODE:         handleFont(bv, cmd.argument, "texttt"); break;
+       case LFUN_EMPH:         handleFont(bv, cmd.argument, "textit"); break;
+       case LFUN_ITAL:         handleFont(bv, cmd.argument, "textit"); break;
+       case LFUN_NOUN:         handleFont(bv, cmd.argument, "textsc"); break;
+
+       case LFUN_M_BOLD:       handleFont(bv, cmd.argument, "mathbf"); break;
+       case LFUN_M_SANS:       handleFont(bv, cmd.argument, "mathsf"); break;
+       case LFUN_CAL:          handleFont(bv, cmd.argument, "mathcal"); break;
+       case LFUN_M_ROMAN:      handleFont(bv, cmd.argument, "mathrm"); break;
+       case LFUN_M_CODE:       handleFont(bv, cmd.argument, "mathtt"); break;
+       case LFUN_FRAK:         handleFont(bv, cmd.argument, "mathfrak"); break;
+       case LFUN_M_ITAL:       handleFont(bv, cmd.argument, "mathit"); break;
+       case LFUN_BB_BOLD:      handleFont(bv, cmd.argument, "mathbb"); break;
+       case LFUN_DEFAULT:      handleFont(bv, cmd.argument, "mathnormal"); break;
+       case LFUN_TEXT:         handleFont(bv, cmd.argument, "textrm"); break;
 
        case LFUN_GREEK:
                handleFont(bv, cmd.argument, "lyxgreek1");
Index: src/frontends/xforms/FormMathsStyle.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/frontends/xforms/FormMathsStyle.C,v
retrieving revision 1.12
diff -u -p -r1.12 FormMathsStyle.C
--- src/frontends/xforms/FormMathsStyle.C       2002/09/05 15:14:22     1.12
+++ src/frontends/xforms/FormMathsStyle.C       2002/09/19 08:32:09
@@ -33,17 +33,22 @@ char const * latex_mathstyle[] = {
        "displaystyle", "textstyle", "scriptstyle", "scriptscriptstyle"
 };
 
+#if 0
 kb_action latex_mathfontcmds[] = {
        LFUN_BOLD, LFUN_SANS, LFUN_ROMAN, LFUN_ITAL, LFUN_CODE,
        LFUN_NOUN, LFUN_FRAK, LFUN_EMPH, LFUN_FREE, LFUN_DEFAULT
 };
+#endif
 
-
+kb_action latex_mathfontcmds[] = {
+       LFUN_M_BOLD, LFUN_M_SANS, LFUN_M_ROMAN, LFUN_M_ITAL, LFUN_M_CODE,
+       LFUN_BB_BOLD, LFUN_FRAK, LFUN_CAL, LFUN_TEXT, LFUN_DEFAULT
+};
 
 FormMathsStyle::FormMathsStyle(LyXView & lv, Dialogs & d,
                               FormMathsPanel const & p)
        : FormMathsSub(lv, d, p, _("Maths Styles & Fonts"), false),
-         style_(-1)
+       style_(-1)
 {}
 
 
Index: src/commandtags.h
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/commandtags.h,v
retrieving revision 1.103
diff -u -p -r1.103 commandtags.h
--- src/commandtags.h   2002/09/11 14:48:16     1.103
+++ src/commandtags.h   2002/09/19 08:32:09
@@ -58,8 +58,16 @@ enum kb_action {
        LFUN_NOUN,
        LFUN_ITAL,
        LFUN_FRAK,
+       LFUN_CAL,
+       LFUN_M_BOLD,
+       LFUN_M_SANS,
+       LFUN_M_ROMAN,
+       LFUN_M_CODE,
+       LFUN_M_ITAL,
+       LFUN_BB_BOLD,
+       LFUN_TEXT,
        LFUN_RIGHT,
-       LFUN_LEFT,  // 40
+       LFUN_LEFT,  // 40 -> 46
        LFUN_UP,
        LFUN_DOWN,
        LFUN_PRIOR,
Index: src/LyXAction.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/LyXAction.C,v
retrieving revision 1.139
diff -u -p -r1.139 LyXAction.C
--- src/LyXAction.C     2002/09/12 14:58:05     1.139
+++ src/LyXAction.C     2002/09/19 08:32:10
@@ -216,6 +216,14 @@ void LyXAction::init()
                { LFUN_SANS, "font-sans", N_("Toggle sans font style"), Noop },
                { LFUN_FRAK, "font-frak", N_("Toggle fraktur font style"), Noop },
                { LFUN_ITAL, "font-ital", N_("Toggle italic font style"), Noop },
+               { LFUN_CAL, "font-cal", N_("Math calligraphy font style"), Noop },
+               { LFUN_M_BOLD, "math-bold", N_("Math bold font style"), Noop },
+               { LFUN_M_SANS, "math-sans", N_("Math sans font style"), Noop },
+               { LFUN_M_ROMAN, "math-roman", N_("Math roman font style"), Noop },
+               { LFUN_M_CODE, "math-code", N_("Math code font style"), Noop },
+               { LFUN_M_ITAL, "math-ital", N_("Math italic font style"), Noop },
+               { LFUN_BB_BOLD, "math-bbbold", N_("Blackboard Bold style"), Noop },
+               { LFUN_TEXT, "math-text", N_("Text-in-math style"), Noop },
                { LFUN_FONT_SIZE, "font-size", N_("Set font size"), Noop },
                { LFUN_FONT_STATE, "font-state", N_("Show font state"),
                  ReadOnly },

Attachment: msg44937/pgp00000.pgp
Description: PGP signature

Reply via email to