6

I had a look here but I was not able to adapt it to my case.

I want biblatex to print at the end of my bib entry the field addendum only in case the field indicates the original publication date Original work published \dddd\ but not if the field indicates that the work is a reprint (or for that matter in any other case). Please consider the following MWE.

\RequirePackage{filecontents}

\begin{filecontents*}{mybib.bib}
@book{test1,
    address = {Cambridge, {MA}},
    title = {The structural transformation of the public sphere: {An} inquiry into a category of bourgeois society},
    publisher = {MIT {Press}},
    author = {Habermas, Jürgen},
    translator = {Burger, Thomas and Lawrence, Frederick},
    year = {1989},
    addendum = {Original work published 1962}
}
@incollection{test2,
    address = {Cambridge, {MA}},
    title = {Deliberation and democratic legitimacy},
    booktitle = {Deliberative democracy: {Essays} on reason and politics},
    publisher = {MIT {Press}},
    author = {Cohen, Joshua},
    editor = {Bohman, James and Rehg, William},
    year = {1997},
    addendum = {Reprinted from {Hamlin} 1989 pp.17-34},
    pages = {67--91}
}
\end{filecontents*}

\documentclass{article}


% Set the values for the bibliography
\usepackage[
    style=apa,
    backend=biber,
    isbn=false,
    url=false,
    doi=false,
    eprint=false,
    hyperref=true,
    backref=false,
    firstinits=false,
]{biblatex}

% Recommended for biblatex
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage{xpatch}

% Set language
\usepackage[british]{babel}
\DeclareLanguageMapping{british}{british-apa}

\addbibresource{mybib.bib}

\begin{document}

\cite{test1}
\cite{test2}

\printbibliography
\end{document}

What I obtain is

output

but what I would like is to avoid printing the addendum in the first entry case, like this

output

8

Using biblatex+biber one can use source maps to nullify the content of bibtex fields

For the case in the question the following code does the trick (the regexp can be adjusted accordingly)

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=addendum, match=\regexp{[R|r]eprint.*},
            fieldset=addendum, null]
    }
  }
}

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.