如何将 url 和 urldate 添加到 \footcite 输出?

如何将 url 和 urldate 添加到 \footcite 输出?

这个例子几乎满足了我的所有需求。唯一缺少的是,在使用 \footcite 获取在线资源时,我需要显示 url 和 urldate。我想实现这样的效果:

劳布海默,虚拟旅游:互动成本高,实用性一般,2020年8月30日。网址: https://www.nngroup.com/articles/virtual-tours/(于 2021 年 1 月 18 日提出)。

我将非常感激任何指点,谢谢!

\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{\addcomma\space}%
  \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 this\footcite[Vgl.][S. 32-33]{einstein} and this\footcite{laubpage} please.

\printbibliography
\end{document}

答案1

该字段由文件中定义的宏url打印。要以样式(和类似样式)使用它,必须将其导入到宏中:doi+eprint+urlstandard.bbxauthortitletitle

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

相关内容