Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a few references that consist of several bibliography entries that are grouped via biblatex's command \defbibentryset (using biber as backend). The standard behaviour of biblatex is to seperate the entries by a semicolon without any further labelling. I wonder wether there is a possibility to assign a label (arabic or roman numbers or letters) to each of the entries so that it looks like

[1] a) bibliography entry; b) bibliograhpy entry; c) ...

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Sometimes the entrysetcount field really comes in handy. :-)

\documentclass{article}

\usepackage[backend=biber]{biblatex}

\DeclareFieldFormat{bibentrysetcount}{\mknumalph{#1})\addhighpenspace}
\renewbibmacro*{begentry}{%
  \printfield[bibentrysetcount]{entrysetcount}%
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{A01}

\defbibentryset{set}{B02,C03}

\begin{document}

\printbibliography

\end{document}

EDIT: \addhighpenspace discourages line breaks after the label, but does not forbid them. As for the format of entrysetcount: I should have used the bibentrysetcount format -- example corrected.

EDIT 2: Another advantage of using the bibentrysetcount format is that one can drop the \iffieldundef test -- example corrected again.

share|improve this answer
1  
Thank you very much. This works quite nice. Just for the sake of completeness: would you add the package-option backend=biber to biblatex? Since I'm pretty new to this forum I don't know yet wether I should edit another person's answer to add something like this or not. I have two little questions: Can I controle which labels are used (numbers, letters,...)? What did you use the \addhighpenspace command for? –  Philipp Aug 4 '11 at 19:55
1  
@Philipp: Good catch -- I forgot that biber is necessary here; I always enable it in my configuration file biblatex.cfg. –  lockstep Aug 4 '11 at 20:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.