On Fri, Mar 02, 2007 at 11:34:06AM +0100, Jean-Marc Lasgouttes wrote:
> >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> Martin> On Fri, Mar 02, 2007 at 04:13:14AM +0100, Juergen Spitzmueller
> Martin> wrote:
> >> José Matos wrote:
> >> 
> >> > What is Jürgen's opinion on the subject?
> >> 
> >> Without having a closer look at the patch, my opinion is that
> >> Martin's approach is good (and necessary) in general. However, it
> >> should enclose numerical citations in one way or another.
> >> 
> >> Jürgen
> 
> Martin> That would be like the attached... but note that I don't think
> Martin> that is right. I agree that numeric should be handled, but
> Martin> what happens here is that, also when natbib is pre-loaded by
> Martin> the document class, the _user_ is allowed to choose between
> Martin> numeric and author-year. I don't think that is right.
> 
> I have no idea on the actual logic, but nevertheless:
> 
> -     biblio::CiteEngine const cite_engine = buffer.params().cite_engine;
> +     BufferParams const & p = buffer.params();
> +     biblio::CiteEngine cite_engine;
> +     if (p.getLyXTextClass().provides(LyXTextClass::natbib)
> +        && p.cite_engine != biblio::ENGINE_NATBIB_NUMERICAL)
> +             cite_engine = biblio::ENGINE_NATBIB_AUTHORYEAR;
> +     else    
> +             cite_engine = p.cite_engine;
> 
> Should getEngine from biblio.C be moved to BufferParams and used
> there? I'd like to factor code whenever possible.

Hmm. What would be the advantage? Sure I can do it... won't be next
Tuesday though.
 
> -             features.require("natbib");
> +             if 
> (!features.bufferParams().getLyXTextClass().provides(LyXTextClass::natbib))
> +                     features.require("natbib");
> 
> I think it is not necessary because LaTeXFeatures handles it.

Damn you're right... and I actually looked at that code when preparing
for this. This was the only thing the old code got right ;-/

- Martin

Attachment: pgppQm6Vk8BMy.pgp
Description: PGP signature

Reply via email to