我需要将文本从“上次访问”更改为“访问时间”,并且不带括号?我该怎么做?
\begin{filecontents}{\test.bib}
@online{gates,
author = {Bill Gates}
title = {Save the world!
url = {https://www.gatesfoundation.org/de/},
date = {2016-07-04},
organization = {Bill and Melinda Gates Foundation}
}
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authortitle]{biblatex}
\addbibresource{\test.bib}
\begin{document}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\footcite{gates}
\printbibliography
\end{document}
答案1
在您给出的 bib 条目中缺少一些逗号,并且有一个错误}
。请参阅以下 MWE 以了解正确的条目。
您可以使用\DeclareFieldFormat{urldate}{visted at #1}
来更改打印的 urldate。请注意,您必须urldate
使用url
。
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@online{gates,
author = {Bill Gates},
title = {Save the world!},
url = {https://www.gatesfoundation.org/de/},
urldate = {2016-07-04},
organization = {Bill and Melinda Gates Foundation},
}
\end{filecontents*}
\documentclass{article}
\usepackage[style=authortitle]{biblatex}
\addbibresource{\jobname.bib}
\DeclareFieldFormat{urldate}{visted at #1}
\begin{document}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\footcite{gates} \cite{gates}
\printbibliography
\end{document}
结果:
正如 @moewe 在他的评论中提到的,针对您的问题的最佳解决方案如下:
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@online{gates,
author = {Bill Gates},
title = {Save the world!},
url = {https://www.gatesfoundation.org/de/},
urldate = {2016-07-04},
organization = {Bill and Melinda Gates Foundation},
}
\end{filecontents*}
\documentclass{article}
\usepackage[style=authortitle]{biblatex}
\addbibresource{\jobname.bib}
\DefineBibliographyStrings{english}{% <==================================
urlseen = {visited at} % <==================================
}
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1} % <============
\begin{document}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\footcite{gates} \cite{gates} \citeurl{gates}
\printbibliography
\end{document}
答案2
urlseen
您可以使用类似以下内容来自定义参考书目字符串的文本
\DefineBibliographyStrings{english}{
urlseen = {visited on}
}
参见 biblatex 手册第 3.9 和 4.9 节。
要删除括号,请使用
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}