2

I am using biblatex-ext with introcite=label to get a citation style like shown in the following question:

Creating a bibliography with fixed indention and authoryear labels using biblatex and biber

This gives me labels with a space between author and year both in the label and the bibliography. However, I am required to have a space between author and year in the label and a comma between author and year in the bibliography entry. So I need something like that:

Tietze et al. 2012    Tietze, Ulrich; Schenk, Christoph, 2012.
                      Halbleiterschaltungstechnik. ...

Note that I used the following solution to remove the parentheses around the year: biblatex: How to remove the parentheses around the year in authoryear style?

While searching for a solution, I found

\renewcommand*{\nameyeardelim}{\addcomma\space}

but this only works for the label making the above entry

Tietze et al., 2012    Tietze, Ulrich; Schenk, Christoph 2012.
                      Halbleiterschaltungstechnik. ...

This is the opposite of what I need. I need a space between author and year in the label and a comma in the bibliography entry.

2
  • \renewcommand*{\nametitledelim}{\addcomma\space}?
    – koleygr
    Aug 14, 2019 at 13:53
  • 1
    \nametitledelim is context sensitive, so \DeclareDelimFormat{nametitledelim}{\addcomma\space} is probably better. (Same for \nameyeardelim actually.) Aug 14, 2019 at 13:56

1 Answer 1

0

As mentioned by David Purton in the comments, nameyeardelim is a context-sensitive delimiter. This means that you can give it different definitions for the bibliography and citations. The introcite label has the context bbx@introcite, which is different from the context bib for the rest of the bibliography, so we can use different values for nameyeardelim here.

The default nameyeardelim for all contexts is \addspace, so we only need to change the delimiter for the bib context to a comma followed by a space.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[style=ext-authoryear, backend=biber, introcite=label, dashed=false]{biblatex}
\addbibresource{biblatex-examples.bib}

\setlength{\bibitemsep}{0.5\baselineskip plus 0.5\baselineskip}
\setlength{\introcitewidth}{6em}

\DeclareDelimFormat[bib]{nameyeardelim}{\addcomma\space}

\DeclareFieldFormat{biblabeldate}{#1}

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

Sigfridsson and Ryde 1998//Sigfridsson, Emma and Ulf Ryde, 1998.

You must log in to answer this question.

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