]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Use ASCII number in \char definition
[lyx.git] / src / BufferParams.cpp
index e044d4e45a6404a98e0fe5798ea891fa1b5a9783..a4c3a80dc1cd3a80025671ff79368e7c4fd331c5 100644 (file)
@@ -393,6 +393,7 @@ BufferParams::BufferParams()
        use_geometry = false;
        biblio_style = "plain";
        use_bibtopic = false;
+       multibib = string();
        use_indices = false;
        save_transient_properties = true;
        track_changes = false;
@@ -522,6 +523,14 @@ map<string, string> const & BufferParams::auto_packages()
 }
 
 
+bool BufferParams::useBibtopic() const
+{
+       if (useBiblatex())
+               return false;
+       return (use_bibtopic || (!multibib.empty() && multibib != "child"));
+}
+
+
 AuthorList & BufferParams::authors()
 {
        return pimpl_->authorlist;
@@ -858,6 +867,8 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                biblatex_citestyle = trim(lex.getString());
        } else if (token == "\\use_bibtopic") {
                lex >> use_bibtopic;
+       } else if (token == "\\multibib") {
+               lex >> multibib;
        } else if (token == "\\use_indices") {
                lex >> use_indices;
        } else if (token == "\\tracking_changes") {
@@ -1233,6 +1244,8 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
                os << "\n\\biblatex_bibstyle " << biblatex_bibstyle;
        if (!biblatex_citestyle.empty())
                os << "\n\\biblatex_citestyle " << biblatex_citestyle;
+       if (!multibib.empty())
+               os << "\n\\multibib " << multibib;
 
        os << "\n\\use_bibtopic " << convert<string>(use_bibtopic)
           << "\n\\use_indices " << convert<string>(use_indices)
@@ -2213,6 +2226,10 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
                                delim = ",";
                        }
                }
+               if (!multibib.empty() && multibib != "child") {
+                       opts += delim + "refsection=" + multibib;
+                       delim = ",";
+               }
                if (bibtexCommand() == "bibtex8"
                    || prefixIs(bibtexCommand(), "bibtex8 ")) {
                        opts += delim + "backend=bibtex8";