Biblatex-apa 样式不应在带有 doi 的期刊出版物的参考文献中显示发行号

Biblatex-apa 样式不应在带有 doi 的期刊出版物的参考文献中显示发行号

根据 APA6 出版手册,带有 doi 编号的期刊文章不应显示发行号。但是,我的 biblatex-apa 样式(使用 biber)显示了它。有人知道如果期刊文章有 doi 编号,自动删除发行号的好方法吗?

现在看起来像这样:

Weber, M. & Ruch, W. (2012)。性格优势在青少年恋爱关系中的作用:对伴侣选择和伴侣生活满意度的初步研究。青少年杂志,35(6),1537–1546。doi:10.1016/j.adolescence.2012.06.002

但应该看起来像这样:

Weber, M. & Ruch, W. (2012)。性格优势在青少年恋爱关系中的作用:对伴侣选择和配偶生活满意度的初步研究。青少年杂志,35,1537–1546。doi:10.1016/j.adolescence.2012.06.002

我的测试文档如下所示:

\documentclass[12pt, onecolumn]{apa6}


\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style= apa, backend=biber]{biblatex}
\bibliography{testbib}
\DeclareLanguageMapping{american}{american-apa}


\begin{document}

Some text \parencite{Weber2012} and \parencite{belbin1993}.

\printbibliography
\end{document}

以及测试 bib 文件:

@article{Weber2012,
abstract = {},
author = {Weber, M. and Ruch, W.},
doi = {10.1016/j.adolescence.2012.06.002},
file = {},
issn = {1095-9254},
journal = {Journal of adolescence},
number = {6},
pages = {1537--1546},
pmid = {22749517},
publisher = {Elsevier Ltd},
title = {{The role of character strengths in adolescent romantic relationships: An initial        study on partner selection and mates' life satisfaction.}},
url = {http://www.ncbi.nlm.nih.gov/pubmed/22749517},
volume = {35},
year = {2012}
} 

@article{belbin1993,
author = {Belbin, R Meredith},
journal = {Journal of Occupational and Organizational Psychology},
number = {3},
pages = {259--260},
publisher = {Wiley Online Library},
title = {{A reply to the Belbin Team-Role Self-Perception Inventory by Furnham, Steele and Pendleton}},
volume = {66},
year = {1993}
}

在此示例中,Weber & Ruch (2012) 不应有发行号(因为它有 doi),而 Belbin (1993) 应有发行号(因为它没有 doi)。如果能提供解决方案,我将不胜感激 :)

答案1

我们可以使用以下测试来检测 bib 项目是否具有@articleDOI 字段,如果是,我们就删除number

\AtEveryBibitem{%
  \ifboolexpr{test {\ifentrytype{article}} and not test {\iffieldundef{doi}}}
    {\clearfield{number}}
    {}%
}

平均能量损失

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa, backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Weber2012,
  author    = {Weber, M. and Ruch, W.},
  doi       = {10.1016/j.adolescence.2012.06.002},
  issn      = {1095-9254},
  journal   = {Journal of adolescence},
  number    = {6},
  pages     = {1537--1546},
  pmid      = {22749517},
  publisher = {Elsevier Ltd},
  title     = {The Role of Character Strengths in Adolescent Romantic Relationships},
  subtitle  = {An Initial Study on Partner Selection and Mates' Life Satisfaction},
  url       = {http://www.ncbi.nlm.nih.gov/pubmed/22749517},
  volume    = {35},
  year      = {2012},
} 
@article{belbin1993,
  author    = {Belbin, R Meredith},
  journal   = {Journal of Occupational and Organizational Psychology},
  number    = {3},
  pages     = {259--260},
  publisher = {Wiley Online Library},
  title     = {A Reply to the {Belbin} {Team-Role} {Self-Perception} {Inventory} by {Furnham}, {Steele} and {Pendleton}},
  volume    = {66},
  year      = {1993},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\DeclareLanguageMapping{american}{american-apa}

\AtEveryBibitem{%
  \ifboolexpr{test {\ifentrytype{article}} and not test {\iffieldundef{doi}}}
    {\clearfield{number}}
    {}%
}

\begin{document}
  Some text \parencite{Weber2012,belbin1993}.

  \printbibliography
\end{document}

在此处输入图片描述

相关内容