我一直在努力改变我的文内引用:
(Pirone 和 Tykot,2017:80)
到
(Pirone 和 Tykot 2017: 80)
我在尝试着删除作者和日期之间的逗号我可能需要帮助。
我现在正在使用 Biblatex,使用 natbib 命令和 Bath 风格:
\usepackage[style=bath,backend=biber,maxcitenames=1,natbib=true]{biblatex}
\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\AtBeginBibliography{\let\mkbibnamefamily\textsc} %Last name in Upper Case in reference list
\addbibresource{references.bib}
我发现了一个与此类似的主题,并尝试添加建议的解决方案, \renewcommand*{\nameyeardelim}{\addspace}
如下所示:
\usepackage[style=bath,backend=biber,maxcitenames=1,natbib=true]{biblatex}
\renewcommand*{\nameyeardelim}{\addspace}
\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1} %remove p.
\DeclareFieldFormat{multipostnote}{#1} %remove p.
\AtBeginBibliography{\let\mkbibnamefamily\textsc} %Last name in Upper Case in reference list
\addbibresource{references.bib}
但是当我编译时,作者和日期之间仍然会出现逗号:
(Pirone 和 Tykot,2017:80)
我无法确定问题所在,因此想尝试其他解决方案。
答案1
您应该使用\DeclareDelimFormat
来重新定义分隔符。
\documentclass{article}
\usepackage[style=bath,natbib=true]{biblatex}
\addbibresource{temp.bib}
\DeclareDelimFormat[parencite]{nameyeardelim}{\addspace}
% To remove comma everywhere:
%\DeclareDelimFormat[parencite]{nameyeardelim}{\addspace}
\DeclareDelimFormat{postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\begin{filecontents}{temp.bib}
@book{temp1,
author = {John Doe},
title = {Lorem ipsum dolor sit amet},
year= {2020}}
\end{filecontents}
\begin{document}
Comma removed for citations in text: \parencite[80]{temp1}, \citep[80]{temp1}
Comma not removed for citations in footnote:\footcite[80]{temp1}\footnote{\cite[80]{temp1}.}
\printbibliography
\end{document}