11

I have a document with multiple bibliographies (generated with biblatex and biber). I am wondering if it is possible to suppress the generation of a letter after the year (extrayear) for only one if the bibliographies.

From a previous question, I learned that the label can be suppressed through various tweaks in the preamble, but that affects all bibliographies, of course.

From the biblatex manual (p. 188 in version 2.0) , I understand that I can deactivate the label on a per-entrytype basis, but that will not do in my case. The manual also states that customization of labelyear is not possible on a per-item/per-entry basis (Appendix D).

So my question is whether there is a workaround to suppress the label anyway, for example on a per bibliography basis or a per keyword basis.

I am thinking, for example, of a combination of \AtEveryBibitem and some if/then loop that filters for keywords. But I am unfortunately unable to program such a thing...

  • It depends on whether you want to simply suppress the generated extrayear label or not generate it at all. The former scenario would lead to strange gaps in the label disambiguation. The latter would need a biber change and it's not clear that this wouldn't be a bit misleading and tricky to implement. I think we'll need a use case to see what's intended. – PLK Jul 17 '12 at 12:20
  • okay, so I'll try to clarify this a bit: the bibliography that should not have the labels is just a bibliography, there is no text with citations that might refer to this list of titles. Therefore no disambiguation is necessary. This would be easy to achieve by setting labelyear=false in the preamble. However, there is another bibliography in the same document which is a "normal" list of references, i.e. it comes with a text with citations and all. So disambiguation is needed here which means it cannot be turned off in the preamble. – Christoph Jul 18 '12 at 22:15
  • @PLK: supressing the label is the right option. not generating might cause problems if certain keys are used in both bibliographies and need disambiguation. Do you still need a use case? If so, do you mean a full working example? – Christoph Jul 18 '12 at 22:19
7

I think that this has to be done using \defbibenvironment as the entries to skip labeldate disambiguation on are not necessarily only in one bibliography, as you say. You can't use \AtEveryBibItem as this is global and applies to all bibliographies. How about this - you simply define a new bibliography environment and use this when you want a bibliography without extradate disambiguation. I am using here a copy of the authoryear \defbibenvironment definition. If you are using a different style, simply copy its "bibliography" bib environment definition and add \clearfield{extradate} at the beginning of the itemcode argument:

\begin{filecontents}{test.bib}
@BOOK{test1,
  AUTHOR    = {Alan Ambiguous},
  TITLE     = {The Annals of Ambiguity},
  DATE      = {1934}
}
@BOOK{test2,
  AUTHOR    = {Alan Ambiguous},
  TITLE     = {Unambiguous Unknowns},
  DATE      = {1934}
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authoryear]{biblatex}

\defbibenvironment{nodis}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\clearfield{extradate}\item}

\addbibresource{test.bib}

\begin{document}
\cite{test1} \cite{test2}
\printbibliography
\printbibliography[env=nodis]
\end{document}

enter image description here

  • Great! This is an excellent idea, and one that works perfectly for me! – Christoph Jul 23 '12 at 23:34
  • 1
    This solution doesn't work anymore with newer versions of biblatex. You need to write extradate instead of extrayear now. – Mil Jan 7 '18 at 14:05
  • Edited for newer versions. – PLK Jan 7 '18 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.