]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibtex.cpp
Circumvent odd stmary font metrics (part of #9990).
[lyx.git] / src / insets / InsetBibtex.cpp
index eaec7f9c22b6a375a4963eb86a7bb72df5a0de2b..eb0cf8ff922ba0a86eb013ac165b6eeb1e2aae40 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
@@ -1022,6 +1025,12 @@ docstring InsetBibtex::xhtml(XHTMLStream & xs, OutputParams const &) const
 }
 
 
+void InsetBibtex::write(ostream & os) const
+{
+       params().Write(os, &buffer());
+}
+
+
 string InsetBibtex::contextMenuName() const
 {
        return "context-bibtex";