# URL field inherited despite separate cross reference item

The following code produces a list of references that contains the URL three times. I use crossreferencing to save space. Is there a way to get rid of the URL in the entries that refere to a main entry?

\documentclass{article}

\usepackage{natbib}

\usepackage{url}

\begin{document}

\citet{Flickinger2008a,VanEynde2008a}

\bibliographystyle{plainnat}
\bibliography{test}
\end{document}


test.bib:

@inproceedings{Flickinger2008a,
Author = {Daniel P. Flickinger},
Crossref = {Mueller2008a-ed},

@inproceedings{VanEynde2008a,
Author = {Frank {Van Eynde}},
Crossref = {Mueller2008a-ed},
Pages = {253--273},
Title = {Predicate Complements}}

@proceedings{Mueller2008a-ed,
Booktitle = {Proceedings of the 15th International Conference on Head-Driven Phrase Structure Grammar},
Editor = {Stefan M{\"u}ller},
Title = {Proceedings of the 15th International Conference on Head-Driven Phrase Structure Grammar},
Url = {http://cslipublications.stanford.edu/HPSG/9/},
Year = {2008}}

-

This seems to be a design decision in the plainnat style. I get no URL for the @inproceedings entries if I modify plainnat.bst to have the following inproceedings function:

FUNCTION {inproceedings}
{ output.bibitem
format.authors "author" output.check
author format.key output
new.block
format.title "title" output.check
new.block
crossref missing${ format.in.ed.booktitle "booktitle" output.check format.bvolume output format.number.series output format.pages output address empty$
{ organization publisher new.sentence.checkb
organization output
publisher output
format.date "year" output.check
}
format.date "year" output.check
new.sentence
organization output
publisher output
}
if$format.isbn output format.doi output format.url output } { format.incoll.inproc.crossref output.nonnull format.pages output } if$
%  format.isbn output
%  format.doi output
%  format.url output
new.block
note output
fin.entry
}


The commented out lines are responsible for adding the isbn, doi and url fields and have been moved in the "false" branch of the test crossref missing\$, so that @inproceedings entries without a crossref field will get the URL.

As usual, you should make a copy of plainnat.bst under a new name, say myplainnat.bst. Similar modifications should be made to the inbook and incollection functions.

-
OK. This is great, but the other poster is right too: In case I specify a specific value for the papers in the proceedings, I would like to see this value. So is there a trick that helps to see whether one deals with an inherited value or a specific one? –  Stefan Müller Nov 14 '12 at 20:13
@StefanMüller When a field is declared for an entry, in this case url, it is inherited from the entry referred to with crossref, if missing. This is a rule of BibTeX. So either you define a new field type, say urlhere and update the relevant functions, or there's nothing to do. –  egreg Nov 14 '12 at 22:03

It strikes me that the url fields of the three entries should not all be the same. In particular, the entries Flickinger2008a and VanEynde2008a should really be given their own separate url fields. I.e., the entry Flickinger2008a might be given the field

url = {http://cslipublications.stanford.edu/HPSG/9/Flickinger.pdf},


and the entry VanEynde2008a might be given the field

url = {http://cslipublications.stanford.edu/HPSG/9/vaneynde.pdf},


The chief reason for providing separate url fields is that the URLs of the entries of type @inproceedings are pdf files, whereas the URL of the @proceedings-type entry is a web page. By providing separate URLs, you make it easy (or easier) on the readers to obtain just the publication(s) they want, rather than making them go first to a website and then scroll around for a while until they manage to find the paper they're interested in.

Addendum, prompted by a follow-up comment by the OP: If you do not want to have the "child" entries (of type @inproceedings) "inherit" the value of the url field from the "parent" entry (of type @proceedings) at all, you could simply set a blank value for the corresponding url fields, i.e., you could set

url = {},


for both of the "child" entries.

-
I agree. So, if something is specified, this should be printed for the individual items, but if nothing is specified, the value should not be inherited. –  Stefan Müller Nov 14 '12 at 19:38
The url = {} solution seems to work in principle. However, BibDesk is smarter than we are and removes the empty field from the database ... –  Stefan Müller Nov 15 '12 at 10:28
@StefanMüller -- aah, you hadn't mentioned so far that you use bibdesk. :-) Is it possible to instruct bibdesk not to remove "empty" fields? –  Mico Nov 15 '12 at 13:37