[NTG-context] Citeproc

Taco Hoekwater taco at elvenkind.com
Tue Oct 6 09:25:50 CEST 2020



> On 5 Oct 2020, at 22:26, Denis Maier <denis.maier.lists at mailbox.org> wrote:
> 
> Am 05.10.2020 um 22:04 schrieb Hans Hagen:
>> if it's an xml spec then using lua makes not that much sense (no gain) .. just process the xml 
> Hmm, but the XML is just a descriptive grammar of how bibliographies and citations should be rendered. As Aditya has pointed out it's quite similar to the role of bst style files for bibtex. So, a citeproc will take a style file (in xml) and apply it to the metadata (based on the items actually cited in a document).

I recall discussing this idea with Bruce D’Arcus a long time ago (somewhere in the early 00-es, maybe).

The CSL files look like XML, but really they are more like a macro processing language. Parsing and interpreting that should not be all that hard, I expect. If I had to do this, I would convert the XML <macro> tags into actual lua functions while parsing the XML. The implied processing language is quite straightforward (unlike the stack-based postfix language in bibtex bst files). I don’t have time right now, but if someone reminds me in two months or so, I might have a go at it.

Best wishes,
Taco



More information about the ntg-context mailing list