]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.C
layout as layout
[lyx.git] / src / LaTeXFeatures.C
index 418f0b00ee93a359ede077a80459333ad325c2a9..2010eca80c4a3d2d0f84a1234f51327b30411570 100644 (file)
@@ -245,7 +245,7 @@ string const LaTeXFeatures::getPackages() const
 
        // float.sty
        // natbib.sty
-       if (isRequired("natbib")) {
+       if (isRequired("natbib") && ! tclass.provides(LyXTextClass::natbib)) {
                packages << "\\usepackage[";
                if (params.use_numerical_citations) {
                        packages << "numbers";
@@ -303,22 +303,30 @@ string const LaTeXFeatures::getMacros() const
        // other
        if (isRequired("NeedLyXMinipageIndent"))
                macros << minipageindent_def;
-       if (isRequired("ParagraphIndent"))
-               macros << paragraphindent_def;
+       if (isRequired("ParagraphLeftIndent"))
+               macros << paragraphleftindent_def;
        if (isRequired("NeedLyXFootnoteCode"))
                macros << floatingfootnote_def;
 
        // floats
        getFloatDefinitions(macros);
 
+       return macros.str().c_str();
+}
+
+
+string const LaTeXFeatures::getBabelOptions() const
+{
+       ostringstream tmp;
+
        for (LanguageList::const_iterator cit = UsedLanguages.begin();
             cit != UsedLanguages.end(); ++cit)
                if (!(*cit)->latex_options().empty())
-                       macros << (*cit)->latex_options() << '\n';
+                       tmp << (*cit)->latex_options() << '\n';
        if (!params.language->latex_options().empty())
-               macros << params.language->latex_options() << '\n';
+               tmp << params.language->latex_options() << '\n';
 
-       return macros.str().c_str();
+       return tmp.str().c_str();
 }
 
 
@@ -333,7 +341,7 @@ string const LaTeXFeatures::getTClassPreamble() const
        set<string>::const_iterator cit = layout.begin();
        set<string>::const_iterator end = layout.end();
        for (; cit != end; ++cit) {
-               tcpreamble << tclass[*cit].preamble();
+               tcpreamble << tclass[*cit]->preamble();
        }
 
        return tcpreamble.str().c_str();