On Thu, 2007-03-01 at 10:58 +0100, Stephan Witt wrote:
> Andre Poenitz wrote:
> > 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;
> >   }
> 
> Really? I think the aim was to override p.cite_engine for layouts providing
> natbib...

But that's precisely what it does... look closer. If the engine already
is biblio::ENGINE_NATBIB_NUMERICAL, no need to override it anymore.

- Martin

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to