citeproc-js bug in handling lists of mixed authors?


We’ve encountered a problem that I suspect is a bug in citeproc-js. I’m attaching the citeproc-json file. Note how there are a lot of authors, some of which have family/given names, and some of which are specified with “literal”.

The output that I’m getting has the order of the authors all wrong, for all of the three styles that we’re using. It seems that the literal authors are causing the processor to break. The outputs are below (sans some formatting).

Is this a known bug, or is there something I’m missing?


Vv V, Ww W, Xx X, et al. with Aa A, Bb B, Cc C et al., Literal J, Kk K, Ll L, Mm M et al., Literal U. Stuff and nonsense. My Favorite Journal. 2015;24(2):582-596. doi:10.1234/mfj/1234.


Vv, V et al. with Aa, A, B Bb, et al., Literal J and Kk, K, L Ll et al., Literal U. “Stuff and Nonsense.” My Favorite Journal 24.2 (2015): 582–596. PMC. Web. 6 Feb. 2015.


Vv, V., Ww, W., Xx, X., Yy, Y., Zz, Z., Aaa, A., … Fff, F. with Aa, A., Bb, B., Cc, C., Dd, D., Ee, E., Ff, F., … Ii, I., Literal J and Kk, K., Ll, L., Mm, M., Nn, N., Oo, O., Pp, P., … Tt, T., Literal U. (2015). Stuff and nonsense. My Favorite Journal, 24(2), 582–596. doi:10.1234/mfj/1234–
Chris Maloney
NIH/NLM/NCBI (Contractor)
Building 45, 4AN36D-12

FWIW, while Zotero does import/export single-field authors as literal
to CSL JSON when using export, it looks like it passes them on to
citeproc-js just as family with an empty given (or at least that’s
what ends up embeded in documents).

Odd. Maybe Frank can shed light on this.

Though I’m confused about the JSON you attached and the output you’re
getting–I only see 5 authors total (3 regular 2 literal) in the JSON,
so that couldn’t possibly produce what you have.


I think you’re seeing this, which dates back to the early development
of the processor:

When the “literal” element is used, the processor interprets it as an
institution. Authors listed before an institution name are grouped
with it in the rendered author list, as affiliated to the institution.
This works out nicely but for one detail - unaffiliated authors. To
capture that information in the simple list structure accepted by the
processor, unaffiliated authors are taken from the end of the list,
after the last institution. This is obviously confusing, since they
render at the beginning of the list in a citation, followed by "with"
to set them off from the author/institution groups that follow.

If you want institutional authors to be treated as first-class authors
in the list, just send them as a “family” element, with no “given”.
That’s what Zotero does - their intention with “single-field entry” in
the UI had not been to treat them as institutional authors, and they
were concerned about user confusion. (In the MLZ variant that I
maintain, single-field entries are sent to the processor as “literal”,
and are treated as institutions.)

It is unfortunate that the reversal of position can be alarming - but
on the other hand, we had to turn backflips in CSL to cope with the
scientists’ convention of placing the principle investigator at the
end of an author list. Sometimes there isn’t quite enough bandwidth in
a schema.

Anyway, I’m pretty sure that’s what’s going on with those. (I’ll now
brace myself for the onslaught of rotten tomatoes.)


Yes, sorry, I attached the wrong file. Here is the one that produced the
output I quoted.–
Chris Maloney
NIH/NLM/NCBI (Contractor)
Building 45, 4AN36D-12

“Sebastian Karcher” wrote:

4275071.testcase.json (2.91 KB)


Thanks for your detailed explanation.

I think we can adjust our output to conform to these conventions. (And,
anyway, I’m out of tomatoes at the moment!)

I created this issue,
proc-js-manual-with, to suggest that you update the citeproc-js manual
with this info — that seems to be the closest thing to a human-readable
description of the schema, and there’s no mention there of this
interpretation of the “literal” values.–
Chris Maloney
NIH/NLM/NCBI (Contractor)
Building 45, 4AN36D-12


I read the section that you linked to,
on, and I see that it says that this extension is enabled by default. Is
there any way to turn it off? (I’m running citeproc-js via citeproc-java).
I don’t see any mention of how to turn on/off extensions in the
Integrator’s Manual


Chris Maloney


In the current citeproc-js code, the only way of controlling
institution treatment is in the input data. That’s not good, and I
would like to fix it (and the documentation) for better control and

It’s a problem specific to citeproc-js, and I have some questions
about the requirements, so let’s take the discussion over to the
citeproc-js issue tracker:


Okay, thanks,
I created #173 - Fix institutional authors jiggery-pokery
Chris Maloney
NIH/NLM/NCBI (Contractor)
Building 45, 4AN36D-12

“Frank Bennett” wrote: