andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
85 stars 9 forks source link

void-function citeproc--option #62

Closed jkitchin closed 2 years ago

jkitchin commented 2 years ago

I am trying to use this csl file https://gist.githubusercontent.com/rmzelle/90150/raw/6e3cb4cceb19f77cb56b28befb3f7940bfe4cc9b/vancouver-superscript.csl

but I get an error that starts out with

Debugger entered--Lisp error: (void-function citeproc--option)
  (citeproc--option '((name . "collapse") (value . "citation-number")) context)
  (lambda (context) (citeproc--option '((name . "collapse") (value . "citation-number")) context)

Is that expected?

andras-simonyi commented 2 years ago

The error message is unfortunately not very informative, but looking at the style file it seems that it contains elements which are not allowed by the CSL standard versions targeted by citeproc-el (I checked both 1.0.1 and 1.0.2). Concretely, the `option' elements are illegal as far as I know (@bdarcus can probably comment on whether they were allowed in earlier versions).

denismaier commented 2 years ago

yep, that was valid in CSL 0.81: https://www.zotero.org/support/dev/citation_styles/csl_0.8.1_syntax In CSL 1.0 these option elements should be converted to attributes on the parent element (i.e., style, bibliography or citation).

bdarcus commented 2 years ago

Yeah, see here for the errors. It appears to be a really old style, based on a pre-1.0 version of CSL.

Note that version 1.0 and after (future) styles require a version attribute.

<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" ...>

Probably try one of these?

https://www.zotero.org/styles?q=vancouver-superscript

jkitchin commented 2 years ago

Thanks!