# For child entries with crossrefs, how can I instruct biblatex to output only a reference to the parent entry in the bibliography?

When producing a bibliography using biblatex and the alphabetic style, I would like to produce actual cross-references between two crossref-entries. For example, if I have several @inproceedings entries that define crossref={proc} and I have a matching @proceedings entry, I would like to generate something along the lines of:

[Aut13a] Test Author. “Testing the second Title”. In: [EE13], pp. 10–20.

[Aut13b] Test Author. “Testing the Title”. In: [EE13], pp. 1–10.

[EE13] Senor Editor and Senora Editora, eds. My Proceedings. Any Publisher, 2013.

But the only result I am achieving so far is:

[Aut13a] Test Author. “Testing the second Title”. In: My Proceedings. Ed. by Senor Editor and Senora Editora. Any Publisher, 2013, pp. 10–20.

[Aut13b] Test Author. “Testing the Title”. In: My Proceedings. Ed. by Senor Editor and Senora Editora. Any Publisher, 2013, pp. 1–10.

[EE13] Senor Editor and Senora Editora, eds. My Proceedings. Any Publisher, 2013.

This is actually the same question as How can I print only Author-Date of the parent crossref in the bibliography entry of the child of the crossref? but the proposed answer there is just a work-around which would be very tedious for my rather large bibliography file.

The behavior described above is standard BibTeX behavior for the alpha style, AFAIK. So I suspect this is just one of the approximately 10,000 configuration options of biblatex and I'm simply not aware of how to do it ;-) To get you guys going, here is an MWE:

\documentclass[]{article}

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

\begin{filecontents}{my.bib}
@inproceedings{inproc1,
Author = {Test Author},
Crossref = {proc},
Pages = {1--10},
Title = {Testing the Title}}

@inproceedings{inproc2,
Author = {Test Author},
Crossref = {proc},
Pages = {10--20},
Title = {Testing the second Title}}

@proceedings{proc,
Editor = {Senor Editor and Senora Editora},
Publisher = {Any Publisher},
Title = {My Proceedings},
Year = {2013}}
\end{filecontents}

\begin{document}
Test \cite{inproc1} and \cite{inproc2}
\printbibliography
\end{document}

• Just to make sure: You want the parent entry in the bibliography even if it wasn't quoted explicitly in the document? May 8 '12 at 5:52
• That is actually something I can control with the biblatex option mincrossrefs if I understand it correctly. So this is not the main point here. Usually, bibtex would generate a complete reference (like [Aut13a] in the second example) if no other child was cited and abbreviated entries + the parent entry if more than one child is cited in the text. May 8 '12 at 7:59
• It may not the main point, but it's still important to know what you want to achieve. So this should follow biblatexs general mechanism: if the parent entry is in the bibliography (either because of mincrossrefs or because it was cited explicitly) then you want abbreviated output for child entries. But if the parent entry is not in the bibliography, then you want the full output for the child entry? May 8 '12 at 8:22

Substantially Revised

In the light of the discussion in the comments, I've substantially revised this.

\documentclass[]{article}

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

\begin{filecontents}{my.bib}
@inproceedings{inproc1,
Author = {Test Author},
Crossref = {proc},
Pages = {1--10},
Title = {Testing the Title}}

@inproceedings{inproc2,
Author = {Test Author},
Crossref = {proc},
Pages = {10--20},
Title = {Testing the second Title}}

@proceedings{proc,
Editor = {Senor Editor and Senora Editora},
Publisher = {Any Publisher},
Title = {My Proceedings},
Year = {2013}}

@inproceedings{inproc3,
Author  = {Nother Author},
Publisher = {Nother Publisher},
Title   = {In Some Other Proceedings},
Maintitle = {Main Title of Other Proceedings},
Year     = {2001},
}
\end{filecontents}

