X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLaTeXFeatures.C;h=9cbbc3288c564c9e76c60aa34443f15740d92782;hb=ff6706002f89b9c10b98ebd08c00962aacf0a4c7;hp=b70b7decc3bd2c30121f78351f05b251fbbb4ae7;hpb=44cd0fc9a1687cc63911c7f98d978594458e7813;p=lyx.git diff --git a/src/LaTeXFeatures.C b/src/LaTeXFeatures.C index b70b7decc3..9cbbc3288c 100644 --- a/src/LaTeXFeatures.C +++ b/src/LaTeXFeatures.C @@ -42,8 +42,8 @@ using std::ostringstream; using std::set; -LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p) - : buffer_(b), params_(p) +LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p, bool n) + : buffer_(&b), params_(p), nice_(n) {} @@ -189,7 +189,10 @@ char const * simplefeatures[] = { "prettyref", "float", "wasy", - "dvipost" + "dvipost", + "fancybox", + "calc", + "jurabib" }; int const nb_simplefeatures = sizeof(simplefeatures) / sizeof(char const *); @@ -296,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"; @@ -304,6 +307,12 @@ string const LaTeXFeatures::getPackages() const packages << "]{natbib}\n"; } + // bibtopic -- the dot provides the aux file naming which + // LyX can detect. + if (isRequired("bibtopic")) { + packages << "\\usepackage[dot]{bibtopic}\n"; + } + return packages.str(); } @@ -355,8 +364,6 @@ string const LaTeXFeatures::getMacros() const macros << mathcircumflex_def << '\n'; // other - if (isRequired("NeedLyXMinipageIndent")) - macros << minipageindent_def; if (isRequired("ParagraphLeftIndent")) macros << paragraphleftindent_def; if (isRequired("NeedLyXFootnoteCode")) @@ -370,6 +377,9 @@ string const LaTeXFeatures::getMacros() const if (isRequired("lyxgreyedout")) macros << lyxgreyedout_def; + if (isRequired("lyxdot")) + macros << lyxdot_def << '\n'; + // floats getFloatDefinitions(macros); @@ -407,6 +417,13 @@ string const LaTeXFeatures::getTClassPreamble() const tcpreamble << tclass[*cit]->preamble(); } + CharStyles::iterator cs = tclass.charstyles().begin(); + CharStyles::iterator csend = tclass.charstyles().end(); + for (; cs != csend; ++cs) { + if (isRequired(cs->name)) + tcpreamble << cs->preamble; + } + return tcpreamble.str(); } @@ -451,7 +468,13 @@ void LaTeXFeatures::showStruct() const { Buffer const & LaTeXFeatures::buffer() const { - return buffer_; + return *buffer_; +} + + +void LaTeXFeatures::setBuffer(Buffer const & buffer) +{ + buffer_ = &buffer; }