0

The following MWE ends up with three bibliography entries, although there are only two cited. What am I doing wrong?

\documentclass{book}

\usepackage[utf8]{inputenc}
\usepackage{blindtext}

\usepackage[backend=biber,
    natbib=true,
    hyperref=true,
    bibstyle=ext-authoryear,
    giveninits=true,
    uniquename=false,
    innamebeforetitle,
    articlein=false,
    useprefix=true,
    sortlocale=de_DE_phonebook,
]{biblatex}
    \defbibheading{bibliography}[\bibname]{%
    \section*{#1}%
    }
    \addbibresource{TEST-Bib-Sorting.bib}
    \defbibheading{subbibliography}[\refname]{\subsection*{#1}}

    \DeclareBibliographyCategory{cited}
    \AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%     Biblatex-Einstellungen                                      %%%
\renewcommand*{\newunitpunct}{\addcomma\space}
\ExecuteBibliographyOptions{dashed=false}

\DeclareNameAlias{sortname}{family-given}
\DeclareDelimFormat{multinamedelim}{\addslash}
\DeclareDelimAlias{finalnamedelim}{multinamedelim}

\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addperiod\space}
\DeclareDelimFormat[bib,biblist]{innametitledelim}{\addcomma\space}

% this is tricky, we want to merge the round brackets around
% the "ed."/"eds." and the year
% the idea is to only open the brackets in the editor string
% and the close it in the labelyear
% since editortype might also be used for editors of @in...
% types where this can't happen, we need a test
\newtoggle{bbx@editor@sortname}
\makeatletter
\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\toggletrue{bbx@editor@sortname}%
     \usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
        \setunit{\printdelim{editortypedelim}}%
        \usebibmacro{bbx:savehash}}%
     \usebibmacro{#1}%
     \clearname{editor}%
     \setunit{\printdelim{nameyeardelim}}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \setunit*{\printdelim{nonameyeardelim}}}%
  \usebibmacro{date+extradate}%
  \togglefalse{bbx@editor@sortname}}
\makeatother

