0

I reused some old code to have the editor names printed before the parent title of a source, however it gives me the parent title twice now. I can't spot the cause of it.

How can I provide the editor names before the collectiontitle/booktitle, i.e. only once?

Picture

enter image description here

MWE

\documentclass[
a4paper,
12pt,
]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage[
language=english,
style=authoryear-ibid,
backend=biber,
hyperref=true,
dashed=false,
isbn=false,
doi=false,
maxcitenames=2,
maxbibnames=99,
sorting=nyt,
firstinits=true,
uniquename=init,
uniquelist=false,
autocite=footnote,
ibidtracker=true,
date=comp,
mincrossrefs=1,
]{biblatex}
\usepackage{xpatch}

\renewbibmacro*{byeditor+others}{%
    \ifnameundef{editor}
    {}
    {\printnames[byeditor]{editor}%
        \setunit{\addspace}%
        \usebibmacro{byeditor+othersstrg}%
        \clearname{editor}%
        \newunit}%
    \usebibmacro{byeditorx}%
    \usebibmacro{bytranslator+others}
    \setunit{\addcolon\space}
    \usebibmacro{booktitle}}
\xpatchbibmacro{byeditor+othersstrg}{\printtext}{\printtext[parens]}{}{}

\begin{filecontents}{\jobname.bib}
@incollection{abc,
Title                    = {Stuff},
Author                   = {Lamp, Jones},
Date                     = {2011},
Crossref ={ddd}
}
@collection{ddd,
    Title= {Words},
    Editor={Smith, John and Doe, Jane},
    Date={2012},
    Location={Towntown}
}
\end{filecontents}

\addbibresource{\jobname.bib}
\nocite{*}

\listfiles

\begin{document}
Words.

\printbibliography
\end{document}
henry
  • 6,594

0 Answers0