Editing Citation Style Language (CSL) files

The big picture is that I’m trying to produce a document which complies with the SBL Style Guide. This means there are an annoying number of edge cases, which in LaTeX are dealt with comprehensively by the biblatex-sbl style. That style has a very helpful list of test cases which can be viewed here:

https://github.com/dcpurton/biblatex-sbl/blob/master/doc/biblatex-sbl-examples.pdf

Some of the types I don’t think are obvious are found in section 6.4 of that PDF, and in section 7. This is simply getting the citations right. I’m very happy to cooperate in helping to get these going in pandoc-citeproc as it would truly liberate me from needing to use LaTeX.

Bonus features would then be adding the citations to an abbreviations list (no doubt would need a pandoc filter of some sort), indexing, and multiple bibliographies that appropriately split for example primary and secondary sources.

I think everything would make pandoc and/or quarto more useful generally for humanities subjects, as while SBL is specific to biblical studies many of the conventions are similar in classics, etc.

2 Likes

@lyndondrake, that is quite a handful to build from scratch, I think. When I had to prepare a style for my phd thesis, I took a style that seemed closest, made a list of the necessary changes for it to comply with what I needed, then used the CSL editor to alter file. If you could find such a style, produce this list of necessary changes, and provide the relevant references to test them, I would be happy to help out by taking them for a spin in the CSL Editor.

What do you think?

Bernardo, on this topic: do you know of a simple parenthetical in-text author-date style that has only one comma after the final author: e.g. (Barry and Barry, 2003)? I found one that I thought worked for me (it’s mis-quarterly.csl), but this CSL strangely doesn’t always produce in-text citations whose order fits what’s in pandoc. That is, “[@Barry2003, p. 13; @Larry1999, p. 2]” sometimes produces "(Larry 1999, p. 2; Barry and Barry 2003, p. 13).

Thanks for any pointers.

@jpkell, sure, this is possible. You are looking for lines 280-283 of the CSL file:

I made some changes, but I haven’t tested it very extensively.

mis-quarterly-2.csl.zip (2.8 KB)

Let me know if this helps.

1 Like

Amazing! This worked great. Thanks so much!

1 Like

That sounds like a sensible way forward. There is an SBL CSL style already. I hadn’t thought about modifying it. Maybe the best option would be if I produce a pandoc-flavoured Markdown file which has citations of the various types, and we can compare the output with what might be intended? Even if it’s only gradually chipping away at the needed modifications it offers me a way forward towards getting it in good shape

1 Like

Sounds like a plan, @lyndondrake!

@AmberV, perhaps we could split this off from here into a separate thread on CSL style files? They are getting increasingly important to academic users, I believe.

EDIT: Thank you, Amber!

2 Likes

So for those who want to try CSL modification, the online visual / code editor is really helpful:

https://editor.citationstyles.org/visualEditor/

CSL is XML-based, so it is quite verbose but pretty logical and self-documenting. For the nitty-gritty deails the docs are here:

2 Likes