Re: Replacing Natbib with Custom BibStyle (WAS: changing bibliography style in layouts)

2006-09-23 Thread Luis Rivera
Luis Rivera <[EMAIL PROTECTED]> writes:

> 
> [snip] I found that I can use makebst generated bibtex styles with LyX's
> (presumably) hardcoded \usepackage[...]{natbib} command, provided they use the
> "standard" natbib macros: that's so because the \bibliographystyle declaration
> may be adjusted in the document's preamble.
> 

Indeed, oxon is somewhat of a weird bird: it has harvard as background, yet it
uses only the plain \cite command; so I found I can get my job done using the
standard citations provided by LyX.

Thanks to the makebst and LyX developers.

Luis.




Re: Replacing Natbib with Custom BibStyle (WAS: changing bibliography style in layouts)

2006-09-20 Thread Luis Rivera
Richard Heck <[EMAIL PROTECTED]> writes:

> 
> Here are some hacks.
> 
> * Try loading oxon.sty from the preamble, hoping this is after
>   natbib.sty is loaded. Of course, as things are, LaTeX will
>   complain about your redefinitions. But perhaps you could change
>   the ones you redefine to \renewcommand. Or would \newcommand*
>   work? Anyway, something along these lines could be done.
> * Export to LaTeX and make the change manually. But then you lose
>   preview.
> * Weird idea: Redefine the LaTeX -> DVI converter to pass your file
>   through sed or something first, thus changing the
>   "\usepackage{natbib}" line into "\usepackage{oxon}". I don't know
>   that this will work, but it might.
> 

I knew about options 1 and 2; (1) is a kludge, unless I come up with the exact
opposite to \ProvideCommand, namely, if a command is already defined, renew it;
otherwise, define it; (2) indeed makes preview impossible, so it's a non-option.

Your "weird" idea (3) is not that weird, but it requires fiddling with the
"standard" preview process; something I'm not ready to do, since my problem is
pretty local---I don't want to go through the sed/awk/perl/gema script for all
my files. So, in a way, it is also a kludge.

It occurred to me that saving oxon.sty (not oxon.bst) as natbib.sty in my source
file directory may do the trick: since my TeX installation searches the current
directory first, the first file's definitions discard any other version of the
file in the system; but that's also a kludge, since I have to rename/copy
oxon.sty, and thus I multiply entities without necessity.

If \usepackage[...]{natbib} is indeed hardcoded, I'm pretty screwed. 

Any thoughts from the real experts?

By the way, I found that I can use makebst generated bibtex styles with LyX's
(presumably) hardcoded \usepackage[...]{natbib} command, provided they use the
"standard" natbib macros: that's so because the \bibliographystyle declaration
may be adjusted in the document's preamble.

> 
> By the way, I'd be interested to see oxon.sty, if you're sharing. I've
> played some with BibTeX as well.
> 

Let me debug it first: there is one little thing it still doesn't do; but if you
don't mind being a beta tester, let me know.

Luis.




Replacing Natbib with Custom BibStyle (WAS: changing bibliography style in layouts)

2006-09-19 Thread Richard Heck
Luis Rivera wrote:
> Richard Heck <[EMAIL PROTECTED]> writes:
>> I'm not sure I understand what it is you want to do. Do you want LyX to
>> export "\usepackage{oxon}" instead of "\usepackage{natbib}"? 
>> 
> Indeed, this is what I'm trying to do.  The main problem is that I redefined 
> some commands from natbib to achieve some results in the \cite=ations in the 
> body of the document; loading \usepackage{natbib} load the previous 
> definitions, so that my \newcommand's are ignored.
>   
I doubt there is going to be a clean way to do this, as I expect the
export is hard-coded into LyX.

Here are some hacks.

* Try loading oxon.sty from the preamble, hoping this is after
  natbib.sty is loaded. Of course, as things are, LaTeX will
  complain about your redefinitions. But perhaps you could change
  the ones you redefine to \renewcommand. Or would \newcommand*
  work? Anyway, something along these lines could be done.
* Export to LaTeX and make the change manually. But then you lose
  preview.
* Weird idea: Redefine the LaTeX -> DVI converter to pass your file
  through sed or something first, thus changing the
  "\usepackage{natbib}" line into "\usepackage{oxon}". I don't know
  that this will work, but it might.

Any thoughts from the real experts?

By the way, I'd be interested to see oxon.sty, if you're sharing. I've
played some with BibTeX as well.

Richard



Re: changing bibliography style in layouts

2006-09-19 Thread Luis Rivera
Richard Heck <[EMAIL PROTECTED]> writes:

> 
> 
> I'm not sure I understand what it is you want to do. Do you want LyX to
> export "\usepackage{oxon}" instead of "\usepackage{natbib}"? 

Indeed, this is what I'm trying to do.  The main problem is that I redefined 
some commands from natbib to achieve some results in the \cite=ations in the 
body of the document; loading \usepackage{natbib} load the previous 
definitions, so that my \newcommand's are ignored.

> Or do you
> just want to use oxon.sty with natbib the way you might use, say,
> apalike.sty with natbib?
> 

I've never tried apalike.sty with natbib, so I don't know what happens here. 
Can I achieve the same results?

I hope the clarification is informative.

Luis.




Re: changing bibliography style in layouts

2006-09-19 Thread Richard Heck

I'm not sure I understand what it is you want to do. Do you want LyX to
export "\usepackage{oxon}" instead of "\usepackage{natbib}"? Or do you
just want to use oxon.sty with natbib the way you might use, say,
apalike.sty with natbib?

Richard

Luis Rivera wrote:
> Hello,
>
> I wrote my own bibliography package (no kidding), following (freely) natbib; 
> now
> I want to use LyX's natbib layout, but with my own sty/bst.  I browsed around
> the /layout directory, without figuring out where are the bibliography options
> stored, so that I can adjust LyX's "native" natbib support, but now calling my
> own package/bibstyle (its name is "oxon", if that info is useful).
>
> Thanks.
>
> Luis.
>
>   



changing bibliography style in layouts

2006-09-18 Thread Luis Rivera
Hello,

I wrote my own bibliography package (no kidding), following (freely) natbib; now
I want to use LyX's natbib layout, but with my own sty/bst.  I browsed around
the /layout directory, without figuring out where are the bibliography options
stored, so that I can adjust LyX's "native" natbib support, but now calling my
own package/bibstyle (its name is "oxon", if that info is useful).

Thanks.

Luis.