36

When using biblatex, suppose I have set up two separate bibliographies, how can I assign them different styles, e.g. one numbered and the other author-year format or some such thing.

\documentclass{article}

\usepackage[defernumbers=true]{biblatex}

\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}

\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}

\bibliography{\jobname}

\begin{document}

\nocite{*}

\cite{A01,B02}

\printbibliography[title={References},category=cited]

\printbibliography[title={Further Reading},notcategory=cited]

\end{document}
lockstep
  • 250,273

2 Answers2

30

Good question. :-) One the one hand, section 3.6.2 of the biblatex manual mentions

mixing a numerical subbibliography with one or more subbibliographies using a different scheme (e. g., author-title or author-year).

On the other hand, according to section 3.1.1, style, bibstyle and citestyle are load-time options, i.e. they must be specified when biblatex is loaded and cannot be used in the optional argument of \printbibliography.

I have a possibly hackish solution. Load biblatex with a numeric style (the default behaviour) or an alphabetic style. Define a new bibliography environment nolabelbib that simply copies the definition of bibliography as found in authortitle.bbx and authoryear.bbx (i.e. one that doesn't print a label). Switch to this environment for your "Further Reading" (sub-)bibliography. The result should equate the authortitle style.

\documentclass{article}

\usepackage{biblatex}

\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}

% The following definition is copied from authortitle.bbx/authoryear.bbx
\defbibenvironment{nolabelbib}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item}

\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{*}

\begin{document}

Some text \autocite{A01,B02}.

\printbibliography[title={References},category=cited]

\printbibliography[env=nolabelbib,title={Further Reading},notcategory=cited]

\end{document}

enter image description here

lockstep
  • 250,273
  • Wow, biblatex never stops to amaze me. –  Feb 02 '11 at 17:28
  • I've tried to compile this example with

    pdflatex file.tex bibtex file pdflatex file.tex pdflatex file.tex

    But no bibliography was generated. How could I compile correctly the example? Thanks.

    – jackb Sep 06 '13 at 10:19
  • Problem solved with

    \usepackage[style=numeric-comp,useprefix,hyperref,backend=bibtex]{biblatex}

    – jackb Sep 06 '13 at 10:49
  • This is also perfect for adding a global bibliography with a different style to per-section bibliographies. Just define the nolabelbib environment in preamble, open a new refcontext (with your preferred sorting option) for your global biblio, \nocite{*} (possibly to gether with the cited macro), and call upon the environment at the global \printbibliography. Thanks a lot! – RoB Apr 27 '23 at 09:32
  • Would you do this the same way now? – cfr Jul 01 '23 at 03:27
1

You might also want to check out the multibib library:

http://www.bakoma-tex.com/doc/latex/multibib/multibib.pdf

Kore-N
  • 111
  • 3
    The question is about biblatex so multibib is irrelevant. Biblatex already allows multiple bibliographies and cannot be used with such auxiliary packages. – cfr Oct 30 '19 at 14:46
  • @BsAxUbx5KoQDEpCAqSffwGy554PSah But the OP's example can't be redone using multibib if it is using things like category, can it? It's also debatable whether multibib is preferable given the other advantages of biblatex, but that will obviously depend on the details. – cfr Jul 01 '23 at 03:14