2

I am using bibtex to organize my bibliography. I want to cite a chapter from a book. The best way I read when one has both author and editors, is to use crossref and an inbook and book entry, e.g.: (bib_test.bib)

@inbook{inbook,
  author = {A. Inbook-Author},
  title = {The title of the inbook entry},
  pages = {1--5},
  chapter = {1},
  crossref = "book",
}

@book{book,
  title = {A title of the book entry},
  booktitle = {A title of the book entry},
  year = 2013,
  editor = {E. Book-Editor},
  publisher = {Book Publishing Inc.},
}

However, if I run bibtex, on a latex file

\documentclass{scrartcl}

\begin{document}
\cite{inbook}
\bibliographystyle{style}
\bibliography{bib_test}
\end{document}

it always gives me the warning:

Warning--can't use both author and editor fields in inbook

I don't understand this, since that was the reason I splitted it into inbook and book, but still I am gettings this error. In the bibstyle file I found

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$
  title empty$ 'skip$ 'setup.inlinelink if$ % urlbst
  format.btitle "title" output.check
  format.edition output 
  crossref missing$
    {
      format.publisher.address output
      format.bvolume output
      format.chapter.pages "chapter and pages" output.check
      format.number.series output
    }
    {
      format.chapter.pages "chapter and pages" output.check
      format.book.crossref output.nonnull
    }
  if$

  format.date "year" output.check
  date.block
  format.pages "pages" output.check
  format.doi output
  format.note output
  fin.entry
} 

I tested a few things and it seems that crossref missing$ gives always True as an answer. He should NOT test on both author and editor fields being present if a crossref is given. This is weird, since he definitely recognizes the crossref, otherwise he would show an error...

  • Please show not only code snippets but a MWE. Is there a good reason for using old BibTeX instead of biblatex with biber? – Schweinebacke Jan 29 '17 at 13:01
  • I have added a MWE. Not that I know of, I always used bibtex in combination with pdflatex. Is there an advantage of using biblatex? What is biber? – Guiste Jan 29 '17 at 13:44
3

The solution is to change the entry type of the first entry from @inbook to @inproceedings.

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@inproceedings{inbook,
  author = {A. Inbook-Author},
  title = {The title of the inbook entry},
  pages = {1--5},
  chapter = {1},
  crossref = "book",
}
@book{book,
  title = {A title of the book entry},
  booktitle = {A title of the book entry},
  year = 2013,
  editor = {E. Book-Editor},
  publisher = {Book Publishing Inc.},
  address   = "Anytown",
}
\end{filecontents}

\documentclass{article}
\bibliographystyle{style} % downloaded from site indicated by OP

\begin{document}
\cite{inbook}
\bibliography{mybib}
\end{document}
  • But what is the purpose of the "inbook" type then? – Guiste Jan 29 '17 at 18:35
  • @Guiste - I believe @inbook should be used only if the piece being cited is something like a chapter in a book -- and if the chapter and the entire book have the same author (or editor). For a multi-author anthology that was edited by one or more persons who needn't be same as the authors of any of the chapters, the entry type @inproceedings should be used. Note that the ``@inproceedings` entry type isn't just limited to conference proceedings -- anthologies will do as well. – Mico Jan 29 '17 at 21:37
  • this is exactly my case. So I want to cite a chapter out of a book with the same author for the chapter and the book, but additionally editors for the whole book, how to handle that? – Guiste Jan 30 '17 at 7:15
  • @Guiste - Is the entry type @inproceedings not working for you? It would help if you edited your posting and replaced the two "dummy" entries with real (or at least more realistic) entries. – Mico Jan 30 '17 at 7:31

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.