On 03/15/2013 04:44 PM, Georg Baum wrote:
Some time ago we had a discussion about what changes to layout files are
allowed in a stable release. There were several proposals, from simple but limited to
powerful but complicated. Meanwhile I had another idea which is IMHO quite simple but still
powerful: Introduce a new "force local" flag for layouts. If this flag is set, the
layout is always stored as a special local layout in the .lyx file. This flag would be set
for any style which is added to LyX 2.1.x (with x > 0). Then any such document could
always be used by LyX 2.1.x-1 as well, even including export. The same style in 2.2 (or
whathever it will be called) would not use this flag. Therefore, the stored local layouts
would be automatically deleted once the document is saved by 2.2.
Attached is an untested sketch of the idea. The only missing part is
Layout::write(). Implementing this will be some work (which could be reused for
a layout editor btw), and therefore I'll only do it if this will go in.
What do you think?
Saw the commit of the write() routine. Looks good.
I'm not sure I fully understand the implementation details here, but the
idea seems like a good one. It might be worth having a button somewhere,
too, that allows anyone at any time to write the layout then in effect
to the LyX file. This would allow people to share their own layouts with
collaborators without having to send a layout file separately.
Richard