\documentclass[12pt,english,a4paper]{report}
\usepackage[backend=biber,
% natbib=true
style=ieee,
sorting=none,
doi=false,
isbn=false,
url=true,
urldate=long,
]{biblatex} % best for bibliography
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@Online{stack,
title = {stackexchange},
url = {http://tex.stackexchange.com/},
urldate = {2016-08-30},
}
\end{filecontents}
\DefineBibliographyStrings{english}{urlseen = {Last accessed:},}
\addbibresource{references.bib}
\begin{document}
\cite{stack}
\printbibliography
\end{document}
().
应删除起始。
\AtEveryBibitem{% \ifentrytype{Online}{% \clearfield{labelyear}% }{% }% }
不工作
Available:
=>Available at:
(Last accessed: )
=> 不带括号
请不要更改文件内容。
答案1
由于date
/year
是必填字段,biblatex-ieee
因此它要求必须有该字段,并且不会检查年份是否缺失以避免出现空括号。我们可以这样做 - 使用包插入检查以xpatch
避免重写驱动程序 -
\usepackage{xpatch}
\xpatchbibdriver{online}
{\printtext[parens]{\usebibmacro{date}}}
{\iffieldundef{year}{}{\printtext[parens]{\usebibmacro{date}}}}
{}{}
第 2 项应处理
\DefineBibliographyStrings{english}{url = [Online]\adddot\addspace Available at,}
最后,
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
关于第三点。
平均能量损失
\documentclass[12pt,english,a4paper]{report}
\usepackage[backend=biber,
% natbib=true
style=ieee,
sorting=none,
doi=false,
isbn=false,
url=true,
urldate=long,
]{biblatex} % best for bibliography
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@Online{stack,
title = {stackexchange},
url = {https://tex.stackexchange.com/},
urldate = {2016-08-30},
}
\end{filecontents}
\DefineBibliographyStrings{english}{urlseen = {Last accessed:},}
\addbibresource{references.bib}
\usepackage{xpatch}
\xpatchbibdriver{online}
{\printtext[parens]{\usebibmacro{date}}}
{\iffieldundef{year}{}{\printtext[parens]{\usebibmacro{date}}}}
{}{}
\DefineBibliographyStrings{english}{url = [Online]\adddot\addspace Available at,}
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
\begin{document}
\cite{stack}
\printbibliography
\end{document}
[1] Stackexchange,[在线]。可从以下网址获取:https://tex.stackexchange.com/最后访问日期:2016 年 8 月 30 日。