use_geometry = false;
use_amsmath = package_auto;
use_esint = package_auto;
- cite_engine = biblio::ENGINE_BASIC;
+ cite_engine_ = biblio::ENGINE_BASIC;
use_bibtopic = false;
trackChanges = false;
outputChanges = false;
} else if (token == "\\cite_engine") {
string engine;
lex >> engine;
- cite_engine = citeenginetranslator().find(engine);
+ cite_engine_ = citeenginetranslator().find(engine);
} else if (token == "\\use_bibtopic") {
lex >> use_bibtopic;
} else if (token == "\\tracking_changes") {
// the textclass
os << "\\textclass " << textclasslist[textclass].name() << '\n';
- // then the the preamble
+ // then the preamble
if (!preamble.empty()) {
// remove '\n' from the end of preamble
string const tmppreamble = rtrim(preamble, "\n");
<< "\n\\use_geometry " << convert<string>(use_geometry)
<< "\n\\use_amsmath " << use_amsmath
<< "\n\\use_esint " << use_esint
- << "\n\\cite_engine " << citeenginetranslator().find(cite_engine)
+ << "\n\\cite_engine " << citeenginetranslator().find(cite_engine_)
<< "\n\\use_bibtopic " << convert<string>(use_bibtopic)
<< "\n\\paperorientation " << string_orientation[orientation]
<< '\n';
return *(language->encoding());
}
+
+biblio::CiteEngine BufferParams::getEngine() const
+{
+ // FIXME the class should provide the numerical/
+ // authoryear choice
+ if (getLyXTextClass().provides(LyXTextClass::natbib)
+ && cite_engine_ != biblio::ENGINE_NATBIB_NUMERICAL)
+ return biblio::ENGINE_NATBIB_AUTHORYEAR;
+ return cite_engine_;
+}
+
+
+void BufferParams::setCiteEngine(biblio::CiteEngine const cite_engine)
+{
+ cite_engine_ = cite_engine;
+}
+
} // namespace lyx