0

I am using the following command for generating the bibliography in my scrreprt document

\usepackage[style=authoryear,backend=biber,sortlocale=de_DE,sorting=nty,maxbibnames=99,maxcitenames=1]{biblatex} %maxnames=bib&cite, maxbibname=bib, maxcitenames=cite, (default=3)

I am asked to print the bibliography in alphabetical order by last name of the first author or the publisher. It is more or less a harvard-style.

I cannot use style=alphabetic because the output would be the following

enter image description here

Instead I need the following

[Lui et al. 2017] J. Lui, H. Shen und L. Yu. ...

How can I achieve this?

Quickedit: I forgot to mention atleast the citestyle must be authoryear for references within the text

  • 1
    This answer might contain what you want to achieve. – leandriis Mar 16 '18 at 22:07
  • You could also make use of \DeclareLabelalphaTemplate[]{<specification> as described in section '4.5.5 Labels' of the biblatex documentation. – leandriis Mar 16 '18 at 22:16
  • @leandriis this is the solution. part of! it doesn't respect two-columns but maybe I am able to fix that somehow! thank you very much, wasn't able to find this answer! – Sefer Mar 16 '18 at 22:23
  • 1
  • If the desired output is in fact an author-year citation I would use an author-year style to build upon. alphabetic may work and is often a clever trick, but somehow it doesn't feel right to me. The problem with a style like this is that the citation label can potentially get arbitrarily long, if it gets too long there is not enough space left for the rest of the bib entry. That's why in the already linked answer and in tex.stackexchange.com/a/348138/35864 I propose a solution where you have to manually give the margin length and longer labels move the entry to the next line. – moewe Mar 17 '18 at 6:35
2

You could use my biblatex-ext style bundle (available in MikTeX and TeX live 2018 and above). Building on Adding an [AuthorYear] block at the beginning of bibliography entries, Creating a bibliography with fixed indention and authoryear labels using biblatex and biber and many related questions and answers those styles implement a introcite option.


With introcite=plain you can get a similar output to Adding an [AuthorYear] block at the beginning of bibliography entries

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=ext-authoryear, backend=biber, introcite=plain, dashed=false]{biblatex}

\DeclareFieldFormat{bbx@introcite}{\mkbibbold{\mkbibbrackets{#1}}}
\renewcommand*{\introcitepunct}{\addspace}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,worman,geer,knuth:ct:a,knuth:ct:b}
\printbibliography
\end{document}

enter image description here


With introcite=label you can get a more list-like output similar to Creating a bibliography with fixed indention and authoryear labels using biblatex and biber

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=ext-authoryear, backend=biber, introcite=label, dashed=false]{biblatex}

\DeclareFieldFormat{bbx@introcite}{\mkbibbrackets{#1}}
\setlength{\introcitewidth}{8\biblabelsep}
\setlength{\introcitesep}{.5\biblabelsep}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,worman,geer,knuth:ct:a,knuth:ct:b}
\printbibliography
\end{document}

The list indent and minimum space between the "label" and citation body can be controlled with \introcitewidth and \introcitesep. Labels that are too long move the reference to the next line.

enter image description here


Edited for name changes in v0.4 of biblatex-ext.

  • That's a very nice package addition! Congrats! Didn't know it was coming. Hope to see it popping around here (so I can keep up ;). – gusbrs Mar 24 '18 at 12:42
0

The following MWE shows how to use \DeclareLabelalphaTemplate to achieve the desired customization of alphabetic bibliography style labels.

\documentclass{scrreprt}
\usepackage[style=authoryear,backend=biber,sortlocale=de_DE,sorting=nty,maxbibnames=99,maxcitenames=1,style=alphabetic]{biblatex} 

\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{key,
  author = {Author, A. and Name, B.},
  year = {2001},
  title = {A long title to show the indentation of the second line},
  publisher = {Publisher},
}
\end{filecontents}
\renewcommand{\labelalphaothers}{\addspace et al.}
\DeclareLabelalphaTemplate[]{\labelelement{\field[names=1]{author}}
                             \labelelement{\literal{\addspace}}
                             \labelelement{\field{year}}
                             }

\begin{document}
\cite{key}
\printbibliography
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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