40

What is the best way create a bibliography for separate sections within a document? I am using biblatex.

lockstep
  • 250,273
Nate Glenn
  • 1,614

1 Answers1

49

Please refer to Section 3.14.3 Multiple Bibliographies of the biblatex documentation. The basic idea is to use the refsection environment for each bibliographical unit and the \printbibliography command inside each refsection environment. Notice that you will have to compile (through bibTeX, for example) the auxiliary .aux files that will be created for every refsection environment.

Here's an schematic document (test.tex) to produce a bibliography for each chapter:

\documentclass{book}
\usepackage{biblatex}
\addbibresource{biblio.bib}

\begin{document} \chapter{Test Chapter One} \begin{refsection}

\cite{goossens93}, \cite{lamport94}, \cite{rahtz89} \printbibliography[heading=subbibliography] \end{refsection}

\chapter{Test Chapter Two}

\begin{refsection} \cite{greenwade93}, \cite{patashnik88}, \cite{knuth79} \printbibliography[heading=subbibliography] \end{refsection}

\end{document}

the database biblio.bib:

@book{goossens93,
    author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
    title = "The Latex Companion A",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"

}

@article{greenwade93, author = "George D. Greenwade", title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})", year = "1993", journal = "TUGBoat", volume = "14", number = "3", pages = "342--351", url=" www.ctan.org" }

@book{knuth79, author = "Donald E. Knuth", title = "Tex and Metafont, New Directions in Typesetting", year = "1979", publisher = "American Mathematical Society and Digital Press", address = "Stanford" }

@book{lamport94, author = "Leslie Lamport", title = "Latex: A Document Preparation System", year = "1994", edition = "Second", publisher = "Addison-Wesley", address = "Reading, Massachusetts" }

@misc{patashnik88, author = "Oren Patashnik", title = "{B}ib{T}e{X}ing. Documentation for General {B}ib{T}e{X} users", year = "1988", howpublished = "Electronic document accompanying BibTeX distribution" }

@techreport{rahtz89, author = "Sebastian Rahtz", title = "A Survey of {T}ex and graphics", year = "1989", institution = "Department of Electronics and Computer Science", address = "University of Southampton, UK", number = "CSTR 89-7" }

You need to compile the example in the following way:

pdflatex test
bibtex test1-blx
bibtex test2-blx
pdflatex test
pdflatex test
cabohah
  • 11,455
Gonzalo Medina
  • 505,128
  • I've been using an IDE which doesn't figure that out. When I try from the command line, there is no biblatex command. Where should I look for that? Or is it a parameter for bibtex? – Nate Glenn May 29 '11 at 01:13
  • @Nate Glenn: Sorry for that! It was a mistake; I fixed it now. – Gonzalo Medina May 29 '11 at 01:15
  • @Nate Glenn: or maybe have a look at biber instead of bibtex, ie biber test1-blx and biber test2-blx – pluton May 29 '11 at 05:46
  • @Gonzalo Medina: Works great, thanks. Do you know any IDEs that pick up on that automatically? I can do it with the command line, but I'd rather just use the IDE. – Nate Glenn May 29 '11 at 07:31
  • 4
    By the way, biber processes all refsections in one pass so you just need:

    pdflatex test biber test pdflatex test

    – PLK May 29 '11 at 17:25
  • @Nate Glenn: no, I don't know how to configure some IDE to automate the compilation procedure; I use the command line. – Gonzalo Medina May 29 '11 at 17:27
  • @PLK: I think I am gonna give biber a try. Thanks for the comment. – Gonzalo Medina May 29 '11 at 17:28
  • 1
    @GonzaloMedina I've just checked and only for the sake for semplicity I would let you know that the reference section is now 3.13.3 in the Biblatex Documentation – Erik Pillon Dec 08 '17 at 16:26