Bibtex mit Inbook- und Buch-CrossRef: Warum fehlt CrossRef$ = True, obwohl CrossRef erkannt wird?

Bibtex mit Inbook- und Buch-CrossRef: Warum fehlt CrossRef$ = True, obwohl CrossRef erkannt wird?

Ich verwende Bibtex, um meine Bibliographie zu organisieren. Ich möchte ein Kapitel aus einem Buch zitieren. Wenn sowohl Autor als auch Herausgeber angegeben sind, verwende ich am besten CrossRef und einen InBook- und Book-Eintrag, z. B.: (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.},
}

Wenn ich jedoch bibtex auf einer Latex-Datei ausführe

\documentclass{scrartcl}

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

es gibt mir immer die Warnung:

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

Ich verstehe das nicht, denn das war der Grund, warum ich es in Inbook und Book aufgeteilt habe, aber ich bekomme trotzdem diesen Fehler. In der Bibstyle-Datei fand ich

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
} 

Ich habe ein paar Dinge getestet und es scheint, dass crossref missing$ immer True als Antwort liefert. Er sollte NICHT testen, ob sowohl die Felder „Autor“ als auch „Editor“ vorhanden sind, wenn ein Crossref angegeben ist. Das ist seltsam, da er den Crossref definitiv erkennt, sonst würde er einen Fehler anzeigen ...

Antwort1

Die Lösung besteht darin, den Eintragstyp des ersten Eintrags von @inbookin zu ändern @inproceedings.

Bildbeschreibung hier eingeben

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

verwandte Informationen