]> git.lyx.org Git - features.git/commitdiff
Bibtopic requires styles files to be passed via argument
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 22 Apr 2014 07:25:58 +0000 (09:25 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 22 Apr 2014 07:25:58 +0000 (09:25 +0200)
Fixes: #9060
src/insets/InsetBibtex.cpp

index eaec7f9c22b6a375a4963eb86a7bb72df5a0de2b..c925bfe3cc9bd3c30c1366c4327a7cbf4837bc2d 100644 (file)
@@ -338,7 +338,7 @@ void InsetBibtex::latex(otexstream & os, OutputParams const & runparams) const
        if (style == "default")
                style = buffer().params().biblio_style;
 
-       if (!style.empty()) {
+       if (!style.empty() && !buffer().params().use_bibtopic) {
                string base = normalizeName(buffer(), runparams, style, ".bst");
                FileName const try_in_file =
                        makeAbsPath(base + ".bst", buffer().filePath());
@@ -377,7 +377,10 @@ void InsetBibtex::latex(otexstream & os, OutputParams const & runparams) const
        }
 
        if (!db_out.empty() && buffer().params().use_bibtopic) {
-               os << "\\begin{btSect}{" << db_out << "}\n";
+               os << "\\begin{btSect}";
+               if (!style.empty())
+                       os << "[" << style << "]";
+               os << "{" << db_out << "}\n";
                docstring btprint = getParam("btprint");
                if (btprint.empty())
                        // default