citeproc-js bug?

Maybe it's just too late here, but I'm getting unexpected results with Zotero 4.0.29.11.

The stripped down style at https://gist.github.com/rmzelle/07cc20759b6dba413771db822974912d has the following code:


<citation>
<layout prefix="(" suffix=")" delimiter=",, ">
<text term="figure" form="short"/>
<text variable="citation-number"/>
</layout>
</citation>


The CSL spec says "When used within cs:citation, the delimiter attribute may be used to specify a delimiter for cites within a citation.". However, I'm seeing (with Zotero's CSL editor):

Individual Citations
(fig.,, 1)
(fig.,, 2)
Single Citation (with position "first")
(fig.,, 1,, fig.,, 2)
This should be

Individual Citations
(fig.1)
(fig.2)
Single Citation (with position "first")
(fig.1,, fig.2)
right?
  • Yes. Same issue as here:
    https://forums.zotero.org/discussion/62008/use-of-eg-with-numbered-citations/#Item_16
  • Ah. Doesn't that affect a large number of styles? Does it go wrong whenever there is a delimiter of cs:layout?
  • No. It's a bug, and I'll follow up later with a fix, but it's unlikely styles other than this one will be affected.
  • (Well, not many styles other than this one.)
  • (afaict it only affects numeric styles, where we rarely have this combination).
  • edited September 6, 2016
    The timing is good. I was just getting ready to announce fixes for a couple of other bugs, one of which required delving into the part of the code where this bug also lives—so it's a grudge match, and one that we're likely to win.

    More in a bit.
  • The fix is done, so this issue will soon go away.

    It's getting later here, I'll bundle up a release tomorrow morning.
  • This delimiter bug has been addressed, in citeproc-js release 1.1.119.

    For testing, and for projects requiring an immediate fix, install one of the Propachi plugins to run the revised processor in current Zotero. The plugin should be removed at the next Zotero update.
  • edited September 6, 2016
    Thanks, Frank.

    The updated processor is now available in the latest 4.0 and 5.0 Betas of Zotero for Firefox.
  • Dan,

    Just posted another update (tag 1.1.120), to address the bug reported here. After discovering that the 1.1.119 fixes didn't address that bug (failure of subsequent-author-substitute with macros shared between cs:citation and cs:bibliography), I initially thought it would be too difficult to fix, at least in the short term. Found a solution, though, and I think this clears all of the bugs that I know about.
  • OK, the 4.0 Beta is updated to 1.1.121.
Sign In or Register to comment.