math-macro and inline editing

2007-02-15 Thread Stefan Schimanski
Hi!

I want to make heavy use of math-macros to create type inference rules 
using proof.sty. I defined some macros using the \frac construct in 
the right box of the math-macro definition as preview, with several 
arguments #1, #2, ... In the left box I use the corresponding commands 
from proof.sty. 

Everything looks great  until I try to edit the arguments of the 
macro: LyX jumps into a third representation with several line 
prefixed with #1, #2 to enter the arguments. Is it supposed to work 
like that? Especially if you nest math-macros in your formulas this 
style of editing makes it unusable because you easily completely loose 
track of the structure of your formula.

Why isn't LyX using my preview definition for the macro with some 
placeholder boxes as the arguments? Although I don't know LyX's 
rendering code, it doesn't look to be much more complicated. But maybe I am 
wrong.

Regards
 Stefan




Re: math-macro and inline editing

2007-02-15 Thread Jean-Marc Lasgouttes
 Stefan == Stefan Schimanski [EMAIL PROTECTED] writes:

Stefan Everything looks great  until I try to edit the arguments
Stefan of the macro: LyX jumps into a third representation with
Stefan several line prefixed with #1, #2 to enter the arguments. Is
Stefan it supposed to work like that? Especially if you nest
Stefan math-macros in your formulas this style of editing makes it
Stefan unusable because you easily completely loose track of the
Stefan structure of your formula.

Stefan Why isn't LyX using my preview definition for the macro with
Stefan some placeholder boxes as the arguments? Although I don't know
Stefan LyX's rendering code, it doesn't look to be much more
Stefan complicated. But maybe I am wrong.

It used to do that, but this was changed in 1.3.x (I think). One
particular problem (which could be avoided) was to know what to do
when for example #1 is used twice.

I also think this should be reverted. But we have to find somebody who
wants to actually do it :)

JMarc


Re: math-macro and inline editing

2007-02-15 Thread Andre Poenitz
On Thu, Feb 15, 2007 at 11:24:23AM +, Stefan Schimanski wrote:
 Everything looks great  until I try to edit the arguments of the 
 macro: LyX jumps into a third representation with several line 
 prefixed with #1, #2 to enter the arguments. Is it supposed to work 
 like that?

Sort of, yes. So far no better idea has been proposed/implemented.

 Especially if you nest math-macros in your formulas this 
 style of editing makes it unusable because you easily completely loose 
 track of the structure of your formula.
 
 Why isn't LyX using my preview definition for the macro with some 
 placeholder boxes as the arguments?

Navigation between the arguments is non-obvious.
Macro arguments can be used more than once. 

 Although I don't know LyX's rendering code, it doesn't look to be much
 more complicated. But maybe I am wrong.

Just try to implement something better. If it works out, we should use
that.

Andre'


Re: math-macro and inline editing

2007-02-15 Thread Andre Poenitz
On Thu, Feb 15, 2007 at 01:54:06PM +0100, Jean-Marc Lasgouttes wrote:
 It used to do that, but this was changed in 1.3.x (I think).

1.2 with the math rewrite (I think)

 One particular problem (which could be avoided) was to know what to do
 when for example #1 is used twice.

This did not work at all in pre 1.2 times.

Andre'


Re: math-macro and inline editing

2007-02-15 Thread Jean-Marc Lasgouttes
 Andre == Andre Poenitz [EMAIL PROTECTED] writes:

 Why isn't LyX using my preview definition for the macro with some
 placeholder boxes as the arguments?

Andre Navigation between the arguments is non-obvious. Macro
Andre arguments can be used more than once.

We could decide that only the first instance is editable, or that they
are all editable and the result is visible in all instance at the same
time...

JMarc


Re: math-macro and inline editing

2007-02-15 Thread Stefan Schimanski
 Why isn't LyX using my preview definition for the macro with some 
 placeholder boxes as the arguments?
 
 Navigation between the arguments is non-obvious.
 Macro arguments can be used more than once. 

But as I understand the second part of the macro is the editing template. 
That uses a usual formula with some holes. If I had typed the same 
formula manually there would be some navigation logic. Why can't that used 
here as well, just with some parts being unchangeable because they belong 
to the template.

And even if you just number the holes of the templates and let the cursor 
jump from n to n+1 and n-1 by left and right would be ok. Don't really see 
a problem here. As Jean-Marc wrote, if an argument appear more than once, 
just update all of the appearances.

