Re: How to make Lyx DRAMATICALLY better.
On Tuesday 05 June 2007 23:17:31 Andre Poenitz wrote: Buts it would be sufficient if only insets that _do_ have a variable background would have that member. OK. I did not notice that it was in the base member but then it makes sense to be static since that is a property of the class not of the particular instance. Andre' -- José Abílio
Re: How to make Lyx DRAMATICALLY better.
Bo == Bo Peng [EMAIL PROTECTED] writes: No, you are making my problems ;-) When I want to change background I have to take into account mathhoverbg, too. Please, remove that. Bo This part is true, but the same goes to buttonbg and Bo buttonhoverbg. No because these do not use the window background color by default. JMarc
Re: How to make Lyx DRAMATICALLY better.
Andre == Andre Poenitz [EMAIL PROTECTED] writes: Andre On Tue, Jun 05, 2007 at 10:07:40PM +0100, José Matos wrote: On Tuesday 05 June 2007 19:16:08 Andre Poenitz wrote: Right. Commit 17913 added int InsetBase::background_color_ to InsetBase that used to be 16 bytes a while ago. Andre' Cann't that be a class method instead of an instance method? (In C++ parlance mode a static class method/data I think). Andre Not really, as this assumes that all inset backgrounds are Andre equal. Andre Buts it would be sufficient if only insets that _do_ have a Andre variable background would have that member. Why don't we just use a virtual mathod? Is it really necessary to customize each inset's color. JMarc
Re: How to make Lyx DRAMATICALLY better.
Andre == Andre Poenitz [EMAIL PROTECTED] writes: Or replace the corners by a change of color of the inset that is currently edited. Andre That would be the _outermost_ inset that's being edited? Don't know :) JMarc
Re: How to make Lyx DRAMATICALLY better.
Enrico Forestieri wrote: Maybe we can try to avoid not having a space after math. I mean, when you leave a math inset by hitting the space bar, LyX does not insert a space after the math and perhaps it should. I think that this change would cure the vast majority of missing space after math cases. Yes - adding a normal space in this case seems ok - the user pressed space after all. If she don't want a space, she can delete it again (it was added to the text, not added during latex export.) The user that knows she don't need a space can exit the math with right-arrow instead. Helge Hafting
Re: How to make Lyx DRAMATICALLY better.
On Wed, Jun 06, 2007 at 09:24:48AM +0200, Jean-Marc Lasgouttes wrote: Andre == Andre Poenitz [EMAIL PROTECTED] writes: Andre On Tue, Jun 05, 2007 at 10:07:40PM +0100, José Matos wrote: On Tuesday 05 June 2007 19:16:08 Andre Poenitz wrote: Right. Commit 17913 added int InsetBase::background_color_ to InsetBase that used to be 16 bytes a while ago. Andre' Cann't that be a class method instead of an instance method? (In C++ parlance mode a static class method/data I think). Andre Not really, as this assumes that all inset backgrounds are Andre equal. Andre Buts it would be sufficient if only insets that _do_ have a Andre variable background would have that member. Why don't we just use a virtual mathod? I don't know. This is obviously a sensible solution. Is it really necessary to customize each inset's color. I don't think so. Andre'
Re: How to make Lyx DRAMATICALLY better.
On Tuesday 05 June 2007 23:17:31 Andre Poenitz wrote: > Buts it would be sufficient if only insets that _do_ have a variable > background would have that member. OK. I did not notice that it was in the base member but then it makes sense to be static since that is a property of the class not of the particular instance. > Andre' -- José Abílio
Re: How to make Lyx DRAMATICALLY better.
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: >> No, you are making my problems ;-) When I want to change background >> I have to take into account mathhoverbg, too. Please, remove that. Bo> This part is true, but the same goes to buttonbg and Bo> buttonhoverbg. No because these do not use the window background color by default. JMarc
Re: How to make Lyx DRAMATICALLY better.
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> On Tue, Jun 05, 2007 at 10:07:40PM +0100, José Matos wrote: >> On Tuesday 05 June 2007 19:16:08 Andre Poenitz wrote: > Right. >> Commit 17913 added int InsetBase::background_color_ to InsetBase > >> that used to be 16 bytes a while ago. >> > >> > Andre' >> >> Cann't that be a class method instead of an instance method? (In >> C++ parlance mode a static class method/data I think). Andre> Not really, as this assumes that all inset backgrounds are Andre> equal. Andre> Buts it would be sufficient if only insets that _do_ have a Andre> variable background would have that member. Why don't we just use a virtual mathod? Is it really necessary to customize each inset's color. JMarc
Re: How to make Lyx DRAMATICALLY better.
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: >> Or replace the corners by a change of color of the inset that is >> currently edited. Andre> That would be the _outermost_ inset that's being edited? Don't know :) JMarc
Re: How to make Lyx DRAMATICALLY better.
Enrico Forestieri wrote: Maybe we can try to avoid not having a space after math. I mean, when you leave a math inset by hitting the space bar, LyX does not insert a space after the math and perhaps it should. I think that this change would cure the vast majority of "missing space after math" cases. Yes - adding a normal space in this case seems ok - the user pressed space after all. If she don't want a space, she can delete it again (it was added to the text, not added during latex export.) The user that knows she don't need a space can exit the math with right-arrow instead. Helge Hafting
Re: How to make Lyx DRAMATICALLY better.
On Wed, Jun 06, 2007 at 09:24:48AM +0200, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Andre> On Tue, Jun 05, 2007 at 10:07:40PM +0100, José Matos wrote: > >> On Tuesday 05 June 2007 19:16:08 Andre Poenitz wrote: > Right. > >> Commit 17913 added int InsetBase::background_color_ to InsetBase > > >> that used to be 16 bytes a while ago. > >> > > >> > Andre' > >> > >> Cann't that be a class method instead of an instance method? (In > >> C++ parlance mode a static class method/data I think). > > Andre> Not really, as this assumes that all inset backgrounds are > Andre> equal. > > Andre> Buts it would be sufficient if only insets that _do_ have a > Andre> variable background would have that member. > > Why don't we just use a virtual mathod? I don't know. This is obviously a sensible solution. > Is it really necessary to > customize each inset's color. I don't think so. Andre'
Re: How to make Lyx DRAMATICALLY better.
On Mon, Jun 04, 2007 at 04:34:32PM -0500, Bo Peng wrote: Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. And this increased the size of small insets only by 20%... what a bargain! Andre'
Re: How to make Lyx DRAMATICALLY better.
On Mon, 4 Jun 2007, Bo Peng wrote: Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. If nothing else, it should be documented. So for now I've added: * Possibility of changing background of math insets in the LyX view to http://wiki.lyx.org/LyX/DocumentationDevelopment as a reminder for later. (I'll eventually turn these into bugzilla issues, at the moment it's quicker to just add a line to the wiki). /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: How to make Lyx DRAMATICALLY better.
Bo Peng wrote: Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. Can't we just remove the extra spacing around math instead? If the user then writes My formulax+x=2xis a true statement, then the lack of spacing will be as obvious in LyX as it is now in this email. There will be no need to indicate where the inset ends with background color then. I don't think people will object to adding the spaces themselves - this is no harder than adding spaces around words. (The user adding spaces explicitly is necessary, there are several kind of spacing after all) Problem solvable without ugly math. Helge Hafting
Re: How to make Lyx DRAMATICALLY better.
I guess very few people know the background of mathed can be changed in 1.5.0. And this increased the size of small insets only by 20%... what a bargain! You mean adding background increases inset size? I have no idea what you are talking about here. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 09:11:02AM -0500, Bo Peng wrote: I guess very few people know the background of mathed can be changed in 1.5.0. And this increased the size of small insets only by 20%... what a bargain! You mean adding background increases inset size? I have no idea what you are talking about here. I suppose he means the memory footprint. /** We store the Color::color value as an int to get Color.h out * of the header file. */ int background_color_; - Martin
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 12:56:41PM +0200, Helge Hafting wrote: Bo Peng wrote: Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. Can't we just remove the extra spacing around math instead? That's a matter of font metrics, I fear. If the user then writes My formulax+x=2xis a true statement, then the lack of spacing will be as obvious in LyX as it is now in this email. There will be no need to indicate where the inset ends with background color then. I don't think people will object to adding the spaces themselves - this is no harder than adding spaces around words. (The user adding spaces explicitly is necessary, there are several kind of spacing after all) Problem solvable without ugly math. Maybe we can try to avoid not having a space after math. I mean, when you leave a math inset by hitting the space bar, LyX does not insert a space after the math and perhaps it should. I think that this change would cure the vast majority of missing space after math cases. -- Enrico
Re: How to make Lyx DRAMATICALLY better.
I suppose he means the memory footprint. /** We store the Color::color value as an int to get Color.h out * of the header file. */ int background_color_; This has nothing to do with my patch. If he meant bool mouse_hover_, then he calculated wrong because 1. it only shows in MathHull. 2. there are many big objects there in MathHull. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 09:11:02AM -0500, Bo Peng wrote: I guess very few people know the background of mathed can be changed in 1.5.0. And this increased the size of small insets only by 20%... what a bargain! You mean adding background increases inset size? I have no idea what you are talking about here. Right. Commit 17913 added int InsetBase::background_color_ to InsetBase that used to be 16 bytes a while ago. Andre'
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 04:25:27PM +0200, Enrico Forestieri wrote: On Tue, Jun 05, 2007 at 12:56:41PM +0200, Helge Hafting wrote: Bo Peng wrote: Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. Can't we just remove the extra spacing around math instead? That's a matter of font metrics, I fear. Not the 2 pixel boundary every inset has? Andre'
Re: How to make Lyx DRAMATICALLY better.
You are right, that's it. I simply noticed that the space between the math inset and an 'a' in $1$a and $g$a seems to be bigger in the first case, but that turns out to be an optical effect. And a non-background mathbg shows the problem clearly. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 02:09:26PM -0500, Bo Peng wrote: You are right, that's it. I simply noticed that the space between the math inset and an 'a' in $1$a and $g$a seems to be bigger in the first case, but that turns out to be an optical effect. And a non-background mathbg shows the problem clearly. So, better not implementing it in order to hide this defect ;-) -- Enrico
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 08:17:37PM +0200, Andre Poenitz wrote: On Tue, Jun 05, 2007 at 04:25:27PM +0200, Enrico Forestieri wrote: On Tue, Jun 05, 2007 at 12:56:41PM +0200, Helge Hafting wrote: Bo Peng wrote: Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. Can't we just remove the extra spacing around math instead? That's a matter of font metrics, I fear. Not the 2 pixel boundary every inset has? You are right, that's it. I simply noticed that the space between the math inset and an 'a' in $1$a and $g$a seems to be bigger in the first case, but that turns out to be an optical effect. This 2 pixel boundary really makes it appear as if there is a real space between the two 'a's in $\displaystyle\text{a}$a as they sum up... -- Enrico
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 09:02:36PM +0200, Enrico Forestieri wrote: On Tue, Jun 05, 2007 at 08:17:37PM +0200, Andre Poenitz wrote: On Tue, Jun 05, 2007 at 04:25:27PM +0200, Enrico Forestieri wrote: On Tue, Jun 05, 2007 at 12:56:41PM +0200, Helge Hafting wrote: Bo Peng wrote: Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. Can't we just remove the extra spacing around math instead? That's a matter of font metrics, I fear. Not the 2 pixel boundary every inset has? You are right, that's it. I simply noticed that the space between the math inset and an 'a' in $1$a and $g$a seems to be bigger in the first case, but that turns out to be an optical effect. This 2 pixel boundary really makes it appear as if there is a real space between the two 'a's in $\displaystyle\text{a}$a as they sum up... Indeed. There is an easy solution which is, unfortunately, not easy at all: Do not reserve extra space for the corner markers, but draw the corner markers outside the space owned by the inset. Andre'
Re: How to make Lyx DRAMATICALLY better.
On Tuesday 05 June 2007 19:16:08 Andre Poenitz wrote: Right. Commit 17913 added int InsetBase::background_color_ to InsetBase that used to be 16 bytes a while ago. Andre' Cann't that be a class method instead of an instance method? (In C++ parlance mode a static class method/data I think). -- José Abílio
Re: How to make Lyx DRAMATICALLY better.
Andre == Andre Poenitz [EMAIL PROTECTED] writes: Andre There is an easy solution which is, unfortunately, not easy at Andre all: Do not reserve extra space for the corner markers, but Andre draw the corner markers outside the space owned by the inset. Or replace the corners by a change of color of the inset that is currently edited. JMarc
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 11:13:11PM +0200, Jean-Marc Lasgouttes wrote: Andre == Andre Poenitz [EMAIL PROTECTED] writes: Andre There is an easy solution which is, unfortunately, not easy at Andre all: Do not reserve extra space for the corner markers, but Andre draw the corner markers outside the space owned by the inset. Or replace the corners by a change of color of the inset that is currently edited. Oh, no. JMarc, you too... Please, look at how texmacs does it. This is similar to what Andrè suggests. Draw the inset markers without reserving any space for them but keep track of the cursor position, such as moving the cursor may seem to not move it but simply goes from an inset to another when they are stacked, until you are logically in the outer inset and then you can move the cursor. The logical cursor position may be tracked in the minibuffer, of course. Please, no changing colours, no special effects, no eye candies... These things may be easier to implement but are very annoying. -- Enrico
Re: How to make Lyx DRAMATICALLY better.
Please, no changing colours, no special effects, no eye candies... These things may be easier to implement but are very annoying. Please test the patch I proposed (the newer version), along with the problems I described. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 04:46:56PM -0500, Bo Peng wrote: Please, no changing colours, no special effects, no eye candies... These things may be easier to implement but are very annoying. Please test the patch I proposed (the newer version), along with the problems I described. Actually, I tested it. As I had changed the background colours, I saw flashing colours all around when I moved the cursor over a math inset. I also don't like having the markers highlighted. There are better methods to achieve the wanted result, only they are not cheap, maybe. But this makes the difference between an excellent software and a passable one... -- Enrico
Re: How to make Lyx DRAMATICALLY better.
Actually, I tested it. As I had changed the background colours, I saw flashing colours all around when I moved the cursor over a math inset. mathbg and mathhoverbg are the same as background. If you set them to flashing colors, that is your problem. The only change to the default behavior is the showing of corners, which can hardly be called flashing. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 05:05:05PM -0500, Bo Peng wrote: Actually, I tested it. As I had changed the background colours, I saw flashing colours all around when I moved the cursor over a math inset. mathbg and mathhoverbg are the same as background. If you set them to flashing colors, that is your problem. No, you are making my problems ;-) When I want to change background I have to take into account mathhoverbg, too. Please, remove that. The only change to the default behavior is the showing of corners, which can hardly be called flashing. Yes, if you remove mathhoverbg, that would be true. -- Enrico
Re: How to make Lyx DRAMATICALLY better.
No, you are making my problems ;-) When I want to change background I have to take into account mathhoverbg, too. Please, remove that. This part is true, but the same goes to buttonbg and buttonhoverbg. Yes, if you remove mathhoverbg, that would be true. So the defaults should fit your taste. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 10:07:40PM +0100, José Matos wrote: On Tuesday 05 June 2007 19:16:08 Andre Poenitz wrote: Right. Commit 17913 added int InsetBase::background_color_ to InsetBase that used to be 16 bytes a while ago. Andre' Cann't that be a class method instead of an instance method? (In C++ parlance mode a static class method/data I think). Not really, as this assumes that all inset backgrounds are equal. Buts it would be sufficient if only insets that _do_ have a variable background would have that member. Andre'
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 11:13:11PM +0200, Jean-Marc Lasgouttes wrote: Andre == Andre Poenitz [EMAIL PROTECTED] writes: Andre There is an easy solution which is, unfortunately, not easy at Andre all: Do not reserve extra space for the corner markers, but Andre draw the corner markers outside the space owned by the inset. Or replace the corners by a change of color of the inset that is currently edited. That would be the _outermost_ inset that's being edited? Andre'
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 05:17:20PM -0500, Bo Peng wrote: No, you are making my problems ;-) When I want to change background I have to take into account mathhoverbg, too. Please, remove that. This part is true, but the same goes to buttonbg and buttonhoverbg. Seems that you are making me a lot of problems ;-) Yes, if you remove mathhoverbg, that would be true. So the defaults should fit your taste. None so deaf as those that will not hear ;-) -- Enrico
Re: How to make Lyx DRAMATICALLY better.
On Mon, Jun 04, 2007 at 04:34:32PM -0500, Bo Peng wrote: > >Note that 1.5 should support math background allowing you to have a > >flashy yellow background. > > I guess very few people know the background of mathed can be changed > in 1.5.0. And this increased the size of small insets only by 20%... what a bargain! Andre'
Re: How to make Lyx DRAMATICALLY better.
On Mon, 4 Jun 2007, Bo Peng wrote: Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. If nothing else, it should be documented. So for now I've added: * Possibility of changing background of math insets in the LyX view to http://wiki.lyx.org/LyX/DocumentationDevelopment as a reminder for later. (I'll eventually turn these into bugzilla issues, at the moment it's quicker to just add a line to the wiki). /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: How to make Lyx DRAMATICALLY better.
Bo Peng wrote: Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. Can't we just remove the extra spacing around math instead? If the user then writes My "formulax+x=2xis a true statement", then the lack of spacing will be as obvious in LyX as it is now in this email. There will be no need to indicate where the inset ends with background color then. I don't think people will object to adding the spaces themselves - this is no harder than adding spaces around words. (The user adding spaces explicitly is necessary, there are several kind of spacing after all) Problem solvable without "ugly math". Helge Hafting
Re: How to make Lyx DRAMATICALLY better.
> I guess very few people know the background of mathed can be changed > in 1.5.0. And this increased the size of small insets only by 20%... what a bargain! You mean adding background increases inset size? I have no idea what you are talking about here. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 09:11:02AM -0500, Bo Peng wrote: > >> I guess very few people know the background of mathed can be changed > >> in 1.5.0. > > > >And this increased the size of small insets only by 20%... what a > >bargain! > > You mean adding background increases inset size? I have no idea what > you are talking about here. I suppose he means the memory footprint. /** We store the Color::color value as an int to get Color.h out * of the header file. */ int background_color_; - Martin
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 12:56:41PM +0200, Helge Hafting wrote: > Bo Peng wrote: > >> Note that 1.5 should support math background allowing you to have a > >> flashy yellow background. > > > > I guess very few people know the background of mathed can be changed > > in 1.5.0. Can we use a color that is different from background as > > default? If people do not like it, they can change it back to > > background color. > Can't we just remove the extra spacing around math instead? That's a matter of font metrics, I fear. > If the user then writes My "formulax+x=2xis a true statement", then > the lack of spacing will be as obvious in LyX as it is now in this email. > There will be no need to indicate where the inset ends with > background color then. I don't think people will object > to adding the spaces themselves - this is no harder than adding > spaces around words. (The user adding spaces explicitly is necessary, > there are several kind of spacing after all) > > Problem solvable without "ugly math". Maybe we can try to avoid not having a space after math. I mean, when you leave a math inset by hitting the space bar, LyX does not insert a space after the math and perhaps it should. I think that this change would cure the vast majority of "missing space after math" cases. -- Enrico
Re: How to make Lyx DRAMATICALLY better.
I suppose he means the memory footprint. /** We store the Color::color value as an int to get Color.h out * of the header file. */ int background_color_; This has nothing to do with my patch. If he meant bool mouse_hover_, then he calculated wrong because 1. it only shows in MathHull. 2. there are many big objects there in MathHull. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 09:11:02AM -0500, Bo Peng wrote: > >> I guess very few people know the background of mathed can be changed > >> in 1.5.0. > > > >And this increased the size of small insets only by 20%... what a > >bargain! > > You mean adding background increases inset size? I have no idea what > you are talking about here. Right. Commit 17913 added int InsetBase::background_color_ to InsetBase that used to be 16 bytes a while ago. Andre'
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 04:25:27PM +0200, Enrico Forestieri wrote: > On Tue, Jun 05, 2007 at 12:56:41PM +0200, Helge Hafting wrote: > > Bo Peng wrote: > > >> Note that 1.5 should support math background allowing you to have a > > >> flashy yellow background. > > > > > > I guess very few people know the background of mathed can be changed > > > in 1.5.0. Can we use a color that is different from background as > > > default? If people do not like it, they can change it back to > > > background color. > > Can't we just remove the extra spacing around math instead? > > That's a matter of font metrics, I fear. Not the 2 pixel boundary every inset has? Andre'
Re: How to make Lyx DRAMATICALLY better.
You are right, that's it. I simply noticed that the space between the math inset and an 'a' in $1$a and $g$a seems to be bigger in the first case, but that turns out to be an optical effect. And a non-background mathbg shows the problem clearly. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 02:09:26PM -0500, Bo Peng wrote: > > You are right, that's it. I simply noticed that the space > > between the math inset and an 'a' in $1$a and $g$a seems to be > > bigger in the first case, but that turns out to be an optical effect. > > And a non-background mathbg shows the problem clearly. So, better not implementing it in order to hide this defect ;-) -- Enrico
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 08:17:37PM +0200, Andre Poenitz wrote: > On Tue, Jun 05, 2007 at 04:25:27PM +0200, Enrico Forestieri wrote: > > On Tue, Jun 05, 2007 at 12:56:41PM +0200, Helge Hafting wrote: > > > Bo Peng wrote: > > > >> Note that 1.5 should support math background allowing you to have a > > > >> flashy yellow background. > > > > > > > > I guess very few people know the background of mathed can be changed > > > > in 1.5.0. Can we use a color that is different from background as > > > > default? If people do not like it, they can change it back to > > > > background color. > > > Can't we just remove the extra spacing around math instead? > > > > That's a matter of font metrics, I fear. > > Not the 2 pixel boundary every inset has? You are right, that's it. I simply noticed that the space between the math inset and an 'a' in $1$a and $g$a seems to be bigger in the first case, but that turns out to be an optical effect. This 2 pixel boundary really makes it appear as if there is a real space between the two 'a's in $\displaystyle\text{a}$a as they sum up... -- Enrico
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 09:02:36PM +0200, Enrico Forestieri wrote: > On Tue, Jun 05, 2007 at 08:17:37PM +0200, Andre Poenitz wrote: > > On Tue, Jun 05, 2007 at 04:25:27PM +0200, Enrico Forestieri wrote: > > > On Tue, Jun 05, 2007 at 12:56:41PM +0200, Helge Hafting wrote: > > > > Bo Peng wrote: > > > > >> Note that 1.5 should support math background allowing you to have a > > > > >> flashy yellow background. > > > > > > > > > > I guess very few people know the background of mathed can be changed > > > > > in 1.5.0. Can we use a color that is different from background as > > > > > default? If people do not like it, they can change it back to > > > > > background color. > > > > Can't we just remove the extra spacing around math instead? > > > > > > That's a matter of font metrics, I fear. > > > > Not the 2 pixel boundary every inset has? > > You are right, that's it. I simply noticed that the space > between the math inset and an 'a' in $1$a and $g$a seems to be > bigger in the first case, but that turns out to be an optical effect. > > This 2 pixel boundary really makes it appear as if there is a real > space between the two 'a's in $\displaystyle\text{a}$a > as they sum up... Indeed. There is an easy solution which is, unfortunately, not easy at all: Do not reserve extra space for the corner markers, but draw the corner markers outside the space owned by the inset. Andre'
Re: How to make Lyx DRAMATICALLY better.
On Tuesday 05 June 2007 19:16:08 Andre Poenitz wrote: > Right. Commit 17913 added int InsetBase::background_color_ to InsetBase > that used to be 16 bytes a while ago. > > Andre' Cann't that be a class method instead of an instance method? (In C++ parlance mode a static class method/data I think). -- José Abílio
Re: How to make Lyx DRAMATICALLY better.
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> There is an easy solution which is, unfortunately, not easy at Andre> all: Do not reserve extra space for the corner markers, but Andre> draw the corner markers outside the space owned by the inset. Or replace the corners by a change of color of the inset that is currently edited. JMarc
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 11:13:11PM +0200, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Andre> There is an easy solution which is, unfortunately, not easy at > Andre> all: Do not reserve extra space for the corner markers, but > Andre> draw the corner markers outside the space owned by the inset. > > Or replace the corners by a change of color of the inset that is > currently edited. Oh, no. JMarc, you too... Please, look at how texmacs does it. This is similar to what Andrè suggests. Draw the inset markers without reserving any space for them but keep track of the cursor position, such as moving the cursor may seem to not move it but simply goes from an inset to another when they are stacked, until you are logically in the outer inset and then you can move the cursor. The logical cursor position may be tracked in the minibuffer, of course. Please, no changing colours, no special effects, no eye candies... These things may be easier to implement but are very annoying. -- Enrico
Re: How to make Lyx DRAMATICALLY better.
Please, no changing colours, no special effects, no eye candies... These things may be easier to implement but are very annoying. Please test the patch I proposed (the newer version), along with the problems I described. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 04:46:56PM -0500, Bo Peng wrote: > > Please, no changing colours, no special effects, no eye candies... > > These things may be easier to implement but are very annoying. > > Please test the patch I proposed (the newer version), along with the > problems I described. Actually, I tested it. As I had changed the background colours, I saw flashing colours all around when I moved the cursor over a math inset. I also don't like having the markers highlighted. There are better methods to achieve the wanted result, only they are not cheap, maybe. But this makes the difference between an excellent software and a passable one... -- Enrico
Re: How to make Lyx DRAMATICALLY better.
Actually, I tested it. As I had changed the background colours, I saw flashing colours all around when I moved the cursor over a math inset. mathbg and mathhoverbg are the same as background. If you set them to flashing colors, that is your problem. The only change to the default behavior is the showing of corners, which can hardly be called flashing. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 05:05:05PM -0500, Bo Peng wrote: > > Actually, I tested it. As I had changed the background colours, I > > saw flashing colours all around when I moved the cursor over a math > > inset. > > mathbg and mathhoverbg are the same as background. If you set them to > flashing colors, that is your problem. No, you are making my problems ;-) When I want to change background I have to take into account mathhoverbg, too. Please, remove that. > The only change to the default behavior is the showing of corners, > which can hardly be called flashing. Yes, if you remove mathhoverbg, that would be true. -- Enrico
Re: How to make Lyx DRAMATICALLY better.
No, you are making my problems ;-) When I want to change background I have to take into account mathhoverbg, too. Please, remove that. This part is true, but the same goes to buttonbg and buttonhoverbg. Yes, if you remove mathhoverbg, that would be true. So the defaults should fit your taste. Bo
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 10:07:40PM +0100, José Matos wrote: > On Tuesday 05 June 2007 19:16:08 Andre Poenitz wrote: > > Right. Commit 17913 added int InsetBase::background_color_ to InsetBase > > that used to be 16 bytes a while ago. > > > > Andre' > > Cann't that be a class method instead of an instance method? (In C++ parlance > mode a static class method/data I think). Not really, as this assumes that all inset backgrounds are equal. Buts it would be sufficient if only insets that _do_ have a variable background would have that member. Andre'
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 11:13:11PM +0200, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Andre> There is an easy solution which is, unfortunately, not easy at > Andre> all: Do not reserve extra space for the corner markers, but > Andre> draw the corner markers outside the space owned by the inset. > > Or replace the corners by a change of color of the inset that is > currently edited. That would be the _outermost_ inset that's being edited? Andre'
Re: How to make Lyx DRAMATICALLY better.
On Tue, Jun 05, 2007 at 05:17:20PM -0500, Bo Peng wrote: > > No, you are making my problems ;-) > > When I want to change background I have to take into account > > mathhoverbg, too. Please, remove that. > > This part is true, but the same goes to buttonbg and buttonhoverbg. Seems that you are making me a lot of problems ;-) > > Yes, if you remove mathhoverbg, that would be true. > > So the defaults should fit your taste. None so deaf as those that will not hear ;-) -- Enrico
Re: How to make Lyx DRAMATICALLY better.
On Sun, 3 Jun 2007, Andreas Neustifter wrote: On 02.06.2007, at 00:39, Tim Michelsen wrote: I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a /real space/ (like the one we put between 2 words). I'm also struggling with math and white spaces sometimes, would be great to have some sort of automatic blanks around math. Although I've had the problem of not getting spaces after the inline formula, I'm not sure I'd always like to get the space automtically... Hmm... could it be an idea to give an inline formula some kind of property that says it should automatically get a space? Then the user could toggle some default preference equivalent to: Inline math-insets should be surrounded by space automtically by default. Just a thought. /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: How to make Lyx DRAMATICALLY better.
Tim Michelsen wrote: Hello, I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a /real space/ (like the one we put between 2 words). Hm. If LaTeX don't add spacing there, then LyX shouldn't either, unless LyX also add spaces in the output. But there will be cases where people want no spaces, so I think LyX shouldn't add anything. If an in-line formula crash into the text on the display, then people will add whatever space the need because the problem is so clearly visible. I think that is the correct solution. Helge Hafting
Re: How to make Lyx DRAMATICALLY better.
Helge Hafting wrote: Tim Michelsen wrote: Hello, I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a /real space/ (like the one we put between 2 words). I don't see it quote that way. If I have a math-inset with x^2 = 1, then I see a bit of space. But if I have x^2 = y, then I don't. The space seems to be due, then, to the 1, and is the space it occupies. Same if I have x^2 = \textnormal{i}. So there is some issue here about font metrics. Hm. If LaTeX don't add spacing there, then LyX shouldn't either, unless LyX also add spaces in the output. But there will be cases where people want no spaces, so I think LyX shouldn't add anything. Agreed. Richard -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: How to make Lyx DRAMATICALLY better.
Hm. If LaTeX don't add spacing there, then LyX shouldn't either, unless LyX also add spaces in the output. But there will be cases where people want no spaces, so I think LyX shouldn't add anything. Agreed. I think you are both right concerning output there shouldn't be added anything in LyX that isn't needed in LaTeX. I think what the could be useful is a better (visual) user feedback on wheather there'll be /real/ space or not in the output. I cite the suggestions in http://article.gmane.org/gmane.editors.lyx.devel/83103 the exact extent of that rectangular region is indicated by four purple corner markers. For various purposes it is highly desirable to to be able to see the exact location and extent of the formula region also when the cursor is outside that region. Thus I strongly suggest offering the option If the user knows exactly where the equation ends and if there's a space added there'll be no surprises in output. The option preview isn't enabled by default. If a user has set it in his preferences the latter example (x2 = 1) will not be rendered as preview if the space hasn't been added. I may need to remind that I am still working on 1.4.3 (Ubuntu) and haven't tested the 1.5.x realeases, yet. Kind regards, Timmie
Re: How to make Lyx DRAMATICALLY better.
I think what the could be useful is a better (visual) user feedback on wheather there'll be /real/ space or not in the output. I have not followed this thread closely, but are you guys suggesting *visible* blanks and newlines as what vim and word have? I would support such a feature request. Bo
Re: How to make Lyx DRAMATICALLY better.
Bo Peng schrieb: I think what the could be useful is a better (visual) user feedback on wheather there'll be /real/ space or not in the output. I have not followed this thread closely, but are you guys suggesting *visible* blanks and newlines as what vim and word have? Kind of. There are only some cases where it could be useful to have a visual feedback wheather there's a space between a inset and the sourrounding text. For use cases check back on my post at: http://permalink.gmane.org/gmane.editors.lyx.devel/86469 I think we don't neet this for general text like in Word or OOo: I-have-an-apple. This is useless because Lyx intelligently removes aboundant spaces. It could be a feedback which can be switched on and of upon need and users liking. Maybe -- you developers know it better than I -- it could easier be implemented through some kind of macro. If the searchreplace dialog of Lyx would support advanced formatting (newline, lyx notes, footnotes, etc.) we could search for such cases. I would support such a feature request. Thank you.
Re: How to make Lyx DRAMATICALLY better.
Tim == Tim Michelsen [EMAIL PROTECTED] writes: Tim Bo Peng schrieb: I think what the could be useful is a better (visual) user feedback on wheather there'll be /real/ space or not in the output. I have not followed this thread closely, but are you guys suggesting *visible* blanks and newlines as what vim and word have? Tim Kind of. There are only some cases where it could be useful to Tim have a visual feedback wheather there's a space between a inset Tim and the sourrounding text. For use cases check back on my post Note that 1.5 should support math background allowing you to have a flashy yellow background. JMarc
Re: How to make Lyx DRAMATICALLY better.
Note that 1.5 should support math background allowing you to have a flashy yellow background. OK, then. To conclude this matter: We will try that and if not sufficient look for other forms of improvement.
Re: How to make Lyx DRAMATICALLY better.
Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. Bo
Re: How to make Lyx DRAMATICALLY better.
Bo == Bo Peng [EMAIL PROTECTED] writes: Note that 1.5 should support math background allowing you to have a flashy yellow background. Bo I guess very few people know the background of mathed can be Bo changed in 1.5.0. Can we use a color that is different from Bo background as default? If people do not like it, they can change Bo it back to background color. I am not sure that we shall annoy all the people who like their maths as thet are for the benefit of the few people who may not find it. Personally, as a reasonably heavy math use, I'd hate to have a windows cluttered by differently colored insets all over. JMarc
Re: How to make Lyx DRAMATICALLY better.
Bo I guess very few people know the background of mathed can be Bo changed in 1.5.0. Can we use a color that is different from Bo background as default? If people do not like it, they can change Bo it back to background color. What about adding this kind of information to *_splash.lyx? We could have a second section which highlights the most important new features and changes for the user like the wiki page: http://wiki.lyx.org/LyX/NewInLyX15 When the new Lyx will be used first time a user could then be informed. There's another advantage: Most longtime users don't know about the exciting new features and will be made aware through such a message. If this procedure is used the splash file needs to pop up even if a user just upgrades (applicable to debian and rpm package managements). What do you think? = The user may see that 1.5.0 *is* DRAMATICALLY better ;-)
Re: How to make Lyx DRAMATICALLY better.
Personally, as a reasonably heavy math use, I'd hate to have a windows cluttered by differently colored insets all over. You will not, because I will propose a background color that is the same as buttonbg; and if you are willing to go a step further, the attached patch implements mathhoverbg (the same as buttonhoverbg) so mathed will have the same hover behavior as InsetCommand. Try it yourself and let me know if you like it. Bo Index: src/Color.h === --- src/Color.h (revision 18674) +++ src/Color.h (working copy) @@ -121,6 +121,8 @@ math, /// Math inset background color mathbg, + /// Math inset background color under focus + mathhoverbg, /// Macro math inset background color mathmacrobg, /// Math inset frame color under focus Index: src/mathed/InsetMathHull.cpp === --- src/mathed/InsetMathHull.cpp (revision 18674) +++ src/mathed/InsetMathHull.cpp (working copy) @@ -159,7 +159,7 @@ InsetMathHull::InsetMathHull() : InsetMathGrid(1, 1), type_(hullNone), nonum_(1), label_(1), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) { //lyxerr sizeof InsetMath: sizeof(InsetMath) endl; //lyxerr sizeof MetricsInfo: sizeof(MetricsInfo) endl; @@ -172,7 +172,7 @@ InsetMathHull::InsetMathHull(HullType type) : InsetMathGrid(getCols(type), 1), type_(type), nonum_(1), label_(1), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) { initMath(); setDefaults(); @@ -182,7 +182,7 @@ InsetMathHull::InsetMathHull(InsetMathHull const other) : InsetMathGrid(other), type_(other.type_), nonum_(other.nonum_), label_(other.label_), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) {} @@ -205,6 +205,7 @@ nonum_ = other.nonum_; label_ = other.label_; preview_.reset(new RenderPreview(*other.preview_, this)); + mouse_hover_ = false; return *this; } @@ -333,6 +334,13 @@ } +bool InsetMathHull::setMouseHover(bool mouse_hover) +{ + mouse_hover_ = mouse_hover; + return true; +} + + void InsetMathHull::draw(PainterInfo pi, int x, int y) const { use_preview_ = previewState(pi.base.bv); @@ -341,7 +349,8 @@ // selection at the top level of nested inset is difficult to handle. if (!editing(pi.base.bv)) pi.pain.fillRectangle(x + 1, y - ascent() + 1, width() - 2, -ascent() + descent() - 1, Color::mathbg); +ascent() + descent() - 1, +mouse_hover_ ? Color::mathhoverbg : Color::mathbg); if (use_preview_) { // one pixel gap in front Index: src/mathed/InsetMathHull.h === --- src/mathed/InsetMathHull.h (revision 18674) +++ src/mathed/InsetMathHull.h (working copy) @@ -121,6 +121,9 @@ /// static int displayMargin() { return 12; } + /// + bool setMouseHover(bool mouse_hover); + protected: InsetMathHull(InsetMathHull const ); @@ -183,6 +186,8 @@ boost::scoped_ptrRenderPreview preview_; /// mutable bool use_preview_; + /// + bool mouse_hover_; // // Incorporate me // Index: src/Color.cpp === --- src/Color.cpp (revision 18674) +++ src/Color.cpp (working copy) @@ -294,7 +294,8 @@ { commandframe, N_(command inset frame), commandframe, black, commandframe }, { special, N_(special character), special, RoyalBlue, special }, { math, N_(math), math, DarkBlue, math }, - { mathbg, N_(math background), mathbg, linen, mathbg }, + { mathbg, N_(math background), mathbg, #dcd2c8, mathbg }, + { mathhoverbg, N_(math background under focus), mathhoverbg, #C7C7CA, mathhoverbg }, { graphicsbg, N_(graphics background), graphicsbg, linen, graphicsbg }, { mathmacrobg, N_(Math macro background), mathmacrobg, linen, mathmacrobg }, { mathframe, N_(math frame), mathframe, Magenta, mathframe },
Re: How to make Lyx DRAMATICALLY better.
Bo Peng wrote: Personally, as a reasonably heavy math use, I'd hate to have a windows cluttered by differently colored insets all over. You will not, because I will propose a background color that is the same as buttonbg; and if you are willing to go a step further, the attached patch implements mathhoverbg (the same as buttonhoverbg) so mathed will have the same hover behavior as InsetCommand. I'd propose a background color that is only BARELY different from the normal background. So you'd see the difference but it wouldn't be intrusive. rh Try it yourself and let me know if you like it. Bo Index: src/Color.h === --- src/Color.h (revision 18674) +++ src/Color.h (working copy) @@ -121,6 +121,8 @@ math, /// Math inset background color mathbg, + /// Math inset background color under focus + mathhoverbg, /// Macro math inset background color mathmacrobg, /// Math inset frame color under focus Index: src/mathed/InsetMathHull.cpp === --- src/mathed/InsetMathHull.cpp(revision 18674) +++ src/mathed/InsetMathHull.cpp(working copy) @@ -159,7 +159,7 @@ InsetMathHull::InsetMathHull() : InsetMathGrid(1, 1), type_(hullNone), nonum_(1), label_(1), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) { //lyxerr sizeof InsetMath: sizeof(InsetMath) endl; //lyxerr sizeof MetricsInfo: sizeof(MetricsInfo) endl; @@ -172,7 +172,7 @@ InsetMathHull::InsetMathHull(HullType type) : InsetMathGrid(getCols(type), 1), type_(type), nonum_(1), label_(1), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) { initMath(); setDefaults(); @@ -182,7 +182,7 @@ InsetMathHull::InsetMathHull(InsetMathHull const other) : InsetMathGrid(other), type_(other.type_), nonum_(other.nonum_), label_(other.label_), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) {} @@ -205,6 +205,7 @@ nonum_ = other.nonum_; label_ = other.label_; preview_.reset(new RenderPreview(*other.preview_, this)); + mouse_hover_ = false; return *this; } @@ -333,6 +334,13 @@ } +bool InsetMathHull::setMouseHover(bool mouse_hover) +{ + mouse_hover_ = mouse_hover; + return true; +} + + void InsetMathHull::draw(PainterInfo pi, int x, int y) const { use_preview_ = previewState(pi.base.bv); @@ -341,7 +349,8 @@ // selection at the top level of nested inset is difficult to handle. if (!editing(pi.base.bv)) pi.pain.fillRectangle(x + 1, y - ascent() + 1, width() - 2, - ascent() + descent() - 1, Color::mathbg); +ascent() + descent() - 1, +mouse_hover_ ? Color::mathhoverbg : Color::mathbg); if (use_preview_) { // one pixel gap in front Index: src/mathed/InsetMathHull.h === --- src/mathed/InsetMathHull.h (revision 18674) +++ src/mathed/InsetMathHull.h (working copy) @@ -121,6 +121,9 @@ /// static int displayMargin() { return 12; } + /// + bool setMouseHover(bool mouse_hover); + protected: InsetMathHull(InsetMathHull const ); @@ -183,6 +186,8 @@ boost::scoped_ptrRenderPreview preview_; /// mutable bool use_preview_; + /// + bool mouse_hover_; // // Incorporate me // Index: src/Color.cpp === --- src/Color.cpp (revision 18674) +++ src/Color.cpp (working copy) @@ -294,7 +294,8 @@ { commandframe, N_(command inset frame), commandframe, black, commandframe }, { special, N_(special character), special, RoyalBlue, special }, { math, N_(math), math, DarkBlue, math }, - { mathbg, N_(math background), mathbg, linen, mathbg }, + { mathbg, N_(math background), mathbg, #dcd2c8, mathbg }, + { mathhoverbg, N_(math background under focus), mathhoverbg, #C7C7CA, mathhoverbg }, { graphicsbg, N_(graphics background), graphicsbg, linen, graphicsbg }, { mathmacrobg, N_(Math macro background), mathmacrobg, linen, mathmacrobg }, { mathframe, N_(math frame), mathframe, Magenta, mathframe }, -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash:
Re: How to make Lyx DRAMATICALLY better.
I'd propose a background color that is only BARELY different from the normal background. So you'd see the difference but it wouldn't be intrusive. Please apply the patch and propose a color that you like most. My proposed colors are the same as those of buttons so no additional color has been added.. Bo
Re: How to make Lyx DRAMATICALLY better.
On Sun, 3 Jun 2007, Andreas Neustifter wrote: On 02.06.2007, at 00:39, Tim Michelsen wrote: I just want to add something from a users experience with math in normal text. > > As far as I can recall, one reason that I particularly wanted this > > feature > > was to enable me to see more clearly whether or not I had spaces > > between > > a formula and the text following or preceding it. > > I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a /real space/ (like the one we put between 2 words). I'm also struggling with math and white spaces sometimes, would be great to have some sort of automatic blanks around math. Although I've had the problem of not getting spaces after the inline formula, I'm not sure I'd always like to get the space automtically... Hmm... could it be an idea to give an inline formula some kind of property that says it should automatically get a space? Then the user could toggle some default preference equivalent to: Inline math-insets should be surrounded by space automtically by default. Just a thought. /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: How to make Lyx DRAMATICALLY better.
Tim Michelsen wrote: Hello, I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a /real space/ (like the one we put between 2 words). Hm. If LaTeX don't add spacing there, then LyX shouldn't either, unless LyX also add spaces in the output. But there will be cases where people want no spaces, so I think LyX shouldn't add anything. If an in-line formula crash into the text on the display, then people will add whatever space the need because the problem is so clearly visible. I think that is the correct solution. Helge Hafting
Re: How to make Lyx DRAMATICALLY better.
Helge Hafting wrote: Tim Michelsen wrote: Hello, I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a /real space/ (like the one we put between 2 words). I don't see it quote that way. If I have a math-inset with "x^2 = 1", then I see a bit of space. But if I have "x^2 = y", then I don't. The space seems to be due, then, to the "1", and is the space it occupies. Same if I have "x^2 = \textnormal{i}". So there is some issue here about font metrics. Hm. If LaTeX don't add spacing there, then LyX shouldn't either, unless LyX also add spaces in the output. But there will be cases where people want no spaces, so I think LyX shouldn't add anything. Agreed. Richard -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ == Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Re: How to make Lyx DRAMATICALLY better.
Hm. If LaTeX don't add spacing there, then LyX shouldn't either, unless LyX also add spaces in the output. But there will be cases where people want no spaces, so I think LyX shouldn't add anything. Agreed. I think you are both right concerning output there shouldn't be added anything in LyX that isn't needed in LaTeX. I think what the could be useful is a better (visual) user feedback on wheather there'll be /real/ space or not in the output. I cite the suggestions in http://article.gmane.org/gmane.editors.lyx.devel/83103 > the exact extent of that rectangular region is > indicated by four purple "corner markers". For various purposes it is > highly desirable to to be able to see the exact location and extent of > the "formula region" also when the cursor is outside that region. Thus I > strongly suggest offering the option If the user knows exactly where the equation ends and if there's a space added there'll be no surprises in output. The option "preview" isn't enabled by default. If a user has set it in his preferences the latter example ("x2 = 1") will not be rendered as preview if the space hasn't been added. I may need to remind that I am still working on 1.4.3 (Ubuntu) and haven't tested the 1.5.x realeases, yet. Kind regards, Timmie
Re: How to make Lyx DRAMATICALLY better.
I think what the could be useful is a better (visual) user feedback on wheather there'll be /real/ space or not in the output. I have not followed this thread closely, but are you guys suggesting *visible* blanks and newlines as what vim and word have? I would support such a feature request. Bo
Re: How to make Lyx DRAMATICALLY better.
Bo Peng schrieb: I think what the could be useful is a better (visual) user feedback on wheather there'll be /real/ space or not in the output. I have not followed this thread closely, but are you guys suggesting *visible* blanks and newlines as what vim and word have? Kind of. There are only some cases where it could be useful to have a visual feedback wheather there's a space between a inset and the sourrounding text. For use cases check back on my post at: http://permalink.gmane.org/gmane.editors.lyx.devel/86469 I think we don't neet this for general text like in Word or OOo: I-have-an-apple. This is useless because Lyx intelligently removes aboundant spaces. It could be a feedback which can be switched on and of upon need and users liking. Maybe -- you developers know it better than I -- it could easier be implemented through some kind of macro. If the search dialog of Lyx would support advanced formatting (newline, lyx notes, footnotes, etc.) we could search for such cases. I would support such a feature request. Thank you.
Re: How to make Lyx DRAMATICALLY better.
> "Tim" == Tim Michelsen <[EMAIL PROTECTED]> writes: Tim> Bo Peng schrieb: >>> I think what the could be useful is a better (visual) user >>> feedback on wheather there'll be /real/ space or not in the >>> output. >> I have not followed this thread closely, but are you guys >> suggesting *visible* blanks and newlines as what vim and word have? Tim> Kind of. There are only some cases where it could be useful to Tim> have a visual feedback wheather there's a space between a inset Tim> and the sourrounding text. For use cases check back on my post Note that 1.5 should support math background allowing you to have a flashy yellow background. JMarc
Re: How to make Lyx DRAMATICALLY better.
> Note that 1.5 should support math background allowing you to have a > flashy yellow background. OK, then. To conclude this matter: We will try that and if not sufficient look for other forms of improvement.
Re: How to make Lyx DRAMATICALLY better.
Note that 1.5 should support math background allowing you to have a flashy yellow background. I guess very few people know the background of mathed can be changed in 1.5.0. Can we use a color that is different from background as default? If people do not like it, they can change it back to background color. Bo
Re: How to make Lyx DRAMATICALLY better.
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes: >> Note that 1.5 should support math background allowing you to have a >> flashy yellow background. Bo> I guess very few people know the background of mathed can be Bo> changed in 1.5.0. Can we use a color that is different from Bo> background as default? If people do not like it, they can change Bo> it back to background color. I am not sure that we shall annoy all the people who like their maths as thet are for the benefit of the few people who may not find it. Personally, as a reasonably heavy math use, I'd hate to have a windows cluttered by differently colored insets all over. JMarc
Re: How to make Lyx DRAMATICALLY better.
Bo> I guess very few people know the background of mathed can be Bo> changed in 1.5.0. Can we use a color that is different from Bo> background as default? If people do not like it, they can change Bo> it back to background color. What about adding this kind of information to *_splash.lyx? We could have a second section which highlights the most important new features and changes for the user like the wiki page: http://wiki.lyx.org/LyX/NewInLyX15 When the new Lyx will be used first time a user could then be informed. There's another advantage: Most longtime users don't know about the exciting new features and will be made aware through such a message. If this procedure is used the splash file needs to pop up even if a user just upgrades (applicable to debian and rpm package managements). What do you think? => The user may see that 1.5.0 *is* DRAMATICALLY better ;-)
Re: How to make Lyx DRAMATICALLY better.
Personally, as a reasonably heavy math use, I'd hate to have a windows cluttered by differently colored insets all over. You will not, because I will propose a background color that is the same as buttonbg; and if you are willing to go a step further, the attached patch implements mathhoverbg (the same as buttonhoverbg) so mathed will have the same hover behavior as InsetCommand. Try it yourself and let me know if you like it. Bo Index: src/Color.h === --- src/Color.h (revision 18674) +++ src/Color.h (working copy) @@ -121,6 +121,8 @@ math, /// Math inset background color mathbg, + /// Math inset background color under focus + mathhoverbg, /// Macro math inset background color mathmacrobg, /// Math inset frame color under focus Index: src/mathed/InsetMathHull.cpp === --- src/mathed/InsetMathHull.cpp (revision 18674) +++ src/mathed/InsetMathHull.cpp (working copy) @@ -159,7 +159,7 @@ InsetMathHull::InsetMathHull() : InsetMathGrid(1, 1), type_(hullNone), nonum_(1), label_(1), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) { //lyxerr << "sizeof InsetMath: " << sizeof(InsetMath) << endl; //lyxerr << "sizeof MetricsInfo: " << sizeof(MetricsInfo) << endl; @@ -172,7 +172,7 @@ InsetMathHull::InsetMathHull(HullType type) : InsetMathGrid(getCols(type), 1), type_(type), nonum_(1), label_(1), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) { initMath(); setDefaults(); @@ -182,7 +182,7 @@ InsetMathHull::InsetMathHull(InsetMathHull const & other) : InsetMathGrid(other), type_(other.type_), nonum_(other.nonum_), label_(other.label_), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) {} @@ -205,6 +205,7 @@ nonum_ = other.nonum_; label_ = other.label_; preview_.reset(new RenderPreview(*other.preview_, this)); + mouse_hover_ = false; return *this; } @@ -333,6 +334,13 @@ } +bool InsetMathHull::setMouseHover(bool mouse_hover) +{ + mouse_hover_ = mouse_hover; + return true; +} + + void InsetMathHull::draw(PainterInfo & pi, int x, int y) const { use_preview_ = previewState(pi.base.bv); @@ -341,7 +349,8 @@ // selection at the top level of nested inset is difficult to handle. if (!editing(pi.base.bv)) pi.pain.fillRectangle(x + 1, y - ascent() + 1, width() - 2, -ascent() + descent() - 1, Color::mathbg); +ascent() + descent() - 1, +mouse_hover_ ? Color::mathhoverbg : Color::mathbg); if (use_preview_) { // one pixel gap in front Index: src/mathed/InsetMathHull.h === --- src/mathed/InsetMathHull.h (revision 18674) +++ src/mathed/InsetMathHull.h (working copy) @@ -121,6 +121,9 @@ /// static int displayMargin() { return 12; } + /// + bool setMouseHover(bool mouse_hover); + protected: InsetMathHull(InsetMathHull const &); @@ -183,6 +186,8 @@ boost::scoped_ptr preview_; /// mutable bool use_preview_; + /// + bool mouse_hover_; // // Incorporate me // Index: src/Color.cpp === --- src/Color.cpp (revision 18674) +++ src/Color.cpp (working copy) @@ -294,7 +294,8 @@ { commandframe, N_("command inset frame"), "commandframe", "black", "commandframe" }, { special, N_("special character"), "special", "RoyalBlue", "special" }, { math, N_("math"), "math", "DarkBlue", "math" }, - { mathbg, N_("math background"), "mathbg", "linen", "mathbg" }, + { mathbg, N_("math background"), "mathbg", "#dcd2c8", "mathbg" }, + { mathhoverbg, N_("math background under focus"), "mathhoverbg", "#C7C7CA", "mathhoverbg" }, { graphicsbg, N_("graphics background"), "graphicsbg", "linen", "graphicsbg" }, { mathmacrobg, N_("Math macro background"), "mathmacrobg", "linen", "mathmacrobg" }, { mathframe, N_("math frame"), "mathframe", "Magenta", "mathframe" },
Re: How to make Lyx DRAMATICALLY better.
Bo Peng wrote: Personally, as a reasonably heavy math use, I'd hate to have a windows cluttered by differently colored insets all over. You will not, because I will propose a background color that is the same as buttonbg; and if you are willing to go a step further, the attached patch implements mathhoverbg (the same as buttonhoverbg) so mathed will have the same hover behavior as InsetCommand. I'd propose a background color that is only BARELY different from the normal background. So you'd see the difference but it wouldn't be intrusive. rh Try it yourself and let me know if you like it. Bo Index: src/Color.h === --- src/Color.h (revision 18674) +++ src/Color.h (working copy) @@ -121,6 +121,8 @@ math, /// Math inset background color mathbg, + /// Math inset background color under focus + mathhoverbg, /// Macro math inset background color mathmacrobg, /// Math inset frame color under focus Index: src/mathed/InsetMathHull.cpp === --- src/mathed/InsetMathHull.cpp(revision 18674) +++ src/mathed/InsetMathHull.cpp(working copy) @@ -159,7 +159,7 @@ InsetMathHull::InsetMathHull() : InsetMathGrid(1, 1), type_(hullNone), nonum_(1), label_(1), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) { //lyxerr << "sizeof InsetMath: " << sizeof(InsetMath) << endl; //lyxerr << "sizeof MetricsInfo: " << sizeof(MetricsInfo) << endl; @@ -172,7 +172,7 @@ InsetMathHull::InsetMathHull(HullType type) : InsetMathGrid(getCols(type), 1), type_(type), nonum_(1), label_(1), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) { initMath(); setDefaults(); @@ -182,7 +182,7 @@ InsetMathHull::InsetMathHull(InsetMathHull const & other) : InsetMathGrid(other), type_(other.type_), nonum_(other.nonum_), label_(other.label_), - preview_(new RenderPreview(this)) + preview_(new RenderPreview(this)), mouse_hover_(false) {} @@ -205,6 +205,7 @@ nonum_ = other.nonum_; label_ = other.label_; preview_.reset(new RenderPreview(*other.preview_, this)); + mouse_hover_ = false; return *this; } @@ -333,6 +334,13 @@ } +bool InsetMathHull::setMouseHover(bool mouse_hover) +{ + mouse_hover_ = mouse_hover; + return true; +} + + void InsetMathHull::draw(PainterInfo & pi, int x, int y) const { use_preview_ = previewState(pi.base.bv); @@ -341,7 +349,8 @@ // selection at the top level of nested inset is difficult to handle. if (!editing(pi.base.bv)) pi.pain.fillRectangle(x + 1, y - ascent() + 1, width() - 2, - ascent() + descent() - 1, Color::mathbg); +ascent() + descent() - 1, +mouse_hover_ ? Color::mathhoverbg : Color::mathbg); if (use_preview_) { // one pixel gap in front Index: src/mathed/InsetMathHull.h === --- src/mathed/InsetMathHull.h (revision 18674) +++ src/mathed/InsetMathHull.h (working copy) @@ -121,6 +121,9 @@ /// static int displayMargin() { return 12; } + /// + bool setMouseHover(bool mouse_hover); + protected: InsetMathHull(InsetMathHull const &); @@ -183,6 +186,8 @@ boost::scoped_ptr preview_; /// mutable bool use_preview_; + /// + bool mouse_hover_; // // Incorporate me // Index: src/Color.cpp === --- src/Color.cpp (revision 18674) +++ src/Color.cpp (working copy) @@ -294,7 +294,8 @@ { commandframe, N_("command inset frame"), "commandframe", "black", "commandframe" }, { special, N_("special character"), "special", "RoyalBlue", "special" }, { math, N_("math"), "math", "DarkBlue", "math" }, - { mathbg, N_("math background"), "mathbg", "linen", "mathbg" }, + { mathbg, N_("math background"), "mathbg", "#dcd2c8", "mathbg" }, + { mathhoverbg, N_("math background under focus"), "mathhoverbg", "#C7C7CA", "mathhoverbg" }, { graphicsbg, N_("graphics background"), "graphicsbg", "linen", "graphicsbg" }, { mathmacrobg, N_("Math macro background"), "mathmacrobg", "linen", "mathmacrobg" }, { mathframe, N_("math frame"), "mathframe", "Magenta", "mathframe" }, -- == Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/
Re: How to make Lyx DRAMATICALLY better.
I'd propose a background color that is only BARELY different from the normal background. So you'd see the difference but it wouldn't be intrusive. Please apply the patch and propose a color that you like most. My proposed colors are the same as those of buttons so no additional color has been added.. Bo
Re: How to make Lyx DRAMATICALLY better.
On 02.06.2007, at 00:39, Tim Michelsen wrote: I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a / real space/ (like the one we put between 2 words). I'm also struggling with math and white spaces sometimes, would be great to have some sort of automatic blanks around math. astifter
Re: How to make Lyx DRAMATICALLY better.
On 02.06.2007, at 00:39, Tim Michelsen wrote: I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a / real space/ (like the one we put between 2 words). I'm also struggling with math and white spaces sometimes, would be great to have some sort of automatic blanks around math. astifter
Re: How to make Lyx DRAMATICALLY better.
On Fri, 1 Jun 2007, Tim Michelsen wrote: Hello, I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... This problem has happened to me quite a few times when using inline formulas (in the 1.3.x-series of LyX, I just assume it's the same now). Anyway, I did find it difficult to detect missing spaces. /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: How to make Lyx DRAMATICALLY better.
On Fri, 1 Jun 2007, Tim Michelsen wrote: Hello, I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... This problem has happened to me quite a few times when using inline formulas (in the 1.3.x-series of LyX, I just assume it's the same now). Anyway, I did find it difficult to detect missing spaces. /Christian -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: How to make Lyx DRAMATICALLY better.
Hello, I just want to add something from a users experience with math in normal text. As far as I can recall, one reason that I particularly wanted this feature was to enable me to see more clearly whether or not I had spaces between a formula and the text following or preceding it. I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a /real space/ (like the one we put between 2 words). A similar issue but the other way round applies if you have a expanded LyX note within your text. Sometimes it is difficult to control it and people reading the printout don't know that there's been a Lyx note behind the space. Example: not expanded: My cat is here[Lyx Note]. expanded: My cat is here [because the dog is outside]. It wour be desireable if there's a warning procedure implemented in LyX. LyX can already remove superflicous spaces (like cat and dog = cat and dog) so it shouldn't be too hard to add this. Just my experinence. P.S.: Additionally, I can say that from today I'm standing in the line with those having written a beautiful thesis with Lyx. Just went to the final printout and loooked all nicely. Many thanks to the dev team for your efforts and perseverance! Now I'll have a save tryout of 1.5.x.
Re: How to make Lyx DRAMATICALLY better.
Hello, I just want to add something from a users experience with math in normal text. > > As far as I can recall, one reason that I particularly wanted this feature > > was to enable me to see more clearly whether or not I had spaces between > > a formula and the text following or preceding it. > > I don't think you can do mistake like this in LyX... The described problem occoured many time to me when I had to use math mode within regular text like a arrow, greek letter, etc. because LyX inserts a slight space after a math inset which can be easily mistaken as a /real space/ (like the one we put between 2 words). A similar issue but the other way round applies if you have a expanded LyX note within your text. Sometimes it is difficult to control it and people reading the printout don't know that there's been a Lyx note behind the space. Example: not expanded: My cat is here[Lyx Note]. expanded: My cat is here [because the dog is outside]. It wour be desireable if there's a warning procedure implemented in LyX. LyX can already remove superflicous spaces (like cat and dog => cat and dog) so it shouldn't be too hard to add this. Just my experinence. P.S.: Additionally, I can say that from today I'm standing in the line with those having written a beautiful thesis with Lyx. Just went to the final printout and loooked all nicely. Many thanks to the dev team for your efforts and perseverance! Now I'll have a save tryout of 1.5.x.
Re: How to make Lyx DRAMATICALLY better.
I too now have to report that, at least in Lyx 1.4 3-4 running under windows on my computer, the option for changing the colour of the math background does not change anything. Hi, Dr. Cwikel, Support for math background and math corners have been added to lyx. You should be able to adjust background and/or corner marker colors of math formulas when they are not under focus. This feature will be available next week as lyx 1.5.0 beta 3, or in June as lyx 1.5.0. Cheers, Bo
Re: How to make Lyx DRAMATICALLY better.
On Sun, 13 May 2007, Bo Peng wrote: I too now have to report that, at least in Lyx 1.4 3-4 running under windows on my computer, the option for changing the colour of the math background does not change anything. Hi, Dr. Cwikel, Support for math background and math corners have been added to lyx. You should be able to adjust background and/or corner marker colors of math formulas when they are not under focus. This feature will be available next week as lyx 1.5.0 beta 3, or in June as lyx 1.5.0. Bo actually means by Christmas, which just might happen in June this time :-) /C -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: How to make Lyx DRAMATICALLY better.
I too now have to report that, at least in Lyx 1.4 3-4 running under windows on my computer, the option for changing the colour of the math background does not change anything. Hi, Dr. Cwikel, Support for math background and math corners have been added to lyx. You should be able to adjust background and/or corner marker colors of math formulas when they are not under focus. This feature will be available next week as lyx 1.5.0 beta 3, or in June as lyx 1.5.0. Cheers, Bo
Re: How to make Lyx DRAMATICALLY better.
On Sun, 13 May 2007, Bo Peng wrote: I too now have to report that, at least in Lyx 1.4 3-4 running under windows on my computer, the option for changing the colour of the math background does not change anything. Hi, Dr. Cwikel, Support for math background and math corners have been added to lyx. You should be able to adjust background and/or corner marker colors of math formulas when they are not under focus. This feature will be available next week as lyx 1.5.0 beta 3, or in June as lyx 1.5.0. Bo actually means by Christmas, which just might happen in June this time :-) /C -- Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
Re: How to make Lyx DRAMATICALLY better.
Bo Peng [EMAIL PROTECTED] writes: I am a professor of mathematics who has been using Scientific Word intensively for many years. Been there, switched to Lyx. Me too. I just wish I had done it earlier. Andreas
Re: How to make Lyx DRAMATICALLY better.
Abdelrazak Younes [EMAIL PROTECTED] writes: Jean-Marc Lasgouttes wrote: Bo == Bo Peng [EMAIL PROTECTED] writes: Bo Tool - preference - color - math background? Except that it does nothing now. And even if it did, it will set the background for the whole equation. I would find that very useful. It's quite strange now when Tool - preference - color - math background does nothing. Andreas