plk / biblatex-apa

APA style for BibLaTeX
88 stars 48 forks source link

crossref #196

Closed mvvmvv closed 1 year ago

mvvmvv commented 1 year ago

I am creating my bibliography as follows:

@INCOLLECTION{X-a,
    author = {author, another},
    title = {another title},
    pages = {12--34},
    crossref = {X},
}

@BOOK{X,
    author = {author},
    editor = {author},
    title = {title},
    booktitle = {booktitle},
    publisher = {publisher},
    address = {place},
    year = {1234},
}

When I create the references it only shows the editors for X-a defined in X, is this correct?

moewew commented 1 year ago

Can you explain what exactly you mean by showing the output you get from those .bib entries (ideally you would show a complete example document and not just the .bib entries) and how that deviates from what you expect?

Semantically speaking it is a bit dubious to have an @incollection crossref a @book. It would be more logical to have the @incollection refer to a @collection. A @collection only has an editor and no author, so I would expect something more like

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=apa]{biblatex}

\begin{filecontents}{\jobname.bib}
@incollection{X-a,
  author   = {author, another},
  title    = {another title},
  pages    = {12-34},
  crossref = {X},
}
@collection{X,
  editor    = {editor},
  title     = {title},
  publisher = {publisher},
  address   = {place},
  year      = {1234},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem \autocite{sigfridsson,X-a}

\printbibliography
\end{document}

which produces

author another, a. (1234). Another title. In editor (Ed.), Title (pp. 12–34). publisher.

for me as I would have expected.

plk commented 1 year ago

Please re-open if needed with a with a full example including expected and obtained output.