[tex-live] In natbib, how to exclude content of url field in the bib section

Zdenek Wagner zdenek.wagner at gmail.com
Mon Aug 13 10:48:25 CEST 2007

2007/8/13, Lianqing Yu <lianqing.yu at hotmail.com>:
>  I use bibliographic database and \thebibliography environment to create the
> reference section of my papers. In each bibliographic entry in the database,
> I usually add a url field. When I use bibtex, the content of the url field
> is not shown in the paper. This is fine. However, when I use natbib, the
> content of the url field is shown in the paper. This is not desirable but I
> have to use natbib for its author-year style. So my question is: how to
> configure natbib so that the the content of the url field is not shown in
> the paper?

Make a copy of abbrvnat.bst under a different name, eg.
abbrvnat-without-url.bst, and put it to the place where bibtex expects
bst files, preferably in the same directory hierarchy in texmf-local,
and rebuild the filename database. Then edit your copy of the bst
file, locate FUNCTION {format.url}. Below you will see a conditional
command with two expansions, the first line outputs the empty string,
the following outputs URL. Remove the second line and replace it with
the copy of the preceding line, ie. the function then should look as:

FUNCTION {format.url}
{ url empty$
    { "" }
    { "" }

I hope this works.
> ________________________________
> Live Earth is coming.  Learn more about the hottest summer event - only on
> MSN. Check it out!

Zdeněk Wagner

More information about the tex-live mailing list