On 08/21/2009 11:57 AM, Vincent van Ravesteijn - TNW wrote:

If you want to include local layout in your document,
you can open it in a text editor and add similar lines.
I hope to add a GUI for this in the next LyX release
(now looking like 1.7). I'd be really, really happy if
someone else wanted to jump in and do it. It should
actually be quite easy. (More or less just copy the
GUI for the preamble.)
And if (hypothetically of course) I've copied the GUI for the preamble..
what then ?

Actually, that might even be more complicated than necessary, since the preamble bit has syntax highlighting, and we don't need that for layout. But anyway, the contents go with the BufferParams::local_layout string, just as the contents of the preamble thing go with the BufferParams::preamble string. So e.g.:

void LocalLayoutModule::apply(BufferParams & params)
{
params.local_layout = fromqstr(layoutTE->document()->toPlainText());
}

and similarly in update().

Richard



Reply via email to