Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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...

share|improve this question
    
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
add comment

1 Answer 1

up vote 4 down vote accepted

I think that this has to be done using \defbibenvironment as the entries to skip labelyear 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 extrayear disambiguation. I am using here a copy of the authoryear \defbibenvironment definition. If you are using a different style, simply copy its "bibliography" bib enviroinment definition and add \clearfield{extrayear} 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{extrayear}\item}

\addbibresource{test.bib}

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

enter image description here

share|improve this answer
    
Great! This is an excellent idea, and one that works perfectly for me! –  Christoph Jul 23 '12 at 23:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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