
前段時間,Alan Munn 提出問題,步調一致地雄辯地回答關於去掉括號的問題來自 biblatexauthoryear
風格參考。不幸的是,lockstep 的解決方案將不需要的內容注入\addperiod\space
到「破折號」引用中。例如,給定作者 A. 被引用兩次:
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage{xpatch}
\usepackage{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}
\nocite{*}
\begin{document}
\printbibliography
\xpatchbibmacro{date+extrayear}{%
\printtext[parens]%
}{%
\addperiod\space%
\printtext%
}{}{}
\printbibliography
\end{document}
我們得到:
我嘗試使用類似的構造來建立解決方案,\usebibmacro{bbx:dashcheck}
但沒有成功。那麼,基於lockstep基於nice的方法,我如何有條件地僅在“非破折號”引用的情況下xpatch
包含?\addperiod\space
答案1
單位的輸出應該在命令內完成\setunit
。
\xpatchbibmacro{date+extrayear}{%
\printtext[parens]%
}{%
\setunit{\addperiod\space}%
\printtext%
}{}{}