On Wed, Sep 18, 2002 at 12:44:06PM +0200, Andre Poenitz wrote: > On Mon, Sep 16, 2002 at 09:36:24AM +0300, Martin Vermeer wrote: > > While we're at it (and this is a apropos the textsf bug too) why > > (mathed/formulabase.C): > > > > // Math fonts > > case LFUN_GREEK_TOGGLE: handleFont(bv, cmd.argument, "lyxgreek"); break; > > case LFUN_BOLD: handleFont(bv, cmd.argument, "textbf"); break; > > case LFUN_SANS: handleFont(bv, cmd.argument, "textsf"); break; > > [...] > > This is the handling of LFUNs. > > > but (lib/symbols): > > > > mathnormal font mathmode inherit medium up math > > frak font mathmode > > mathbb font mathmode > > mathbf font mathmode > > This is the handling of "direct keyboard input" like > > \mathbb > > Ideally, the should be the same. However, there are not. > > > I found experimentally that the font names used in formulabase.C must be > > present in lib/symbols in order for LyX not to go haywire. > > Indeed. > > > Questions: Why in math use text font commands? > > Because math can contain nested text in \mbox, \fbox, \textrm etc. > > > And why are some of those in lib/symbols and some not? > > Because nobody tried to come up with a scheeme where this kind of > inconsistencies are not possible. > > > Anyway, replacing textsf by mathsf and textnormal by mathnormal in > > formulabase.C fixes both your problems... but is this a proper fix? > > Well. The question is "What is LFUN_SANSSERIF" supposed to do. My > implementation answered this with "switch to \textsl", yours says "\textsl > if nowhere close to math, but \mathsl if somewhere within math, even > within nested text boxes". > > I actually believe we should replace all the different LFUN_FONTCHANCES by > a single LFUN_FONT as a font is nothing that should be hardcoded... > > Andre'
I see. Explanation accepted. So what you're saying is that we actually should have buttons for both \mathsf and \textsf within math (no matter how implemented)? Anyway, I suggest you do something that fixes the 'haywire' behaviour with a minimum of collateral damage. Add textsf to symbols for all I care :-) Martin
msg44877/pgp00000.pgp
Description: PGP signature