On Wednesday 25 July 2001 14:44, Lars Gullik Bjønnes wrote:
> +
> +     // natbib.sty
> +     if (natbib) {
> +             string options("[]");
> +             if (params.use_numerical_citations)
> +                     options.insert(1, "numbers");
> +             else
> +                     options.insert(1, "authoryear");
> +             packages << "\\usepackage" << options << "{natbib}\n";
> +     }

;-) I think I was teaching myself about string::insert

> mmm... I guess stringstream is not a win in this case.
> or...
>         if (natbib) {
>                 packages << "\\usepackage[";
>                 if (params.use_numerical_citations) {
>                         packages << "numbers";
>                 } else {
>                         packages << "authoryear";
>                 }
>                 packages << "]{natbib}\n";
>         }

Can't say that it isn't cleaner and I don't see any extra temporary 
variables. In my tree.

My main question, however, is have I left anything important out? I modified 
        lib/chkconfig.ltx
        lib/doc/LaTeXConfig.lyx.in
Am I correct in saying that the former is used by the latter? In fact it's 
used only to generate the LaTeXConfig help documentation.

The only code I altered in src was in
        LaTeXFeatures.[Ch], buffer.C, bufferparams.[Ch]
and the changes were pretty small. Again, I'm left asking, "is that all I 
have to do"? Seems pretty easy (not that easy's bad...)

So most of the changed code is in frontends and large chunks of that are 
temporary. What I really want is a proper BibTeX database class to be stored 
in LyX and made accessible to the different buffers but this will come later.

Angus



        

Reply via email to