Le 20/12/2015 04:43, Richard Heck a écrit :
On 12/19/2015 06:35 PM, Guillaume Munch wrote:

Let me ask naively, what is the expected difference with unchecking
"Select master document"?

I assume you mean "Select default master document"?

(apart from the fact that we need to close the master document and
reopen the child after this, which is a bug obviously, and the fact
that the former parent document is forgotten on reopening, making it
unconvenient to re-enable)

I don't think it is a bug. I think perhaps you are misunderstanding the
purpose of this setting.

Having a *default* master makes it the case that, whenever you open this
document directly, it causes the default master to be opened, and for
the document you are actually opening to be opened as a child (or
grandchild, or ....) of that document. This makes sense e.g. for files
that are chapters of books: When you edit the chapter, you want it to be
edited as a chapter of the book, not as a standalone file. Note that
this does *not* mean the same file cannot appear as children of other
masters. What it means, in effect, is that the file cannot be edited as
a standalone document.

But there are other files that can function as children of different
masters and that one does want to be able to edit as standalone
documents. Or a file that is always used as a child but that it doesn't
make sense to associate with a default master. An example of the latter
from my own use would be a file of math macros I use in various documents.

So, with all that said, suppose a default master was previously selected
and one decides to remove that setting. Nothing else does *or should*
happen at that time. If the document is currently open as a child (which
it will be), then it must remain open as a child. The only other option
would be automatically to close the current master, and all of its
children, and re-open this document standalone. But that would be
totally wrong. Simply saying "I don't want this document any longer, by
default, to be a child of some other document" can't also mean: Oh, and
by the way, please also close the entire document set of which this was
a part, and then re-open this one. We aren't saying this document isn't
part of that document set, only that it shouldn't by default be
considered part of it. The same goes if one were to change what the
default master is.

I think it is very unclear what to do here. I think it's a good idea of
Jurgen's to allow selection of whether to use the master's params or our
own. But I'd add that it would also make sense to allow the child's
params to be added to the master's. Consider, again, a file of my
favorite math macros. Maybe there are modules that need to be used with
these, or some preamble code, and one would think one should be able to
indicate those in the macro file and have them always be used when that
file is used in some other document. I can imagine thinking that this
should be the default behavior when a default master is defined, though
I'm not sure about that.



Yes, all this parent/child relationship seems quite complicated and ad
hoc. While testing what would happen when a document has two parents, I
found the following crash: <http://www.lyx.org/trac/ticket/9907>.


Guillaume

Reply via email to