On 01/12/2010 13:29, Guenter Milde wrote:
On 2010-11-30, Richard Heck wrote:
On 11/30/2010 05:51 AM, Guenter Milde wrote:
On 2010-11-29, Michal wrote:
      That's something I didn't know - I thought that the InPreamble
option works for 'Style' only. Well, I'll have to take a closer look
into a documentation then. Thank you for pointing it out.
Sorry, I did not test whether InsetLayout supports InPreamble, so
maybe it will not help in your case.
InsetLayout doesn't support InPreamble.
OK.

However, maybe it is simple to add this support - even in the beta
phase.
This looks too confusing to me. We'd have insets, which could appear
anywhere in the document, whose sole purpose was to add things to the
preamble?
To me, this is not more confusing than to have a Paragraph adding
things to the preamble.

The preamble style looks to me like a hack anyway.
In my view, while this is an expert feature, it might come handy for
stuff that logically belongs to some text part but for technical
reasons must be placed in the preamble.

The original issue was branch-specific preamble code. A better way to
implement this, it seems to
me, would be to have LyX declare a condition for each branch, based upon
the branch name, e.g.:
      \newif\ly...@branchname
and then make it true or false according to whether the branch is
active. Then you can test for the
condition in your preamble code. Easy to implement via
InsetBranch::validate().
Another way, but IMO more complicated from the users point.

Why not simply add a preamble editor in the branches dialog? LyX will then collect the preamble for each branches. I guess this would be a format change but it strikes me as the correct solution...

I am going back to my silence :-)

Abdel.

PS: I am in China (Shenzen) these days, quite an interesting country...

Abdel.



Reply via email to