Am Donnerstag 17 Dezember 2015, 16:43:32 schrieb Guillaume Munch:
> I am confused now because it seems to be saying that outputting the
> master preamble was already the intended meaning after the fix to 8445.
> Jürgen, is this correct or am I misinterpreting?

Yes, I probably thought that this was the case (although it was not the 
intended fix; the intended fix was to load the global/master macro definitions)

> I miss what is the
> effect of just setting is_child. 

It adds the information to the output routine that the currently output buffer 
functions as a child. The output routine then suppresses some output that 
makes no sense for children. See the use of is_child in the source.

It also decides to use master params rather than params where appropriate.
To load the master preamble, one further addition would be necessary. See 
attached patch. But as JMarc says, this change will not please everybody.

> Do you have an opinion about changing
> this line of yours with my patch?

I would prefer using the is_child parameter instead.

> As for the long term, maybe we could have an option "Copy the master
> preamble" in the document properties dialog in the future, and have this
> preamble also validated against the macros that are included from master.

A proper solution would be the option to select between two modes: Inherit 
params from master or keep own params. In some documents, both modes make 
sense at different times.

Jürgen

> Guillaume
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index eac9821..aba52a9 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -1858,7 +1858,9 @@ void Buffer::writeLaTeXSource(otexstream & os,
 		listParentMacros(parentMacros, features);
 
 		// Write the preamble
-		runparams.use_babel = params().writeLaTeX(os, features,
+		BufferParams const & bparams = runparams.is_child
+			? masterParams() : params();
+		runparams.use_babel = bparams.writeLaTeX(os, features,
 							  d->filename.onlyPath());
 
 		// Japanese might be required only in some children of a document,

Reply via email to