On Wed, Feb 28, 2007 at 10:27:18PM +0100, Jean-Marc Lasgouttes wrote: > >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> The attached patches make both these mechanisms respond to the > Martin> ProvidesNatbib textclass flag. I am not sure I did this right > Martin> -- I am especially uncertain about the handling of the numeric > Martin> vs. author-year thing. Shouldn't this also be in the .layout > Martin> file if the class is loading natbib? > > CiteEngine_enum getEngine(Buffer const & buffer) > { > - return buffer.params().cite_engine; > + BufferParams const & p = buffer.params(); > + if (p.getLyXTextClass().provides(LyXTextClass::natbib)) { > + if (p.cite_engine == biblio::ENGINE_NATBIB_NUMERICAL) > + return ENGINE_NATBIB_NUMERICAL; > + else > + return ENGINE_NATBIB_AUTHORYEAR; > + } else > + return p.cite_engine; > }
> What is the logic here? Looks equivalent to CiteEngine_enum getEngine(Buffer const & buffer) { BufferParams const & p = buffer.params(); if (p.getLyXTextClass().provides(LyXTextClass::natbib) && p.cite_engine != biblio::ENGINE_NATBIB_NUMERICAL) return ENGINE_NATBIB_AUTHORYEAR; return p.cite_engine; } Andre'