[Tex/LaTex] bibtex with inbook and book crossref: why is crossref missing$ = True, although crossref is recognized

bibtexcross-referencing

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…

Best Answer

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}