jjmccollum / context-sbl

Society of Biblical Literature (SBL) style files for ConTeXt
2 stars 0 forks source link

context-sbl

Society of Biblical Literature (SBL) style files for ConTeXt

About This Project

I initially began developing this bibliography rendering for my own use, but since the SBL citation style is commonly used in the humanities (particularly in religious studies), I felt that a full implementation for the ConTeXt typesetting system would be of value for other users. Thankfully, David Purton had already put together a thorough implementation of this citation style for LaTeX (https://github.com/dcpurton/biblatex-sbl), so I was able to use his category definitions as starting points instead of reinventing the wheel. At the same time, since I had to build the .lua and .mkvi files mostly from scratch, I took advantage of opportunities to simplify certain implementation details. I will summarize the changes I made below.

Structure of the Bibliographic Database

In my opinion, one of the most useful innovations of the biblatex package (which Purton generally uses to good effect in biblatex-sbl) is its use of cross-references between BibTeX entries. This feature allows us to simplify the pool of fields used by different categories, modularize the structures of categories, and reduce redundancy of common higher-level references. In short, it allows (and encourages) users to structure their .bib files more like actual databases. I decided to implement this feature more generally and (for now) more strictly, eliminating the book*, main*, and revd* fields in favor of values in the crossref or xref fields. This is intended to be compatible with the biblatex cross-referencing convention, although (again) it is a bit stricter, as it does not work with entries that directly use the book*, main*, and revd* fields. Even separate @journal and @series entries are supported and can be cross-referenced with the journalxref and seriesxref fields (but the traditional journal, shortjournal, series, and shortseries fields are still supported).

Since some of the entry types that Purton adds on top of the basic biblatex types are functionally identical, I collapsed some of them to more common biblatex categories where this was feasible. My aim was to introduce as few new categories as possible so as to maximize compatibility with bibliographic databases already intended for use with biblatex. A brief summary of each category, starting from the top-level categories and working our way down, follows:

A relational diagram between the most commonly used categories is shown below.

Relational diagram of entry categories in SBL rendering

In the diagram above, solid lines indicate required cross-reference relationships (although in most cases, only one such relationship, if any, is required), and dashed lines indicate optional cross-reference relationships. Additional relationships can be encoded in the related field, such as reprints (relatedtype = {reprintof}) and translations (relatedtype = {translationof}); for the sake of space, these are not illustrated here. (For an example of both, see §6.2.5.)

Citation Alternatives

Given the hierarchical structure just described, it is natural to handle citations of lower-level entries that cross-reference higher-level entries recursively on the ConTeXt side. Because SBL formats bibliographic list entries, and long- and short-form inline citations all slightly differently, I chose to develop multiple citation alternatives for the rendering. The three main alternatives are the following:

The setups for these alternatives, in turn, are invoked in the setups for the following higher-level alternatives:

\setupnote
  [footnote]
  [location=none]

...

% Put this wherever you want endnotes to appear
\placenotes [footnote]

The SBL specification also includes the following alternatives, although they are mostly intended for internal use:

For more details, see https://www.mail-archive.com/ntg-context@ntg.nl/msg98667.html.

biblatex-style Citation Macros

Following the conventions of biblatex (but with some minor modifications to accommodate locators) the SBL specification also supports the following high-level commands that allow for more concise usage:

Support for CSL Locators

The SBL rendering also includes support for page number and other references specified using Citation Style Language (CSL) locators (https://github.com/citation-style-language/locales). The \loc macro can be used in anywhere in the text of your document or specified in the lefttext, altloctext, loctext, or righttext parameters of a citation. The preferred usage is to specify all locators assignment-style (e.g., \loc[vol=2,pt=1,p=12,fig=3]), but raw text inputs (e.g., \loc[1.3]) are also supported. Some examples follow:

\loc[p=xii,n={4, 7}] % an inline locator involving a page number in Roman numerals and multiple footnote numbers

\loc[fol={212\high{r}},col=2,l={18--20}] % an inline locator involving folio, column, and line numbers

\loc[pl=5,col=2,l=20]--\loc[col=3,l=2] % an inline locator involving plate, column, and line numbers that spans multiple columns in the same plate

\autocite[{\loc[127]][]{talbert:1992}

\autocite[{\loc[p=127]][]{talbert:1992} % same as previous, but more portable over different bibliographic styles

\autocite[{\loc[chap=1.3]}][]{reventlow:2009}

\autocite[{\loc[chap=3]\btxcomma\quotation{Introducing David}}][]{wright:2014}

\autocite[{\loc[sec=3] \paren{A I 11--17}}][{\loc[p=26]}][]{disappearanceofsungod} % "§ 3 (A I 11–17)" appears after the title of the ancient text, and "26" is cited as a page number in the book reproducing the text

\autocite[{obv. \loc[l={10--17}]}][{\loc[p={143--144}]}][]{ashurinscription} % "obv. lines 10–17" appears after the title of the ancient text, and "143–44" is cited as a page number in the book reproducing the text

\autocite[{See the discussion of ἐκρατοῦντο in}][][{\loc[vol=2,p=271]}][]{Str-B}.

\autocite[{\loc[sec=6.2.1]}][]{SBLHS}

\autocite[{\loc[sv={\quotation{ἐνθύημα}, \quotation{λεαίνω}}]}][]{LEH}

\autocite[{See}][][{\loc[p=8]}][{\btxcomma but there are also contradictory statements\btxcomma e.g. \loc[p=12].}]{Doe:Title} % locators can also be invoked in the lefttext or righttext; note, however, that \btxcomma must be used in place of the usual comma (otherwise ConTeXt will parse the bracketed argument incorrectly)

Other Options

The SBL specification includes several customizable options intended to give users a degree of flexibility approximating that offered by biblatex. Most of the options are intended to be specified up front via \setupbtx[sbl:cite], so that the biblatex-style citation macros can be used in place of ConTeXt's more verbose \cite commands. The most useful of these options are described below:

Special Formatting Rules

While I have tried to account for all cases in the examples using only category-based rules as much as possible, there are some types of entries within certain categories that need to be typeset slightly differently. These special type values are detailed below. (TODO: These will likely be changed to values for the options field, in accordance with biblatex conventions. Like everything else, they are subject to change as I continue to work through the issues for this project.)

type value Description Example(s)
seriesascollection In short-form citations, the series to which this entry belongs should be cited as if it were a collection containing it. Volumes of RIMA (§6.4.1.2) and texts in Migne's PG and PL series
useseriesshorthand In short-form citations, use the shorthand of the series to which this entry belongs as if it were this entry's shorthand. Volumes of ARM and ARMT (§6.4.1.2) and entries in the Loeb Classical Library series (§6.4.2)

Specification Coverage

The following cases (taken from https://github.com/dcpurton/biblatex-sbl/blob/master/test/biblatex-sbl-examples.ref.txt) should be covered by this rendering:

6.2 General Examples: Books

6.3 General Examples: Journal Articles, Reviews, and Dissertations

6.4 Special Examples

7 Other Examples

The publ-imp-sbl-test.bib file contains BibTeX entries for these examples, and the publ-imp-sbl-test.tex file demonstrates how to typeset them with various settings.

To Do

Most to-do tasks have been moved to the Issues tab. Things that others have volunteered to do are listed below: