]> git.lyx.org Git - features.git/commitdiff
Fix state of certain language packages (polyglossia, japanese) in children (#8779)
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 18 Jul 2013 07:26:56 +0000 (09:26 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 18 Jul 2013 13:19:36 +0000 (15:19 +0200)
src/Buffer.cpp
status.20x

index 36d9b1fd3f7a5e35251a4ba66c9d5b7da7184763..af1faf42118c64879c4ed9df20c287238b5eaf38 100644 (file)
@@ -1468,7 +1468,9 @@ void Buffer::writeLaTeXSource(otexstream & os,
        LYXERR(Debug::LATEX, "  Validating buffer...");
        LaTeXFeatures features(*this, params(), runparams);
        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.");
 
        bool const output_preamble =
@@ -1580,7 +1582,9 @@ void Buffer::writeLaTeXSource(otexstream & os,
                runparams.use_babel = params().writeLaTeX(os, features,
                                                          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) {
                        // Restore the parenthood if needed
index 74472eb26d3260296811c25883e06af525a83f4c..56cb4d7b7403afcb72376f1ef370229ca6301033 100644 (file)
@@ -57,6 +57,9 @@ What's new
 
 - Fix problem with unbalanced braces in XeTeX output (bug 8765).
 
+- Fix state of certain language packages (polyglossia, japanese) in
+  child documents (bug 8779).
+
 - Added h5 and h6 as tags for Paragraph and Subparagraph.
 
 - Include alt tag when exporting math as images (bug 8746).