Re: "Local Layout" in external file?

2016-11-24 Thread Klaus-Dieter Bauer
2016-11-23 17:03 GMT+01:00 Richard Heck <rgh...@lyx.org>:

> On 11/23/2016 04:49 AM, Klaus-Dieter Bauer wrote:
>
> 2014-11-13 11:20 GMT+01:00 Klaus-Dieter Bauer <
> bauer.klaus.die...@gmail.com>:
>>
>> 2014-11-07 19:50 GMT+01:00 Richard Heck <rgh...@lyx.org>:
>>
>>> On 11/07/2014 10:25 AM, Klaus-Dieter Bauer wrote:
>>>
>>>> Hello!
>>>>
>>>> Is there a method to share document settings (document class, font
>>>> size, ...) across all subdocuments of a project?
>>>>
>>>> My intention is to be able to compile each file separately (for faster
>>>> debugging), with changes to document settings being automatically shared
>>>> across all files and explicitly WITHOUT manually changing settings like
>>>> \includeonly or commenting-out include statements.
>>>>
>>>
>>> Note that Document> Settings> Child Documents provides a different way
>>> to do this. But I understand the desire to compile the documents
>>> separately. And that can sort of be done.
>>>
>>> If you can get the settings right at the start, then you can put them
>>> into a sort of template file and use that to start all your documents. But
>>> if you need to change something, you'll have to change it manually in each
>>> of the sub-documents. The exception is anything you put in the LaTeX
>>> preamable. That can be synchronized by putting it all into some common file
>>> and then incuding that.
>>>
>>> Richard
>>>
>> Since I found manually changing the documents tiresome, I wrote a script
>> that extracts, overwrites and copies the header section between lyx files
>> and uploaded it to
>>
>> https://gist.github.com/kbauer/2282492968f061b94f82
>>
>
> Picking up on my old question again, with a more limited scope: Is there
> some feature that allows putting the "local layout" in an external file,
> that is local to the current project (e.g. in the same directory as the lyx
> file)?
>
>
> No. This facility does exist for layout files, but it causes all kinds of
> problems, and I've meant for some years to remove it.
>
> I am recently heavily using the "local layout" feature in my documents.
> This does however come with some disadvantages, notably a very limited
> internal editor and the need to manually (or with an external script)
> synchronize the setting across multiple files of a project. Installing them
> as system-wide modules isn't a good solution either, when I want to ensure
> that files that were created with an old version of my local-layout will
> still compile in the future, let alone on other people's LyX-installation –
> or my own in three years.
>
>
> We've discussed the possibility before of allowing for the possibility of
> launching an external editor, etc, for Local Layout. But no one has ever
> done it.
>
> I'm not totally sure why installing them as modules is a bad idea. Perhaps
> "system-wide" is meant to indicate that you aren't putting them in your
> local user directory?
>
> Richard
>

Hello!

By system-wide I mean that they are shared across all projects on the local
machine, and cannot be transferred to other machines easily as part of a
project. Just for clarification, do you mean
https://wiki.lyx.org/LyX/UserDir which for Windows would be
%APPDATA%\Lyx\ ?

It is also not easily possible to archive a LyX document together with the
installed modules it used, to ensure that future changes to the layout
(such as removal of deprecated custom insets, or loss of disused modules)
don't break archived documents. While manually archiving all user-modules
along with the document is certainly doable, it is also easily forgotten.

Convenience-wise, adding or modifying a local layout is more friction-free
than reloading changed modules installed to the user directory; As far as I
remember that requires "Tools > Reconfigure". Sadly that convenience breaks
down when having more than one file...

To summarize,

   - "Local layout" doesn't work well with multi-file documents.
   - UserDir modules are easily forgotten when archiving or transferring
   LyX files to other users/devices.

We've discussed the possibility before of allowing for the possibility of
> launching an external editor, etc, for Local Layout. But no one has ever
> done it.


It would already help though, if these places just used a monospaced font,
allowing source-code formatting with whitespace-indentation.

regards, Klaus


Re: "Local Layout" in external file?

