0

I am trying to set up my citation style with biblatex and biber right now and I've come across the style authortitle-ibid which gives me almost exactly what I need when using \footcite.

The only thing that I am missing is that I want the year to show up in my footnotes right after the title and before postnotes. (which are [S. 32-33] in my example case)

If anybody would have an idea how to accomplish that I would be very thankful! Thanks.

\documentclass[12pt]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[ngerman]{babel}
\usepackage[style=authortitle-ibid,sorting=none,backend=biber]{biblatex}
\begin{filecontents}{\jobname.bib}
    @article{einstein,
        author = {Albert Einstein},
        title = {the true about tree},
        journaltitle = {Annalen der Physik},
        year = {1905},
        volume = {322},
        number = {10},
        pages = {891--921}
    }
   @Online {laubpage,
    author = {Laubheimer, Page},
    title = {Virtual Tours: High Interaction Cost, Moderate Usefulness},
    date = {2020-08-30},
    year = {2020},
    file = {:./references/articles-virtual-tours-.html:html},
    url = {https://www.nngroup.com/articles/virtual-tours/},
    urldate = {2021-01-18}
    }
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}


Cite this\footcite[Vgl.][S. 32-33]{einstein} and this\footcite{laubpage} please.

\printbibliography
\end{document}

1 Answer 1

1

What you are building is a hybrid style. First of all we need to create the macro to print the year. This is borrowed from authoryear.bbx.

\renewbibmacro*{cite:labeldate+extradate}{%
  \iffieldundef{labelyear}
  {}
  {\printtext[bibhyperref]{\printlabeldateextra}}}

Then we have to insert this macro into the one that prints the title (adding a comma and a space before):

\renewbibmacro*{cite:title}{%
  \printtext[bibhyperref]{%
    \printfield[citetitle]{labeltitle}%
    \setunit{\addcomma\space}%
    \usebibmacro{cite:labeldate+extradate}}}

Or, if you prefer an all-in-one solution:

\usepackage{xpatch}
\xapptobibmacro{cite:title}{%
  \setunit{\addcomma\space}%
  \iffieldundef{labelyear}{}
  {\printtext[bibhyperref]{\printlabeldateextra}}}{}{}

Finally, we need the labeldateparts option:

\usepackage[<...>,labeldateparts]{biblatex}
3
  • Where would I have to add this all-in-one solution? Just adding it to the beginning of my Document doesn't change anything for me right now. Thank you for taking the time!
    – Apikid
    Jan 19, 2021 at 13:02
  • Put that code in the preamble. Anyway, sorry, I forgot to mention the labeldateparts option is needed. I update my answer.
    – Ivan
    Jan 19, 2021 at 13:27
  • Is there a way I can easily add the URL and the urldate to the footnote for online sources in the same way? So for this seems to work great! Thank you
    – Apikid
    Jan 19, 2021 at 14:24

You must log in to answer this question.

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