我开始使用 APA 风格的 BibLaTeX,我注意到如果两个日期相同(包括nd),则会在年份中添加标签(例如2016b或者钕铊)。我想删除这些。
以下是 MWE:
\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{mwe.bib}
\begin{document}
\cite{tutpnt1}
\cite{tutpnt2}
...
\printbibliography
\end{document}
包含mwe.bib
:
@online{tutpnt1,
author = {{TutorialsPoint}},
title = {{SLDC -- Iterative Model}},
url = {http://www.tutorialspoint.com/sdlc/sdlc_iterative_model.htm},
date = {},
urldate = {2016-04-09}
}
@online{tutpnt2,
author = {{TutorialsPoint}},
title = {{SLDC -- V-Model}},
url = {http://www.tutorialspoint.com/sdlc/sdlc_v_model.htm},
date = {},
urldate = {2016-04-09}
}
有什么方法可以删除这些标签吗?此作业要求使用 APA 样式。我目前使用的是 MiKTeX v2.9。
答案1
extrayear
你可以用
\AtEveryCitekey{\clearfield{extradate}}
\AtEveryBibitem{\clearfield{extradate}}
这样,您可能会失去 APA 合规性,并且在参考书目中找到正确的条目将成为一场机会游戏。
编辑biblatex
针对v3.8 中重命名extrayear
为 的变化进行了更新extradate
。
一个稍微简单的方法extradate
是,在 LaTeX 端读取数据时忽略它。为此,我们使用 重新定义字段输入处理程序\DeclareFieldInputHandler
。
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}
\DeclareFieldInputHandler{extradate}{\def\NewValue{}}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{sigfridsson}
\nocite{knuth:ct:b,knuth:ct:c}
\printbibliography
\end{document}
答案2
看起来他们已经改为extrayear
了extradate
。因此更新@moewe 的答案:
\AtEveryCitekey{\clearfield{extradate}}
\AtEveryBibitem{\clearfield{extradate}}