2016-11-23 Thread Richard Heck
On 11/23/2016 04:49 AM, Klaus-Dieter Bauer wrote:
> 2014-11-13 11:20 GMT+01:00 Klaus-Dieter Bauer
> <bauer.klaus.die...@gmail.com <mailto:bauer.klaus.die...@gmail.com>>:
>
> 2014-11-07 19:50 GMT+01:00 Richard Heck <rgh...@lyx.org
> <mailto:rgh...@lyx.org>>:
>
> On 11/07/2014 10:25 AM, Klaus-Dieter Bauer wrote:
>
> Hello!
>
> Is there a method to share document settings (document
> class, font size, ...) across all subdocuments of a project?
>
> My intention is to be able to compile each file separately
> (for faster debugging), with changes to document settings
> being automatically shared across all files and explicitly
> WITHOUT manually changing settings like \includeonly or
> commenting-out include statements.
>
>
> Note that Document> Settings> Child Documents provides a
> different way to do this. But I understand the desire to
> compile the documents separately. And that can sort of be done.
>
> If you can get the settings right at the start, then you can
> put them into a sort of template file and use that to start
> all your documents. But if you need to change something,
> you'll have to change it manually in each of the
> sub-documents. The exception is anything you put in the LaTeX
> preamable. That can be synchronized by putting it all into
> some common file and then incuding that.
>
> Richard
>
> Since I found manually changing the documents tiresome, I wrote a
> script that extracts, overwrites and copies the header section
> between lyx files and uploaded it to
>
> https://gist.github.com/kbauer/2282492968f061b94f82
> <https://gist.github.com/kbauer/2282492968f061b94f82>
>
>
> Picking up on my old question again, with a more limited scope: Is
> there some feature that allows putting the "local layout" in an
> external file, that is local to the current project (e.g. in the same
> directory as the lyx file)?

No. This facility does exist for layout files, but it causes all kinds
of problems, and I've meant for some years to remove it.

> I am recently heavily using the "local layout" feature in my
> documents. This does however come with some disadvantages, notably a
> very limited internal editor and the need to manually (or with an
> external script) synchronize the setting across multiple files of a
> project. Installing them as system-wide modules isn't a good solution
> either, when I want to ensure that files that were created with an old
> version of my local-layout will still compile in the future, let alone
> on other people's LyX-installation – or my own in three years.

We've discussed the possibility before of allowing for the possibility
of launching an external editor, etc, for Local Layout. But no one has
ever done it.

I'm not totally sure why installing them as modules is a bad idea.
Perhaps "system-wide" is meant to indicate that you aren't putting them
in your local user directory?

Richard



"Local Layout" in external file?

2016-11-23 Thread Klaus-Dieter Bauer
2014-11-13 11:20 GMT+01:00 Klaus-Dieter Bauer <bauer.klaus.die...@gmail.com>
:
>
> 2014-11-07 19:50 GMT+01:00 Richard Heck <rgh...@lyx.org>:
>
>> On 11/07/2014 10:25 AM, Klaus-Dieter Bauer wrote:
>>
>>> Hello!
>>>
>>> Is there a method to share document settings (document class, font size,
>>> ...) across all subdocuments of a project?
>>>
>>> My intention is to be able to compile each file separately (for faster
>>> debugging), with changes to document settings being automatically shared
>>> across all files and explicitly WITHOUT manually changing settings like
>>> \includeonly or commenting-out include statements.
>>>
>>
>> Note that Document> Settings> Child Documents provides a different way to
>> do this. But I understand the desire to compile the documents separately.
>> And that can sort of be done.
>>
>> If you can get the settings right at the start, then you can put them
>> into a sort of template file and use that to start all your documents. But
>> if you need to change something, you'll have to change it manually in each
>> of the sub-documents. The exception is anything you put in the LaTeX
>> preamable. That can be synchronized by putting it all into some common file
>> and then incuding that.
>>
>> Richard
>>
> Since I found manually changing the documents tiresome, I wrote a script
> that extracts, overwrites and copies the header section between lyx files
> and uploaded it to
>
> https://gist.github.com/kbauer/2282492968f061b94f82
>

Picking up on my old question again, with a more limited scope: Is there
some feature that allows putting the "local layout" in an external file,
that is local to the current project (e.g. in the same directory as the lyx
file)?

I am recently heavily using the "local layout" feature in my documents.
This does however come with some disadvantages, notably a very limited
internal editor and the need to manually (or with an external script)
synchronize the setting across multiple files of a project. Installing them
as system-wide modules isn't a good solution either, when I want to ensure
that files that were created with an old version of my local-layout will
still compile in the future, let alone on other people's LyX-installation –
or my own in three years.

regards, Klaus