Fix state of certain language packages (polyglossia, japanese) in children (#8779)

This commit is contained in:
Juergen Spitzmueller 2013-07-18 09:26:56 +02:00
parent c3aad9624f
commit 49c89d838b

View File

@ -1564,7 +1564,9 @@ void Buffer::writeLaTeXSource(otexstream & os,
LYXERR(Debug::LATEX, " Validating buffer..."); LYXERR(Debug::LATEX, " Validating buffer...");
LaTeXFeatures features(*this, params(), runparams); LaTeXFeatures features(*this, params(), runparams);
validate(features); validate(features);
runparams.use_polyglossia = features.usePolyglossia(); // This is only set once per document (in master)
if (!runparams.is_child)
runparams.use_polyglossia = features.usePolyglossia();
LYXERR(Debug::LATEX, " Buffer validation done."); LYXERR(Debug::LATEX, " Buffer validation done.");
bool const output_preamble = bool const output_preamble =
@ -1666,7 +1668,9 @@ void Buffer::writeLaTeXSource(otexstream & os,
runparams.use_babel = params().writeLaTeX(os, features, runparams.use_babel = params().writeLaTeX(os, features,
d->filename.onlyPath()); d->filename.onlyPath());
runparams.use_japanese = features.isRequired("japanese"); // Japanese might be required only in some children of a document,
// but once required, we must keep use_japanese true.
runparams.use_japanese |= features.isRequired("japanese");
if (!output_body) { if (!output_body) {
// Restore the parenthood if needed // Restore the parenthood if needed