Schimmi




math-macro and inline editing

2007-02-15 Thread Stefan Schimanski
Hi!

I want to make heavy use of math-macros to create type inference rules 
using proof.sty. I defined some macros using the \frac construct in 
the right box of the math-macro definition as preview, with several 
arguments #1, #2, ... In the left box I use the corresponding commands 
from proof.sty. 

Everything looks great  until I try to edit the arguments of the 
macro: LyX jumps into a third representation with several line 
prefixed with #1, #2 to enter the arguments. Is it supposed to work 
like that? Especially if you nest math-macros in your formulas this 
style of editing makes it unusable because you easily completely loose 
track of the structure of your formula.

Why isn't LyX using my preview definition for the macro with some 
placeholder boxes as the arguments? Although I don't know LyX's 
rendering code, it doesn't look to be much more complicated. But maybe I am 
wrong.

Regards
 Stefan




Re: math-macro and inline editing

2007-02-15 Thread Jean-Marc Lasgouttes
 Stefan == Stefan Schimanski [EMAIL PROTECTED] writes:

Stefan Everything looks great  until I try to edit the arguments
Stefan of the macro: LyX jumps into a third representation with
Stefan several line prefixed with #1, #2 to enter the arguments. Is
Stefan it supposed to work like that? Especially if you nest
Stefan math-macros in your formulas this style of editing makes it
Stefan unusable because you easily completely loose track of the
Stefan structure of your formula.

Stefan Why isn't LyX using my preview definition for the macro with
Stefan some placeholder boxes as the arguments? Although I don't know
Stefan LyX's rendering code, it doesn't look to be much more
Stefan complicated. But maybe I am wrong.

It used to do that, but this was changed in 1.3.x (I think). One
particular problem (which could be avoided) was to know what to do
when for example #1 is used twice.

I also think this should be reverted. But we have to find somebody who
wants to actually do it :)

JMarc


Re: math-macro and inline editing

2007-02-15 Thread Andre Poenitz
On Thu, Feb 15, 2007 at 11:24:23AM +, Stefan Schimanski wrote:
 Everything looks great  until I try to edit the arguments of the 
 macro: LyX jumps into a third representation with several line 
 prefixed with #1, #2 to enter the arguments. Is it supposed to work 
 like that?

Sort of, yes. So far no better idea has been proposed/implemented.

 Especially if you nest math-macros in your formulas this 
 style of editing makes it unusable because you easily completely loose 
 track of the structure of your formula.
 
 Why isn't LyX using my preview definition for the macro with some 
 placeholder boxes as the arguments?

Navigation between the arguments is non-obvious.
Macro arguments can be used more than once. 

 Although I don't know LyX's rendering code, it doesn't look to be much
 more complicated. But maybe I am wrong.

Just try to implement something better. If it works out, we should use
that.

Andre'


Re: math-macro and inline editing

2007-02-15 Thread Andre Poenitz
On Thu, Feb 15, 2007 at 01:54:06PM +0100, Jean-Marc Lasgouttes wrote:
 It used to do that, but this was changed in 1.3.x (I think).

1.2 with the math rewrite (I think)

 One particular problem (which could be avoided) was to know what to do
 when for example #1 is used twice.

This did not work at all in pre 1.2 times.

Andre'


Re: math-macro and inline editing

2007-02-15 Thread Jean-Marc Lasgouttes
 Andre == Andre Poenitz [EMAIL PROTECTED] writes:

 Why isn't LyX using my preview definition for the macro with some
 placeholder boxes as the arguments?

Andre Navigation between the arguments is non-obvious. Macro
Andre arguments can be used more than once.

We could decide that only the first instance is editable, or that they
are all editable and the result is visible in all instance at the same
time...

JMarc


Re: math-macro and inline editing

2007-02-15 Thread Stefan Schimanski
 Why isn't LyX using my preview definition for the macro with some 
 placeholder boxes as the arguments?
 
 Navigation between the arguments is non-obvious.
 Macro arguments can be used more than once. 

But as I understand the second part of the macro is the editing template. 
That uses a usual formula with some holes. If I had typed the same 
formula manually there would be some navigation logic. Why can't that used 
here as well, just with some parts being unchangeable because they belong 
to the template.

And even if you just number the holes of the templates and let the cursor 
jump from n to n+1 and n-1 by left and right would be ok. Don't really see 
a problem here. As Jean-Marc wrote, if an argument appear more than once, 
just update all of the appearances.

