]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.C
avoid to update when navigating
[lyx.git] / src / LaTeXFeatures.C
index e7f52c7954a5a5f9efe912c85a8b65d85d9a0167..9cbbc3288c564c9e76c60aa34443f15740d92782 100644 (file)
@@ -43,7 +43,7 @@ using std::set;
 
 
 LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p, bool n)
-       : buffer_(b), params_(p), nice_(n)
+       : buffer_(&b), params_(p), nice_(n)
 {}
 
 
@@ -299,7 +299,7 @@ string const LaTeXFeatures::getPackages() const
        // natbib.sty
        if (isRequired("natbib") && ! tclass.provides(LyXTextClass::natbib)) {
                packages << "\\usepackage[";
-               if (params_.use_numerical_citations) {
+               if (params_.cite_engine == biblio::ENGINE_NATBIB_NUMERICAL) {
                        packages << "numbers";
                } else {
                        packages << "authoryear";
@@ -377,6 +377,9 @@ string const LaTeXFeatures::getMacros() const
        if (isRequired("lyxgreyedout"))
                macros << lyxgreyedout_def;
 
+       if (isRequired("lyxdot"))
+               macros << lyxdot_def << '\n';
+
        // floats
        getFloatDefinitions(macros);
 
@@ -465,7 +468,13 @@ void LaTeXFeatures::showStruct() const {
 
 Buffer const & LaTeXFeatures::buffer() const
 {
-       return buffer_;
+       return *buffer_;
+}
+
+
+void LaTeXFeatures::setBuffer(Buffer const & buffer)
+{
+       buffer_ = &buffer;
 }