3

I need to create an annotated bibliography using the biblatex-sbl package. I have managed to hack something together by creating a custom bbx file, but I was introduced to xpatch as a possible, more elegant solution. After scanning the docs and reading a bit, I have not been able to find a solution of my own. The following is a sample of a working tex file:

\documentclass[letterpaper,12pt,oneside,openany]{book}

\usepackage{sbl-paper}
\usepackage[backend=biber]{biblatex}

\begin{filecontents}{selectedworks.bib}
@article{Sasson:1966aa,
    Author = {Sasson, Jack M.},
    Date-Added = {2017-10-27 23:26:58 +0000},
    Date-Modified = {2017-11-14 01:28:31 +0000},
    Issn = {0021-9231},
    Journaltitle = {Journal of Biblical Literature},
    Number = {4},
    Pages = {473-476},
    Title = {Circumcision in the Ancient Near East},
    Volume = {85},
    Year = {1966},
    Annote = {Annotation text.}}

@article{Polaski:1998aa,
    Author = {Polaski, Donald C.},
    Date-Added = {2017-10-27 23:24:22 +0000},
    Date-Modified = {2017-10-27 23:26:44 +0000},
    Issn = {03090892},
    Journaltitle = {Journal for the Study of the Old Testament},
    Number = {77},
    Pages = {55-73},
    Title = {Reflections on a Mosaic Covenant: The Eternal Covenant (Isaiah 24:5) and Intertextuality},
    Year = {1998},
    Annote = {Annotation text.}}

@article{Mor:2012aa,
    Author = {Mor, Menahem},
    Date-Added = {2017-10-27 23:19:43 +0000},
    Date-Modified = {2017-10-27 23:23:18 +0000},
    Issn = {12242284},
    Pages = {161-193},
    Title = {Are There Any New Factors Concering the Bar Kokhba Revolt?},
    Volume = {18},
    Year = {2012},
    Annote = {Annotation text.}}
\end{filecontents}

\addbibresource{selectedworks.bib}

\begin{document}

\nocite{Sasson:1966aa}
\nocite{Mor:2012aa}
\nocite{Polaski:1998aa}

\printbibliography[title=Annotated Bibliography]
\end{document}

The following is defined in the sbl.bbx:

\DeclareBibliographyDriver{article}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \newunit
  \usebibmacro{title}%
  \newunit
  \usebibmacro{bytranslator+others}%
  \newunit
  \usebibmacro{inissuetitle}%
  \newunit
  \printfield{version}%
  \newunit
  \printlist{organization}%
  \newunit
  \printfield{note}%
  \newunit
  \usebibmacro{shortjournal+issue}%
  \usebibmacro{pages}%
  \newunit
  \printfield{addendum}%
  \newunit
  \usebibmacro{issn}%
  \newunit
  \usebibmacro{doi+eprint+url}%
  \newunit
  \ifboolexpr{
    togl {relatedseen}
    or
    not togl {bbx:related}
  }
    {}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}%
  \usebibmacro{finentry}%
}

I want to add something like the following in order to incorporate the annotations:

  \par
  \usebibmacro{annotation}
  \newunit\newblock
1

1 Answer 1

3

You could use:

\xpatchbibdriver{article}{%
    \usebibmacro{finentry}%
    }{%
    \setunit\par
    \usebibmacro{annotation}%
    \newunit\newblock
    \usebibmacro{finentry}%
    }{}{}

enter image description here

According to xpatch's documentation, the sintax of xpatchbibdriver is:

\xpatchbibdriver{<name>}{<search>}{<replace>}{<success>}{<failure>}

So there we are searching for \usebibmacro{finentry}% in the bibdriver for article and replacing it with the added content of interest.

Or in full:

\documentclass[letterpaper,12pt,oneside,openany]{book}

\usepackage{sbl-paper}
\usepackage[backend=biber]{biblatex}
\usepackage{xpatch}

