有人可以提示我如何去掉参考书目列表中附录之前的 URL 后面的点吗?
这是我的 MWE:
\documentclass[12pt,a4paper,parskip=half,abstracton]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[backend=biber,bibencoding=utf8,style=apa,citestyle=authoryear,natbib,maxcitenames=2,maxbibnames=99,firstinits=true]{biblatex}
\ExecuteBibliographyOptions{sorting=nyt,bibwarn=true,url=true}
\DefineBibliographyStrings{ngerman}{%
nodate = {o.J.},
retrieved = {Internet:},
from = {},
}
\usepackage{hyperref}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\renewcommand*{\nameyeardelim}{\addspace}
\renewcommand{\labelnamepunct}{\addcolon\space}
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat{citetitle}{#1}
\urlstyle{same}
\addbibresource{db.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
还有两个示例 .bib 条目:
@ELECTRONIC{Rothenberg2018,
AUTHOR = {Rothenberg, Valentin},
YEAR = {2018},
TITLE = {AWS, Azure oder Google Cloud. Eine ausführliche Analyse aus Management-Sicht},
URL = {https://t3n.de/news/aws-azure-google-cloud-878305},
ADDENDUM = {30. September 2018},
}
@article{Waldrop2016,
AUTHOR={Waldrop, M. Mitchell},
YEAR={2016},
TITLE = {More than Moore},
JOURNAL={Nature},
VOLUME={530},
PAGES={144-147},
URL={https://www.nature.com/polopoly_fs/1.19338!/menu/main/topColumns/topLeftColumn/pdf/530144a.pdf},
ADDENDUM = {28. September 2018},
}
答案1
理想情况下,您将使用该urldate
字段来提供在线源的访问日期。
biblatex-apa
但是,在 URL 之前显示urldate
,因此我们需要将其移回 URL 之后。这可以通过重新定义来实现url+urldate
(该宏已简化,但代价是abstracturl
和abstractloc
)。我还对代码中的其他一些部分进行了现代化。
\documentclass[12pt,a4paper,parskip=half,abstracton]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english,ngerman]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[backend=biber, style=apa, citestyle=authoryear, sorting=nyt, natbib,
maxcitenames=2, maxbibnames=99, giveninits=true, uniquename=init,
urldate=long]{biblatex}
\DefineBibliographyStrings{german}{%
nodate = {o.J\adddot},
url = {Internet},
}
\usepackage{hyperref}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\DeclareDelimFormat{nameyeardelim}{\addspace}
\renewcommand{\labelnamepunct}{\addcolon\space}
\DeclareFieldFormat{title}{#1}
\DeclareFieldFormat{citetitle}{#1}
\urlstyle{same}
\DeclareFieldFormat{url}{\bibstring{url}\addcolon\space\url{#1}}
\DeclareFieldFormat*{urldate}{\mkbibparens{#1}}
\renewbibmacro*{url+urldate}{%
\ifboolexpr{ test {\iffieldundef{url}}
or not test {\iffieldundef{doi}}}
{}
{\printfield{url}%
\setunit{\addspace}%
\printurldate}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{Rothenberg2018,
author = {Rothenberg, Valentin},
year = {2018},
title = {AWS, Azure oder Google Cloud. Eine ausführliche Analyse aus Management-Sicht},
url = {https://t3n.de/news/aws-azure-google-cloud-878305},
urldate = {2018-09-28},
}
@article{Waldrop2016,
author = {Waldrop, M. Mitchell},
year = {2016},
title = {More than Moore},
journal = {Nature},
volume = {530},
pages = {144-147},
url = {https://www.nature.com/polopoly_fs/1.19338!/menu/main/topColumns/topLeftColumn/pdf/530144a.pdf},
urldate = {2018-09-28}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
style=apa
请注意,与其他bibstyle
s 或s混合通常不是一个好主意citestyle
:仅biblatex-apa
当需要 APA 样式引文和 APA 参考书目时才应使用。对于其他所有内容,biblatex-apa
修改起来可能非常困难,因为它是专门为提供 APA 所需的输出而设计的。如果您想要自定义样式,通常最好选择一种标准样式并从那里开始。