抑制 biblatex-apa 中的月份

抑制 biblatex-apa 中的月份

请考虑以下 MWE

\RequirePackage{filecontents}

\begin{filecontents*}{mybib.bib}
@article{test1,
    title = {Structural holes and good ideas},
    volume = {110},
    issn = {0002-9602, 1537-5390},
    doi = {10.1086/421787},
    number = {2},
    urldate = {2012-10-04},
    journal = {American {Journal} of {Sociology}},
    author = {Burt, Ronald S.},
    month = sep,
    year = {2004},
    pages = {349--399},
}
@book{test2,
    address = {New {York}, {NY}},
    edition = {1st ed.},
    title = {Understanding media: {The} extensions of man},
    lccn = {P90 .M26},
    publisher = {McGraw-{Hill}},
    author = {{McLuhan}, Marshall},
    year = {1964}
}
\end{filecontents*}

\documentclass[a4paper]{article}


% Set the values for the bibliography
\usepackage[
    style=apa,
    backend=biber,
    isbn=false,
    url=false,
    doi=false,
    eprint=false,
    hyperref=true,
    backref=false,
    firstinits=false
]{biblatex}

% Recommended by biblatex
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage{xpatch}

% Remove series & month
\AtEveryBibitem{
  \clearfield{month}
  \clearfield{edition}
}

% Set language
\usepackage[british]{babel}
\DeclareLanguageMapping{british}{british-apa}

\addbibresource{mybib.bib}

\begin{document}

\cite{test1} \cite{test2}

\printbibliography
\end{document}

我不明白为什么该选项\clearfield{edition}成功地抑制了第二个参考中的版本,而该选项\clearfield{month}却无法成功删除月份:

Burt, RS(2004 年 9 月)

而不是我希望看到的:

伯特,RS(2004)

答案1

在作者-年份样式(例如biblatex-apa)中,该month字段用于组成Labelmonth(元类型)字段。您可以通过发出以下命令在参考书目中清除它:

\AtEveryBibitem{
  \clearfield{labelmonth}
}

这是您的 MWE 的简化版本:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{test1,
    title = {Structural holes and good ideas},
    volume = {110},
    issn = {0002-9602, 1537-5390},
    doi = {10.1086/421787},
    number = {2},
    urldate = {2012-10-04},
    journal = {American {Journal} of {Sociology}},
    author = {Burt, Ronald S.},
    month = sep,
    year = {2004},
    pages = {349--399},
}
@book{test2,
    address = {New {York}, {NY}},
    edition = {1st ed.},
    title = {Understanding media: {The} extensions of man},
    lccn = {P90 .M26},
    publisher = {McGraw-{Hill}},
    author = {{McLuhan}, Marshall},
    year = {1964}
}
\end{filecontents*}
\documentclass[a4paper]{article}
\usepackage[style=apa,backend=biber]{biblatex}
\AtEveryBibitem{
  \clearfield{labelmonth}
}
\usepackage[british]{babel}
\DeclareLanguageMapping{british}{british-apa}
\addbibresource{\jobname.bib}
\begin{document}
\thispagestyle{empty}
\cite{test1} \cite{test2}
\printbibliography
\end{document}

姆韦

相关内容