我有同样的问题如何(正确地)删除作者年份样式中年份周围的括号?。但是,接受的答案不再有效(可能是由于 的一些更新biblatex
)。当前的解决方案是什么?
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{xpatch,filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,author={Author, A.},year={2001},title={Alpha}}
@misc{A02,author={Author, A.},year={2001},title={Beta}}
\end{filecontents}
\addbibresource{\jobname.bib}
\xpatchbibmacro{date+extrayear}{%
\printtext[parens]%
}{%
\setunit{\addperiod\space}%
\printtext%
}{}{}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
答案1
代替
\xpatchbibmacro{date+extrayear}{%
\printtext[parens]%
}{%
\setunit{\addperiod\space}%
\printtext%
}{}{}
和
\xpatchbibmacro{date+extrayear}{%
\printtext[parens]%
}{%
\setunit*{\addperiod\space}%
\printtext%
}{}{}
梅威瑟:
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{xpatch,filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,author={Author, A.},year={2001},title={Alpha}}
@misc{A02,author={Author, A.},year={2001},title={Beta}}
\end{filecontents}
\addbibresource{\jobname.bib}
\xpatchbibmacro{date+extrayear}{%
\printtext[parens]%
}{%
\setunit*{\addperiod\space}%
\printtext%
}{}{}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
输出: