On 06/12/2015 03:23 PM, Liviu Andronic wrote:
Thanks Richard for the thorough explanation. A couple of comments below.
On Fri, Jun 12, 2015 at 3:54 PM, Richard Heck <rgh...@lyx.org> wrote:
This tag was introduced with LyX 1.4.0. Layout files from older LyX
versions do not have an explicit file format and are considered to
have Format 1. The format for the present version of LyX is format 35.
But then I'm confused. Why does litinsets.inc have Format 54 (in GIT;
it's 49 in 2.1.3)?
Then our docs seem to be outdated. Customization Manual lists format
35 as current:
# Incremented to format 35, 28 March 2011 by rgh
# Try to add "Flex:" to any flex insets that don't have it.
when it's actually 49:
# Incremented to format 49, 10 Feb 2014 by gb
# Change default of "ResetsFont" tag to false
Looks like format 35 was "current" for the 2.0.x series...
Indeed. I've updated this.
If the script is intended for 2.1.x, then it should use format 49---and,
more importantly, it
should *adhere* to format 49: Use exactly the resources provided by format
49, with exactly
that syntax. E.g., it should not use the ToggleIndent tag introduced at
format 51 (the changes
are documented in layout2layout.py). It should also use the new syntax for
arguments that
was introduced at format 41.
The layout2layout.py is very helpful. Maybe it too should be mentioned
in the docs.
Did this, too.
Since very subtle syntax conventions must be followed, do we have
something like a "layout validator" script, to check if a given
layout/module conforms to the format it advertises?
Not as far as I know. Of course, one can always try loading it into LyX,
and see what happens,
and in principle one could copy the script into the "local layout" box
under Document Settings
and use the validation button there.
Richard