9

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?

2 Answers 2

11

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

7
  • 1
    That works great, could you additionally tell me how to achieve that the last name comes first (I'm using firstinits=true)? Jun 10, 2016 at 13:40
  • @OliverBorchert Are you looking for \DeclareNameAlias{default}{family-given} (or last-first in pre-3.3 biblatex)?
    – moewe
    Jun 10, 2016 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 Jun 10, 2016 at 13:50
  • Ok, I figured it out .. (last-first instead of family-given) .. as I said .. not a lot of experience .. Jun 10, 2016 at 13:52
  • 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 4, 2020 at 16:02
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

1
  • 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? Jun 10, 2016 at 9:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .