1

Finally I almost have my perfect citation style when I cite an @incollection entry.

Author (year). “Title”. In: Editor A and Editor B (Hrsg.): Title

So important is the "(Hrsg.):" in parentheses. But when I cite the collection directly I would like to have it without parentheses and with an comma before it (otherwise it looks dumb when I use the author-year-style)

Editor A, Editor B, Hrsg. (year). Title.

So here is a minimal example, perhaps someone has a nice solution - would be so helpful!

\documentclass[12pt,a4paper,]{scrreprt} 
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage[natbib=true,backend=biber,
style=ext-authoryear-icomp,innamebeforetitle,innameidem=true]{biblatex}
\DefineBibliographyStrings{ngerman}{editor = (Hrsg\adddot):}
\DefineBibliographyStrings{ngerman}{editors = (Hrsg\adddot):}
\DeclareDelimFormat{editortypedelim}{\addspace}

\usepackage{hyperref}
\usepackage{filecontents}

\begin{filecontents}{example.bib}
@incollection{Hoffmann.2010,
 author = {Hoffmann, Thomas},
 title = {Erste Natur, Zweite Natur und das Gute f{\"u}r den Menschen},
 pages = {75--104},
 editor = {Hoffmann, Thomas and Reuter, Michael},
 booktitle = {Nat{\"u}rlich gut. Aufs{\"a}tze zur Philosophie von Philippa Foot},
 year = {2010},
 address = {Frankfurt am Main (u. a.)}
}


@book{Hoffmannetal.2010,
 year = {2010},
 title = {Nat{\"u}rlich gut. Aufs{\"a}tze zur Philosophie von Philippa Foot},
 address = {Frankfurt am Main (u. a.)},
 editor = {Hoffmann, Thomas and Reuter, Michael}
}
\end{filecontents}

\addbibresource{example.bib}

\begin{document}

\cite{Hoffmann.2010} \cite{Hoffmannetal.2010}



\printbibliography[]

\end{document}

1 Answer 1

1

Formatting like parentheses and trailing punctuation like colons should never be included in bibstrings and their translations.

In this case the right way to make the changes is via the editortype field format, the editortypedelim delimiter and the innametitledelim delimiter.

biblatex-ext's bbx:in:editor macro (which prints the editor for innamebeforetitle) reuses the editortype field format, which is also used by other macros to print the editor string. So the easiest way to obtain different formatting is by overriding the global setting locally in bbx:in:editor.

\documentclass[12pt,a4paper,]{article} 
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{libertine}
\usepackage{csquotes}
\usepackage[natbib=true,backend=biber,
style=ext-authoryear-icomp,innamebeforetitle,innameidem=true]{biblatex}

\usepackage{hyperref}

\DeclareDelimFormat[bib]{innametitledelim}{\addcolon\space}

\makeatletter
\renewbibmacro*{bbx:in:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\DeclareFieldFormat{editortype}{\mkbibparens{##1}}%
     \DeclareDelimFormat{editortypedelim}{\addspace}%
     \ifboolexpr{togl {bbx:innameidem} and test {\bbx@ineditoridem}}
       {\bibstring[\mkibid]{idem\thefield{gender}}}
       {\printnames[ineditor]{editor}}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{#1}%
     \clearname{editor}}
    {}}
\makeatother


\begin{filecontents}{\jobname.bib}
@incollection{Hoffmann.2010,
 author   = {Hoffmann, Thomas},
 title    = {Erste Natur, Zweite Natur und das Gute für den Menschen},
 pages    = {75--104},
 crossref = {Hoffmannetal.2010},
}
@collection{Hoffmannetal.2010,
 year     = {2010},
 title    = {Natürlich gut},
 subtitle = {Aufsätze zur Philosophie von Philippa Foot},
 address  = {Frankfurt am Main and others},
 editor   = {Hoffmann, Thomas and Reuter, Michael}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\cite{Hoffmann.2010} \cite{Hoffmannetal.2010}

\printbibliography
\end{document}

Hofmann,Thomas(2010).“Erste Natur, Zweite Natur und das Gute für den Menschen”. In: Thomas Hofmann und Michael Reuter (Hrsg.): Natürlich gut. Aufsätze zur Philosophie von Philippa Foot. Frankfurt am Main u.a., S. 75–104.//Hofmann, Thomas und Michael Reuter, Hrsg. (2010). Natürlich gut. Aufsätze zur Philosophie von Philippa Foot. Frankfurt am Main.

Note the small changes to your example entries: With biblatex and Biber you can use non-ASCII characters like ü directly, you don't have to escape them to {\"u}. You can also avoid repetition with the crossref feature. Finally, the parent entry should be a @collection and not a @book (after all the child is an @incollection and not an @inbook).

3
  • oh wow, thank you so much! Very impressive
    – Horstfuchs
    Dec 4, 2020 at 9:02
  • @Horstfuchs If this answer helped you solve your problem, please consider accepting it by clicking on the green checkmark on the top left to mark the question as resolved. See tex.stackexchange.com/help/someone-answers
    – moewe
    Dec 4, 2020 at 12:37
  • ah thank you!!!
    – Horstfuchs
    Dec 5, 2020 at 15:01

You must log in to answer this question.

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