On 10/2/06, Georg Baum <[EMAIL PROTECTED]> wrote:
Ozgur Ugras BARAN wrote:

> On 9/30/06, Georg Baum
> <[EMAIL PROTECTED]> wrote:
>> This is a specialization, but I think we should keep it generic and
>> simple. InsetCommandParams would just store a number of parameters, and
>> the LaTeX command generated from then would simply be
>> \command{param1}[optparam2][optparam3]{param4} etc.
>>
> Ah.. What I intended to do here is introduce a new base class
> (insetparams maybe..). Then one can extend his/her specific params by
> applying new keys_. Index is just an example here and I really didn't
> think about if this is applicable or not. I just open a door for
> specific implementations. If you find it too fantastic, feel free to
> drop all keys and maps from the code.
> - Show quoted text -
> Actually we don't.. I just prefer listed keys for maintainability.

Me too. The problem is that many LaTeX commands do not get their parameters
via the keyval package, but have a predefined parameter order. But as I
outlined previously, we can use the order for LaTeX and have keys at the
same time for LyX. Then we do not need to deal with the order in insets
anymore (except in the constructor), and can always get and set a parameter
by key. The difference to your current implementation is that we do not
have some parameters with keys and some with order, but all parameters have
an order and a key.

Oh, I see now.. But don't you think that the order should be
controlled by controllers? I mean when you create/edit the parameters
and dispatch them, you can control the order at the same time.

Do you want to create another version that does this? I think I got now a
clear picture how it could work with the help of your discussions, so if
you don't want I can also do it.

If you have a clear picture, please go ahead.. This will be more
efficient, I guess. I can help testing if you wish.

Ugras

Reply via email to