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.

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? The preamble style looks to me like a hack
anyway.

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().

Richard

Reply via email to