\DeclareBibliographyDriver{inproceedings}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{in:}%
\iffieldundef{crossref}
{\usebibmacro{crossref:full}}
{\usebibmacro{crossref:label}}
\newunit\newblock
\usebibmacro{chapter+pages}%
\iffieldundef{crossref}
{\usebibmacro{crossref:extrainfo}}
{}
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}

\newbibmacro{crossref:full}{%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}%
\newunit
\printfield{volumes}%
\newunit\newblock
\usebibmacro{series+number}%
\newunit\newblock
\printfield{note}%
\newunit\newblock
\printlist{organization}%
\newunit
\usebibmacro{publisher+location+date}}

\newbibmacro{crossref:label}{%
\entrydata{\strfield{crossref}}
{\printtext{\mkbibbrackets
{\printfield{labelalpha}\printfield{extraalpha}}}}}

\newbibmacro{crossref:extrainfo}{%
\newunit\newblock
\iftoggle{bbx:isbn}
{\printfield{isbn}}
{}%
\newunit\newblock
\usebibmacro{doi+eprint+url}%
\newunit\newblock

\begin{document}

Test \cite{inproc1} and \cite{inproc2} and \cite{inproc3}
\printbibliography
\end{document}


This redefinition of the driver for inproceedings checks to see if there is a cross reference field defined. If there is, then it prints the label for the cross-referenced work. If there is not (ie if the inproceedings entry is self-contained) it prints full information.

I've only done this for inproceedings: it might be necessary to use a similar redefinition for inbook and incollection if you use these in a similar way.

(Note: this replaces my original answer, which involved a (bad) hackish redefinition of the maintitle+booktitle macro, and which would have had unfortunate effects if crossreferences were not defined. This should be safe if a crossreference is defined, so long as it is valid and refers to a work that is cited. It also carries the health warning that I haven't tested it extensively with a large number of examples, and it's always the corner cases that catch you when you try to write bibliography drivers.)

• Thanks for your suggestion. I'll give it a try when I get to it. So you are saying that the behavior I would like to achieve is not a question of configuring biblatex but rather of writing a new bibliography driver if I want to do it “the right way”. Do I understand you correctly? May 8 '12 at 8:04
• Perhaps there is some simple configuration option ... But I don't know what it is ... And couldn't see it in the source. Sadly that doesn't mean it's not there; the package is magnificently complex on every level, and I am a bear of little brain. But you can use this without altering your bib file, so if someone comes up with a better answer just delete my code and nothing should be ruined. May 8 '12 at 8:09
• Your solution works in principle. It has some drawbacks, though, the major one being that I will need to make all my proceedings use crossrefs because it suppresses the booktitle for entries that have no crossref relationship. I'll accept it as a “best one can do easily” answer if no better answers are posted within a day or so. May 8 '12 at 8:38
• Absolutely. That's the obvious problem with it, I agree. Hopefully someone else can do better; indeed, I'll see if I can. May 8 '12 at 8:43
• I've substantially revised the suggestion, hopefully avoiding the need to rewrite entries: this should now only work if there is a crossref field defined. May 8 '12 at 9:15

The styles of my biblatex-ext bundle have an option called citexref to do this.

So you can just replace style=alphabetic, with style=ext-alphabetic, and add citexref=true, to the biblatex options and are good to go.

\documentclass[]{article}

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

\begin{filecontents}{\jobname.bib}
@inproceedings{inproc1,
author   = {Test Author},
crossref = {proc},
pages    = {1--10},
title    = {Testing the Title},
}
@inproceedings{inproc2,
author   = {Test Author},
crossref = {proc},
pages    = {10--20},
title    = {Testing the second Title},
}
@proceedings{proc,
editor    = {Senor Editor and Senora Editora},
publisher = {Any Publisher},
title     = {My Proceedings},
year      = {2013},
}
@inproceedings{inproc3,
author    = {Nother Author},
publisher = {Nother Publisher},
title     = {In Some Other Proceedings},
maintitle = {Main Title of Other Proceedings},
year      = {2001},
}
\end{filecontents}