10

I haven't had a lot of experience with biblatex so far and I decided to use the numeric style for citations in the text. However, the authoryear style for the bibliography is much nicer. I know, I can't actually combine numeric citestyle with authoryear bibstyle.

That brings me to my question: How can I achieve using the numeric citestyle and the formatting of authoryear in the bibliography?

moewe
  • 175,683

2 Answers2

12

You can go down the route from biblatex-biber: How to customize the order in the bibliography?.

Call citestyle=numeric (or the member of the numeric family you currently use) and bibstyle=authoryear, then import numeric.bbx to get the proper bibliography environment again.

(The sorting will by default be sorting=nyt, if you want sorting=none you will need to order that explicitly.)

\documentclass{article}
\usepackage[
    backend=biber,
    %sorting=none,
    citestyle=numeric,
    bibstyle=authoryear,
]{biblatex}

\makeatletter
\input{numeric.bbx}
\makeatother

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{wilde,geer,worman}
\printbibliography
\end{document}

example output

moewe
  • 175,683
  • 1
    That works great, could you additionally tell me how to achieve that the last name comes first (I'm using firstinits=true)? – Oliver Borchert Jun 10 '16 at 13:40
  • @OliverBorchert Are you looking for \DeclareNameAlias{default}{family-given} (or last-first in pre-3.3 biblatex)? – moewe Jun 10 '16 at 13:43
  • I actually don't know what that means, the first one basically works, however the authors are not depicted accurately (always one or two, no et al., although maxbibnames=2) and there is no space between last and first name and between the authors – Oliver Borchert Jun 10 '16 at 13:50
  • Ok, I figured it out .. (last-first instead of family-given) .. as I said .. not a lot of experience .. – Oliver Borchert Jun 10 '16 at 13:52
  • Is it possible to have one bibliography in the numeric style and another in the authoryear style? I've added a bibliography for uncited references, and the numbers don't make much sense there. – TakingItCasual Aug 04 '20 at 14:34
  • 1
    @TakingItCasual In general it is not easy to combine different citation styles in the same document, but in your use case that seems possible. Add something like \defbibenvironment{aybibliography} {\list {} {\setlength{\leftmargin}{\bibhang}% \setlength{\itemindent}{-\leftmargin}% \setlength{\itemsep}{\bibitemsep}% \setlength{\parsep}{\bibparsep}}} {\endlist} {\item} to the preamble and print the bibliography with the uncited entries with \printbibliography[env=aybibliography, omitnumbers]. That needs the defernumbers option. – moewe Aug 04 '20 at 16:02
  • @moewe Thank you very much for this simple solution. This is exactly what I needed! – mab0189 May 25 '22 at 15:47
2

You can combine them:

\documentclass{article}
 \usepackage[T1]{fontenc}
 \usepackage[utf8]{inputenc}
 \usepackage[citestyle=numeric,bibstyle=authoryear]{biblatex}
 \addbibresource{biblatex-examples.bib}
 \AtEveryBibitem{[\printfield{labelnumber}]\addspace}%Numbers in the bib
 \begin{document}

 \cite{herrmann}, \cite{doody}, 

 \printbibliography
 \end{document}

enter image description here

Ulrike Fischer
  • 327,261
  • 1
    Awesome! However, I have one more question: the numeric bibstyle kind of has an alignment character so that when the number exceeds 9 (10 etc.), the authors are still aligned correctly and not slightly shifted to the right. How can I achieve that? – Oliver Borchert Jun 10 '16 at 09:03