]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
scanLog for checkout svn in VCS.
[lyx.git] / src / BufferParams.cpp
index 5cde23fc41bfec77c92f8ecb7f1ef949528193aa..9c6a0e2926450b60b35c1769799797fb37c45999 100644 (file)
@@ -1226,11 +1226,16 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
                texrow.newline();
        }
 
-       // If we use jurabib, we have to call babel here.
-       if (use_babel && features.isRequired("jurabib")) {
-               os << from_ascii(babelCall(language_options.str()))
+       // If we use hyperref, jurabib, japanese, or vietnamese, we have to call babel here.
+       if (use_babel
+               && (features.isRequired("jurabib")
+                       || features.isRequired("hyperref")
+                       || features.isRequired("vietnamese")
+                       || features.isRequired("japanese") ) ) {
+               // FIXME UNICODE
+               os << from_utf8(babelCall(language_options.str()))
                   << '\n'
-                  << from_ascii(features.getBabelOptions());
+                  << from_utf8(features.getBabelOptions());
                texrow.newline();
        }
 
@@ -1242,15 +1247,6 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
        // Line spacing
        lyxpreamble += from_utf8(spacing().writePreamble(tclass.provides("SetSpace")));
 
-       // If we use hyperref or japanese or vietnamese, we have to call babel here.
-       if (use_babel && !features.isRequired("jurabib")
-           && (features.isRequired("hyperref") || features.isRequired("vietnamese")
-               || features.isRequired("japanese"))) {
-               // FIXME UNICODE
-               lyxpreamble += from_utf8(babelCall(language_options.str())) + '\n';
-               lyxpreamble += from_utf8(features.getBabelOptions());
-       }
-
        // PDF support.
        // * Hyperref manual: "Make sure it comes last of your loaded
        //   packages, to give it a fighting chance of not being over-written,