9

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},
        Title = {Transparent Heads}}


@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}}

2 Answers 2

8

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
        }
        { address output.nonnull
          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.

1
  • 1
    @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, 2012 at 22:03
3

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.