]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Typo.
[lyx.git] / src / output_latex.cpp
index 2166425f07f7f8a3d9d9ccf06c799bfa2574dd78..564b345633408182d6a08c48b62cc90c933e6704 100644 (file)
@@ -183,7 +183,7 @@ TeXEnvironment(Buffer const & buf,
        if (par_language->encoding()->package() == Encoding::CJK &&
            open_encoding_ != CJK && pit->isMultiLingual(bparams)) {
                os << "\\begin{CJK}{" << from_ascii(par_language->encoding()->latexName())
-                  << "}{}%\n";
+                  << "}{" << from_ascii(bparams.fontsCJK) << "}%\n";
                open_encoding_ = CJK;
                cjk_nested = true;
                texrow.newline();
@@ -453,7 +453,7 @@ TeXOnePar(Buffer const & buf,
                                if (par_language->encoding()->package() == Encoding::CJK &&
                                    open_encoding_ != CJK && cjk_inherited_ == 0) {
                                        os << "\\begin{CJK}{" << from_ascii(par_language->encoding()->latexName())
-                                          << "}{}%\n";
+                                          << "}{" << from_ascii(bparams.fontsCJK) << "}%\n";
                                        open_encoding_ = CJK;
                                        texrow.newline();
                                }
@@ -714,8 +714,12 @@ TeXOnePar(Buffer const & buf,
        // Note from JMarc: we will re-add a \n explicitely in
        // TeXEnvironment, because it is needed in this case
        if (nextpit != paragraphs.end()) {
-               os << '\n';
-               texrow.newline();
+               Layout const & next_layout = nextpit->layout();
+               // no blank lines before environments!
+               if (!next_layout.isEnvironment() || style == next_layout) {
+                       os << '\n';
+                       texrow.newline();
+               }
        }
 
        if (nextpit != paragraphs.end())
@@ -760,7 +764,7 @@ void latexParagraphs(Buffer const & buf,
        // if the document's language is a CJK language
        if (maintext && bparams.encoding().package() == Encoding::CJK) {
                os << "\\begin{CJK}{" << from_ascii(bparams.encoding().latexName())
-               << "}{}%\n";
+               << "}{" << from_ascii(bparams.fontsCJK) << "}%\n";
                texrow.newline();
                open_encoding_ = CJK;
        }
@@ -937,7 +941,8 @@ pair<bool, int> switchEncoding(odocstream & os, BufferParams const & bparams,
                                os << "\\egroup";
                                count += 7;
                        }
-                       os << "\\begin{CJK}{" << inputenc_arg << "}{}";
+                       os << "\\begin{CJK}{" << inputenc_arg << "}{"
+                          << from_ascii(bparams.fontsCJK) << "}";
                        open_encoding_ = CJK;
                        return make_pair(true, count + 15);
                }