Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to reference parent entry by citation #1106

Closed
logological opened this issue Feb 15, 2021 · 7 comments
Closed

Add option to reference parent entry by citation #1106

logological opened this issue Feb 15, 2021 · 7 comments
Labels

Comments

@logological
Copy link
Contributor

With the original BibTeX bibliography styles, entries containing a crossref field are not printed in full; instead, the crossreferenced entry appears separately, and the entry that crossreferences it appears in abbreviated form, with a citation to the crossreferenced entry:

\documentclass{article}

\begin{filecontents}{\jobname.bib}
@incollection{article1,
  author =   {Sally Scribe},
  title =    {Article One},
  pages =    {1--20},
  crossref = {somebook},
}
@incollection{article2,
  author =   {Walter Writer},
  title =    {Article Two},
  pages =    {21--30},
  crossref = {somebook},
}
@book{somebook,
  editor =    {Edward Editor},
  title =     {Some Book},
  year =      2020,
  publisher = {Polly Publisher},
}
\end{filecontents}

\begin{document}
\cite{article1,article2}
\bibliographystyle{plain}
\bibliography{\jobname.bib}
\end{document}

test

However, when using Biblatex and Biber, entries containing a crossref field are printed in full:

\documentclass{article}
\usepackage{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@incollection{article1,
  author =   {Sally Scribe},
  title =    {Article One},
  pages =    {1--20},
  crossref = {somebook},
}
@incollection{article2,
  author =   {Walter Writer},
  title =    {Article Two},
  pages =    {21--30},
  crossref = {somebook},
}
@book{somebook,
  editor =    {Edward Editor},
  booktitle = {Some Book},
  year =      2020,
  publisher = {Polly Publisher},
}
\end{filecontents}

\begin{document}
\cite{article1,article2}
\printbibliography
\end{document}

test2

It is common for people to ask how to get the old BibTeX-style behaviour with Biblatex. For example:

At present the only workaround seems to be to manually redefine the bibliography driver for all the relevant entry types (@incollection, @inproceedings, etc.).

Given that this this behaviour is so commonly requested (and was indeed standard for Biblatex's predecessor), how about modifying the standard Biblatex styles such that this behaviour can be invoked at will with an option? Basically, this issue is requesting that the definitive solution sketched by moewe be implemented (whenever the time and resources become available).

@moewew
Copy link
Collaborator

moewew commented Feb 15, 2021

I'm not sure how feasible it is to get this into core biblatex even in the long term. A change of the required dimension would have serious backwards compatibility implications.

The biblatex-ext styles, on the other hand, have the option citexref for this.

\documentclass{article}
\usepackage[style=ext-numeric, citexref=true]{biblatex}

\begin{filecontents}{\jobname.bib}
@incollection{article1,
  author =   {Sally Scribe},
  title =    {Article One},
  pages =    {1--20},
  crossref = {somebook},
}
@incollection{article2,
  author =   {Walter Writer},
  title =    {Article Two},
  pages =    {21--30},
  crossref = {somebook},
}
@book{somebook,
  editor =    {Edward Editor},
  booktitle = {Some Book},
  year =      2020,
  publisher = {Polly Publisher},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{article1,article2}
\printbibliography
\end{document}

Sally Scribe. “Article One”. In: [1], pp. 1–20.

@logological
Copy link
Contributor Author

A change of the required dimension would have serious backwards compatibility implications.

Could you clarify this a bit? If the behaviour is enabled with an option (like citexref=true from biblatex-ext) that is turned off by default, then what sort of implications for backwards compatibility are there?

@moewew
Copy link
Collaborator

moewew commented Feb 15, 2021

On a (superficial) user level a new option whose pre-set value corresponds to the status quo is pretty unproblematic. But the issue is that the implementation of that option would likely require changes to bibmacros (and/or the drivers). Since the standard styles are a basis for many people's preamble customisations as well as for some contributed styles, changes to the implementation could mean that those things no longer work as expected. This is of particular concern for people patching bibmacros/drivers, but may also come back to bite other people who otherwise rely on certain bits of the current style implementation.

Essentially, there is no clear separation between a "stable external interface" and its "internal implementation" (which we can change as we want as long as the external interface and the output don't change) when it comes to biblatex standard style development.

That is not to say that we can never change bibmacros or drivers for the standard styles, but we have to do so carefully and need to consider the impact this might have. For a feature like this, which would need larger-scale changes, I'd like to be very careful.

Another point is that the biblatex standard styles fulfil several roles at once

  • they are the go-to/first style for many people and thus should ideally work (with small changes) for as many people as possible,
  • they should be a simple basis for further customisation,
  • they should be an example of good biblatex coding and should show people what a solid biblatex style looks like.

There was always the understanding that if people want fancy stuff, they might have to look for contributed styles. That's why I wrote biblatex-ext: Some things just didn't feel like they should be or could be part of the standard styles, because there is a certain expectation that the standard styles are simple and clean. Other features (like citexref) were a bit too risky because they required larger-scale changes that could disrupt other people's use of the standard styles.

@logological
Copy link
Contributor Author

Fair enough (though I contend that citations referencing parent citations doesn't count as "fancy stuff", since this was standard behaviour in BibTeX and still seems to be in demand nowadays). Using biblatex-ext probably solves my particular use case, though I had no idea that package existed until you told me about it, and seemingly neither do any of the people (besides you) participating in the TeX Stack Exchange threads I linked to upthread. Seems to me the package could be better publicized… maybe by briefly mentioning and describing it in the Biblatex documentation itself?

@moewew
Copy link
Collaborator

moewew commented Feb 16, 2021

The TeX.SX questions you linked predate biblatex-ext by quite a few years (I think the newest question was from 2014, the first public release of biblatex-ext was in 2018). But I took the opportunity to advertise biblatex-ext in https://tex.stackexchange.com/q/54799/35864. (In https://tex.stackexchange.com/q/31499/35864 and https://tex.stackexchange.com/q/18820/35864 the questions also ask about crossref-citing @articles and @periodicals, which biblatex-ext doesn't do at the moment. I might look into that, but there are some subtle issues there like whether or not the @periodical includes volume and number info, that might make things a little more tricky. Come to think of it, this is already problematic for things like @incollection if the parent @collection refers to a multi-volume work as a whole, while the @incollection is obviously part of one particular volume.)

I don't think I'd want to advertise particular third-party styles in the biblatex manual.

@plk
Copy link
Owner

plk commented Aug 18, 2022

We might want to reconsider mentioning some style in the manual - biblatex-ext and biblatex-software are more like "extensions" to biblatex than styles that add in functionality people sometimes want irrespective of style and so I think we might want to mention these in a short section explaining the philosophy you outline nicely above.

@moewew
Copy link
Collaborator

moewew commented Aug 19, 2022

I'm not too fond of the idea of mentioning certain third-party styles/packages in the official documentation. For one I feel it creates the impression of an endorsement. It would be annoying to endorse something that becomes unmaintained/unusable after a while. Plus there is also the question of what we should mention there. Any third-party package? Could we reasonably refuse to mention certain packages if someone asked us to also mention them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants