5

I started using BibLaTeX with the APA style, and I noticed that if two dates are the same (including n.d.), a label will be added to the year (e.g. 2016b or n.d.-b). I would like to remove these.

Here is a 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}

with mwe.bib containing:

@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}
}

Output with dates: Labels 'a' and 'b' added after years

Output with no dates: Labels 'a' and 'b' added after entries with 'n.d.'

Is there any way to remove these labels? This assignment requires the APA style to be used. I am currently using MiKTeX v2.9.

  • But how can you then tell apart the two citations in the text? \AtEveryCitekey{\clearfield{extrayear}}\AtEveryBibitem{\clearfield{extrayear}} I believe you will lose APA compliance if you apply these changes, biblatex-apa adheres to the APA rules quite strictly. BTW: It should probably only be style=apa in the biblatex options. – moewe Apr 09 '16 at 15:51
  • @moewe I don't know, but my teacher doesn't want them. The answer you gave me works, though. – Nicolas Gnyra Apr 09 '16 at 15:53
  • 1
    Maybe you should ask your teacher what to do if you have two works from the same year by the same author. – moewe Apr 09 '16 at 15:56

2 Answers2

6

You can get rid of the extrayear fields with

\AtEveryCitekey{\clearfield{extradate}}
\AtEveryBibitem{\clearfield{extradate}}

You will probably lose APA compliance that way and finding the right entry in the bibliography becomes a game of chance.

edit Updated for changes in biblatex v3.8 that renamed extrayear to extradate.


A slightly simpler way to get rid of extradate is by ignoring it when the data is read on the LaTeX side. To do that we redefine the field input handler with \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}

moewe
  • 175,683
  • 1
    Is there a way to selectively get rid of the extrayear fields only when the year field is "n.d."? – Niko Fohr Aug 20 '16 at 15:15
  • @np8 Are you still using bibatex-apa? Anyway, I believe that warrants asking a new question (I haven't really checked, but it might be a bit more complicated than what I used here). – moewe Aug 21 '16 at 06:25
  • By biblatex-apa do you mean the style parameter? I have bibstyle=authoryear and citestyle=numeric-comp, but I have not used a style parameter. – Niko Fohr Aug 21 '16 at 08:26
  • @np8 Aha, would you mind posting a question with an MWE? Then I can have a look. (I just experimented with the styles you mention and did not see any "n.d.".) – moewe Aug 21 '16 at 11:03
0

Looks like they changed extrayear to extradate. So to update @moewe's answer:

\AtEveryCitekey{\clearfield{extradate}}
\AtEveryBibitem{\clearfield{extradate}}

https://github.com/CarlOrff/biblatex-archaeology/issues/7

j sad
  • 101