如何(正确地)删除 authoryear 样式中年份周围的括号?(v2)

如何(正确地)删除 authoryear 样式中年份周围的括号?(v2)

我有同样的问题如何(正确地)删除作者年份样式中年份周围的括号?。但是,接受的答案不再有效(可能是由于 的一些更新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} 

输出:

在此处输入图片描述

相关内容