在我使用 biblatex 创建的参考书目中,我想写下我访问 URL 的完整日期。出于某种原因,只显示年份,而不显示完整日期。“urldate=long”不起作用。您能帮忙吗?
我的 quellen.bib 文件中有以下条目:
@Online{ MyOnline,
Title = {Title of Page},
URL = {http://www.somesite.com},
URLDate = {2016-06-15}
}
在我的 main.tex 文档中我有:
\documentclass[twoside,a4paper,draft=true]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}
\usepackage[backend=biber,bibstyle=nature,citestyle=nature]{biblatex}
\ExecuteBibliographyOptions{
sorting=none,
bibwarn=true,
isbn=true,
url=true,
urldate=long,
maxnames=20
}
\addbibresource{quellen.bib}
\begin{document}
\cite{MyOnline}
\printbibliography
\end{document}
答案1
样式nature
定义@online
仅排版年份,与选项无关。因此,为了在不更改样式的情况下在此条目类型中获得长日期,我们需要重新定义相关的 Biblatex“驱动程序”并替换 Biblatex 的 URL 和日期标准格式。
例如,
\documentclass[twoside,a4paper,draft=true]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}
\usepackage[backend=biber,bibstyle=nature,citestyle=nature,sorting=none,bibwarn=true,isbn=true,url=true,maxnames=20,urldate=long]{biblatex}
\DeclareBibliographyDriver{online}{% modified from biblatex-nature's bbx
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{author/editor+others/translator+others}%
\setunit{\labelnamepunct}\newblock
\usebibmacro{title}%
\newunit
\printlist{language}%
\newunit\newblock
\usebibmacro{byauthor}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{version}%
\newunit
\printfield{note}%
\newunit\newblock
\printlist{organization}%
\newunit\newblock
\iftoggle{bbx:eprint}
{\usebibmacro{eprint}}
{}%
\newunit\newblock
\usebibmacro{url+urldate}% from Biblatex's standard.bbx
\newunit\newblock
\usebibmacro{addendum+pubstate}%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\newunit\newblock
\usebibmacro{related}%
\usebibmacro{finentry}%
}
\addbibresource{\jobname.bib}
\begin{document}
\cite{MyOnline}
\printbibliography
\end{document}