\DeclareFieldFormat{superedition}{\textsuperscript{#1}}

\DeclareFieldFormat{editortype}{%
  \iftoggle{bbx@editor@sortname}
    {\bibopenparen #1}
    {\mkbibparens{#1}}}
\DeclareFieldFormat{biblabeldate}{%
  \iftoggle{bbx@editor@sortname}
    {\addcomma\space
     \iffieldnum{edition}
       {\printfield[superedition]{edition}%
        \csgundef{abx@field@edition}}
       {}%
     #1\bibcloseparen}
    {\mkbibparens{%
       \iffieldnum{edition}
         {\printfield[superedition]{edition}%
          \csgundef{abx@field@edition}}
         {}%
       #1}}}
\DeclareDelimFormat{editortypedelim}{\addspace}
%% tricky bit END

\DeclareFieldFormat{translatortype}{\mkbibparens{#1}}
\DeclareDelimFormat{translatortypedelim}{\addspace}

\renewbibmacro*{pubinstorg+location+date}[1]{%
  \setunit{\addperiod\space}%
  \printlist{location}%
  \iflistundef{#1}
    {\setunit*{\locdatedelim}}
    {\setunit*{\locpubdelim}}%
  \printlist{#1}%
  \setunit*{\pubdatedelim}%
  \usebibmacro{date}%
  \newunit}

\newbibmacro*{pages}{
  \printfield{pages}%
}

\renewcommand*{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addcolon}\space}
\DeclareFieldFormat{pages}{#1}

\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{volcitepages}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}

%%% Titel kursiv
\DeclareFieldFormat{title}{#1\isdot}
\DeclareFieldFormat[article]{title}{#1}
\DeclareFieldFormat[inbook,incollection]{title}{#1}
\DeclareFieldFormat[inbook,incollection]{booktitle}{#1}
\DeclareFieldFormat[article]{journaltitle}{#1}

\DeclareSortingNamekeyTemplate{
  \keypart{
    \namepart{prefix}
  }
  \keypart{
    \namepart{family}
  }
  \keypart{
    \namepart{given}
  }
  \keypart{
    \namepart{suffix}
  }
}

\renewbibmacro*{incollection:parent}{%
  \iftoggle{bbx:innamebeforetitle}
    {\usebibmacro{in:editor+others}%
     \setunit{\printdelim{innametitledelim}}\newblock}
    {}%
  \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \usebibmacro{edition}%
  \newunit
  \usebibmacro{barevolume+volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}}


\DeclareBibliographyDriver{article}{%
  \usebibmacro{introcite:plain}%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \usebibmacro{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \iftoggle{bbx:articlein}{\usebibmacro{in:}}{}%
  \usebibmacro{journal+issuetitle}%
  \newunit
  \usebibmacro{byeditor+others}%
  \setunit{\addcolon\addspace}
  \usebibmacro{pages}%
  \setunit{\adddot\addspace}\newblock
  \usebibmacro{note}%
  \newunit\newblock
  \usebibmacro{issn}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}


\DeclareBibliographyDriver{book}{%
  \usebibmacro{introcite:plain}%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \usebibmacro{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \usebibmacro{edition}%
  \newunit
  \usebibmacro{barevolume+volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \setunit{\adddot\addspace}\newblock
  \usebibmacro{note}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \usebibmacro{isbn}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}


\DeclareBibliographyDriver{incollection}{%
  \usebibmacro{introcite:plain}%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \usebibmacro{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{crosscite}{incollection:parent}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \setunit{\adddot\addspace}\newblock
  \usebibmacro{note}%
  \newunit\newblock
  \usebibmacro{isbn}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  % with default inheritance 'related' is not inherited,
  % so the test is not actually necessary
  \ifboolexpr{togl {bbx:related} and not test {\iffieldxref{related}}}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{filecontents}{TEST-Bib-Sorting.bib}
@Incollection{Fowler:2000:First,
  author   = {Fowler, D. P.},
  year     = {2000},
  title    = {First thoughts on closure: problems and prospects},
  pages    = {239–83},
  crossref = {Fowler:2000},
}

@Incollection{Fowler:2000:Second,
  author   = {Fowler, D. P.},
  year     = {2000},
  title    = {Second thoughts on closure},
  pages    = {284–307},
  crossref = {Fowler:2000},
}

@Book{Fowler:2000,
  editor    = {Fowler, D. P.},
  year      = {2000},
  title     = {Roman constructions. Readings in postmodern Latin},
  publisher = {Oxford},
  booktitle = {Roman constructions. Readings in postmodern Latin},
}
\end{filecontents}


\begin{document}

%\citet{Fowler:2000},
\citet{Fowler:2000:Second},
\citet{Fowler:2000:First}


\printbibliography


\end{document}

enter image description here

9
  • 1
    you have crossref's in the bib. Commented Mar 14, 2019 at 13:00
  • Yes. I already tried the following. When deleting the crossref from entry Fowler:2000:Second, the result is perfectly fine, i.e. there are only two entries printed (Fowler:2000:First and Fowler:2000:Second).
    – rsa-krypto
    Commented Mar 14, 2019 at 13:03
  • That's minimal?
    – JPi
    Commented Mar 14, 2019 at 13:03
  • 2
    Check the description of crossref and the mincrossrefs option in the documentation. Commented Mar 14, 2019 at 13:05
  • 1
    The standard setting of mincrossrefs is mincrossrefs=2. That means that an entry is automatically added to the bibliography (as if it had been \nocite'd) if two different entries crossref it. Fowler:2000 is crossref'd by both Fowler:2000:First and Fowler:2000:Second and so it ends up in the bibliography as if cited.
    – moewe
    Commented Mar 14, 2019 at 13:11

1 Answer 1

2

You have crossref's in the bib entries.

From the documentation:

If the number of child entries referencing a specific parent entry hits a certain threshold, the parent entry is automatically added to the bibliography even if it has not been cited explicitly. The threshold is settable with the mincrossrefs package option ...

You must log in to answer this question.

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