[Tex/LaTex] LyX sync document settings of child documents with master especially concerning citation style

biblatexbibliographiesbibtexcitinglyx

How can I make sure, that the document settings of a child document are compatible to the master document?

Today I had a big hassle concerning citation:

If I choose "citation style standard (numerical)" in the master document and "natbib" in the child document I get in the "insert citation window" (in the child document) the options that belong to natbib package (citet, citep, citeauthor etc.). Trying to render the document gives an error: "control sequence undefinded" (obviously, as the \citet is only defined in the natbib package, which I haven't included (in the master, at least)).

Do I have to keep master and child settings in sync manually? Shouldn't the be possible to be done automatically or are there use cases where different settings are useful? I expect a behaviour just like LaTeX, where it is also possible to have subdocuments without any header.

This problem: LyX BibTeX with child-documents not working
was obviously caused by the same issue.

Best Answer

This might answer your question probably only partly: I have a master document with some child documents. All lyx files have the same document type and use the defaults. To include packages or define macros I have an additional tex file (options.tex) which contains everything that needs to be done in the preamble.

In the preamble of the lyx documents I add an input instruction.

\input{options}

This solution is not perfect, but this enables me to compile the master document (which takes some time as it is 190+ pages) or compile only a child document.

Related Question