head's up on number styles and citation sorting/collapsing

People might want to take a look at this thread from a frustrated Zotero user:

http://forums.zotero.org/discussion/3579/multiple-citation-numbering-unpredictable-wrong/

Short summary:

He wants to use a numeric style (Science) that will yield citations
like [1, 3, 5] and [1-3]. In other words, they should be sorted, and
collapsed appropriately.

Problem: the style he was using specified no sort rule for the
citation. As a result, it seemed that the collapsing didn’t work
correctly as well (?).

My argument is that:

If a numeric style has the collapse set to true, it might be that you
need to assume you need to sort the citation by its number? Otherwise,
it seems not to make much sense.

Do we all agree with that, or not?

I also think that if I’m right above on the collapsing, that’s a bug in Zotero.

Bruce

Problem: the style he was using specified no sort rule for the
citation. As a result, it seemed that the collapsing didn’t work
correctly as well (?).

My argument is that:

If a numeric style has the collapse set to true, it might be that you
need to assume you need to sort the citation by its number? Otherwise,
it seems not to make much sense.

Do we all agree with that, or not?

No, we do not. If a style does not specify a citation sorting rule
either that is intentional or it is a bug. In the first case you
collapse only when collapsing is possible (because citation ordering
allows collapsing). In the second case you fix the bug in the style.

I also think that if I’m right above on the collapsing, that’s a bug in Zotero.

I didn’t grasp the specific issue of the cited thread at first sight,
but if the Zotero behaviour is due to the lack of citation ordering
rules in the style than its behaviour seems correct to me.

As a general rule, you do not change an implementation to fix a bug in
a style. This is necessary in order to have good quality styles.

Andrea

I guess it just depends on what we mean by “collapse.” Your conclusion
makes sense if we assume that “1, 3, 2” should not be collapsed. where
we then say that input for collapsing is an ordered list of integers.

I’m fine with that myself, but it seems also reasonable to expect a
different view: that the input for potential collapsing is just an
(unordered) list of integers. This is clearly what the user was
thinking.

Either way, we should write it down in the schema.

Bruce

No, we do not. If a style does not specify a citation sorting rule
either that is intentional or it is a bug. In the first case you
collapse only when collapsing is possible (because citation ordering
allows collapsing). In the second case you fix the bug in the style.

I guess it just depends on what we mean by “collapse.” Your conclusion
makes sense if we assume that “1, 3, 2” should not be collapsed. where
we then say that input for collapsing is an ordered list of integers.

I’m fine with that myself, but it seems also reasonable to expect a
different view: that the input for potential collapsing is just an
(unordered) list of integers. This is clearly what the user was
thinking.

I agree that collapsing an unordered list of integers would make
sense, but not collapsing it would increase the language
expressiveness, while collapsing would reduce it. Do you agree with
that?

Either way, we should write it down in the schema.

I agree.

Best,
Andrea

No, we do not. If a style does not specify a citation sorting rule
either that is intentional or it is a bug. In the first case you
collapse only when collapsing is possible (because citation ordering
allows collapsing). In the second case you fix the bug in the style.

I guess it just depends on what we mean by “collapse.” Your conclusion
makes sense if we assume that “1, 3, 2” should not be collapsed. where
we then say that input for collapsing is an ordered list of integers.

I’m fine with that myself, but it seems also reasonable to expect a
different view: that the input for potential collapsing is just an
(unordered) list of integers. This is clearly what the user was
thinking.

I agree that collapsing an unordered list of integers would make
sense, but not collapsing it would increase the language
expressiveness, while collapsing would reduce it. Do you agree with
that?

To me that per se is not an important question; the question is
whether collapsing it could ever have unintended consequences.

Either way, we should write it down in the schema.

I agree.

So we have two options:

A. collapse applies to lists of integers after sorting, and therefore
will not work unless the citations are sorted according to the
‘citation-number’ variable.

B. collapse applies to a list of integers, where those integers are
sorted by default according to the ‘citation-number’ variable.

I guess unless someone has any objections going with A, we’ll do that.

Suggestions on better wording appreciated in any case.

Bruce