dcpurton / biblatex-sbl

Society of Biblical Literature (SBL) style files for biblatex
24 stars 5 forks source link

Creating an Annotated Bibliography #62

Closed lenrsmith closed 6 years ago

lenrsmith commented 6 years ago

I need to create an annotated bibliography for a class. There are some threads on tex.stackexchange.com, but none quite get me there. Do you have any resources you can point to that I can use to create a well-formatted annotated bibliography?

lenrsmith commented 6 years ago

Made a little progress on my own. I copied sbl.bbx to sbl-annotate.bbx so that I would have something to play with. I then inserted the following starting at line 24:

\DeclareFieldFormat{annotation}{\bibstring{annotation}\addcolon\space #1}

\newbool{bbx:annotation}

\DeclareBibliographyOption[boolean]{annotation}[true]{%
  \setbool{bbx:annotation}{#1}}

At the end of the article driver, originally around line 107, I inserted:

\ifbool{bbx:annotation}
    {\par\usebibmacro{annotation}%
     \newunit\newblock}
    {}%

I adapted the above from the biblatex 'reading' style. In addition to the bbx file, I needed to make copies of the cbx and dbx files. So, there are three new files: sbl-annotate.bbx, sbl-annotate.cbx, and sbl-annotate.dbx.

After running texhash in the texmf folder for biblatex-sbl, I was able to use \RequirePackage[style=sbl-annotate,annotation=true,indexing=cite,backend=biber]{biblatex} in my 'sty' file to get things working.

It's not the most elegant solution but it works, for now. I'd love to know if there is a better way.

dcpurton commented 6 years ago

This kind of question is better suited to stack exchange. You don't have to make a new bbx file though. You can easily patch any bibmacro and bibdriver using the xpatch package (look for \xpatchbibmacro and \xpatchbibdriver in the manual. Everything can go in your preamble and you keep using style=sbl. This is better, since when updates are made to the main biblatex-sbl files you don't have to re-create your modified file. Just make sure you give a good minimal working example with bibliography when you ask your question on stack exchange and you will get an answer within a few hours.