8

What is the ideological difference between CSL and bibtex/biblatex? I know there had been discussion here on how one can use CSL with LaTeX, but how (and why) they differ, and why there should exist several methods of styling citations/bibliographies is not obvious at all. Is it that while bib(la)tex is aimed at citing with LaTeX, CSL is aimed at citing with office suites like MS Word/LibreOffice? Which is more universal (and in what sense)? Why CSL seems to be more popular among software like Zotero and Mendeley (is writing styles simpler than in biblatex?)? Do other standardized systems for formatting citations/references exist, apart from CSL and bib(la)tex?

I had tried to tackle these questions myself. Frankly, I found the CSL specification not very illuminating (for me, biblatex is documented more rigorously). In fact, CSL does not even specify which metadata is required for which document type (well, in biblatex the division required/optional also became somewhat non-strict and style-dependent, but it's still there). Even more strange, the type definitions in CSL are not explained at all! E.g., what is the difference of just article from other articles (article-journal, article-magazine and article-newspaper)? Or the difference between post and post-weblog? Nowhere I could find the answers.

The particularly bizarre thing for me is the following. Both biblatex and CSL have the same ultimate goal: styling the citations and bibliographies. Yet, the overlap between CSL variables and biblatex data fields is roughly about 60-70%. How can they do the same thing with different data? E.g., there are no analogs in biblatex of, e.g., these CSL variables: archive_location, archive-place, call-number, medium, reviewed-author, illustrator, jurisdiction,... At the same time, there are no analogs in CSL of, e.g., these biblatex fields: subtitle, titleaddon, eprint, reprinttitle, origlanguage,...

Sorry that the questions are not strictly TeX-related, but where else can I hope to get the answer to them.

  • 1
    Though your question seems fairly clear (even if broad), may I ask if you have an agenda in this question (in the sense that you want to use this for solving a particular problem / making a particular choice). I ask because, even though one might compare biblatex and CSL in this sense, one does not really usually have a choice between them, given any particular setup for producing your overall text. So, in LaTeX, either BibTeX or biblatex. In M$Word or LibreOffice some of the major players in bibliography management provide CSL based structures. – gusbrs Jun 4 '18 at 19:04
  • 1
    The context for my question is that I'm developing a desktop app to manage bibliographic items. I found myself unhappy with the analogous software I happened to use (which exactly and why is a different topic :) ). So I want to make an app with the prime focus on accessibility to pdf-files (because I often have to read simultaneously many papers), but also would like to implement the functionality of citation manager, which, ideally, would support both bib(la)tex and CSL equally well. Hence, the question :) – Maximko Jun 5 '18 at 3:13
  • So for myself, there is actually no choice - I've been using bibtex for years (now switched to biblatex). But I thought native support for CSL would also be nice. – Maximko Jun 5 '18 at 3:15
  • 1
    see github.com/fiduswriter/biblatex-csl-converter for a converter between CSL BibLaTeX databases. – michal.h21 Jun 5 '18 at 9:00
  • 1
    @Maximko Please check the ultimate comparison of reference management software and the Wikipedia comparision for related work. - In JabRef we are working hard towards new features. Currently, we are working on full text search. Full biblatex support included. You are really invited to join the team to make JabRef even better. – koppor Jun 5 '18 at 11:40
8

This is probably not going to be a full answer, but maybe it can shed some light on the whole issue of CSL and biblatex.

History and introduction

biblatex development started back in 2006 with big milestones in 2008 and version 1.0 – the first official release – in 2010. According to Wikipedia, CSL came about at roughly the same time if maybe a little earlier (there are pages dating back to 2004 that are associated with it, Zotero supported CSL upon release in 2006).

biblatex basically is a reimplementation and reinvention of the BibTeX way of creating bibliographies that had been with the TeX world since the late 1980ies. With BibTeX the .bst files written in their own reverse Polish notation language determine the output of the bibliography. BibTeX compiles all the information from the .bib file and outputs it to the .bbl in the expected format, LaTeX then simply imports the .bbl and typesets its contents. With biblatex on the other hand the formatting is done on the LaTeX side. That means that bibliography styles and citation commands can be written in TeX, making it more accessible to those who don't want to learn the reverse Polish notation of BibTeX. The backend (BibTeX or Biber, the latter is needed to enjoy the full set of biblatex features) is reduced to extracting the relevant entries from the .bib file, sorting them and parsing them into a usable data structure for LaTeX. All this means that biblatex is still intricately tied to the LaTeX world and that is probably not of much use outside of it. biblatex's standard data model is an extension of the 'usual BibTeX data model' (i.e. those types and fields supported by the BibTeX styles). Even before biblatex a not insignificant number of functions of some bibliography packages was implemented on the LaTeX side and even more styles allowed modifications to be applied via LaTeX macros (think natbib, jurabib, ...), but biblatex offered a unified LaTeX interface for all levels of the style.

CSL is an XML-based language for citation and bibliography styles. It aims to be a universal language that can be used by all kinds of reference managers and word processors. From what I could see CSL has its own version of most – if not all – features of biblatex (I assume it has some features that biblatex does not have and that it can solve some things in a nicer way, I'm especially thinking about citation vs. bibliography sorting). The great advantage of CSL over biblatex is its community and reach: Many people seems to be using CSL and there is a vast number of styles available and ready to use. There are a number of biblatex styles available, but in the end people often end up having to do some modifications to their styles themselves. I assume this happens rarely with CSL styles.

The ideological difference

I don't actually think that there is a big ideological difference other than biblatex is basically LaTeX-only and CSL is supposed to be a universal standard.

Why should there exist different methods?

I assume things like this just happen. Furthermore I'd venture the guess that neither project was initially aware of the other.

BibTeX had been around for a while when biblatex was conceived, but it had been a bit complicated even for experienced TeX users because it used a different language altogether. biblatex is still backwards compatible with BibTeX and so the transition to biblatex was made easy for people. biblatex and BibTeX share the same .bib file base that has been around for years, people have become used to it, many programmes and website can export to .bib ... there is a .bib ecosystem – and once one gets the hang of it, .bib files are quite easy to use.

In the TeX world there is more to bibliographies than just biblatex: Why do amsrefs and biblatex co-exist? Why are there natbib and jurabib, ...?

CSL on the other hand was never only aimed at TeX and so it didn't really need TeX to get off the ground. Since TeX already had a working system for citations and bibliographies there never was a real need for a CSL implementation. I assume these two facts contributed to the result that we see today: No one has implemented CSL for LaTeX yet – and those that consider it would seriously have to ponder if the work spent on such a project is worth it.

Why is CSL popular among reference managers?

Because it is a well-developed standard (at least it seems to be to me) based on the ubiquitous XML that people are familiar with and can actually understand. biblatex on the other hand is written in LaTeX and configured in LaTeX, which means that if a software wanted to use it, it would have to parse LaTeX (in one way or another, not necessarily all of it, but XML seems easier).

I have never written a CSL style, but I would say that writing a CSL style looks easier than writing a biblatex style, especially if you are not familiar with LaTeX. The structure of the standard biblatex styles and most contributed styles (following the examples set by the standard styles) exhibit some idiosyncrasies that one might not necessarily follow if one were to write a biblatex style from scratch in a similar fashion to CSL, so the comparison might be a bit unfair: apa.csl weighs in at around 720 lines, while apa.bbx and apa.cbx (the main part of biblatex-apa) add up to around 2800 lines of code.

Small overlap

On paper the overlap between CSL and biblatex may indeed only be 60-70% (my feeling would be that the overlap is higher, but I haven't checked), but the differences are in field and entry types that are rarely used and not that common. If we add weights proportional to usage I'd say we end up at a level of overlap close to 90%. For the most part your average bibliography (a journal article with DOI, a book, a paper in a collection, a simple website ...) could probably be transferred from one system to the other without loss of information.

As to why the nominal overlap is smaller than one might expect for similar systems, that is probably just a matter of culture and who implemented it. I think it is fair to say that the development of BibTeX and biblatex was carried out by essentially one developer with input from the TeX community (mostly, but certainly not exclusively drawn up from STEM-related fields; biblatex is hugely influenced by the law-focussed jurabib project). CSL development seems to have been driven by one or two people in the beginning as well, but their input probably came not only from TeX, but from a more diverse or at least different group of people (Open/Libre Office, Zotero). Many of the fields from CSL that you list as missing in biblatex look like something a librarian might immediately think of. The fields listed as missing in CSL but present in biblatex are a more inhomogeneous bunch and it seems that they address specific issues that might be considered to be of minor importance by some (subtitle makes for shorter author-title citations where the subtitle can usually be dropped, titleaddon for additional notes, eprint for repositories such as the arXiv).

  • Awesome! Thanks. The only bit left unclear to me is why the CSL specification is rather sloppy about the definitions of entry types and variables, given the wide-spread usage of CSL. – Maximko Jun 5 '18 at 7:58
  • @Maximko I wondered about that as well. I could not find any specification about what the entry types mean, but I guess common sense helps for the often used ones. But I'm lost when it comes to post and post-weblog, that is probably a question for github.com/citation-style-language/documentation/issues. BTW: You may want to hold off accepting this answer, maybe someone else with a better perspective on CSL comes along and weighs in... – moewe Jun 5 '18 at 8:12
  • @Maximko A comment on the entrytypes and fields. My view is that, for any system, entrytypes and fields can be arbitrary, as long as they are defined in your style/system. You will find, e.g. biblatex-chicago with entrytype article but entrysubtype newspaper or magazine. I myself have at a customized data model archcollection and archdoclocus, which seem very much like CSL's archive_location, archive-place. I'd say this terminology is largely standardized, but is not so on several "fringe cases". But of course, the differences complicate the portability of the data. – gusbrs Jun 5 '18 at 11:55
  • @moewe I'm aware that biblatex in intimately tied to LaTeX, but would it, in principle, be possible to make it communicate with any other app? (I don't mean currently, but whether this would be doable). Or are we here really in the traditional "Only TeX can parse TeX"? – gusbrs Jun 5 '18 at 12:16
  • 1
    @gusbrs Mhhh, I guess in that case one would have to re-implement biblatex in a way that it outputs the results in a usable format. Due context could also mean the entire text as it should appear (biblatex has tests to check if things are on the same page, etc. etc.), so that could be a bit tricky. My money would have been on a implementing the general functions of biblatex and parsing .bbx and .cbx files... – moewe Jun 5 '18 at 13:47

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.