Re: How to extend a standard layouts
On 21.01.2018 00:13, Richard Heck wrote: On 01/20/2018 11:30 AM, racoon wrote: By default LyX loads standard layouts and insets. Is there a way to extend them without overwriting the default .inc file and without using a module? Let's say I want to extend the standard Note style. I don't want to use a module since I want to make a non-optional change to the Note inset. For example, I want to use another font size for all LyX notes. If I understood correctly, I can just put a copy of the stdinset.inc file from the library to the user directory. But this will have the unwelcome effect to overwrite whatever is in the stdinset.inc in the library directory. So, to avoid unwanted consequences, I will have to update my user stdinset.inc every time the library stdinset.inc changes, for example, in a new version of LyX. I have run into this problem, too. Some form of it will arise any time you want to emend or amend a layout file. I wonder if a longer-term solution is required, then. Might there be some way we could have 'extensions' of this kind? Maybe they could be named things like stdinsets.inc.ext and they would always be loaded after the corresponding other file was. That sounds like a good solution to me. (And it could, in principle, be extended to other files: For every file where this seems reasonable, whether .inc, .module, etc., it is checked whether there is a file with the same name with the additional extension .ext and then loaded.) Daniel
Re: How to extend a standard layouts
On 01/20/2018 11:30 AM, racoon wrote: > By default LyX loads standard layouts and insets. Is there a way to > extend them without overwriting the default .inc file and without > using a module? > > Let's say I want to extend the standard Note style. > > I don't want to use a module since I want to make a non-optional > change to the Note inset. For example, I want to use another font size > for all LyX notes. > > If I understood correctly, I can just put a copy of the stdinset.inc > file from the library to the user directory. But this will have the > unwelcome effect to overwrite whatever is in the stdinset.inc in the > library directory. So, to avoid unwanted consequences, I will have to > update my user stdinset.inc every time the library stdinset.inc > changes, for example, in a new version of LyX. I have run into this problem, too. Some form of it will arise any time you want to emend or amend a layout file. I wonder if a longer-term solution is required, then. Might there be some way we could have 'extensions' of this kind? Maybe they could be named things like stdinsets.inc.ext and they would always be loaded after the corresponding other file was. Richard
Re: How to extend a standard layouts
On Sat, Jan 20, 2018 at 2:58 PM, racoonwrote: > On 20.01.2018 19:22, Joel Kulesza wrote: > >> On Sat, Jan 20, 2018 at 9:30 AM, racoon xraco...@gmx.de>> wrote: >> >> By default LyX loads standard layouts and insets. Is there a way to >> extend them without overwriting the default .inc file and without >> using a module? >> >> >> Would putting your changes into the Document's Local Layout (and >> optionally saving as document defaults) be satisfactory? >> > > Thanks. Right that is an option. But that is not ideal either. It would, > for example, mean that I have to add it to all files I already created. > That's true. However, the way I'd approach it (probably via module inclusion) is to batch-edit the .lyx files from the command line to update the already existing ones retroactively.
Re: How to extend a standard layouts
On 20.01.2018 19:22, Joel Kulesza wrote: On Sat, Jan 20, 2018 at 9:30 AM, racoon> wrote: By default LyX loads standard layouts and insets. Is there a way to extend them without overwriting the default .inc file and without using a module? Would putting your changes into the Document's Local Layout (and optionally saving as document defaults) be satisfactory? Thanks. Right that is an option. But that is not ideal either. It would, for example, mean that I have to add it to all files I already created.
Re: How to extend a standard layouts
On Sat, Jan 20, 2018 at 9:30 AM, racoonwrote: > By default LyX loads standard layouts and insets. Is there a way to extend > them without overwriting the default .inc file and without using a module? > Would putting your changes into the Document's Local Layout (and optionally saving as document defaults) be satisfactory?
How to extend a standard layouts
By default LyX loads standard layouts and insets. Is there a way to extend them without overwriting the default .inc file and without using a module? Let's say I want to extend the standard Note style. I don't want to use a module since I want to make a non-optional change to the Note inset. For example, I want to use another font size for all LyX notes. If I understood correctly, I can just put a copy of the stdinset.inc file from the library to the user directory. But this will have the unwelcome effect to overwrite whatever is in the stdinset.inc in the library directory. So, to avoid unwanted consequences, I will have to update my user stdinset.inc every time the library stdinset.inc changes, for example, in a new version of LyX. So I would rather like to *extend* the current library file by just the font-size changes by InsetLayout Note:Note CopyStyle Note Font SizeSmall EndFont End So LyX should load the library's stdinset.inc first and then load the code that extends it next. Is there currently a way to do this? Daniel