2

Hopefully, someone can help me a bit!
I am struggling with a bug in my citation style. I am required to use a modified Harvard style with footnotes:
² Vgl. Robinson et al. (2017)
My problem is that 2 entries by the same author in one year miss the index. They should produce a "Robinson (2017)" and "Robinson (2017b)" in the footcite, but don't. I simply don't know the right printfield command for this, as \printbibliography produces exactly the desired output.

I achieved this by using the following config:

\usepackage[autocite=footnote,style=authoryear-ibid,maxcitenames=1,natbib=true,backend=biber]{biblatex}

\DefineBibliographyStrings{german}{%
    andothers = {et al.},
}

\DeclareCiteCommand{\footcite}[\mkbibfootnote]
    {\usebibmacro{prenote}}
    {\usebibmacro{citeindex}
        \printnames{labelname}%
        \setunit{\addnbspace}
        \printtext[parens]{\printfield{year}}}
    {\multicitedelim}
    {\usebibmacro{postnote}}

With a bibliography like this:

@book{Crusoe2017,
 author = {Crusoe, Robinson},
 year = {2017},
 title = {The Survival},
 publisher = {{Island Publishing}},
 isbn = {978-1234567890}
}

@book{Crusoe2017b,
 author = {Crusoe, Robinson},
 year = {2017},
 title = {The Survival - Day 2},
 publisher = {{Island Publishing}},
 isbn = {978-1234567800}
}

Finally, the file itself looks like this:

Crusoe states in his first publication\footcite[vgl][S. 75 f.]{Crusoe2017}   
(...) in contrast to his secone one\footcite[vgl][S. 5 f.]{Crusoe2017}

Which produces 2 footnotes like this:
²vgl Crusoe (2017), S. 75 f.
³vgl Crusoe (2017), S. 5 f.

The last footnote should have an additional index, which is fine in the final bibliography.
So if someone has a hint on what to change, that would be really great, thanks!

4
  • Does substituting \printfield{year} in your \footcite command with \printlabeldateextra get the job done? (It should render 2017a and 2017b, not 2017 and 2017b)
    – gusbrs
    Dec 17, 2017 at 14:19
  • Yes, @gusbrs that fixed the problem, thanks a bunch! Unfortunately, it looks like I cannot accept your comment as the correct answer, or am I missing something?
    – matm
    Dec 17, 2017 at 14:23
  • Glad to know. In this case, I'll add it as an answer.
    – gusbrs
    Dec 17, 2017 at 14:30
  • Btw, welcome to TeX.SX!
    – gusbrs
    Dec 17, 2017 at 14:54

1 Answer 1

1

You redefined your \footcite command to print just the year of your bibentry when you specified \printfield{year} in it. If you also want to have the dateextra field, you should use \printlabeldateextra instead.

In full:

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{Crusoe2017,
 author = {Crusoe, Robinson},
 year = {2017},
 title = {The Survival},
 publisher = {{Island Publishing}},
 isbn = {978-1234567890}
}

@book{Crusoe2017b,
 author = {Crusoe, Robinson},
 year = {2017},
 title = {The Survival - Day 2},
 publisher = {{Island Publishing}},
 isbn = {978-1234567800}
}
\end{filecontents}

\usepackage[autocite=footnote,style=authoryear-ibid,maxcitenames=1,natbib=true,backend=biber]{biblatex}

\DefineBibliographyStrings{german}{%
    andothers = {et al.},
}

\DeclareCiteCommand{\footcite}[\mkbibfootnote]
    {\usebibmacro{prenote}}
    {\usebibmacro{citeindex}
        \printnames{labelname}%
        \setunit{\addnbspace}
        \printtext[parens]{\printlabeldateextra}}
    {\multicitedelim}
    {\usebibmacro{postnote}}

\addbibresource{\jobname.bib}

\begin{document}

Crusoe states in his first publication\footcite[vgl][S. 75 f.]{Crusoe2017}   
(...) in contrast to his second one\footcite[vgl][S. 5 f.]{Crusoe2017b}

\printbibliography

\end{document}

enter image description here

You must log in to answer this question.

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