1

I need to format the reference list for my Bachelor Thesis according to the guidlines of the University. In my document I use biblatex and biber. Currently I have this: (MWE)

\documentclass{article}

    %
    % biblatex, biber
    %
    \usepackage[backend=biber, style=authoryear, doi=false, natbib=true, maxcitenames=2, maxbibnames=15, firstinits=true]{biblatex}
    \addbibresource{Literatur.bib}
    \setlength\bibitemsep{1.8\itemsep}
    \renewcommand{\cite}{\parencite}
    \DeclareNameAlias{author}{last-first}
    \DefineBibliographyStrings{ngerman}{andothers = {et al\adddot}}
    \DeclareDelimFormat[parencite]{nameyeardelim}{\addspace}
    \DeclareFieldFormat{journaltitle}{#1}
    \DeclareFieldFormat{booktitle}{#1}
    \DeclareFieldFormat*{title}{#1}
    \DeclareDelimFormat{yeartitledelim}{\addcomma\addspace}
    
    \setlength{\bibhang}{0pt}
    
    \usepackage{xpatch}
    
    \xpatchbibmacro{date+extradate}{%
        \printtext[parens]%
    }{%
        \setunit*{\addcomma\space}%
        \printtext%
    }{}{}
        
    \DefineBibliographyExtras{ngerman}{
        \renewcommand*{\finalnamedelim}{\addcomma\addspace}
    }
    
    \renewbibmacro*{publisher+location+date}{
        \printlist{publisher}
        \setunit*{\addcomma\space}
        \printlist{location}
        \setunit*{\addcomma\space}
        \usebibmacro{date}
        \newunit
    }

\begin{document}
    
    \noindent test \cite{RolfFischer}
    
    \printbibliography


\end{document}

With the following bib entry:

@book{RolfFischer,
    author              ={Fischer, Rolf},
    title               ={Elektrische Maschinen},
    publisher           ={Carl Hanser Verlag},
    address             ={{M{\"u}nchen}},
    year                ={2011},
    isbn                ={978-3-446-42554-5},
}

reference list example

But I need a comma after the year: Fischer, R., 2011, Elektrische Maschinen. Carl Hanser and so on

reference list with comma

How can I achieve this?

1 Answer 1

0

The relevant delimiter here is nametitledelim (in bib context). (This is for consistency reasons with all other bibliography styles where the year is not moved to a position after the author and thus this delimiter would appear between name and title and not as in this case between the year following the name and the title. In the standard styles yeartitledelim does not exist.)

\documentclass{article}

\usepackage[
  backend=biber,
  style=authoryear,
  maxcitenames=2, maxbibnames=15, firstinits=true,
  doi=false,
  natbib=true,
]{biblatex}

\setlength\bibitemsep{1.8\itemsep}
\setlength{\bibhang}{0pt}

\DefineBibliographyStrings{ngerman}{andothers = {et al\adddot}}

\DeclareNameAlias{sortname}{family-given}
\DeclareDelimFormat{finalnamedelim}{\addcomma\space}

\DeclareDelimFormat[bib]{nametitledelim}{\addcomma\addspace}
\DeclareDelimFormat[parencite]{nameyeardelim}{\addspace}

\DeclareFieldFormat{journaltitle}{#1}
\DeclareFieldFormat{booktitle}{#1}
\DeclareFieldFormat*{title}{#1}


\usepackage{xpatch}
\xpatchbibmacro{date+extradate}{%
  \printtext[parens]%
}{%
  \setunit*{\addcomma\space}%
  \printtext%
}{}{}

\renewbibmacro*{publisher+location+date}{%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
  \newunit
}


\begin{filecontents}[overwrite]{\jobname.bib}
@book{RolfFischer,
  author              = {Fischer, Rolf},
  title               = {Elektrische Maschinen},
  publisher           = {Carl Hanser Verlag},
  address             = {München},
  year                = {2011},
  isbn                = {978-3-446-42554-5},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
test \autocite{RolfFischer}

\printbibliography
\end{document}

Fischer, R., 2011, Elektrische Maschinen. Carl Hanser Verlag, München. isbn: 978-3-446-42554-5.

You must log in to answer this question.

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