Schimmi




math-macro and inline editing

2007-02-15 Thread Stefan Schimanski
Hi!

I want to make heavy use of math-macros to create type inference rules 
using proof.sty. I defined some macros using the \frac construct in 
the right box of the math-macro definition as preview, with several 
arguments #1, #2, ... In the left box I use the corresponding commands 
from proof.sty. 

Everything looks great  until I try to edit the arguments of the 
macro: LyX jumps into a third representation with several line 
prefixed with #1, #2 to enter the arguments. Is it supposed to work 
like that? Especially if you nest math-macros in your formulas this 
style of editing makes it unusable because you easily completely loose 
track of the structure of your formula.

Why isn't LyX using my preview definition for the macro with some 
placeholder boxes as the arguments? Although I don't know LyX's 
rendering code, it doesn't look to be much more complicated. But maybe I am 
wrong.

Regards
 Stefan




Re: math-macro and inline editing

2007-02-15 Thread Jean-Marc Lasgouttes
> "Stefan" == Stefan Schimanski <[EMAIL PROTECTED]> writes:

Stefan> Everything looks great  until I try to edit the arguments
Stefan> of the macro: LyX jumps into a third representation with
Stefan> several line prefixed with #1, #2 to enter the arguments. Is
Stefan> it supposed to work like that? Especially if you nest
Stefan> math-macros in your formulas this style of editing makes it
Stefan> unusable because you easily completely loose track of the
Stefan> structure of your formula.

Stefan> Why isn't LyX using my preview definition for the macro with
Stefan> some placeholder boxes as the arguments? Although I don't know
Stefan> LyX's rendering code, it doesn't look to be much more
Stefan> complicated. But maybe I am wrong.

It used to do that, but this was changed in 1.3.x (I think). One
particular problem (which could be avoided) was to know what to do
when for example #1 is used twice.

I also think this should be reverted. But we have to find somebody who
wants to actually do it :)

JMarc


Re: math-macro and inline editing

2007-02-15 Thread Andre Poenitz
On Thu, Feb 15, 2007 at 11:24:23AM +, Stefan Schimanski wrote:
> Everything looks great  until I try to edit the arguments of the 
> macro: LyX jumps into a third representation with several line 
> prefixed with #1, #2 to enter the arguments. Is it supposed to work 
> like that?

Sort of, yes. So far no better idea has been proposed/implemented.

> Especially if you nest math-macros in your formulas this 
> style of editing makes it unusable because you easily completely loose 
> track of the structure of your formula.
> 
> Why isn't LyX using my preview definition for the macro with some 
> placeholder boxes as the arguments?

Navigation between the arguments is non-obvious.
Macro arguments can be used more than once. 

> Although I don't know LyX's rendering code, it doesn't look to be much
> more complicated. But maybe I am wrong.

Just try to implement something better. If it works out, we should use
that.

Andre'


Re: math-macro and inline editing

2007-02-15 Thread Andre Poenitz
On Thu, Feb 15, 2007 at 01:54:06PM +0100, Jean-Marc Lasgouttes wrote:
> It used to do that, but this was changed in 1.3.x (I think).

1.2 with the math rewrite (I think)

> One particular problem (which could be avoided) was to know what to do
> when for example #1 is used twice.

This did not work at all in pre 1.2 times.

Andre'


Re: math-macro and inline editing

2007-02-15 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes:

>> Why isn't LyX using my preview definition for the macro with some
>> placeholder boxes as the arguments?

Andre> Navigation between the arguments is non-obvious. Macro
Andre> arguments can be used more than once.

We could decide that only the first instance is editable, or that they
are all editable and the result is visible in all instance at the same
time...

JMarc


Re: math-macro and inline editing

2007-02-15 Thread Stefan Schimanski
>> Why isn't LyX using my preview definition for the macro with some 
>> placeholder boxes as the arguments?
> 
> Navigation between the arguments is non-obvious.
> Macro arguments can be used more than once. 

But as I understand the second part of the macro is the editing template. 
That uses a "usual" formula with some holes. If I had typed the same 
formula manually there would be some navigation logic. Why can't that used 
here as well, just with some parts being unchangeable because they belong 
to the template.

And even if you just number the holes of the templates and let the cursor 
jump from n to n+1 and n-1 by left and right would be ok. Don't really see 
a problem here. As Jean-Marc wrote, if an argument appear more than once, 
just update all of the appearances.

Schimmi