TeX - LaTeX Asked by Apikid on May 21, 2021
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 thisfootcite[Vgl.][S. 32-33]{einstein} and thisfootcite{laubpage} please.
printbibliography
end{document}
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{addcommaspace}%
usebibmacro{cite:labeldate+extradate}}}
Or, if you prefer an all-in-one solution:
usepackage{xpatch}
xapptobibmacro{cite:title}{%
setunit{addcommaspace}%
iffieldundef{labelyear}{}
{printtext[bibhyperref]{printlabeldateextra}}}{}{}
Finally, we need the labeldateparts
option:
usepackage[<...>,labeldateparts]{biblatex}
Correct answer by Ivan on May 21, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP