[Tex/LaTex] bibtex: author and editor inbook

bibtex

In the .bst file, the inbook function looks like this:

FUNCTION {inbook}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check
    }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  new.block
  format.btitle "title" output.check
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
     format.bvolume output
          format.chapter.pages "chapter and pages" output.check
      new.block
      format.number.series output
      new.sentence
      format.publisher.address output
    }
    {
      format.chapter.pages "chapter and pages" output.check
      new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.date "year" output.check
  new.block
  format.note output
  fin.entry
}

and produces a can't use both editor and author fields error. However, for inproceedings it's fine:

FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  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
      new.sentence
      publisher empty$
        { format.organization.address output }
        { organization "organization" bibinfo.check output
          format.publisher.address output
        }
      if$
      format.date "year" output.check
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  new.block
  format.note output
  fin.entry
}

Does somebody know how to fix the ìnbook entry?

Best Answer

The idea is that an inbook entry refers to a book entry, and therefore should not have an editor. So the following works without warning:

@inbook{inbook,
  author = {A. Inbook-Author},
  title = {The title of the inbook entry},
  pages = {1--5},
  year = 2013,
  crossref = "book",
  volume = 1,
}
@book{book,
  title = {A title of the book entry},
  year = 2013,
  editor = {E. Book-Editor},
  publisher = {Book Publishing Inc.},
}

This is also reflected by the fact that an inbook entry has no booktitle field, not even as an option. BibTeX does not enforce that every inbook has a crossref to a book, but I guess this is the only sensible way to use it. (A little less convincing is the fact that a book also can not have author and editor.)

What you are looking for is probably the incollection entry. This entry type even requires a booktitle field. Note also that there is no collection entry type, that would be the natural target of a cross-referencing incollection entry. An incollection entry can have both an author, and an editor field.

The inproceedings entry is just a variant of incollection where the publisher field is optional (and some more minor variations). So it should not be seen as an entry type that usually cross-reference to a proceedings entry. The analogy breaks here, unfortunately. The proceedings type, however, is again quite similar to a book with optional publisher.

Note, however, that those rules are not infallible. When they were laid down a number of aspects of publishing were not addressed. So these helpful hints of BibTeX documentation always apply:

The standard style’s thirteen entry types do reasonably well at formatting most entries, but no scheme with just thirteen formats can do everything perfectly. Thus, you should feel free to be creative in how you use these entry types (but if you have to be too creative, there's a good chance you're using the wrong entry type).

Don't take the field names too seriously. Sometimes, for instance, you might have to include the publisher's address along with the publisher's name in the publisher field, rather than putting it in the address field. Or sometimes, difficult entries work best when you make judicious use of the note field.

Don't take the warning messages too seriously. Sometimes, for instance, the year appears in the title, as in The 1966 World Gnus Almanac. In this case it's best to omit the year field and to ignore BibTEX’s warning message.

(Emphasis mine)