X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeXFeatures.C;h=9545af96f45f58e16d8b4eca2682a5f3a35a23ed;hb=10ba1b8918e7da14334bb5573ce2a707671c8b51;hp=e7f52c7954a5a5f9efe912c85a8b65d85d9a0167;hpb=68b7ef25fb7d2da230d3eb11d6737701abfc2e64;p=lyx.git diff --git a/src/LaTeXFeatures.C b/src/LaTeXFeatures.C index e7f52c7954..9545af96f4 100644 --- a/src/LaTeXFeatures.C +++ b/src/LaTeXFeatures.C @@ -27,7 +27,7 @@ #include "support/filetools.h" -#include "support/std_sstream.h" +#include using lyx::support::IsSGMLFilename; using lyx::support::MakeRelPath; @@ -41,9 +41,11 @@ using std::ostream; using std::ostringstream; using std::set; +namespace biblio = lyx::biblio; + LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p, bool n) - : buffer_(b), params_(p), nice_(n) + : buffer_(&b), params_(p), nice_(n) {} @@ -158,7 +160,6 @@ string LaTeXFeatures::getLanguages() const cit != UsedLanguages_.end(); ++cit) languages << (*cit)->babel() << ','; - return languages.str(); } @@ -192,7 +193,6 @@ char const * simplefeatures[] = { "dvipost", "fancybox", "calc", - "jurabib" }; int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *); @@ -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"; @@ -307,6 +307,11 @@ string const LaTeXFeatures::getPackages() const packages << "]{natbib}\n"; } + // jurabib -- we need version 0.6 at least. + if (isRequired("jurabib")) { + packages << "\\usepackage{jurabib}[2004/01/25]\n"; + } + // bibtopic -- the dot provides the aux file naming which // LyX can detect. if (isRequired("bibtopic")) { @@ -377,6 +382,9 @@ string const LaTeXFeatures::getMacros() const if (isRequired("lyxgreyedout")) macros << lyxgreyedout_def; + if (isRequired("lyxdot")) + macros << lyxdot_def << '\n'; + // floats getFloatDefinitions(macros); @@ -465,7 +473,13 @@ void LaTeXFeatures::showStruct() const { Buffer const & LaTeXFeatures::buffer() const { - return buffer_; + return *buffer_; +} + + +void LaTeXFeatures::setBuffer(Buffer const & buffer) +{ + buffer_ = &buffer; }