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") {
<< "\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';
}
}
if (!topmargin.empty())
- os << ",tmargin=" << from_ascii(topmargin);
+ os << ",tmargin=" << from_ascii(LyXLength(topmargin).asLatexString());
if (!bottommargin.empty())
- os << ",bmargin=" << from_ascii(bottommargin);
+ os << ",bmargin=" << from_ascii(LyXLength(bottommargin).asLatexString());
if (!leftmargin.empty())
- os << ",lmargin=" << from_ascii(leftmargin);
+ os << ",lmargin=" << from_ascii(LyXLength(leftmargin).asLatexString());
if (!rightmargin.empty())
- os << ",rmargin=" << from_ascii(rightmargin);
+ os << ",rmargin=" << from_ascii(LyXLength(rightmargin).asLatexString());
if (!headheight.empty())
- os << ",headheight=" << from_ascii(headheight);
+ os << ",headheight=" << from_ascii(LyXLength(headheight).asLatexString());
if (!headsep.empty())
- os << ",headsep=" << from_ascii(headsep);
+ os << ",headsep=" << from_ascii(LyXLength(headsep).asLatexString());
if (!footskip.empty())
- os << ",footskip=" << from_ascii(footskip);
+ os << ",footskip=" << from_ascii(LyXLength(footskip).asLatexString());
os << "}\n";
texrow.newline();
}
return *(language->encoding());
}
+
+biblio::CiteEngine BufferParams::getEngine() const
+{
+ // FIXME the class should provide the numerical/
+ // authoryear choice
+ if (getLyXTextClass().provides("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