\begin{filecontents}{selectedworks.bib}
@article{Sasson:1966aa,
    Author = {Sasson, Jack M.},
    Date-Added = {2017-10-27 23:26:58 +0000},
    Date-Modified = {2017-11-14 01:28:31 +0000},
    Issn = {0021-9231},
    Journaltitle = {Journal of Biblical Literature},
    Number = {4},
    Pages = {473-476},
    Title = {Circumcision in the Ancient Near East},
    Volume = {85},
    Year = {1966},
    Annote = {Annotation text.}}

@article{Polaski:1998aa,
    Author = {Polaski, Donald C.},
    Date-Added = {2017-10-27 23:24:22 +0000},
    Date-Modified = {2017-10-27 23:26:44 +0000},
    Issn = {03090892},
    Journaltitle = {Journal for the Study of the Old Testament},
    Number = {77},
    Pages = {55-73},
    Title = {Reflections on a Mosaic Covenant: The Eternal Covenant (Isaiah 24:5) and Intertextuality},
    Year = {1998},
    Annote = {Annotation text.}}

@article{Mor:2012aa,
    Author = {Mor, Menahem},
    Date-Added = {2017-10-27 23:19:43 +0000},
    Date-Modified = {2017-10-27 23:23:18 +0000},
    Issn = {12242284},
    Pages = {161-193},
    Title = {Are There Any New Factors Concering the Bar Kokhba Revolt?},
    Volume = {18},
    Year = {2012},
    Annote = {Annotation text.}}
\end{filecontents}

\addbibresource{selectedworks.bib}

\DeclareBibliographyDriver{article}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \newunit
  \usebibmacro{title}%
  \newunit
  \usebibmacro{bytranslator+others}%
  \newunit
  \usebibmacro{inissuetitle}%
  \newunit
  \printfield{version}%
  \newunit
  \printlist{organization}%
  \newunit
  \printfield{note}%
  \newunit
  \usebibmacro{shortjournal+issue}%
  \usebibmacro{pages}%
  \newunit
  \printfield{addendum}%
  \newunit
  \usebibmacro{issn}%
  \newunit
  \usebibmacro{doi+eprint+url}%
  \newunit
  \ifboolexpr{
    togl {relatedseen}
    or
    not togl {bbx:related}
  }
    {}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}%
  \usebibmacro{finentry}%
}


\xpatchbibdriver{article}{%
    \usebibmacro{finentry}%
    }{%
    \setunit\par
    \usebibmacro{annotation}%
    \newunit\newblock
    \usebibmacro{finentry}%
    }{}{}


\begin{document}

\nocite{Sasson:1966aa}
\nocite{Mor:2012aa}
\nocite{Polaski:1998aa}

\printbibliography[title=Annotated Bibliography]
\end{document}
10
  • Brilliant! That worked perfectly. Thank you, so much. Not sure how I missed the syntax on \xpatchbibdriver, but it makes sense now.
    – Leonard
    Nov 15, 2017 at 22:40
  • What do you mean the code isn't compilable? It compiles OK for me using the current version of biblatex-sbl (2017/01/15 v0.8.1) and v3.8 of biblatex. (I'm the author of biblatex-sbl so if there's a problem, I'd like to fix it.) Nov 16, 2017 at 1:14
  • You don't need the DelcareBibliographyDriver{article}{...} lines BTW. Your patch works fine without it. Nov 16, 2017 at 1:19
  • @DavidPurton, it didn't work for me here (updated TL 2017). The use of sbl-paper threw me the error Illegal unit of measure (pt inserted). on line 6 of biblatex-sdf.def. Perhaps I'm missing something, but I thought I could still provide a meaningful answer and thus provided it using the OP's DeclareBibliographyDriver, which I assumed belonged to his custom bbx file, but lacked several of its macros. I'm I doing something wrong in loading of the package (or perhaps in compilation)? If, given this comment, you feel the answer should indeed be corrected or improved, I'll be glad to try.
    – gusbrs
    Nov 16, 2017 at 8:45
  • 1
    For the sake of completeness biblatex-sbl 0.8.2 is now in CTAN, TeXLive, and MikTeX, and will now not give errors with biblatex 3.8a. Nov 19, 2017 at 8:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .