On 11/28/2015 10:34 PM, Uwe Stöhr wrote: > Am 29.11.2015 um 03:06 schrieb Scott Kostyshak: > >> Why doesn't LyX take care of updating the layout just as it takes care >> of updating the .lyx file format? I ask this for both forwards and >> backwards directions. I guess this means that lyx2lyx needs to know >> where to find layout2layout. >> >> Is this just a missing feature > > I think so.
See my response to Scott: There's a very good reason not automatically to convert local layout. > Today I found out that the LocalLayout in Additional.lyx was still in > the very old format 7. I stumbled over this because in the Spanish > version all insets using the LocalLayout code were broken. We should presumably make a point of converting this stuff before a release. I've just done it for 2.2, at least for the English manuals. > LyX has the button to update the layout to the latest format in the > document settings. This works well, but not for the Spanish version > where I had to edit the LyX file in a text editor to fix it. There was > a strange problem because there was an accented character in the > layout name. I played a bit to reproduce the error and to file a bug > report but failed. So maybe it was a problem in one of the old layout > formats which have been fixed in the meantime. I nevertheless used now > a name without accents. Format 7 is pretty old, and I'm surprised it was used for local layout. I'm pretty sure the layout format was more than 7 when I wrote the local layout stuff. > However the missing feature is that the action that is done after > pressing the conversion button is not triggered by our scripts. The > question is if such a feature is really necessary. I have no opinion. As I said, I don't think lyx2lyx should do this conversion. But probably we should add something to updatedocs.py that will also update local layout. That would prevent the problem you've just had. This would just be a matter of extracting the local layout from a file, running it through layout2layout, and then putting it back into the file. Richard