0

How can one cite a work within a reference entry using BibTeX? I have in mind something like:

Smith, F. (2019). The StackExchange guide to referencing. City: Publisher.

Jones, G. (2019). 'Citations within the bibliography' in (Smith 2019).

The case I'm concerned with is works within a collection (here a @book item containing an @incollection), though I suppose the solution is more general (and of general interest).

  • Welcome to TeX.SE. Based on your description, I'd guess the entry type you're looking for is @incollection. – Mico Sep 9 '19 at 16:12
2

The general feature responsible for this is BibTeX's crossref functionality. Not all styles implement this feature in the exact way you envision, but a great many do it in a way that comes close.

btxdoc explains crossref as follows (pp. 2-3)

BibTeX has a new cross-referencing feature, explained by an example. Suppose you say \cite{no-gnats} in your document, and suppose you have these two entries in your database file:

@INPROCEEDINGS{no-gnats,
  crossref = "gg-proceedings",
  author = "Rocky Gneisser",
  title = "No Gnats Are Taken for Granite",
  pages = "133-139"}
.  .  .
@PROCEEDINGS{gg-proceedings,
  editor = "Gerald Ford and Jimmy Carter",
  title = "The Gnats and Gnus 1988 Proceedings",
  booktitle = "The Gnats and Gnus 1988 Proceedings"}

Two things happen.

First, the special crossref field tells BibTeX that the no-gnats entry should inherit any fields it's missing from the entry it cross references, gg-proceedings. In this case it in inherits the two fields editor and booktitle. Note that, in the standard styles at least, the booktitle field is irrelevant for the @PROCEEDINGS entry type. The booktitle field appears here in the gg-proceedings entry only so that the entries that cross reference it may inherit the field. No matter how many papers from this meeting exist in the database, this booktitle field need only appear once.

The second thing that happens: BibTeX automatically puts the entry gg-proceedings into the reference list if it's cross referenced by two or more entries that you \cite or \nocite, even if you don't \cite or \nocite the gg-proceedings entry itself. So gg-proceedings will automatically appear on the reference list if one other entry besides no-gnats cross references it.

To guarantee that this scheme works, however, a cross-referenced entry must occur later in the database files than every entry that cross-references it. Thus, putting all cross-referenced entries at the end makes sense. (Moreover, you may not reliably nest cross references; that is, a cross-referenced entry may not itself reliably cross reference an entry. This is almost certainly not something you'd want to do, though.)

One final note: This cross-referencing feature is completely unrelated to the old BibTeX's cross referencing, which is still allowed. Thus, having a field like

    note = "Jones \cite{jones-proof} improves the result"

is not affected by the new feature.

Many styles then go on to simply issue as \cite{<crossref parent>} in the crossref child instead of repeating the inherited fields.

apalike comes quite close to what you seem to have in mind.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage{apalike}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{westfahl:frontier,
  author       = {Westfahl, Gary},
  title        = {The True Frontier: {Confronting} and Avoiding
                  the Realities of Space in {American}
                  Science Fiction Films},
  pages        = {55-65},
  crossref     = {westfahl:space},
}
@book{westfahl:space,
  editor       = {Westfahl, Gary},
  title        = {Space and Beyond: {The} Frontier Theme in Science Fiction},
  year         = {2000},
  publisher    = {Greenwood},
  address      = {Westport, Conn.},
}
\end{filecontents}


\begin{document}
\cite{westfahl:frontier} \nocite{westfahl:space}
\bibliographystyle{apalike}
\bibliography{\jobname}
\end{document}

Westfahl, G., editor (2000a). Space and Beyond: The Frontier Theme in Science Fiction. Greenwood, Westport, Conn.//Westfahl, G. (2000b). The true frontier: Confronting and avoiding the realities of space in American science fiction films. In (Westfahl, 2000a), pages 55–65.

Note that the crossref parent had to be \nocited (or \cited) explicitly here, because it only appears automatically in the bibliography without being \cited (or \nocited) if it is crossref'd at least twice. If want the parents to appear even when they are only used once and you can't be bothered to \nocite them, you can call BibTeX with the -min-crossrefs option and pass the value 1 to it

bibtex -min-crossrefs=1 <filename>

biblatex also has a crossref feature, but its inheritance rules are slightly more sophisticated (there is also an xref feature without inheritance). The standard styles don't \cite the parent entries, but my biblatex-ext bundle has the citexref feature that enables this.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[backend=biber, style=ext-authoryear, citexref]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@collection{westfahl:space,
  editor       = {Westfahl, Gary},
  title        = {Space and Beyond},
  subtitle     = {The Frontier Theme in Science Fiction},
  date         = {2000},
  publisher    = {Greenwood},
  address      = {Westport, Conn.},
}
@incollection{westfahl:frontier,
  author       = {Westfahl, Gary},
  title        = {The True Frontier},
  subtitle     = {Confronting and Avoiding
                  the Realities of Space in {American},
                  Science Fiction Films},
  pages        = {55-65},
  crossref     = {westfahl:space},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\cite{westfahl:frontier} \nocite{westfahl:space}
\printbibliography
\end{document}

Westfahl, Gary, ed. (2000a). Space and Beyond. The Frontier Theme in Science Fiction. Westport, Conn.: Greenwood.//— (2000b). ‘The True Frontier. Confronting and Avoiding the Realities of Space in American, Science Fiction Films’. In: Westfahl 2000a, pp. 55–65.

As with BibTeX, the parent had to be \nocited explicitly. biblatex also supports a min-crossref feature, it is called mincrossrefs and is a preamble option (so you don't need to worry about command line options). With

\usepackage[backend=biber, style=ext-authoryear, citexref, mincrossrefs=1]{biblatex}

there would be no need to \nocite the @collection parent.

  • Thanks for the really helpful answer! I tend to use apacite, which seems to be having trouble with crossref (I haven't looked into the documentation for it yet!). – Matthew McClure Sep 11 '19 at 16:01
  • @MatthewMcClure Well, apacite implements the wishes of the APA. AFAIK APA style simply does not include these kinds of citations in the bibliography, they want the full entry data. – moewe Sep 11 '19 at 16:24
  • Yes, I just checked the documentation (replied to your answer in a rush – I was heading out). – Matthew McClure Sep 12 '19 at 10:29

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.