]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Partially revert r34995, which broke math output. Not sure why yet....
[lyx.git] / src / BufferParams.cpp
index 1d4bcd5049188baa0356213cda6dc9c99f0fed80..1b63d4f031b84354ae76a15751d26786070cdca4 100644 (file)
@@ -1288,7 +1288,7 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
                features.useLanguage(default_language);
 
        ostringstream language_options;
-       bool const use_babel = features.useBabel();
+       bool const use_babel = features.useBabel() && !tclass.provides("babel");
        if (use_babel) {
                language_options << features.getLanguages();
                if (!language->babel().empty()) {
@@ -1775,7 +1775,9 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
                texrow.newlines(lines);
                // set back for the rest
                lyxpreamble.clear();
-       }
+       } else if (features.isRequired("nameref"))
+               // hyperref loads this automatically
+               lyxpreamble += "\\usepackage{nameref}\n";
 
        // Will be surrounded by \makeatletter and \makeatother when not empty
        docstring atlyxpreamble;