TransWikia.com

How to add the url and urldate to footcite output?

TeX - LaTeX Asked on July 18, 2021

Here’s the example that does almost everything that I need it to do.
The only thing that is missing is that I need the url and urldate to show when using footcite for online sources.
I’d like to achieve something like this:

Laubheimer, Virtual Tours: High Interaction Cost, Moderate Usefulness, 30. Aug. 2020. url:
https://www.nngroup.com/articles/virtual-tours/ (besucht am 18.01.2021).

I would greatly appreciate any pointers, thanks!

documentclass[12pt]{scrbook}
usepackage[utf8]{inputenc}
usepackage{csquotes}
usepackage[ngerman]{babel}
usepackage[style=authortitle-ibid,sorting=none,backend=biber,labeldateparts]{biblatex}
usepackage{xpatch}
xapptobibmacro{cite:title}{%
  setunit{addcommaspace}%
  iffieldundef{labelyear}{}
  {printtext[bibhyperref]{printlabeldateextra}}}{}{}

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}

One Answer

The url field is printed by the doi+eprint+url macro, which is defined in the standard.bbx file. To use it with authortitle style (and similar) it must be imported into the macro title:

usepackage{xpatch}
xapptobibmacro{cite:title}{%
    setunit{addcommaspace}%
    iffieldundef{labelyear}{}
    {printtext[bibhyperref]{printlabeldateextra}}%
    usebibmacro{doi+eprint+url}%
}{}{}

Answered by Ivan on July 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP